/* ============================================================
   N3 Agroscience — Estilos do Mapa Interativo (Leaflet)
   ============================================================ */

/* ── Wrapper da seção ────────────────────────────────────────── */
.n3-map-section {
  border-top: 1px solid #929292;
  padding: 80px 0 120px;
}

.n3-map-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.n3-map-section h2 {
  text-align: center;
  font-size: clamp(24px, 4vw, 48px);
  max-width: 640px;
}

/* ── Container do mapa ───────────────────────────────────────── */
#n3-map {
  width: 100%;
  height: 480px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #e9e9e9;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08);
  position: relative;
}

@media (max-width: 768px) {
  #n3-map { height: 380px; }
}

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

/* ── Popup ───────────────────────────────────────────────────── */
.n3map-popup-wrapper .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 0;
  overflow: hidden;
}

.n3map-popup-wrapper .leaflet-popup-content {
  margin: 0;
  min-width: 220px;
  max-width: 280px;
}

.n3map-popup {
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
  padding: 28px 16px 16px;  /* top aumentado para não sobrepor o botão X */
}

.n3map-popup-header {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.n3map-popup-city {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #000;
  margin: 0 0 2px;
}

.n3map-popup-state {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.n3map-popup-desc {
  font-size: 0.8125rem;
  color: #444;
  margin: 0 0 6px;
  line-height: 1.4;
}

.n3map-popup-detail {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
  margin: 0 0 10px;
}

.n3map-popup-contacts {
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
  margin-top: 4px;
}

.n3map-popup-contacts-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin: 0 0 8px;
}

.n3map-popup-contact {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.n3map-popup-contact-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #222;
}

.n3map-popup-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #16a34a;
  text-decoration: none;
  transition: color 0.15s ease;
}

.n3map-popup-whatsapp:hover {
  color: #15803d;
  text-decoration: underline;
}

/* ── Legenda ─────────────────────────────────────────────────── */
.n3map-legend {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border: 1px solid #e9e9e9;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
}

.n3map-legend-title {
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
  margin: 0 0 8px;
}

.n3map-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.n3map-legend-item:last-child { margin-bottom: 0; }

.n3map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.n3map-legend-label {
  font-size: 0.75rem;
  color: #444;
  font-weight: 500;
}

/* ── Leaflet overrides ───────────────────────────────────────── */
.leaflet-container {
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
}

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

.leaflet-control-zoom a {
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 16px !important;
}

.leaflet-control-zoom a:first-child {
  border-bottom: 1px solid #f0f0f0 !important;
}

.leaflet-control-attribution {
  background: rgba(255,255,255,0.75) !important;
  font-size: 10px !important;
  border-radius: 4px 0 0 0 !important;
}

.leaflet-popup-close-button {
  font-size: 18px !important;
  color: #666 !important;
  right: 8px !important;
  top: 6px !important;
}

.leaflet-popup-close-button:hover {
  color: #000 !important;
}

/* Marker hover */
.leaflet-marker-icon {
  transition: transform 0.15s ease, filter 0.15s ease;
}

.leaflet-marker-icon:hover {
  transform: scale(1.15) translateY(-2px);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
  z-index: 9999 !important;
}

/* Popup tip */
.leaflet-popup-tip-container {
  margin-top: -1px;
}
