/* ============================================
   SMILINGFLYER INTERACTIVE MAP STYLES
   Light, clean, adventure-friendly design
   ============================================ */

/* --- Map Container --- */
.map-section {
  padding: 0;
  position: relative;
  background: #F5F0EB;
}

.map-section-inner {
  max-width: 100%;
  margin: 0 auto;
}

.map-header {
  text-align: center;
  padding: 60px 24px 30px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F0EB 100%);
}

.map-header .section-label {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-size: 0.85rem;
  color: #D4883A;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 12px;
  display: block;
}

.map-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.8rem;
  color: #1B3A2D;
  margin-bottom: 12px;
}

.map-header p {
  font-size: 1.05rem;
  color: #6B7B73;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Map Filters --- */
.map-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 24px 24px;
  background: #F5F0EB;
  flex-wrap: wrap;
}

.map-filter-btn {
  padding: 10px 22px;
  border: 2px solid #CCC4BB;
  border-radius: 50px;
  background: #FFFFFF;
  color: #5A6B63;
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.map-filter-btn:hover {
  border-color: #D4883A;
  color: #D4883A;
  background: #FFF8F0;
}

.map-filter-btn.active {
  background: #D4883A;
  border-color: #D4883A;
  color: #FFFFFF;
}

.map-filter-btn[data-leg="1"].active { background: #2E86AB; border-color: #2E86AB; }
.map-filter-btn[data-leg="2"].active { background: #A23B72; border-color: #A23B72; }
.map-filter-btn[data-leg="3"].active { background: #F18F01; border-color: #F18F01; }
.map-filter-btn[data-leg="4"].active { background: #C73E1D; border-color: #C73E1D; }

/* --- Map Element --- */
#journey-map {
  width: 100%;
  height: 550px;
  background: #E8E0D8;
  position: relative;
  z-index: 1;
  border-top: 1px solid #DDD5CC;
  border-bottom: 1px solid #DDD5CC;
}

/* --- Map Stats Bar --- */
.map-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #FFFFFF;
  border-top: 1px solid #EDE8E3;
}

.map-stat-item {
  text-align: center;
  padding: 30px 16px;
  border-right: 1px solid #EDE8E3;
}

.map-stat-item:last-child {
  border-right: none;
}

.map-stat-value {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #D4883A;
  line-height: 1;
  margin-bottom: 6px;
}

.map-stat-label {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #8A9B93;
}

/* --- Map Legend --- */
.map-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px 24px;
  background: #F5F0EB;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #5A6B63;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* --- Leaflet Popup Customization --- */
.sf-popup-container .leaflet-popup-content-wrapper {
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #E0D8D0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 0;
}

.sf-popup-container .leaflet-popup-content {
  margin: 0;
  padding: 0;
}

.sf-popup-container .leaflet-popup-tip {
  background: #FFFFFF;
  border: 1px solid #E0D8D0;
  border-top: none;
  border-left: none;
}

.sf-popup-container .leaflet-popup-close-button {
  color: #999;
  font-size: 18px;
  top: 8px;
  right: 10px;
}

.sf-popup-container .leaflet-popup-close-button:hover {
  color: #D4883A;
}

.sf-popup {
  padding: 18px 20px;
  min-width: 200px;
}

.sf-popup-leg {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.sf-popup-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1B3A2D;
  margin-bottom: 4px;
}

.sf-popup-date {
  font-size: 0.8rem;
  color: #8A9B93;
  margin-bottom: 8px;
}

.sf-popup-desc {
  font-size: 0.85rem;
  color: #5A6B63;
  line-height: 1.5;
}

/* --- Leaflet Controls Customization --- */
.leaflet-control-zoom a {
  background: #FFFFFF !important;
  color: #1B3A2D !important;
  border: 1px solid #DDD5CC !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
}

.leaflet-control-zoom a:hover {
  background: #F5F0EB !important;
  color: #D4883A !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

/* Custom marker reset */
.sf-marker {
  background: none !important;
  border: none !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  #journey-map {
    height: 400px;
  }

  .map-header h2 {
    font-size: 2rem;
  }

  .map-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .map-stat-item {
    padding: 20px 12px;
  }

  .map-stat-value {
    font-size: 1.5rem;
  }

  .map-filters {
    gap: 6px;
  }

  .map-filter-btn {
    padding: 8px 16px;
    font-size: 0.7rem;
    letter-spacing: 1px;
  }

  .map-legend {
    gap: 12px;
  }

  .legend-item {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  #journey-map {
    height: 350px;
  }

  .map-header {
    padding: 40px 16px 20px;
  }

  .map-header h2 {
    font-size: 1.6rem;
  }
}
