/* ====== ESTILO CONSOLIDADO E LIMPO - RADAR 2024 ====== */
/* Baseado no template do ANUÁRIO 2024 - Adaptado para RADAR */
/* COPILOT-FINGERPRINT: radar2025 css update 2026-05-27 v1 */
/* VARIÁVEIS CSS (ROOT) */
:root {
  --primary: #2f7f2f; /* Verde institucional - leve ajuste */
  --secondary: #163b6b; /* Azul institucional - leve ajuste */
  --background-color: #f7f9fb;
  --text-color: #222;
  --card-background: #ffffff;
  --footer-background: #1a3c6e;
  --footer-text: #ffffff;
  --border-color: #ddd;
  --shadow-color: rgba(0,0,0,0.04);
}



/* GLOBAIS */
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 17px; /* base maior para melhor leitura */
  background: linear-gradient(to left, rgba(47, 127, 47, 0.25) 0%, rgba(47, 127, 47, 0.12) 25%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  min-height: 100vh;
}

/* NAVBAR */
.navbar {
  background: var(--card-background);
  box-shadow: 0 2px 10px var(--shadow-color);
  padding: 0.8rem 1rem; /* aumenta altura da navbar */
}
.navbar #darkModeToggleNav {
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s;
}
.navbar #darkModeToggleNav i {
  color: var(--secondary);
}
body.dark-mode .navbar #darkModeToggleNav i {
  color: #ffd700;
}

/* HERO SECTION */
.hero-section {
  background: linear-gradient(120deg, #e3f0ff 0%, #f7f9fb 100%);
  padding: 96px 0 48px 0; /* maior espaçamento no topo */
  text-align: center;
}
.hero-section img {
  width: 100%;
  max-width: 1285px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(26,60,110,0.07);
  margin: 0 auto 40px;
  display: block;
  transition: transform 0.3s ease;
}
.hero-section img:hover { transform: scale(1.02); }
.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--secondary);
}

/* HERO SECTION */
.hero-content{ position: relative; z-index: 3; }

/* HERO SECTION MODERNO - estilos aplicados no .hero-title abaixo */

/* TÍTULOS DE SEÇÕES */
.section-title {
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 2rem;
}

/* Cor específica para o título 'Principais Temas' */
#principais-temas .section-title {
  color: rgb(0,66,0) !important;
}

/* Cor específica para o título 'Sobre a FAPESPA e a DETGI' */
#sobre .section-title {
  color: rgb(0,66,0) !important;
}

/* Área dos temas: mais largura para os cards ficarem maiores */
#principais-temas.container {
  max-width: 1720px;
}

/* Alinhamento uniforme dos cards de temas */
.tema-card .card-body {
  width: 100%;
  justify-content: flex-start !important;
}

/* Texto branco no card de Assistência e Previdência Social */
.tema-assistencia-previdencia .card-body h5,
.tema-assistencia-previdencia .card-body p,
.tema-assistencia-previdencia .card-body .btn {
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.tema-assistencia-previdencia .tema-icon,
.tema-assistencia-previdencia .tema-icon i {
  color: inherit !important;
  text-shadow: none !important;
}

/* Botão padrão dos cards de tema */
.tema-card .btn-tema-card {
  display: inline-block;
  margin: 12px auto 0 auto !important;
  margin-top: auto !important;
  align-self: center;
  font-size: 0.96rem;
  background: transparent !important;
  border: 1px solid #fff !important;
  color: #fff !important;
  padding: 12px 18px;
  min-width: 126px;
  max-width: 180px;
  border-radius: 999px;
  line-height: 1.2;
  text-align: center;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #fff !important;
  -webkit-box-shadow: inset 0 0 0 1px #fff !important;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.tema-card .btn-tema-card:hover,
.tema-card .btn-tema-card:focus,
.tema-card .btn-tema-card:active {
  background: var(--secondary) !important;
  border-color: var(--secondary) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

@media (min-width: 992px) {
  .tema-card .card-body {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

/* CARDS COM ANIMAÇÕES - Refinado com Responsividade */
.card-feature {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.card-feature.card-animated {
  min-height: 340px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
@media (min-width: 576px) {
  .card-feature.card-animated { min-height: 360px; padding: 36px 28px; }
}
@media (min-width: 992px) {
  .card-feature.card-animated { min-height: 400px; padding: 44px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .card-feature { transition: none; }
}
.card-feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.92) 60%, rgba(255,255,255,0.88) 100%);
  transition: background 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1;
}
.card-feature:hover::before {
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.5) 100%);
}
.card-feature > * {
  position: relative;
  z-index: 2;
  transition: color 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card-feature:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}
.card-feature:hover h5,
.card-feature:hover p,
.card-feature:hover i {
  color: #fff !important;
}
@media (prefers-reduced-motion: reduce) {
  .card-feature:hover { transform: none; }
}

/* IMAGENS DE FUNDO DOS CARDS */
.card-demografia { background-image: url('../img/demografia.png'); }
.card-economia { background-image: url('../img/economia.png'); }
.card-infraestrutura { background-image: url('../img/infraestrutura.png'); }
.card-meio-ambiente { background-image: url('../img/meio_ambiente.png'); }
.card-social { background-image: url('../img/social.png'); }
.card-mapas { background-image: url('../img/mapas.png'); }

/* CARDS BRANCO (SUMÁRIO, GLOSSÁRIO, EXPEDIENTE) */
.card-feature.text-center.bg-white {
  transition: background-color 0.4s ease, color 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.card-feature.text-center.bg-white:hover {
  background-color: #307028 !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(26, 60, 110, 0.15);
  transform: translateY(-6px) scale(1.02);
}
.card-feature.text-center.bg-white:hover h5,
.card-feature.text-center.bg-white:hover p {
  color: #fff !important;
  transition: color 0.4s ease;
}
.card-feature.text-center.bg-white:hover .btn {
  background-color: #348e39 !important;
  border-color: #348e39 !important;
  color: #fff !important;
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.card-feature.text-center.bg-white:hover i {
  filter: brightness(1);
  transition: filter 0.4s ease;
}

/* BOTÕES NOS CARDS */
.card-feature .btn {
  display: inline-block;
  margin: 12px auto 0 auto;
  font-size: 0.96rem;
  background: transparent !important;
  border: 1px solid #fff !important;
  color: #fff !important;
  padding: 12px 18px;
  min-width: 126px;
  max-width: 180px;
  border-radius: 999px;
  line-height: 1.2;
  text-align: center;
  font-weight: 600;
  box-shadow: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.card-feature .btn:hover {
  background-color: var(--secondary) !important;
  border-color: var(--secondary) !important;
  color: #fff !important;
  transform: translateY(-2px);
}
.card-feature:hover .btn {
  border-color: #fff;
  color: #fff !important;
}

/* MODAL */
.modal-content {
  background-color: var(--card-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.modal-title,
.modal-body h3 { color: var(--secondary); }
.modal-body p { color: var(--text-color); }
body.dark-mode .modal-body p.text-secondary { color: #999 !important; }
.modal-body .form-control {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 12px;
  background-color: var(--background-color);
  color: var(--text-color);
}
body.dark-mode .modal-body .form-control {
  background-color: #2e2e2e;
  border-color: #555;
  color: #e0e0e0;
}

/* MODAL GENÉRICO - esconder título */
#contentModal .modal-header .modal-title { display: none; }
#contentModal .modal-header { justify-content: flex-end; }

/* MODAL GENÉRICO - ajustar tamanho e tipografia (menor modal, texto maior, centralizado) */
#contentModal .modal-dialog {
  max-width: 60vw; /* largura do modal */
  width: 60%;
  max-height: 90vh; /* limita altura do modal */
  margin: 1.75rem auto; /* margem do topo */
}
@media (max-width: 991.98px) {
  #contentModal .modal-dialog {
    max-width: 90vw;
    width: 90%;
  }
}
/* Custom modal header tweaks */
#contentModal .custom-modal-header { position: relative; }
/* Icon buttons in modal footer */
#contentModal .modal-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
#contentModal .modal-icon-btn i { font-size: 1.1rem; line-height: 1; }
#contentModal .modal-icon-btn:hover { background: rgba(0,0,0,0.75); color: #fff; }
#contentModal .modal-icon-close { background: #6c757d; }
#contentModal .modal-icon-close:hover { background: #5a6268; }
/* Bottom bar that holds modal actions so they don't scroll with content */
.modal-bottom-bar { z-index: 1051; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; display:flex; justify-content:flex-end; align-items:center; padding:8px 12px; background: rgba(255,255,255,0.95); border-top:1px solid rgba(0,0,0,0.06); }
.modal-bottom-bar .btn { margin-left: 8px; }

/* Permite scroll interno confortável */
#contentModal .modal-content {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#contentModal .modal-body {
  padding: 2rem;
  text-align: left;
  overflow-y: auto; /* scroll vertical */
  flex: 1 1 auto;
}

#contentModal .modal-body img {
  max-width: 80%;
  height: auto;
  margin: 1rem auto; /* keep images centered */
  display: block;
}

#contentModal .modal-body p,
#contentModal .modal-body li {
  font-size: 1.5rem; /* texto maior */
  line-height: 1.9;
  margin-bottom: 0.75rem;
  width: 100%;
  max-width: none;
  text-align: left;
}

#contentModal .modal-body h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-align: left;
}

#contentModal .modal-body h2 {
  font-size: 2rem;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  text-align: left;
}

#contentModal .modal-body h3 {
  font-size: 1.8rem;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

#contentModal .modal-body strong,
#contentModal .modal-body b {
  font-weight: 700;
}
@media (min-width: 1200px) {
  #contentModal .modal-dialog {
    max-width: 85vw;
  }
}

