/* ═══════════════════════════════════════════════
   Unidades · mapa do Brasil + matriz, bases e filiais

   Peça estática e sóbria: o mapa situa a cobertura, o texto ao lado
   carrega o detalhe. Dado de contato aparece só na matriz — é por lá
   que entram proposta, contrato e atendimento comercial.
   ═══════════════════════════════════════════════ */

.unidades {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.unidades__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(2rem, 5vw, 5rem);
}

.unidades__cabecalho { max-width: 68ch; margin-bottom: clamp(2rem, 4vw, 3rem); }

.unidades__titulo {
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.unidades__texto {
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 60ch;
}

/* ── grade: mapa + conteúdo ── */
.unidades__grade {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  margin-top: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 900px) {
  .unidades__grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); }
}

.unidades__mapa {
  /* width explicito: margin-inline auto num item de grid desliga o
     stretch e o SVG cai no tamanho intrinseco */
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* o viewBox 790.9x829.9 e Web Mercator justo no Brasil — height auto
   preserva a proporcao, nunca definir os dois lados */
.mapa-br {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* o arquivo original vem branco a 50% de opacidade, feito para fundo
   escuro; no branco do site os estados sumiriam */
.br__uf {
  fill: #E3E9E9;
  stroke: #fff;
  stroke-width: 1.1;
  opacity: 1;
}

.br__uf--forte { fill: var(--verde); opacity: 1; }

.br__unidade { fill: #fff; }
.br__sede { fill: #fff; }
.br__halo { fill: none; stroke: var(--dourado); stroke-width: 2; }

/* ── legenda ── */
.mapa-legenda {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.mapa-legenda__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  font-size: var(--text-body-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}

.mapa-legenda__item strong {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
}

.mapa-legenda__chave {
  width: 14px;
  height: 14px;
  margin-top: 0.2rem;
  border-radius: 3px;
  background: #E3E9E9;
}

.mapa-legenda__chave--forte { background: var(--verde); }

/* ── matriz ── */
.unidades__matriz {
  border-left: 2px solid var(--verde);
  padding-left: clamp(1rem, 2vw, 1.5rem);
}

.unidades__rotulo {
  display: block;
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 0.4rem;
}

.unidades__cidade {
  font-size: var(--text-h4);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.unidades__endereco {
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.unidades__contato {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  font-size: var(--text-body-sm);
}

.unidades__contato a {
  color: var(--verde);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out);
}

.unidades__contato a:hover { border-bottom-color: var(--verde); }

/* ── bases e filiais: só nome, praça e função ── */
.unidades__subtitulo {
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: clamp(1.75rem, 3vw, 2.25rem) 0 0.25rem;
}

.unidades__lista { list-style: none; margin: 0; padding: 0; }

.unidades__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.unidades__item:first-child { border-top: 1px solid var(--border); }

.unidades__nome {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--text-primary);
}

.unidades__uf {
  font-size: var(--text-body-sm);
  font-weight: 600;
  color: var(--text-tertiary);
  margin-left: 0.4rem;
}

.unidades__papel {
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  text-align: right;
}

.unidades__nota {
  margin-top: 1.25rem;
  font-size: var(--text-body-sm);
  line-height: 1.6;
  color: var(--text-tertiary);
}

@media (max-width: 480px) {
  .unidades__item { grid-template-columns: minmax(0, 1fr); }
  .unidades__papel { text-align: left; }
}
