/* ===============================
   🎨 Estilo Base
=============================== */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent: #2E8B57;
  --accent-dark: #1E3A5F;
  --border: #e2e8f0;
  --tooltip-bg: #1E3A5F;
  --tooltip-text: #fff;
}
[data-theme="dark"], body.dark-mode {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #34d399;
  --accent-dark: #60a5fa;
  --border: #334155;
  --tooltip-bg: #FFD966;
  --tooltip-text: #1E1E1E;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0; padding: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.3s, color 0.3s;
}

header {
  background: linear-gradient(90deg, #1E3A5F, #2E8B57);
  color: white;
  padding: 20px;
  text-align: center;
}

/* ===============================
   📌 Navegação
=============================== */
nav.navbar {
  background-color: var(--accent);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.logo {
  font-weight: bold;
  color: white;
  margin-right: 20px;
}

.menu {
  display: none;
  flex-direction: column;
  background-color: var(--accent);
  padding: 10px;
  width: 100%;
}

.menu.active { display: flex; }

.menu a {
  color: white;
  margin: 8px 0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}
.menu a:hover { color: #FFD966; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-toggle, #theme-toggle {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}
.menu-toggle { font-size: 1.5em; }
#theme-toggle { font-size: 1.3em; }

/* NOVO DATA4MAX: Esconde menus extras sem apagar HTML */
.hide-menu { display: none!important; }

/* ===============================
   📌 HERO - NOVO BLOCO CENTRALIZADO
=============================== */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-card) 100%);
}

.hero.container {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--accent-dark);
  line-height: 1.2;
  margin: 0 0 16px 0;
}

.hero p {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  margin: 0 0 28px 0;
  max-width: 60ch;
  margin-inline: auto;
}

.btn-cta { /* CORRIGIDO: era.hero.btn-cta */
  display: inline-block;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 1.1em;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s; /* CORRIGIDO.2s */
}
.btn-cta:hover {
  background: #0D1B2A;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.4);
}
body.dark-mode.btn-cta { /* CORRIGIDO */
  background-color: #FFD966;
  color: #1E1E1E;
}
body.dark-mode.btn-cta:hover {
  background-color: #e6c25e;
}

/* ===============================
   📌 Banner
=============================== */
.banner {
  position: relative;
  background-image: url('../img/banner-bg.webp?v=2'), url('../img/banner-bg.jpg?v=2');
  background-position: center left; /* MUDOU DE center PRA center left */
  background-size: cover;
  background-repeat: no-repeat;
  
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.banner.overlay { /* CORRIGIDO: era.banner.overlay */
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 217, 102, 0.6);
}
.banner-content { position: relative; z-index: 2; }
.banner h2 {
  font-size: 2.8em;
  font-weight: 700;
  color: var(--accent-dark);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.banner p { font-size: 1.3em; margin-top: 10px; color: var(--accent-dark); }

/* ===============================
   📌 Seções
=============================== */
.section {
  padding: 25px;
  background-color: var(--bg-card);
  margin: 20px auto;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  max-width: 900px;
  transition: transform 0.3s ease;
}
.section:hover { transform: translateY(-5px); }
.section h2 { color: var(--accent-dark); }

/* ===============================
   📌 Formulário
=============================== */
form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: auto;
}
form input, form select, form button {
  margin-top: 10px;
  padding: 10px;
}
form button {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}
form button:hover { background-color: #256d46; }

/* ===============================
   📌 Mensagem de Confirmação
=============================== */
#mensagemConfirmacao {
  display: none;
  text-align: center;
  margin-top: 20px;
  padding: 20px;
  border: 2px solid #4CAF50;
  border-radius: 8px;
  background-color: #f9fff9;
  color: #333;
}
#mensagemConfirmacao h2 { color: #4CAF50; margin-bottom: 10px; }
#mensagemConfirmacao p { margin: 8px 0; font-size: 16px; }