/* ===== MAPA REDESIGN (não destrutivo) =====
   Regras agora direcionadas à classe `.map-card` aplicada no
   `index.html` — mantém o estilo mesmo com o card centralizado. */
.map-card {
  background: linear-gradient(180deg, rgba(33,150,83,0.06) 0%, rgba(255,255,255,0.6) 100%);
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(26,60,110,0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.map-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(26,60,110,0.12);
}
.map-card h5 {
  color: var(--secondary);
  font-size: 1.18rem;
  margin-bottom: .6rem;
}
.map-card p {
  color: #38506f;
  font-size: 0.98rem;
}
.map-card .btn {
  background: linear-gradient(90deg, #2f7f2f, #3aa64a) !important;
  border: none !important;
  padding: 10px 18px !important;
  min-width: 150px;
  box-shadow: 0 6px 18px rgba(50,115,50,0.14);
}
.map-card .btn:focus,
.map-card .btn:hover {
  transform: translateY(-2px);
}

/* Imagem lateral (se for reintroduzida) */
.map-visual img {
  max-height: 320px;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16,40,80,0.08);
  transition: transform 0.28s ease, filter 0.28s ease;
}
.map-visual img:hover {
  transform: scale(1.02);
  filter: brightness(1.02) saturate(1.03);
}

@media (max-width: 767.98px) {
  .map-card,
  .map-visual img {
    text-align: center;
    margin: 0 auto;
  }
  .map-visual img { max-height: 260px; margin-top: 0.75rem; }
}

/* Espaço reservado para estilos adicionais do mapa, se necessário */


/* SPINNER */
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
  z-index: 99999;
}
#spinner.show {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease-out, visibility 0s linear 0s;
}

/* Ajuste de tamanho do spinner interno */
#spinner .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Modal flutuante customizado (conteúdo dinâmico) */
.modal-backdrop-custom {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  display: none;
}

.custom-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;
  width: 95%;
  max-width: 1200px;
  background: #e8f6eb; /* verde claro para o fundo do modal */
  color: var(--text-color);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 40px);
  overflow: visible;
  display: none;
}

.custom-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #e8f6eb; /* mantém o verde claro em todo o conteúdo */
  color: var(--text-color);
}

.custom-modal-header {
  display: flex;
  justify-content: flex-end; /* botão de fechar no canto direito */
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
  background: #e8f6eb;
}

.custom-modal-header h5 {
  display: none; /* esconder título visível (remover "Apresentação"/"DETGI") */
}

.custom-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-modal-close:hover {
  color: #000;
}

.custom-modal-body {
  padding: 20px;
  overflow: hidden; /* será ajustado via JS se necessário */
  flex: 1;
  background: #e8f6eb;
}

.custom-modal-body iframe {
  width: 100%;
  height: 60vh;
  border: none;
}

.custom-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 15px 20px;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
  background: #e8f6eb;
}

/* BOTÃO VOLTAR AO TOPO - SOLUÇÃO LIMPA */
/* BOTÃO VOLTAR AO TOPO - SIMPLES E FIXO */
#btnTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 50px;
  height: 50px;
  background: #2f7f2f;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 999999;
}

#btnTop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#btnTop:hover {
  background: #1a5f1a;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

