/* Service Area Map - Interactive SVG Map Styles
 * Gajeni Courier Services - 2025
 * Follows BEM methodology with gj- namespace
 */

.service-area-section {
  padding: 5rem 0;
  background-color: var(--color-background-surface);
  position: relative;
  overflow: hidden;
}

.service-area-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.service-area-content {
  background-color: var(--color-raw-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.service-area-content h2 {
  font-size: var(--font-size-xl);
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.service-area-content h2::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--color-brand-primary);
}

.service-area-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-area-column h3 {
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.service-area-column h3::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 25px;
  height: 2px;
  background-color: var(--color-brand-primary);
}

.service-area-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-area-column li {
  padding: 0.5rem 0;
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}

/* Removed bullet dots per client request */
.service-area-column li {
  padding-left: 0.5rem;
}

.service-area-timeline {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.service-area-timeline h3 {
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.service-area-timeline h3::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 25px;
  height: 2px;
  background-color: var(--color-brand-primary);
}

.delivery-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.delivery-timeline li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm);
}

.delivery-timeline li:last-child {
  border-bottom: none;
}

.delivery-region {
  font-weight: 500;
  color: var(--color-text-primary);
}

.delivery-time {
  color: var(--color-brand-primary);
  font-weight: 600;
}

.service-area-note {
  font-size: var(--font-size-sm);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  color: var(--color-text-secondary);
}

.service-area-note a {
  color: var(--color-brand-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: color 0.2s ease;
}

.service-area-note a:hover {
  color: var(--color-brand-primary-dark);
  text-decoration: underline;
}

/* Interactive Map Styles */
.service-area-map {
  position: relative;
}

.service-map-container {
  background-color: var(--color-raw-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

/* SVG Map Styles */
.sa-map-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  max-width: 100%; /* Allow the map to fill the full container */
}

.sa-map {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Province Styles */
.sa-map__province {
  fill: rgba(0, 0, 0, 0.05);
  stroke: rgba(0, 0, 0, 0.1);
  stroke-width: 1;
  transition: all 0.3s ease;
}

.sa-map__province--other {
  fill: rgba(0, 0, 0, 0.03);
}

.sa-map__province--free-state {
  fill: rgba(217, 45, 39, 0.08);
  stroke: rgba(217, 45, 39, 0.3);
}

.sa-map__province--gauteng {
  fill: rgba(11, 31, 63, 0.08);
  stroke: rgba(11, 31, 63, 0.3);
}

/* Province Hover Effects */
.sa-map__province--free-state:hover,
.sa-map__province--gauteng:hover {
  filter: brightness(1.2);
  cursor: pointer;
}

/* City Marker Styles */
.sa-map__city-marker circle {
  fill: rgba(11, 31, 63, 0.6);
  stroke: white;
  stroke-width: 2;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sa-map__city-marker--hq circle {
  fill: var(--color-brand-primary);
  stroke: white;
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(217, 45, 39, 0.3));
}

.sa-map__city-marker text {
  fill: var(--color-text-primary);
  font-size: 14px;
  font-weight: 500;
  text-anchor: middle;
  opacity: 0.7;
  transition: all 0.3s ease;
  pointer-events: none;
}

.sa-map__city-marker--hq text {
  font-weight: 700;
  fill: var(--color-brand-primary);
}

/* City Marker Hover Effects */
.sa-map__city-marker:hover circle {
  r: 10;
  fill: rgba(11, 31, 63, 0.8);
}

.sa-map__city-marker--hq:hover circle {
  r: 12;
  fill: var(--color-brand-primary);
}

.sa-map__city-marker:hover text {
  opacity: 1;
  font-weight: 600;
}

/* Route Lines */
.sa-map__route {
  stroke: var(--color-text-secondary);
  stroke-width: 1.5;
  stroke-dasharray: 5, 5;
  stroke-linecap: round;
  fill: none;
  opacity: 0.6;
}

.sa-map__route--primary {
  stroke: var(--color-brand-primary);
  stroke-width: 2.5;
  stroke-dasharray: none;
  opacity: 0.8;
}

/* Map Legend */
.sa-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background-color: rgba(0, 0, 0, 0.02);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  justify-content: center;
}

.sa-map-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sa-map-legend__color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

.sa-map-legend__color--free-state {
  background-color: var(--color-brand-primary);
}

.sa-map-legend__color--gauteng {
  background-color: var(--color-brand-primary-dark);
}

.sa-map-legend__color--other {
  background-color: var(--color-gray-200);
  border: 1px solid var(--color-gray-400);
}

.sa-map-legend__color--hq {
  background-color: var(--color-brand-secondary);
  border: 2px solid var(--color-raw-white);
}

.sa-map-legend__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Map Info Section */
.sa-map-info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.sa-map-info__title {
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.sa-map-info__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.sa-map-info__features {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.sa-map-info__feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: var(--color-raw-white);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.sa-map-info__feature-icon {
  color: var(--color-brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
}

.sa-map-info__feature-text h4 {
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-size: var(--font-size-md);
}

.sa-map-info__feature-text p {
  margin-bottom: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* City Details Section */
.sa-map-city-details {
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border-left: 3px solid var(--color-brand-primary);
}

.sa-map-city-details__content {
  display: none;
}

.sa-map-city-details__content h4 {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 0.5rem;
}

.sa-map-city-details__content p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0.5rem 0;
  line-height: 1.5;
}

.sa-map-city-details__content[data-city="Sasolburg"] {
  display: block; /* Show Sasolburg by default */
}

/* Responsive Adjustments */
@media screen and (max-width: 992px) {
  .service-area-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .sa-map-info__features {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  .sa-map-wrapper {
    max-height: 350px;
  }
  
  .sa-map-legend {
    flex-wrap: wrap;
  }
  
  .sa-map-legend__item {
    margin-bottom: 0.5rem;
  }
  
  .delivery-timeline li {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0;
  }
  
  .delivery-time {
    margin-top: 0.25rem;
  }
}

@media (max-width: 576px) {
  .service-area-content,
  .service-map-container {
    padding: 1.25rem;
  }
  
  .sa-map-wrapper {
    max-width: 100%;
  }
}
