/**
 * Enrollment Sites — map section. Uses site primary palette.
 * Scoped under .spc-sites. Vanilla tabs + map + list (no Bootstrap).
 */
.spc-sites {
  --spc-primary-color: #2563eb;
  --spc-secondary-color: #1d4ed8;
  --spc-accent-color: #60a5fa;
  --spc-light-color: #f8f9fa;
  --spc-dark-color: #1f2937;
}

.spc-sites.maps-home {
  padding: 60px 0;
  background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
}
.dark .spc-sites.maps-home {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.spc-sites .maps-home__wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.spc-sites .maps-home__title {
  text-align: center;
  margin-bottom: 40px;
}

.spc-sites .maps-home__title .title-s {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--spc-primary-color);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.spc-sites .maps-home__title h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 0;
}

.spc-sites .color-gradient {
  background: linear-gradient(90deg, var(--spc-primary-color), var(--spc-secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.spc-sites .map-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background-color: white;
  margin-bottom: 30px;
  height: 500px;
}
.dark .spc-sites .map-container {
  background-color: #1e293b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.spc-sites .map-tab {
  height: 100%;
  width: 100%;
  border-radius: 12px;
}

/* Tab list and buttons (vanilla, no Bootstrap) */
.spc-sites .spc-tab-list {
  list-style: none;
  margin: 0 0 30px 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.spc-sites .spc-tab-item {
  margin: 0;
}

.spc-sites .spc-tab-btn {
  border: none;
  background-color: white;
  color: var(--spc-dark-color);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
}
.dark .spc-sites .spc-tab-btn {
  background-color: #1e293b;
  color: #e2e8f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.dark .spc-sites .spc-tab-btn:hover {
  background-color: #334155;
}

.spc-sites .spc-tab-btn svg.spc-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  flex-shrink: 0;
}

.spc-sites .spc-tab-btn.active {
  background: linear-gradient(90deg, var(--spc-primary-color), var(--spc-secondary-color));
  color: white;
}

.spc-sites .spc-tab-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

/* Tab content and panes */
.spc-sites .spc-tab-content {
  position: relative;
}

.spc-sites .spc-tab-pane {
  display: none;
}
.spc-sites .spc-tab-pane.active {
  display: block;
}

.spc-sites .spc-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.spc-sites .spc-tab-col-map {
  flex: 1 1 66%;
  min-width: 280px;
}
.spc-sites .spc-tab-col-list {
  flex: 1 1 280px;
  min-width: 260px;
}

.spc-sites .location-list {
  max-height: 500px;
  overflow-y: auto;
  padding: 15px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.dark .spc-sites .location-list {
  background-color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.spc-sites .location-item {
  padding: 15px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 4px solid var(--spc-primary-color);
}
.dark .spc-sites .location-item {
  border-bottom-color: #334155;
}

.spc-sites .location-item:hover {
  background-color: #eff6ff;
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.dark .spc-sites .location-item:hover {
  background-color: rgba(37, 99, 235, 0.15);
}
.spc-sites .location-item.active {
  background-color: #dbeafe;
  border-left: 4px solid var(--spc-accent-color);
}
.dark .spc-sites .location-item.active {
  background-color: rgba(37, 99, 235, 0.25);
}

.spc-sites .location-name {
  font-weight: 600;
  color: var(--spc-primary-color);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.spc-sites .location-name svg.spc-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
}

.spc-sites .location-address {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 5px;
}
.dark .spc-sites .location-address { color: #94a3b8; }

.spc-sites .location-phone {
  font-size: 14px;
  color: #4b5563;
}
.dark .spc-sites .location-phone { color: #94a3b8; }

.spc-sites .location-type {
  display: inline-block;
  padding: 3px 8px;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}

.spc-sites .type-all { background-color: var(--spc-primary-color); }
.spc-sites .type-kinshasa { background-color: var(--spc-secondary-color); }
.spc-sites .type-kongo-central { background-color: #4CAF50; }
.spc-sites .type-haut-katanga { background-color: #FF9800; }

.spc-sites .leaflet-popup-content {
  width: 250px !important;
}

.spc-sites .popup-title {
  font-weight: 600;
  color: var(--spc-primary-color);
  margin-bottom: 5px;
}

.spc-sites .popup-address {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.spc-sites .popup-phone {
  font-size: 14px;
  color: #666;
}

.spc-sites .custom-marker {
  background-color: var(--spc-accent-color);
  border: 2px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  width: 24px;
  height: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  margin-left: 0;
  margin-top: 0;
}

.spc-sites .custom-marker .spc-pin-point {
  display: none;
}

.spc-sites .marker-kinshasa { background-color: var(--spc-secondary-color); }
.spc-sites .marker-kongo-central { background-color: #4CAF50; }
.spc-sites .marker-haut-katanga { background-color: #FF9800; }

.spc-sites .leaflet-container {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.spc-sites .leaflet-tile-pane {
  opacity: 0.7;
}

.spc-sites .leaflet-control-zoom a {
  background-color: white;
  color: var(--spc-primary-color);
}

.spc-sites .leaflet-control-zoom a:hover {
  background-color: var(--spc-primary-color);
  color: white;
}

.spc-sites .spc-locate-wrap {
  margin-bottom: 15px;
}

.spc-sites .spc-locate-btn {
  width: 100%;
  padding: 10px 16px;
  font-weight: 600;
  color: white;
  background: linear-gradient(90deg, var(--spc-primary-color), var(--spc-secondary-color));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spc-sites .spc-locate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.spc-sites .spc-locate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spc-sites .spc-locate-msg {
  font-size: 13px;
  margin-top: 8px;
  color: #666;
}

.spc-sites .spc-locate-msg.error { color: #dc3545; }
.spc-sites .spc-locate-msg.ok { color: #28a745; }

@media (max-width: 768px) {
  .spc-sites .maps-home__title h2 {
    font-size: 28px;
  }

  .spc-sites .spc-tab-btn {
    padding: 10px 15px;
    font-size: 14px;
  }

  .spc-sites .map-container {
    height: 400px;
  }

  .spc-sites .location-list {
    max-height: 400px;
  }
}