#btnTop:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  #btnTop {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

/* FOOTER */
.footer,
.footer-bottom {
  background: var(--footer-background) !important;
  color: var(--footer-text) !important;
}
footer .container { padding-top: 32px; padding-bottom: 32px; }

/* MAPA NO RODAPÉ */
.footer .map-container h5 {
  color: #ffffff;
  margin-bottom: 15px;
}
.footer .map-embed {
  overflow: hidden;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  height: 0;
  max-height: 200px;
}
.footer .map-embed iframe {
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  position: absolute;
  border-radius: 8px;
}
@media (max-width: 992px) {
  .footer .map-embed {
    padding-bottom: 40%;
    max-height: 250px;
  }
}
.footer a {
    color: var(--footer-text) !important; /* Garante que os links sejam brancos */
    text-decoration: underline !important; /* Adiciona o sublinhado */
    text-underline-offset: 4px; /* Opcional: Afasta o traço do texto */
}
.footer .btn-link {
    display: block; /* Garante que cada link ocupe uma linha */
    padding: 0; /* Remove o padding do botão */
    margin-bottom: 0.5rem; /* Adiciona um pequeno espaçamento inferior para separá-los */
    line-height: 1.5; /* Ajusta a altura da linha */
    text-align: left;
}

@media (max-width: 992px) {
  .footer .map-embed {
    padding-bottom: 40%;
    max-height: 250px;
  }
}
/* CSS do Copyright - Rodapé Minimalista */
.copyright {
    background-color: #f8f9fa !important;
    border-top: 1px solid #e0e0e0 !important;
    padding: 0.5rem 0;
}

.copyright small {
    color: #6c757d;
    font-size: 0.875rem;
}

.copyright a {
    color: #495057 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: #212529 !important;
}

.copyright .text-center {
    text-align: center;
}

/* SEÇÃO DE DOWNLOADS */
.downloads-section {
  background: linear-gradient(120deg, #e8f5e9 0%, #d7f0dc 100%);
  color: #1a3c6e;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(26, 60, 110, 0.1);
}
.downloads-section h2 {
  color: #1a3c6e;
  font-weight: 700;
}
.downloads-section p { color: #2e4a3f; }
.downloads-section .btn-success {
  background-color: #348e39;
  border: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.downloads-section .btn-success:hover {
  background-color: #1a3c6e;
  transform: translateY(-3px);
}

/* HELPERS */
.fw-bold { font-weight: 700 !important; }
.fw-medium { font-weight: 600 !important; }

/* Toast container small adjustments (for our dynamic toasts) */
#site-toast-container {
  pointer-events: none;
}
#site-toast-container > div {
  pointer-events: auto;
}


/* RESPONSIVO */
@media (max-width: 400px) {
  .card-feature p { font-size: 0.9rem; }
  .hero-section .btn {
    padding: 10px 24px;
    font-size: 1rem;
  }
  .hero-section h1 { font-size: 2rem; }
  .hero-section img { max-width: 100%; }
}

/* --- FORÇA estilos do contentModal (última palavra: !important para evitar sobrescritas acidentais) --- */
#contentModal .modal-dialog {
  max-width: 58vw !important; /* ajuste fino para 58% */
  width: 58% !important;
}
@media (max-width: 991.98px) {
  #contentModal .modal-dialog {
    max-width: 95vw !important;
    width: 95% !important;
  }
}

#contentModal .modal-content {
  max-height: none !important;
  overflow: visible !important; /* evita scroll interno */
}

#contentModal .modal-body {
  padding: 2.25rem !important;
  min-height: auto !important;
  display: block !important;
  text-align: left !important;
}

#contentModal .modal-body img {
  max-width: 100% !important;
  height: auto !important;
  margin: 1rem auto !important;
  display: block !important;
}

#contentModal .modal-body p,
#contentModal .modal-body li {
  font-size: 1.6rem !important;
  line-height: 1.95 !important;
  margin-bottom: 0.85rem !important;
  width: 100% !important;
  max-width: none !important;
}

#contentModal .modal-body h1 { font-size: 3rem !important; }
#contentModal .modal-body h2 { font-size: 2.2rem !important; }
#contentModal .modal-body h3 { font-size: 1.9rem !important; }

/* Em telas pequenas, permitir overflow interno para manter modal usável */
@media (max-height: 700px) {
  #contentModal .modal-content {
    max-height: 80vh !important;
    overflow-y: auto !important;
  }
}

/* Overrides fortes para conteúdo carregado (ex: apresentacao.html) que traz seu próprio CSS */
#contentModal .modal-body #corpo {
  font-size: 1.6rem !important;
  line-height: 1.95 !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 auto !important;
}
#contentModal .modal-body #cabecalho h2 {
  font-size: 2rem !important;
}
#contentModal .modal-body #rodape {
  font-size: 1rem !important;
}
#contentModal .modal-body p {
  font-size: 1.6rem !important;
}

/* ====================================================================
   ESTILOS MIGRADOS DO INDEX.HTML
   ==================================================================== */

/* Ajuste para botão Apresentação: maior e levemente mais acima */
.btn-apresentacao{
  margin-top: 0.25rem; /* empurra menos para baixo */
  padding: .9rem 1.75rem; /* maior área clicável */
  font-size: 1.125rem; /* texto levemente maior */
}
@media(min-width: 992px){
  .btn-apresentacao{ margin-top: 0.5rem; }
}

/* Capa (hero) — aumentar, levantar e reduzir espaçamento inferior */
.hero-section{
  padding-top: 1rem; /* deixa a seção mais próxima do topo */
  padding-bottom: 1.5rem; /* reduz espaço abaixo para aproximar do restante */
}

