/* ── Locations page ───────────────────────────────────── */

/* HERO */
.loc-hero {
  padding: 64px 0 32px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(34,197,94,0.08), transparent 60%),
    var(--color-bg);
}

.loc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  border-radius: 100px;
  color: var(--green-700);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.loc-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(22,163,74,0.2);
}

.loc-h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.loc-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* MAP */
.loc-map-section {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

#loc-map,
#home-loc-map {
  width: 100%;
  height: 480px;
}

#home-loc-map {
  height: 400px;
  margin: 24px 0 32px;
}

@media (max-width: 640px) {
  #loc-map,
  #home-loc-map { height: 280px; }
}

/* MARKERS */
.loc-marker {
  width: 20px;
  height: 20px;
  position: relative;
}

.loc-marker::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid #fff;
  border-radius: 50%;
  top: 5px;
  left: 5px;
  box-shadow: 0 2px 8px rgba(34,197,94,0.6);
}

.loc-marker-pulse {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #22c55e;
  border-radius: 50%;
  top: 0;
  left: 0;
  animation: locMarkerPulse 2s ease-out infinite;
}

@keyframes locMarkerPulse {
  0%   { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* LEAFLET OVERRIDES */
.leaflet-popup-content-wrapper {
  background: #111827;
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  color: #f3f4f6;
  padding: 0;
}

.leaflet-popup-content {
  margin: 12px 16px;
  line-height: 1.4;
}

.leaflet-popup-tip {
  background: #111827;
}

.leaflet-popup-close-button {
  color: #6b7280 !important;
  font-size: 18px !important;
  padding: 4px 8px !important;
}

.loc-popup-city {
  font-size: 13px;
  font-weight: 600;
  color: #f3f4f6;
  margin-bottom: 6px;
}

.loc-popup-node {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.loc-popup-code {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #4ade80;
  flex-shrink: 0;
  min-width: 42px;
}

/* TILES — светлые тайлы OSM инвертируем в тёмную тему */
#loc-map .leaflet-tile-pane,
#home-loc-map .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) saturate(0.25) brightness(0.8) contrast(0.95);
}

/* ATTRIBUTION */
.leaflet-control-attribution {
  background: rgba(17, 24, 39, 0.75) !important;
  color: #9ca3af !important;
  font-size: 10px;
}

.leaflet-control-attribution a {
  color: #d1d5db !important;
}

/* ZOOM CONTROL */
.leaflet-control-zoom a {
  background: #1f2937 !important;
  color: #d1d5db !important;
  border-color: #374151 !important;
}

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

/* LOCATIONS LIST */
.loc-list {
  padding: 64px 0 80px;
  background: var(--color-bg);
}

.loc-section-head {
  text-align: center;
  margin-bottom: 40px;
}

.loc-section-head h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.loc-section-head p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0 auto;
}

.loc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) { .loc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .loc-grid { grid-template-columns: 1fr; } }

.loc-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.loc-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
}

.loc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.loc-card-code {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.loc-card-flag {
  font-size: 20px;
  line-height: 1;
}

.loc-card-city {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.locations-note {
  margin-top: 24px;
}
