/* ==========================================================
   map.css — styles ONLY for the map section.
   All rules are scoped under .newsletter-section so they
   never bleed into the header, footer, or other pages.
   .container, .section-header, .eyebrow, .section-title,
   .section-sub are intentionally left to main.css.
   ========================================================== */

/* ── Map layout grid ─────────────────────────────────────── */
.newsletter-section .map-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  align-items: start;
  padding: 0 170px;
}

.newsletter-section .location-header {
  padding: 0 170px;
}

/* ── Map wrapper ─────────────────────────────────────────── */
.newsletter-section .map-container {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 32px rgba(26, 18, 8, 0.07);
  background: #e8e4db;
}

#india-map {
  width: 100%;
  height: 620px;
}

/* ── Leaflet UI overrides ────────────────────────────────── */
.leaflet-control-attribution {
  font-family: var(--font-mono) !important;
  font-size: 0.52rem !important;
  background: rgba(245, 243, 239, 0.9) !important;
  color: var(--text-muted) !important;
}

.leaflet-control-attribution a {
  color: var(--accent) !important;
}

.leaflet-container {
  z-index: 1;
}

.leaflet-control-zoom a {
  font-family: var(--font-mono) !important;
  color: var(--text) !important;
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  line-height: 26px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg) !important;
  color: var(--accent) !important;
}

/* ── Custom pins ─────────────────────────────────────────── */
.custom-pin {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
}

.pin-icon {
  font-size: 24px;
  color: #1a1208;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
}

.custom-pin.active .pin-icon,
.custom-pin:hover .pin-icon {
  color: #df6969;
  transform: scale(1.3) translateY(-4px);
}

/* Highlighted (factory) pin */
.custom-pin.highlight .pin-icon {
  color: #df6969;
  font-size: 32px;
}

.pin-ring {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #1a1208;
  animation: ringPulse 2.2s ease-out infinite;
  bottom: -3px;
  left: 50%;
  margin-left: -15px;
  pointer-events: none;
}

@keyframes ringPulse {
  0%   { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}

.custom-pin.highlight.active .pin-ring,
.custom-pin.highlight:hover .pin-ring {
  border-color: var(--accent);
}

.custom-pin.highlight.active .pin-icon,
.custom-pin.highlight:hover .pin-icon {
  color: var(--accent);
}

/* ── Leaflet tooltip ─────────────────────────────────────── */
.leaflet-tooltip {
  background: #1a1208 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 2px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
  padding: 10px 14px !important;
  pointer-events: none !important;
  white-space: nowrap;
}

.leaflet-tooltip::before {
  border-top-color: #1a1208 !important;
}

.tip-name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 3px;
}

.tip-desc {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.newsletter-section .map-sidebar {
  padding-top: 4px;
}

.newsletter-section .sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.newsletter-section .location-list {
  list-style: none;
}

.newsletter-section .location-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.2s;
  color: var(--text);
}

.newsletter-section .location-item:hover,
.newsletter-section .location-item.active {
  color: var(--accent);
}

.newsletter-section .location-item .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.newsletter-section .location-item:hover .dot,
.newsletter-section .location-item.active .dot {
  transform: scale(2);
}

.newsletter-section .location-item.highlight-item .dot {
  border: 1.5px solid currentColor;
  background: transparent;
  width: 8px;
  height: 8px;
}

.newsletter-section .item-name {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.newsletter-section .sidebar-note {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.newsletter-section .highlight-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  flex-shrink: 0;
}

/* ── Debug banner ────────────────────────────────────────── */
#map-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 8px 12px;
  background: rgba(196, 125, 30, 0.1);
  color: var(--accent);
  border-radius: 2px;
  margin-bottom: 12px;
  display: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .newsletter-section .map-layout {
    grid-template-columns: 1fr;
    padding: 0;
  }
  .newsletter-section .location-header {
    padding: 0;
  }
  #india-map {
    height: 460px;
  }
  .newsletter-section .map-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 24px;
  }
  .newsletter-section .sidebar-label,
  .newsletter-section .sidebar-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  #india-map {
    height: 360px;
  }
  .newsletter-section .map-sidebar {
    grid-template-columns: 1fr;
  }
}