/* ---------------------------------------------------------
   VISÃO GERAL DO MUNICÍPIO — overlay aberto pelo logo da rail
   Mesmo estilo e tamanho do painel "Sobre" (about.css): fundo azul,
   texto branco, destaques em amarelo e cards translúcidos.
--------------------------------------------------------- */
.overview-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t-fast, .2s);
}

.overview-backdrop.aberto { opacity: 1; }
.overview-backdrop[style*="display: flex"] { display: flex; }

/* Mesmo tamanho do painel "Sobre" (1040×640, máx. 94vw×82vh);
   o conteúdo rola por dentro se a janela for menor. */
.overview-panel {
  position: relative;
  width: 1040px;
  max-width: 94vw;
  height: 640px;
  max-height: 82vh;
  background: #1a73e8;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(24px) scale(.98);
  opacity: 0;
  transition: transform var(--t-fast, .28s) cubic-bezier(.4,0,.2,1), opacity var(--t-fast, .28s);
}

.overview-backdrop.aberto .overview-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Cabeçalho — título + selo da UF, e linha de metadados */
.overview-head {
  padding: 32px 96px 0 44px;
  flex-shrink: 0;
}

.overview-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.overview-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #fff;
}

.overview-uf {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: rgba(255, 255, 255, .2);
  border-radius: 6px;
  padding: 2px 7px;
}

.overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, .8);
}
.overview-meta strong {
  font-weight: 700;
  color: #fff;
}

.overview-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
  background: rgba(255, 255, 255, .16);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast, .15s);
}
.overview-close:hover { background: rgba(255, 255, 255, .28); }

/* Área rolável: logo | história, cards de KPIs e fonte */
.overview-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 44px 0;
  display: flex;
  flex-direction: column;
}

.overview-scroll::-webkit-scrollbar { width: 5px; }
.overview-scroll::-webkit-scrollbar-track { background: rgba(0, 0, 0, .1); border-radius: 10px; }
.overview-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35); border-radius: 10px; }
.overview-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .55); }

.overview-main {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: center;
}

/* Logo oficial em branco: brasão na versão branca já desenhada (a
   mesma do rodapé do "Sobre", preserva os traços internos) + letreiro
   pintado de branco com o filtro da logo SEFIN — num desenho cheio
   como o brasão colorido esse filtro viraria uma silhueta lisa. */
.overview-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.overview-logo-brasao {
  height: 50px;  /* abaixo dos 68px do PNG: mais pixels por ponto de tela, nítido até ~135% de escala */
  width: auto;
}

.overview-logo-marca {
  height: 45px;  /* mesma proporção do brasão (61/68 do PNG) */
  width: auto;
  max-width: 60%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.overview-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffd54f;
  margin-bottom: 8px;
}

.overview-historia p {
  margin: 0 0 9px;
  font-size: 11px;
  line-height: 1.7;
  text-align: justify;
  hyphens: auto;
  color: #fff;
}
.overview-historia p:last-child { margin-bottom: 0; }

/* KPIs — cards translúcidos como os de categorias do "Sobre",
   com o traço amarelo sob o título */
.overview-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
  flex-shrink: 0;
}

.overview-kpi {
  background: rgba(255, 255, 255, .10);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  transition: background .15s;
}
.overview-kpi:hover { background: rgba(255, 255, 255, .16); }

.overview-kpi-label {
  position: relative;
  padding-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #ffd54f;
}
.overview-kpi-label::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: #ffd54f;
}

.overview-kpi-value {
  margin: 12px 0 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #fff;
}
.overview-kpi-value small {
  font-size: 11px;
  font-weight: 500;
  margin-left: 4px;
  color: rgba(255, 255, 255, .85);
}

.overview-kpi-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, .75);
}

.overview-fonte {
  flex-shrink: 0;
  padding: 18px 0 22px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, .75);
}
.overview-fonte a { color: #fff; text-decoration: underline; }
.overview-fonte a:hover { color: #ffd54f; }

@media (max-width: 860px) {
  .overview-main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 480px) {
  .overview-panel { width: 100%; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .overview-head { padding: 22px 60px 0 20px; }
  .overview-close { top: 18px; right: 16px; }
  .overview-title { font-size: 16px; }
  .overview-scroll { padding: 18px 20px 0; }
  .overview-kpis { grid-template-columns: 1fr; }
}



/* Botão do logo (rail) vira clicável, mantendo o visual original.
   !important necessário porque existe CSS genérico (fora deste
   arquivo) que estiliza qualquer <button> dentro da rail com
   fundo/borda arredondada — antes o logo era uma <div>. */
.rail-logo-btn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: auto !important;
  transition: transform var(--t-fast, .15s), opacity var(--t-fast, .15s);
}
.rail-logo-btn:hover {
  background: none !important;
  transform: scale(1.08);
}
.rail-logo-btn:active,
.rail-logo-btn:focus {
  background: none !important;
  outline: none;
}