.img-hero-anuario{
  display: block;
  width: 85%; /* maior em telas pequenas */
  max-width: 1100px; /* limite para evitar overflow */
  height: auto;
  margin: 0 auto; /* centraliza */
  margin-top: -20px; /* sobe levemente a imagem */
  transition: margin 0.3s ease, width 0.3s ease;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Em telas médias e grandes aumentamos mais e subimos um pouco mais */
@media (min-width: 768px){
  .img-hero-anuario{ width: 75%; margin-top: -60px; }
  .hero-section{ padding-bottom: 1rem; }
}

@media (min-width: 1200px){
  .img-hero-anuario{ width: 65%; margin-top: -100px; }
  .hero-section{ padding-bottom: 0.5rem; }
}

/* =========================
 A11Y — STYLES (ETAPA 2)
 - As classes usam prefixo 'a11y-' e 'html.a11y-*'
 ========================= */

/* --- Vars de escala e controle --- */
:root{
  --a11y-font-scale: 1;
  --a11y-lineheight: 1.55;
  --a11y-paragraph-space: 1.0rem;
  --a11y-zoom: 1;
  --a11y-cursor-size: 1;
  --a11y-focus-outline: 3px solid #ffd54f;
  --a11y-highlight-link: #ffdd57;
  --a11y-highlight-button: #ff9f43;
}

/* Apply base scaling (JS atualiza --a11y-font-scale / --a11y-zoom) */
html { font-size: calc(100% * var(--a11y-font-scale)); }
body {
  transform: none !important; /* evita quebrar position: fixed */
  zoom: var(--a11y-zoom, 1); /* aplica zoom sem usar transform */
}

/* --- Modal / Painel (garante visual consistente) --- */
.acess-modal { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
.acess-modal-panel { min-width: 280px; max-width: 420px; }

/* Section titles */
.acess-section-title {
  font-weight: 700;
  color: #163b6b;
  font-size: 0.95rem;
  padding: 8px 12px 4px;
}

/* Controls base (navbar + modal) */
.acess-control {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d2d2d2;
  background: #f7f7f7;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.2;
  gap: 4px;
}
.acess-control:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); background: #eaeaea; border-color: #bdbdbd; }
.acess-control:focus { outline: var(--a11y-focus-outline); outline-offset: 3px; }
.acess-control:active { background: #dcdcdc; }

/* Reset button variant */
.acess-reset { background: #ff4444 !important; color: #fff !important; border-color: #cc0000 !important; }
.acess-reset:hover { background: #cc0000 !important; }

/* --- High Contrast (força onde necessário) --- */
html.a11y-contrast,
html.a11y-contrast body,
html.a11y-contrast * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  filter: none !important;
}
html.a11y-contrast a { color: #00eaff !important; }
html.a11y-contrast img { filter: invert(1) brightness(1.05) contrast(1.05) !important; }
/* Força texto branco nos botões de acessibilidade */
html.a11y-contrast #acess-modal .acess-control,
html.a11y-contrast #acess-modal button,
html.a11y-contrast #acess-modal .acess-modal-panel * {
  color: #fff !important;
  background-color: #000 !important;
  border-color: #fff !important;
}
html.a11y-contrast #acess-modal .acess-modal-panel {
  background-color: #000 !important;
  border-color: #fff !important;
}

/* --- Modo Noturno (mais suave que contraste) --- */
html.a11y-night, html.a11y-night body {
  background-color: #0f1720 !important;
  color: #e6eef8 !important;
}
html.a11y-night a { color: #8ed0ff !important; }
html.a11y-night .card-feature { background: #12151a !important; }
html.a11y-night .product-card { background: #12151a !important; color: #e6eef8 !important; }
html.a11y-night .product-card h5 { color: #8ed0ff !important; }
html.a11y-night .product-card p { color: #b8c5d6 !important; }
html.a11y-night .hero-section-modern { background: #0f1720 !important; }
html.a11y-night .hero-overlay { background: transparent !important; }
html.a11y-night .navbar { background: #12151a !important; }
html.a11y-night .footer-main { background: #0a0e14 !important; }
html.a11y-night .footer-products { background: #12151a !important; }
html.a11y-night section { background-color: transparent !important; }
html.a11y-night .downloads-section { background: #12151a !important; }
html.a11y-night #principais-temas { background: #0f1720 !important; }
html.a11y-night #sobre { background: #12151a !important; }

/* --- Escala em Cinza --- */
html.a11y-grayscale {
  filter: grayscale(100%) !important;
}

/* --- Reduzir movimentos (prefers-reduced-motion + override) --- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
/* Explicit override class */
html.a11y-reduced-motion * , html.a11y-reduced-motion *::before, html.a11y-reduced-motion *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* --- Fonte dislexia / guia de leitura --- */
html.a11y-dyslexia, html.a11y-dyslexia body {
  font-family: "OpenDyslexic", "Comic Sans MS", "Verdana", "Arial", sans-serif !important;
  letter-spacing: 0.01em !important;
  word-spacing: 0.06em !important;
  line-height: 1.8 !important;
}

/* Barra guia de leitura (linha móvel) */
.a11y-reading-guide {
  position: absolute;
  left: 0;
  right: 0;
  height: 3.2rem;
  background: rgba(255, 229, 153, 0.12);
  border-top: 1px solid rgba(255,229,153,0.22);
  border-bottom: 1px solid rgba(255,229,153,0.08);
  pointer-events: none;
  z-index: 13000;
  mix-blend-mode: multiply;
}

/* --- Espaçamento de linhas e parágrafos controlável --- */
html.a11y-spacing {
  --a11y-lineheight: 1.9;
  --a11y-paragraph-space: 1.2rem;
}
html.a11y-spacing p { line-height: var(--a11y-lineheight) !important; margin-bottom: var(--a11y-paragraph-space) !important; }

/* --- Destacar links e botões --- */
html.a11y-highlight-links a { 
  text-decoration: underline !important; 
  background-color: #4A90E2 !important;
  color: #fff !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}
html.a11y-highlight-links a:hover {
  background-color: #357ABD !important;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3) !important;
}
html.a11y-highlight-buttons button, html.a11y-highlight-buttons .btn { box-shadow: 0 0 0 4px rgba(255,159,67,0.08) inset !important; border: 2px solid var(--a11y-highlight-button) !important; }

/* --- Foco visível aprimorado --- */
html.a11y-focus *:focus { outline: var(--a11y-focus-outline) !important; outline-offset: 3px !important; box-shadow: 0 6px 18px rgba(0,0,0,0.12); }

/* --- Cursor aumentado --- */
html.a11y-large-cursor, html.a11y-large-cursor * { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"><circle cx="24" cy="24" r="10" fill="%23ffd54f"/></svg>') 24 24, auto !important; }
html.a11y-large-cursor { --a11y-cursor-size: 1.6; }

/* --- Modo leitura (remove distrações) --- */
html.a11y-reading-mode body {
  background: #fff !important;
  color: #111 !important;
}
html.a11y-reading-mode header, html.a11y-reading-mode .footer, html.a11y-reading-mode .sidebar, html.a11y-reading-mode .card-feature { display: none !important; }
html.a11y-reading-mode main, html.a11y-reading-mode .content, html.a11y-reading-mode .container { max-width: 900px !important; margin: 0 auto !important; padding: 28px !important; }

/* --- Daltonism filters using CSS filters and SVG matrix for better fidelity --- */
html.a11y-dalton-prot img, html.a11y-dalton-prot { filter: url(#protanopia) !important; }
html.a11y-dalton-deut img, html.a11y-dalton-deut { filter: url(#deuteranopia) !important; }
html.a11y-dalton-trit img, html.a11y-dalton-trit { filter: url(#tritanopia) !important; }
html.a11y-dalton-prot { filter: grayscale(0.05) contrast(1.05) saturate(0.9) !important; }
html.a11y-dalton-deut { filter: grayscale(0.03) contrast(1.02) saturate(0.95) !important; }
html.a11y-dalton-trit { filter: grayscale(0.02) contrast(1.02) hue-rotate(10deg) !important; }

/* --- Teclado virtual (estilo minimal) --- */
#a11y-virtual-keyboard {
  position: fixed;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 14000;
  background: rgba(255,255,255,0.96);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  display: none;
  max-width: 92%;
}
#a11y-virtual-keyboard .vk-row { display:flex; gap:6px; justify-content:center; margin-bottom:6px; }
#a11y-virtual-keyboard .vk-key {
  background:#f1f3f5; border:1px solid #ddd; padding:8px 10px; border-radius:6px; min-width:40px; text-align:center; cursor:pointer;
}
#a11y-virtual-keyboard .vk-key:active { background:#e2e6ea; }

/* --- Readability: choose simpler fonts --- */
html.a11y-plain-font, html.a11y-plain-font body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  letter-spacing: 0.01em !important;
  font-weight: 400 !important;
}

/* --- Small screens adaptions --- */
@media (max-width: 520px) {
  .acess-modal { right: 10px; left: 10px; transform: none; top: auto; bottom: 88px; }
  .acess-modal-panel { width: auto; min-width: auto; }
  .acess-control { padding: 10px 12px; }
  #a11y-virtual-keyboard { bottom: 6%; left: 50%; transform: translateX(-50%); width: 96%; }
}

/* --- Tiny helpers for announcer / sr-only --- */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* BOTÃO DE ACESSIBILIDADE NO NAVBAR */
#acess-open-btn {
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  line-height: 1.5;
  vertical-align: middle;
}

#acess-open-btn:hover {
  color: #0059ff !important;
  background-color: rgba(0, 89, 255, 0.05) !important;
}

#acess-open-btn:focus {
  outline: 2px solid #0059ff;
  outline-offset: 2px;
}

/* Dropdown compacto no navbar (previne quebra de layout) */
.acess-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  width: 280px;
  max-width: 88vw;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
  border: 1px solid rgba(0,0,0,0.08);
  z-index: 1200;
  color: #1a1a1a;
}

.acess-dropdown .acess-section-title { color: #333; margin-top: 8px; margin-bottom: 6px; font-size: 12px; }

.acess-dropdown .acess-control {
  background: #f7f7f7;
  color: #1a1a1a;
  border: 1px solid #d2d2d2;
}

.acess-dropdown .acess-control.active {
  background: #2d6a47;
  color: #ffffff;
  border-color: #225236;
}

/* MODAL DE ACESSIBILIDADE: aparece abaixo do navbar */
#acess-modal {
  position: fixed !important;
  top: 70px !important;
  right: 20px !important;
  width: 380px !important;
  max-width: calc(100vw - 40px) !important;
  background: none !important;
  border: none !important;
  z-index: 999998 !important;
  display: none;
}

/* Painel interno do modal */
#acess-modal .acess-modal-panel {
  width: 100% !important;
  padding: 24px 22px !important;
}

/* MOBILE — centraliza e ocupa mais espaço */
@media (max-width: 768px) {
  #acess-modal {
    top: 60px !important;
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
  }
}

/* MODAL DE ACESSIBILIDADE (NOVO DESIGN) */
#acess-modal .acess-modal-panel {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 18px;
  width: 340px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0px 10px 35px rgba(0,0,0,0.28);
  border: 1px solid rgba(0,0,0,0.09);
  animation: acessFadeIn 0.3s ease;
}

/* Melhorar texto e evitar quebra */
.acess-control {
  white-space: nowrap;
  flex: 1 1 auto;
}

#acess-modal, 
#acess-modal * {
  color: #1a1a1a !important;
  fill: #1a1a1a !important;
}

/* Animação suave */
@keyframes acessFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cabeçalho */
.acess-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 8px;
}

.acess-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.acess-close {
  font-size: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: #444;
  transition: 0.2s;
}

.acess-close:hover {
  color: #d60000;
}

/* Seções */
.acess-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-top: 18px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Linhas dos botões */
.acess-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* Botões */
.acess-control {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 7px;
  border: 1px solid #d2d2d2;
  background: #f7f7f7;
  font-size: 12px;
  cursor: pointer;
  transition: 0.15s ease;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.1;
  gap: 3px;
}

.acess-control:hover {
  background: #eaeaea;
  border-color: #bdbdbd;
}

.acess-control:active {
  background: #dcdcdc;
}

/* Botão principal */
.acess-control.active {
  background: #0059ff;
  color: white;
  border-color: #0048d6;
}

/* Botão "Restaurar tudo" */
.acess-reset {
  background: #ff4444 !important;
  color: white !important;
  border-color: #cc0000 !important;
}

.acess-reset:hover {
  background: #cc0000 !important;
}

/* Scroll estilizado */
#acess-modal .acess-modal-panel::-webkit-scrollbar {
  width: 8px;
}

#acess-modal .acess-modal-panel::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 4px;
}

#acess-modal .acess-modal-panel::-webkit-scrollbar-thumb:hover {
  background: #a9a9a9;
}

/* ============================================
   MODERNIZAÇÃO - HERO SECTION
   ============================================ */

.hero-section-modern {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
  #principais-temas .tema-card {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
  }

  #principais-temas .tema-card::before,
  #principais-temas .tema-card:hover::before {
    background: transparent !important;
  }

  #principais-temas .tema-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  }

  #principais-temas .tema-card .card-body {
    position: relative;
    z-index: 2;
  }

  #principais-temas .tema-card h5,
  #principais-temas .tema-card p {
    color: #0f172a !important;
    text-shadow: none;
  }

  #principais-temas .tema-card h5 {
    font-weight: 800;
  }

  #principais-temas .tema-card p {
    line-height: 1.5;
  }

  #principais-temas .tema-card .btn {
    background: transparent !important;
    border: 2px solid rgba(15, 23, 42, 0.35) !important;
    color: #0f172a !important;
    box-shadow: none !important;
    padding: 10px 18px;
    border-radius: 40px;
    font-weight: 700;
    transition: all 0.25s ease;
  }

  #principais-temas .tema-card .btn:hover {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    transform: translateY(-2px);
  }

  #principais-temas .tema-icon {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 2rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease;
  }

  #principais-temas .tema-card-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.58);
    transform: scale(1.02);
    z-index: 0;
  }

  #principais-temas .tema-demografia .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-demografia .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-demografia .card-body .btn,
  #principais-temas .tema-demografia .card-body .small,
  #principais-temas .tema-demografia .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-demografia .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-demografia .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-demografia .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  }

  #principais-temas .tema-demografia .card-body .btn {
    border-color: rgba(255,255,255,0.85);
  }

  #principais-temas .tema-card:hover .tema-icon {
    transform: scale(1.04);
  }

  #principais-temas .tema-demografia { background: #0f172a; }
  #principais-temas .tema-educacao { background: linear-gradient(135deg, #dcfce7 0%, #86efac 100%); }
  #principais-temas .tema-saude { background: linear-gradient(135deg, #ffe4e6 0%, #fb7185 100%); }
  #principais-temas .tema-trabalho { background: linear-gradient(135deg, #dbeafe 0%, #60a5fa 100%); }
  #principais-temas .tema-seguranca { background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%); }
  #principais-temas .tema-meio-ambiente { background: linear-gradient(135deg, #d1fae5 0%, #34d399 100%); }
  #principais-temas .tema-economia { background: linear-gradient(135deg, #fef3c7 0%, #f59e0b 100%); }
  #principais-temas .tema-financas { background: linear-gradient(135deg, #ede9fe 0%, #a78bfa 100%); }
  #principais-temas .tema-infraestrutura { background: linear-gradient(135deg, #ffedd5 0%, #fb923c 100%); }

  #principais-temas .tema-demografia .tema-icon {
    background: rgba(255,255,255,0.9);
    color: #0f172a;
    border-color: rgba(255,255,255,0.9);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
  }
  /* Make Educação card use same overlay/text treatment as Demografia when a background image is present */
  #principais-temas .tema-educacao .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-educacao .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-educacao .card-body .btn,
  #principais-temas .tema-educacao .card-body .small,
  #principais-temas .tema-educacao .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-educacao .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-educacao .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-educacao .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255,255,255,0.85);
  }
  #principais-temas .tema-educacao .tema-icon { background: rgba(255,255,255,0.95); color: #16a34a; }
  #principais-temas .tema-saude .tema-icon { background: rgba(255,255,255,0.95); color: #e11d48; }
  /* Ensure Saúde card text and controls are readable over a background image */
  #principais-temas .tema-saude .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-saude .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-saude .card-body .btn,
  #principais-temas .tema-saude .card-body .small,
  #principais-temas .tema-saude .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-saude .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-saude .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-saude .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255,255,255,0.85);
  }
  #principais-temas .tema-trabalho .tema-icon { background: rgba(255,255,255,0.95); color: #1d4ed8; }
  /* Ensure Mercado de Trabalho card text and controls are readable over a background image */
  #principais-temas .tema-trabalho .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-trabalho .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-trabalho .card-body .btn,
  #principais-temas .tema-trabalho .card-body .small,
  #principais-temas .tema-trabalho .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-trabalho .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-trabalho .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-trabalho .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255,255,255,0.85);
  }
  #principais-temas .tema-seguranca .tema-icon { background: rgba(255,255,255,0.95); color: #334155; }
  /* Ensure Segurança card text and controls are readable over a background image */
  #principais-temas .tema-seguranca .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-seguranca .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-seguranca .card-body .btn,
  #principais-temas .tema-seguranca .card-body .small,
  #principais-temas .tema-seguranca .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-seguranca .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-seguranca .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-seguranca .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255,255,255,0.85);
  }

  /* Ensure Meio Ambiente card text and controls are readable over a background image */
  #principais-temas .tema-meio-ambiente .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-meio-ambiente .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-meio-ambiente .card-body .btn,
  #principais-temas .tema-meio-ambiente .card-body .small,
  #principais-temas .tema-meio-ambiente .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-meio-ambiente .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-meio-ambiente .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-meio-ambiente .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255,255,255,0.85);
  }
  #principais-temas .tema-meio-ambiente .tema-icon { background: rgba(255,255,255,0.95); color: #15803d; }
  #principais-temas .tema-economia .tema-icon { background: rgba(255,255,255,0.95); color: #b45309; }
  /* Ensure Economia card text and controls are readable over a background image */
  #principais-temas .tema-economia .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-economia .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-economia .card-body .btn,
  #principais-temas .tema-economia .card-body .small,
  #principais-temas .tema-economia .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-economia .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-economia .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-economia .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255,255,255,0.85);
  }

  /* Ensure Finanças Públicas card text and controls are readable over a background image */
  #principais-temas .tema-financas .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-financas .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-financas .card-body .btn,
  #principais-temas .tema-financas .card-body .small,
  #principais-temas .tema-financas .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-financas .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-financas .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-financas .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255,255,255,0.85);
  }
  #principais-temas .tema-financas .tema-icon { background: rgba(255,255,255,0.95); color: #7c3aed; }
  #principais-temas .tema-infraestrutura .tema-icon { background: rgba(255,255,255,0.95); color: #ea580c; }
  /* Ensure Infraestrutura card text and controls are readable over a background image */
  #principais-temas .tema-infraestrutura .card-body {
    position: relative;
    z-index: 2;
    color: #fff;
  }

  #principais-temas .tema-infraestrutura .card-body > * {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  }

  #principais-temas .tema-infraestrutura .card-body .btn,
  #principais-temas .tema-infraestrutura .card-body .small,
  #principais-temas .tema-infraestrutura .card-body h5 {
    color: #fff !important;
  }

  #principais-temas .tema-infraestrutura .card-body h5 {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-infraestrutura .card-body .small {
    opacity: 0.98;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.98);
  }

  #principais-temas .tema-infraestrutura .card-body .btn {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    border-color: rgba(255,255,255,0.85);
  }

  /* Responsivo: reduzir altura e padding em telas pequenas */
  @media (max-width: 576px) {
    #principais-temas .card-feature.card-animated { min-height: 320px; padding: 28px 20px; }
    #principais-temas .tema-icon { width: 64px; height: 64px; font-size: 1.7rem; }
  }

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  position: relative;
  z-index: 1;
  transform: scale(1.08);
  transform-origin: center center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent !important;
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 0;
  transform: translateY(6rem);
  width: 100%;
}