/* ===============================
   📌 Animações
=============================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   🌙 Modo Escuro - UNIFICADO
=============================== */
body.dark-mode header,
body.dark-mode.footer {
  background: linear-gradient(90deg, #0D1B2A, #1B4332);
}
body.dark-mode.footer { background-color: #08182F; } /* Override específico do footer */

body.dark-mode nav { background-color: #1B4332; }
body.dark-mode.menu a { color: #EAEAEA; } /* CORRIGIDO */
body.dark-mode.banner {
  background: url('../img/banner-dark.jpg') center/cover no-repeat;
}
body.dark-mode.banner.overlay { background: rgba(0,0,0,0.5); } /* CORRIGIDO */
body.dark-mode.banner h2,
body.dark-mode.banner p { color: #FFD966; }

body.dark-mode.section {
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 4px 10px rgba(255,255,255,0.1);
}
body.dark-mode form button { background-color: #1B4332; }
body.dark-mode #mensagemConfirmacao {
  background-color: #1E1E1E;
  border-color: #4CAF50;
  color: #EAEAEA;
}
body.dark-mode.footer.legal-footer-wrap { color: #F8F9FA; }
body.dark-mode.footer.legal-footer-wrap::before { background: rgba(255, 193, 7, 0.35); }
body.dark-mode.rodape-conteudo a:hover { color: #FFE066; }
body.dark-mode.mapa-details { background: rgba(0,0,0,0.2); } /* CORRIGIDO */

/* APAGADO: @media (prefers-color-scheme: dark) - Redundante com body.dark-mode */

/* ===============================
   📌 Responsividade
=============================== */
@media (min-width: 769px) {
.menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    flex: 1;
  }
.menu-toggle { display: none; }
}
@media (max-width: 768px) {
.banner h2 { font-size: 2em; }
.hero h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
.section { margin: 10px; padding: 20px; }
.section h2 { font-size: 1.3em; }
.iframe-pesquisa { min-height: 1200px; }
}
@media (max-width: 600px) {
.youtube-container { flex-direction: column; align-items: flex-start; }
.youtube-link { width: 100%; }
.youtube-link a { display: block; text-align: center; width: 100%; }
.playlist-banner { padding: 12px 14px; }
.playlist-banner h3 { font-size: 15px; }
.footer.legal-footer-wrap { font-size: 11px; padding: 0 12px; max-width: 95%; }
}
@media (max-width: 480px) {
.banner { padding: 30px; }
.banner h2 { font-size: 1.6em; }
.hero { padding: 60px 20px 40px; }
.section { margin: 5px; padding: 15px; }
.menu a { font-size: 0.9em; }
.iframe-pesquisa { min-height: 1600px; }
}

/* ===============================
   📌 Seção de Pesquisa
=============================== */
.pesquisa h2 {
  color: var(--accent-dark);
  text-align: center;
  margin-bottom: 15px;
}
.pesquisa p {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 25px;
  font-size: 1.1em;
}
.iframe-pesquisa {
  width: 100%;
  min-height: 80vh;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ===============================
   📌 Aviso LGPD
=============================== */
.aviso-lgpd {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #222;
  color: #fff;
  padding: 15px;
  text-align: center;
  font-size: 14px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.aviso-lgpd a { color: #ffcc00; text-decoration: underline; }
.aviso-lgpd button {
  padding: 5px 10px;
  background-color: #ffcc00;
  border: none;
  cursor: pointer;
}

/* ===============================
   📌 MAPA
=============================== */
.mapa-subtitulo {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 20px auto;
  color: var(--text-muted);
}

.mapa-btn-wrapper {
  text-align: center;
  margin: 0 0 25px 0;
  display: block;
}

.btn-mapa {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s;
}
.btn-mapa:hover { transform: translateY(-2px); background-color: #e6c25e; color: #1E3A5F; }

.btn-faq {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  font-size: 1.05em;
}

.mapa-legenda {
  font-size: 0.9em;
  color: var(--text-muted);
  margin-top: 8px;
}

.mapa-accordion { margin-top: 30px; }

.mapa-cta {
  text-align: center;
  font-weight: bold;
  color: var(--accent-dark);
  margin-bottom: 15px;
}

.mapa-details {
  margin-bottom: 15px;
  background: rgba(255,255,255,0.5);
  border-radius: 12px;
  padding: 10px 15px;
  border: 1px solid var(--border);
}

.mapa-details summary {
  font-weight: bold;
  cursor: pointer;
  font-size: 1.05em;
  list-style: none;
}
.mapa-details summary::-webkit-details-marker { display: none; }
.mapa-details summary::before { content: '▶ '; font-size: 0.8em; }
.mapa-details[open] summary::before { content: '▼ '; }

.mapa-details-content {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ===============================
   📌 MATERIAIS
=============================== */
.materiais-lista { list-style: none; padding-left: 0; }
.materiais-lista li { margin-bottom: 25px; }
.materiais-lista li:last-child { margin-bottom: 0; }

.materiais-link { font-weight: bold; color: var(--accent); text-decoration: none; font-size: 1.05em; }
.materiais-titulo { font-weight: bold; color: var(--accent-dark); margin: 0 0 10px 0; font-size: 1.05em; }
.materiais-video-wrapper { display: block; width: 100%; }

p.tooltip-container {
  display: inline-block;
  width: auto;
  margin: 0 0 10px 0;
}
.video-container { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* === ESTILO DO BOTÃO YOUTUBE === */
.youtube-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.youtube-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  color: var(--text-main);
}
.youtube-icon { flex-shrink: 0; }
.youtube-link a {
  background: #FF0000;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: background 0.2s;
}
.youtube-link a:hover { background: #cc0000; }

/* ===============================
   📌 Tooltip Customizado
=============================== */
.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip {
  visibility: hidden;
  opacity: 0;
  width: max-content;
  max-width: 260px;
  background-color: var(--tooltip-bg);
  color: var(--tooltip-text);
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
  font-size: 0.9em;
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  pointer-events: none;
  white-space: normal;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: var(--tooltip-bg) transparent;
}

.tooltip-container:hover .tooltip { /* VOLTOU O ESPAÇO AQUI */
  visibility: visible;
  opacity: 1;
}

/* ===============================
   📌 AGENDA - Alinhado à esquerda
=============================== */
#agenda h2.tooltip-container {
  display: inline-block;
  text-align: left;
  margin: 0 0 15px 0;
 }

/* ===============================
   📌 MAPA - Centralizado só aqui
=============================== */
.mapa-btn-wrapper.tooltip-container {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

/* ===============================
   📌 Faixa Playlist - UNIFICADO
=============================== */
.playlist-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  box-sizing: border-box;
  width: 100%;
}

.playlist-banner:hover {
  border-color: #FF0000;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.08);
  transform: translateY(-2px);
}

.playlist-banner.yt-icon {
  width: 28px;
  height: 28px;
  color: #FF0000;
  flex-shrink: 0;
}

.playlist-banner h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  line-height: 1.4;
  white-space: normal;
}
/* ===============================
   📌 RODAPÉ - 2 VERSÕES - FIX MOBILE
=============================== */

/* TRAVA GERAL PRA NÃO ESTOURAR */
html, body {
  overflow-x: hidden !important;
}

/* MODO CLARO - Azul Receita Federal */
.footer {
  background-color: #003A6B !important; /* TROQUEI AQUI: era #0A3D91 */
  color: #fff !important;
  text-align: center !important;
  padding: 18px 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.footer .rodape-conteudo {
  display: flex !important;
  justify-content: center !important;
  gap: 8px 12px !important;
  font-size: 14px !important;
  margin-bottom: 10px !important;
  flex-wrap: wrap !important;
  max-width: 1200px !important;
  margin: 0 auto 10px auto !important;
  word-wrap: break-word !important;
}

.footer .rodape-conteudo .separador {
  color: #fff !important;
  opacity: 0.7 !important;
}

.footer .rodape-conteudo a {
  color: #FFC107 !important; /* Amarelo continua igual, combina com o azul */
  text-decoration: none !important;
  font-weight: 600 !important;
}
.footer .rodape-conteudo a:hover {
  color: #FFD43B !important;
  text-decoration: underline !important;
}

/* Bloco Legal */
.footer .legal-footer-wrap {
  font-size: 12.5px !important;
  line-height: 1.6 !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 15px auto 0 auto !important;
  padding: 15px 10px 0 10px !important;
  text-align: center !important;
  box-sizing: border-box !important;
  border-top: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.footer .legal-footer-wrap p {
  margin: 5px 0 !important;
  word-wrap: break-word !important;
}

.footer .legal-footer-wrap::before {
  content: none !important;
}

/* DESTAQUE AZUL CLARO - já combina com o novo azul */
.footer .legal-footer-wrap .label-destaque {
  color: #A7D2FF !important; /* Esse azul claro ficou perfeito com #003A6B */
  font-weight: 600 !important;
}

/* =========================================
   MODO ESCURO - DEGRADÊ VERDE
========================================= */
body.dark-mode .footer {
  background: linear-gradient(90deg, #0D1B2A, #1B4332) !important;
}

body.dark-mode .footer .legal-footer-wrap { 
  border-top: 1px solid rgba(255, 193, 7, 0.3) !important; /* Linha amarela no dark */
}

body.dark-mode .footer .rodape-conteudo a:hover { 
  color: #FFE066 !important; 
}

body.dark-mode .footer .legal-footer-wrap .label-destaque {
  color: #A7D2FF !important;
}
/* ===============================
   📌 FAIXA PLAYLIST YOUTUBE - AJUSTE
=============================== */
.playlist-banner {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  background: linear-gradient(90deg, #FF0000, #CC0000) !important; /* Vermelho YT */
  color: #fff !important;
  text-decoration: none !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  margin-top: 20px !important;
  font-weight: 600 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.playlist-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.playlist-banner h3 {
  font-size: 15px !important;
  margin: 0 !important;
  color: #fff !important;
}

/* ÍCONE YOUTUBE PEQUENO E VERMELHO */
.playlist-banner .yt-icon {
  width: 20px !important;   /* Tamanho compacto */
  height: 20px !important;
  fill: #fff !important;    /* Branco dentro do fundo vermelho */
  flex-shrink: 0 !important;
}

/* MODO ESCURO */
body.dark-mode .playlist-banner {
  background: linear-gradient(90deg, #FF0000, #A00000) !important;
}
