/* Mapa de comitês — hero XI AR Sul (Leaflet, padrão PIN) */

.hero-comites-mapa {
  --arsul-mapa-verde: #2f4638;
  --arsul-mapa-cinza: #9aa3a0;
  --arsul-mapa-terracotta: #b05c3c;
  width: 100%;
}

.hero-comites-mapa__header {
  margin: 0 0 0.85rem;
}

.hero-comites-mapa__title {
  margin: 0 0 0.35rem;
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--arsul-ink);
}

.hero-comites-mapa__meta {
  margin: 0;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--arsul-ink) 72%, transparent);
}

.hero-comites-mapa__meta strong {
  color: var(--arsul-green);
  font-weight: 700;
}

.hero-comites-mapa__frame {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--arsul-ink) 12%, transparent);
  background: #eef2ef;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--arsul-ink) 8%, transparent);
}

.hero-comites-mapa__map {
  width: 100%;
  min-height: min(52dvh, 420px);
  height: clamp(280px, 52dvh, 420px);
  touch-action: none;
}

.hero-comites-mapa__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--arsul-ink) 78%, transparent);
}

.hero-comites-mapa__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-comites-mapa__legend-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--arsul-ink) 18%, transparent);
}

.hero-comites-mapa__legend-dot--ativo {
  background: var(--arsul-mapa-verde);
}

.hero-comites-mapa__legend-dot--organizador {
  background: var(--arsul-mapa-terracotta);
}

.hero-comites-mapa__legend-dot--pendente {
  background: var(--arsul-mapa-cinza);
}

.hero-comites-mapa__legend-dot--agrupado {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--arsul-mapa-cinza);
  box-shadow: 0 0 0 2px #fff;
}

.hero-comites-mapa__attribution {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  color: color-mix(in srgb, var(--arsul-ink) 55%, transparent);
}

.hero-comites-mapa__attribution a {
  color: inherit;
}

/* Marcadores Leaflet */
.arsul-comite-marker {
  background: transparent !important;
  border: none !important;
}

.arsul-comite-marker__dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 3px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 28%);
  background: var(--arsul-mapa-cinza);
}

.arsul-comite-marker--ativo .arsul-comite-marker__dot {
  background: var(--arsul-mapa-verde);
}

.arsul-comite-marker--organizador .arsul-comite-marker__dot {
  width: 18px;
  height: 18px;
  margin: 1px;
  background: var(--arsul-mapa-terracotta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--arsul-mapa-terracotta) 35%, transparent);
}

.arsul-comite-marker--organizador.arsul-comite-marker--ativo .arsul-comite-marker__dot {
  background: var(--arsul-mapa-terracotta);
}

/* Agrupamento por sobreposição na tela (vários comitês no mesmo pin) */
.arsul-comite-marker--cluster {
  cursor: pointer;
}

.arsul-comite-marker__cluster {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
}

.arsul-comite-marker__cluster .arsul-comite-marker__dot {
  width: 100%;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
}

.arsul-comite-marker__cluster .arsul-comite-marker__dot--pie {
  border: 2px solid #fff;
}

.arsul-comite-marker--cluster.arsul-comite-marker--organizador .arsul-comite-marker__cluster {
  width: 34px;
  height: 34px;
}

.arsul-comite-marker__count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgb(0 0 0 / 40%);
  pointer-events: none;
}

.leaflet-popup-content-wrapper.arsul-comite-popup {
  border-radius: 0.75rem;
  font-family: 'Inter', system-ui, sans-serif;
}

.leaflet-popup-content.arsul-comite-popup__inner {
  margin: 0.65rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.35;
}

.arsul-comite-popup__sigla {
  display: block;
  font-weight: 700;
  color: var(--arsul-ink);
}

@media (min-width: 900px) {
  .hero__map-row {
    grid-column: 1 / -1;
    margin-top: clamp(0.25rem, 1vw, 0.75rem);
  }
}

@media (max-width: 899px) {
  .hero__inner {
    display: flex;
    flex-direction: column;
  }

  .hero__copy {
    order: 1;
  }

  .hero__visual {
    order: 2;
  }

  .hero__map-row {
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaflet-zoom-animated {
    transition: none !important;
  }
}