.hero-text-wrapper {
  animation: none !important;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem) !important;
  font-family: 'League Spartan', 'Open Sans', 'Segoe UI', Arial, sans-serif !important;
  font-weight: 700 !important;
  color: #FFD700 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: #FFD700 !important;
  background-clip: initial !important;
  border: none !important;
  -webkit-text-stroke: 0 !important;
  margin-top: 0;
  margin-bottom: 1.5rem;
  transform: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
  line-height: 1.2;
}

@media (min-width: 769px) {
  .hero-title { transform: translateY(1.6rem) !important; }
}

.hero-year {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  background: linear-gradient(90deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  margin-top: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 3rem;
  font-weight: 300;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-cta-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta-single {
  margin-top: 21rem;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1a1a1a;
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 215, 0, 0.4);
  color: #000;
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  animation: bounce 2s infinite;
}

.scroll-text {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.scroll-icon {
  font-size: 1.5rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Animações */
.animate-fade-in {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-delay {
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.animate-fade-in-delay-2 {
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reveal transitions powered by IntersectionObserver (added to match anuario2024)
   Uses opacity + transform with a smooth cubic-bezier for fluid motion */
html.js .js-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.48s ease-out, transform 0.56s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

html.js .js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.36s ease-out, transform 0.48s ease-out;
}

html.js .js-reveal.is-visible .reveal-stagger > * {
  opacity: 1;
  transform: translateY(0);
}

html.js .js-reveal.is-visible .reveal-stagger > *:nth-child(1) { transition-delay: 0.08s; }
html.js .js-reveal.is-visible .reveal-stagger > *:nth-child(2) { transition-delay: 0.16s; }
html.js .js-reveal.is-visible .reveal-stagger > *:nth-child(3) { transition-delay: 0.24s; }
html.js .js-reveal.is-visible .reveal-stagger > *:nth-child(4) { transition-delay: 0.32s; }
html.js .js-reveal.is-visible .reveal-stagger > *:nth-child(5) { transition-delay: 0.40s; }
html.js .js-reveal.is-visible .reveal-stagger > *:nth-child(6) { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  html.js .js-reveal,
  html.js .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

html.a11y-reduced-motion .js-reveal,
html.a11y-reduced-motion .reveal-stagger > * {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ============================================
   CARDS MODERNOS (Sumário, Glossário, Expediente)
   ============================================ */

.quick-access-section {
  padding: 4rem 0;
  background: transparent;
}

.card-modern {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: #ffffff;
}

.bg-primary-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-success-gradient {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

.bg-info-gradient {
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
}

.card-modern-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.card-modern-text {
  font-size: 1rem;
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.btn-card-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  background: #2d6a47;
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
}

.btn-card-modern:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(45, 106, 71, 0.35);
  background: #245338;
  color: #ffffff;
}

/* Responsivo */
@media (max-width: 768px) {
  .hero-section-modern {
    min-height: 70vh;
  }
  
  .hero-cta-group {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn-hero {
    width: 100%;
    max-width: 300px;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .hero-title {
    margin-top: 10rem;
  }
  
  .quick-access-section {
    padding: 2rem 0;
  }
  
  .card-modern {
    padding: 2rem;
  }
}

/* ============================================
   Seção Sobre - modernização visual
   ============================================ */
#sobre {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

#sobre .section-title {
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: 0.5px;
}

#sobre .row {
  align-items: center;
}

#sobre img.img-fluid {
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#sobre img.img-fluid:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

#sobre p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #4a4a4a;
}

#sobre .btn.btn-outline-primary {
  border-width: 2px;
  border-radius: 40px;
  padding: 10px 20px;
  font-weight: 700;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#sobre .btn.btn-outline-primary:hover {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  #sobre img.img-fluid { margin-bottom: 1rem; }
}

/* ============================================
   Seção Downloads - modernização visual
   ============================================ */
.downloads-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.downloads-section .section-title {
  font-weight: 800;
  color: var(--secondary);
}

.downloads-section p {
  color: #4a4a4a;
  font-size: 1.05rem;
}

.downloads-section .btn {
  border-radius: 40px;
  padding: 12px 24px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.downloads-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* ============================================
   Footer - modernização visual
   ============================================ */
.footer {
  background: #0f1b2f;
  color: #e6ecf5;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.footer h5 {
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer p,
.footer li,
.footer a {
  color: #c9d4e3;
}

.footer a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer .list-unstyled li { margin-bottom: 0.5rem; }

.footer .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.footer .social a:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.footer .copyright {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2rem;
  padding-top: 1.5rem;
  color: #9fb1c9;
}

@media (max-width: 576px) {
  .downloads-section .btn { width: 90%; max-width: 320px; }
  
  .hero-title {
    margin-top: 8rem;
  }
  
  .hero-section-modern {
    min-height: 60vh;
  }
}
/* ===========================
 PRODUTOS CARDS (FOOTER SECTION)
 =========================== */
.footer-products {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
  border-top: 4px solid var(--primary);
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.product-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.product-card:hover i {
  transform: scale(1.1);
}

.product-card h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a3c6e;
  font-size: 1rem;
}

.product-card p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* Seção de mapas no index */
.map-feature-card {
  background: linear-gradient(135deg, rgba(33, 150, 83, 0.14) 0%, rgba(227, 244, 235, 0.92) 45%, #ffffff 100%);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.map-feature-card::before {
  content: '';
  position: absolute;
  inset: auto -90px -110px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 60, 110, 0.11) 0%, rgba(26, 60, 110, 0) 70%);
  pointer-events: none;
}

.map-feature-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(26, 60, 110, 0.08);
  color: #1a3c6e;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-feature-title {
  margin-top: 1rem;
  color: #173b67;
  font-weight: 800;
  line-height: 1.15;
}

.map-feature-text {
  color: #516173;
  font-size: 1rem;
  max-width: 42rem;
}

.map-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.map-feature-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #ffffff;
  color: #36516f;
  border: 1px solid rgba(26, 60, 110, 0.12);
  box-shadow: 0 6px 14px rgba(20, 45, 78, 0.06);
  font-size: 0.88rem;
  font-weight: 600;
}

.map-feature-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.map-feature-btn {
  min-width: 150px;
  box-shadow: 0 10px 22px rgba(33, 150, 83, 0.18);
}

.map-feature-note {
  color: #66788b;
}

@media (max-width: 991.98px) {
  .map-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .map-feature-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-feature-btn {
    width: 100%;
  }
}

/* ===========================
 FOOTER PRINCIPAL
 =========================== */
.footer-main {
  background: linear-gradient(135deg, #1a4d2e 0%, #2d6a47 100%);
  border-top: 4px solid var(--primary);
  color: #fff;
}

.footer-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem !important;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.footer-main a {
  color: #d0d0d0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-main a:hover {
  color: var(--primary);
}

.footer-main ul li {
  transition: padding-left 0.3s ease;
}

.footer-main ul li:hover {
  padding-left: 0.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary);
  transform: scale(1.1);
}

.text-light {
  color: #d0d0d0 !important;
}

/* Map embed in footer */
.map-embed {
  overflow: hidden;
  padding-bottom: 100%;
  position: relative;
  height: 0;
}

.map-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===========================
 FOOTER COPYRIGHT
 =========================== */
.footer-copyright {
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.footer-copyright small {
  color: #333 !important;
}

.footer-copyright a {
  color: #333 !important;
  text-decoration: none;
}

.footer-copyright a:hover {
  color: var(--primary) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .footer-title::after {
    width: 30px;
  }

  .product-card {
    padding: 1.5rem 1rem;
  }

  .product-card i {
    font-size: 2rem;
  }

  .product-card h5 {
    font-size: 0.95rem;
  }

  .footer-main .row {
    row-gap: 2rem;
  }

  .social-icons {
    gap: 0.8rem;
  }

  .social-link {
    width: 36px;
    height: 36px;
  }
}

/* ===========================
 AJUSTES DE TAMANHO — REPOSITÓRIO & DOWNLOADS
 =========================== */
/* Cards do Repositório: menores e menos largos */
#repositorio .card-feature.card-animated {
  min-height: 180px;
  padding: 18px 16px;
  background: linear-gradient(135deg, #e7f0ff 0%, #d3e7ff 100%);
  border: 1px solid #e3edf7;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
#repositorio .repo-col {}
@media (min-width: 1200px) {
  #repositorio .repo-col { flex: 0 0 20%; max-width: 20%; }
}

#repositorio .card-feature {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
#repositorio a.card-feature { text-decoration: none; }
#repositorio .card-feature::before { display: none; }
#repositorio .card-feature:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
#repositorio .card-feature i { font-size: 1.8rem; }
#repositorio .card-feature h6 { font-size: 0.95rem; margin: 0; }
/* Evita mudança para branco no hover global */
#repositorio .card-feature:hover i,
#repositorio .card-feature:hover h6 { color: inherit !important; }

/* Grid 3-colunas para Social (3 + 3) */
@media (min-width: 992px) {
  #repositorio .repo-grid-3 .repo-col { flex: 0 0 33.333%; max-width: 33.333%; }
}

/* Grid 4 + 3 para Economia */
@media (min-width: 992px) {
  #repositorio .repo-grid-4-3 .repo-col { flex: 0 0 25%; max-width: 25%; }
  #repositorio .repo-grid-4-3 .repo-col:nth-child(n+5) { flex: 0 0 33.333%; max-width: 33.333%; }
}

/* Grid 2-colunas para Economia (2 por linha) */
@media (min-width: 992px) {
  #repositorio .repo-grid-2 .repo-col { flex: 0 0 50%; max-width: 50%; }
}

/* Cards de Downloads: reduzir largura máxima e centralizar */
.footer-products .product-card {
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, #f0fff0 0%, #e2f5e2 100%);
  border-color: #e8efe8;
  justify-content: center;
  min-height: 160px;
}
.footer-products .product-card i { font-size: 1.8rem; }
.footer-products .product-card h5 { font-size: 0.95rem; }
.footer-products .product-card p { font-size: 0.85rem; }

/* Portfolio Button Styles */
.btn-lg-square {
  width: 48px;
  height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}

.portfolio-inner {
  position: relative;
  overflow: hidden;
}

.portfolio-inner::before,
.portfolio-inner::after {
  position: absolute;
  content: '';
  width: 0;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(15, 66, 41, 0.6);
  transition: 0.5s;
}

.portfolio-inner::after {
  left: auto;
  right: 0;
}

.portfolio-inner:hover::before,
.portfolio-inner:hover::after {
  width: 50%;
}

.portfolio-inner .portfolio-text {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
  z-index: 3;
  opacity: 0;
}

.portfolio-inner .portfolio-text .d-flex {
  flex-direction: row !important;
  gap: 0 !important;
}

.portfolio-inner:hover .portfolio-text {
  transition-delay: 0.3s;
  opacity: 1;
}

.portfolio-inner .portfolio-text .btn {
  background: #ffffff;
  color: #0f4229;
  border: 1px solid #0f4229;
}

.portfolio-inner .portfolio-text .btn:hover {
  background: #0f4229;
  color: #ffffff;
}

/* Demografia: centralizar o parágrafo verticalmente dentro do card */
.tema-demografia .card-body p {
  margin-top: auto;
  margin-bottom: auto;
  text-align: center;
}

/* Força: hover do btn-tema-card => fundo azul escuro, manter borda branca e letras brancas */
.tema-card .btn-tema-card:hover,
.tema-card .btn-tema-card:focus,
.tema-card .btn-tema-card:active {
  background: var(--secondary) !important;
  color: #fff !important;
  border-color: #fff !important;
  transform: translateY(-2px);
}

/* Regra mais específica para garantir a borda branca visível (sobrescreve possíveis conflitos) */
.card-feature.tema-card .card-body .btn-tema-card:hover,
.card-feature.tema-card .card-body .btn-tema-card:focus,
.card-feature.tema-card .card-body .btn-tema-card:active {
  background: var(--secondary) !important;
  color: #fff !important;
  border: 1px solid #fff !important;
  box-shadow: none !important;
}

/* Regra fallback: desenha linha branca interna e outline para garantir visibilidade
   quando algum outro estilo remove ou torna a borda invisível. */
.card-feature.tema-card .card-body .btn-tema-card:hover,
.card-feature.tema-card .card-body .btn-tema-card:focus,
.card-feature.tema-card .card-body .btn-tema-card:active {
  outline: 1px solid #fff !important;
  -webkit-box-shadow: inset 0 0 0 1px #fff !important;
  box-shadow: inset 0 0 0 1px #fff !important;
}

