/* ============================================================
   GUIAS — hub de conteúdo + artigos (SEO/topo de funil)
   Reaproveita as variáveis do base.css.
   ============================================================ */

/* ── Hub (guias.html) ── */
.guias-topo { padding-block: clamp(28px, 5vw, 52px) clamp(8px, 2vw, 16px); }
/* cabeçalho e grade compartilham a mesma largura → bordas alinhadas
   (escopo no <main> p/ não afetar o header/footer globais) */
.pagina-guias main .dp-container { max-width: var(--container-estreito); }
.guias-grade {
  display: grid; gap: clamp(16px, 2.5vw, 24px);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding-bottom: clamp(40px, 6vw, 72px);
}
.guia-card {
  display: flex; flex-direction: column; gap: var(--sp-2);
  background: #fff; border: 1px solid var(--borda, #e7ecf3); border-radius: var(--r-lg, 18px);
  padding: clamp(18px, 2.5vw, 26px); box-shadow: var(--sombra-sm, 0 2px 10px rgba(16,40,80,.06));
  text-decoration: none; color: inherit; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.guia-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-lg, 0 18px 40px rgba(16,40,80,.14)); border-color: transparent; }
.guia-card .eyebrow { margin: 0; }
.guia-card h2 { font-size: var(--fs-h3); margin: var(--sp-1) 0 0; }
.guia-card p { color: var(--texto-suave, #5a6576); line-height: 1.6; margin: 0; flex: 1; }
.guia-card-link { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--azul-700, #0a3d91); font-weight: 700; margin-top: var(--sp-2); }

/* ============================================================
   ARTIGO (guias/*.html) — hierarquia + ritmo calculados (grade --sp-*)
   Fluxo de texto escopado por combinador de filho (.guia > …) para não
   vazar no TOC / box / FAQ / cards.
   ============================================================ */
.pagina-guia .secao { padding-block: 0; } /* o ritmo do topo é do .guia (evita o vão do --pad-secao) */
.guia { max-width: 72ch; margin-inline: auto; padding-block: clamp(24px,4vw,44px) clamp(56px,8vw,96px); }

/* ── Cabeçalho do artigo ── */
.guia .breadcrumb { margin-bottom: clamp(18px,3vw,26px); }
.guia .eyebrow { margin: 0 0 var(--sp-2); }
.guia > h1 { margin: 0 0 var(--sp-4); max-width: 22ch; line-height: 1.08; }
/* vale para o hub (.guias-topo) e para o artigo (.guia) — o corpo usa
   .guia > p:not(.guia-lead), então não há conflito de margens aqui */
.guia-lead {
  font-size: var(--fs-lead); line-height: 1.65; color: var(--texto-suave);
  margin: var(--sp-4) 0 clamp(32px,5vw,48px); padding-bottom: clamp(28px,4vw,40px);
  border-bottom: 1px solid var(--borda);
}

/* ── Seções (h2) — tick da marca em vez de filete pesado ── */
.guia > h2 {
  position: relative; margin: clamp(44px,6vw,68px) 0 var(--sp-4); padding-top: var(--sp-5);
  font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -.02em; color: var(--texto);
  scroll-margin-top: 96px;
}
.guia > h2::before {
  content: ""; position: absolute; top: 0; left: 0; width: 38px; height: 3px;
  border-radius: var(--r-full); background: var(--grad-marca);
}
/* 1ª seção após o lead/TOC: o lead já separa o cabeçalho → menos espaço no topo */
.guia .guia-lead + h2, .guia-toc + h2 { margin-top: clamp(28px,4vw,40px); }

.guia > h3 { margin: var(--sp-6) 0 var(--sp-2); font-size: var(--fs-h3); color: var(--texto); }

/* ── Texto corrido + listas (marcadores da marca) ── */
.guia > p:not(.guia-lead) { color: var(--texto-suave); line-height: 1.8; margin: var(--sp-4) 0; }
.guia > h2 + p, .guia > h3 + p { margin-top: var(--sp-3); }

.guia > ul, .guia > ol { margin: var(--sp-5) 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.guia > ul > li, .guia > ol > li { position: relative; padding-left: var(--sp-7); color: var(--texto-suave); line-height: 1.7; }
.guia > ul > li::before {
  content: ""; position: absolute; left: 6px; top: .62em; width: 7px; height: 7px;
  border-radius: var(--r-full); background: var(--azul-600);
}
.guia > ol { counter-reset: gli; }
.guia > ol > li { counter-increment: gli; }
.guia > ol > li::before {
  content: counter(gli); position: absolute; left: 0; top: .1em;
  width: 24px; height: 24px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--azul-100); color: var(--azul-800); font-size: var(--fs-2xs); font-weight: 800;
}
.guia li strong, .guia strong { color: var(--texto); font-weight: 700; }

/* links de TEXTO (não afeta .btn nem chips/TOC, que são estilizados à parte) */
.guia > p a, .guia > ul a, .guia > ol a, .guia-box a {
  color: var(--azul-700); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
}
.guia > p a:hover, .guia > ul a:hover, .guia > ol a:hover, .guia-box a:hover { color: var(--azul-900); }

/* ── Índice (TOC) — card numerado, 2 colunas no desktop ── */
.guia-toc {
  background: var(--azul-50); border: 1px solid var(--borda); border-radius: var(--r-lg);
  padding: clamp(20px,3vw,28px) clamp(20px,3vw,30px); margin: clamp(28px,4vw,40px) 0;
}
.guia-toc strong {
  display: block; margin-bottom: var(--sp-3);
  font-size: var(--fs-2xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--azul-800);
}
.guia-toc ul { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: var(--sp-1) var(--sp-5); }
@media (min-width:560px){ .guia-toc ul { grid-template-columns: 1fr 1fr; } }
.guia-toc li { counter-increment: toc; margin: 0; }
.guia-toc a {
  display: flex; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) 0;
  color: var(--tinta-2); text-decoration: none; font-weight: 600; line-height: 1.35;
}
.guia-toc a::before {
  content: counter(toc,decimal-leading-zero); flex-shrink: 0;
  font-family: var(--ff-display); font-size: var(--fs-xs); font-weight: 800; color: var(--azul-600);
  font-variant-numeric: tabular-nums;
}
.guia-toc a:hover { color: var(--azul-800); }

/* ── Caixa de destaque ── */
.guia-box {
  background: var(--azul-50); border: 1px solid rgba(10,61,145,.12); border-left: 3px solid var(--azul-600);
  border-radius: var(--r); padding: clamp(16px,2.5vw,22px) clamp(18px,3vw,26px); margin: clamp(28px,4vw,40px) 0;
}
.guia-box p { margin: var(--sp-1) 0; color: var(--tinta-2); line-height: 1.7; }
.guia-box strong { color: var(--azul-800); }

/* ── Tabela comparativa ── */
.guia-tabela-wrap { overflow-x: auto; margin: clamp(28px,4vw,40px) 0; border: 1px solid var(--borda); border-radius: var(--r); }
.guia-tabela { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 460px; }
.guia-tabela th, .guia-tabela td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--borda); vertical-align: top; }
.guia-tabela tbody tr:last-child td { border-bottom: 0; }
.guia-tabela thead th {
  background: var(--azul-50); color: var(--azul-800); font-weight: 800;
  font-size: var(--fs-2xs); letter-spacing: .04em; text-transform: uppercase;
}
.guia-tabela tbody tr:nth-child(even) td { background: #fafbfd; }
.guia-tabela td:first-child { font-weight: 700; color: var(--texto); }

/* ── FAQ (<details>) — chevron animado ── */
.guia-faq { margin: clamp(28px,4vw,40px) 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.guia-faq details {
  border: 1px solid var(--borda); border-radius: var(--r); background: #fff; overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t);
}
.guia-faq details[open] { border-color: var(--azul-200); box-shadow: var(--sombra-sm); }
.guia-faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) clamp(16px,2.5vw,20px); font-weight: 700; color: var(--texto);
}
.guia-faq summary::-webkit-details-marker { display: none; }
.guia-faq summary::after {
  content: ""; flex-shrink: 0; width: 9px; height: 9px;
  border-right: 2.5px solid var(--azul-600); border-bottom: 2.5px solid var(--azul-600);
  transform: rotate(45deg); transition: transform var(--t); margin-right: 3px;
}
.guia-faq details[open] summary::after { transform: rotate(225deg); }
.guia-faq .guia-faq-resp { color: var(--texto-suave); line-height: 1.7; padding: 0 clamp(16px,2.5vw,20px) var(--sp-4); }

/* ── CTA + relacionados ── */
.guia-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: clamp(32px,5vw,48px) 0 var(--sp-2); }
.guia-relacionados { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.guia-relacionados a {
  display: inline-flex; align-items: center; border: 1px solid var(--borda); border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4); font-weight: 600; font-size: var(--fs-sm); text-decoration: none;
  color: var(--azul-800); background: #fff; transition: border-color var(--t), background var(--t), color var(--t);
}
.guia-relacionados a:hover { border-color: var(--azul-200); background: var(--azul-50); color: var(--azul-900); }
