/* Blog da Descobria (/blog/): tipografia do artigo e peças do blog.
   Complementa o site.css, que continua cuidando do cabeçalho, hero, botões,
   tabelas, FAQ, faixa de CTA e rodapé. Tudo aqui fica preso às classes do
   blog (.post-*, .article): nada muda as páginas /consulta-*.
   Mobile primeiro (375px); telas maiores só ganham respiro. */

/* ---------- Coluna de leitura (hero e texto na mesma largura) ---------- */
.post-hero .container,
.post-main .container { max-width: 808px; }

/* O Blog é uma seção: o item do menu fica realçado também dentro do artigo. */
.top nav a[aria-current="true"] { color: var(--ink); }

/* ---------- Hero ---------- */
.post-hero { padding: 22px 0 28px; }
@media (min-width: 768px) { .post-hero { padding: 40px 0 46px; } }
.post-hero .crumbs { margin-bottom: 14px; overflow-wrap: anywhere; }
.post-hero h1 { font-size: clamp(26px, 5.4vw, 42px); line-height: 1.15; }
.post-hero .lead { font-size: clamp(16px, 2vw, 18px); margin-bottom: 16px; }
.post-meta { font-size: 13.5px; line-height: 1.55; color: #94a3b8; margin: 0; }
.post-meta time { color: #cbd5e1; }

/* Botão no topo: a primeira coisa clicável, sem precisar rolar */
.post-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 20px; }
.post-hero-btn { min-height: 52px; padding: 12px 24px; font-size: 16.5px; font-weight: 700; border-radius: 12px;
  box-shadow: 0 10px 28px rgba(28, 114, 232, .45); }
.post-hero-btn span, .post-cta-btn span { display: inline-block; transition: transform .15s; }
.post-hero-btn:hover span, .post-cta-btn:hover span { transform: translateX(3px); }
.post-hero-note { font-size: 13.5px; color: #cbd5e1; }
@media (max-width: 639px) {
  .post-hero-btn { width: 100%; }
  .post-hero-note { width: 100%; text-align: center; }
}

/* ---------- Texto do artigo ---------- */
.post-main { padding: 28px 0 56px; }
@media (min-width: 768px) { .post-main { padding: 44px 0 72px; } }

.article { font-size: 17px; line-height: 1.7; overflow-wrap: break-word; }
@media (min-width: 768px) { .article { font-size: 17.5px; line-height: 1.75; } }
.article p { margin: 0 0 16px; }
.article h2 { font-size: clamp(22px, 3.2vw, 28px); margin: 34px 0 12px; scroll-margin-top: 76px; }
.article h3 { font-size: clamp(18px, 2.4vw, 20px); margin: 28px 0 10px; scroll-margin-top: 76px; }
.article h2 + h3 { margin-top: 18px; }
.article ul,
.article ol { margin: 0 0 20px; padding-left: 22px; }
.article li { margin-bottom: 8px; padding-left: 2px; }
.article li::marker { color: var(--brand); }
.article ol > li::marker { font-weight: 700; }
.article li > ul,
.article li > ol { margin: 8px 0 0; }
.article strong { color: var(--ink); }
.article blockquote { margin: 24px 0; padding: 4px 0 4px 18px; border-left: 3px solid #bfd4f6; color: var(--muted); font-style: italic; }
.article blockquote p:last-child { margin-bottom: 0; }
.article code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .88em; background: #f1f5f9; border-radius: 6px; padding: 1px 6px; }

/* Resposta direta (o visual vem do .answer do site.css) */
.article .answer { font-size: 17px; line-height: 1.65; margin-bottom: 28px; }
@media (min-width: 768px) { .article .answer { font-size: 18px; } }

/* Peças do site.css dentro do texto: só o espaçamento */
.article .table-wrap { margin: 6px 0 24px; }
.article table { font-size: 15px; line-height: 1.55; }
.article td:first-child { min-width: 120px; }
.article .note { margin: 24px 0; font-size: 15.5px; line-height: 1.65; }
.article .note strong { color: #78350f; } /* mesma cor da nota nas páginas /consulta-* */
.article .note p:last-child { margin-bottom: 0; }
.article .note ul { margin: 8px 0 0; padding-left: 20px; }
.article .note li { margin-bottom: 2px; }
.article .note li::marker { color: inherit; }
.article .example { margin: 6px 0 24px; font-size: 13px; }
@media (min-width: 640px) { .article .example { font-size: 13.5px; } }

/* ---------- Caixa de cadastro no meio do texto (destaque) ---------- */
.post-cta { position: relative; overflow: hidden; margin: 32px 0; padding: 24px 20px; border-radius: 16px; color: #fff;
  background: radial-gradient(130% 150% at 0% 0%, #3b8dff 0%, #1C72E8 40%, #0b3f9e 100%);
  box-shadow: 0 18px 40px rgba(11, 63, 158, .32); }
.post-cta::after { content: ""; position: absolute; right: -70px; top: -70px; width: 200px; height: 200px;
  border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.article .post-cta-title { position: relative; font-size: 21px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em;
  color: #fff; margin: 0 0 12px; }
.article .post-cta-points { position: relative; list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.article .post-cta-points li { position: relative; margin: 0; padding-left: 26px; font-size: 15px; line-height: 1.5; color: #dbeafe; }
.article .post-cta-points li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(255, 255, 255, .2); color: #fff; font-size: 11px; font-weight: 800;
  line-height: 18px; text-align: center; }
.post-cta-actions { position: relative; display: flex; }
.post-cta-btn { flex: 1 1 auto; min-height: 54px; padding: 12px 24px; font-size: 17px; font-weight: 800; border-radius: 12px;
  background: #fff; color: #0b3f9e; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.post-cta-btn:hover { background: #eff6ff; color: #0b3f9e; }
@media (min-width: 640px) {
  .post-cta { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center; padding: 28px 30px; }
  .article .post-cta-title { grid-column: 1; }
  .article .post-cta-points { grid-column: 1; margin-bottom: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
  .article .post-cta-points li { white-space: nowrap; }
  .post-cta-actions { grid-column: 2; grid-row: 1 / span 2; }
  .post-cta-btn { flex: 0 0 auto; }
}

/* ---------- Tabela no celular: cada linha vira um cartão ----------
   (o build_blog.py põe data-label com o nome da coluna em cada <td>) */
@media (max-width: 639px) {
  .article .table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .article .table-wrap table,
  .article .table-wrap tbody,
  .article .table-wrap tr,
  .article .table-wrap td { display: block; width: 100%; }
  .article .table-wrap thead { display: none; }
  .article .table-wrap tr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
  .article .table-wrap td { border: 0; padding: 3px 0; min-width: 0; font-size: 15.5px; }
  .article .table-wrap td:first-child { font-size: 16.5px; font-weight: 700; color: var(--ink); padding-bottom: 6px; }
  .article .table-wrap td[data-label]:not(:first-child)::before { content: attr(data-label); display: block;
    font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #64748b; margin-bottom: 1px; }
}

/* ---------- FAQ e nota de uso responsável ---------- */
.post-faq { margin-top: 44px; }
.post-faq h2 { margin-top: 0; }
.post-faq .faq { max-width: none; }
.post-faq .faq summary { font-size: 16px; line-height: 1.5; }
.post-faq .faq details > div { font-size: 15.5px; line-height: 1.7; }
.article .post-note { margin: 36px 0 0; }

/* ---------- Fim do artigo ---------- */
.post-end { margin-top: 48px; }
.post-end .band { margin-bottom: 40px; }
@media (min-width: 640px) { .post-end .band { padding: 36px 32px; } }
.post-end-title { font-size: 20px; margin: 0 0 14px; }
.post-end .related + .post-end-title,
.post-end .post-list + .post-end-title { margin-top: 36px; }
.related.related-one { grid-template-columns: 1fr; }

/* ---------- Lista de artigos (índice e "Mais artigos") ---------- */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.post-list + .post-end-title { margin-top: 36px; }
.post-card { position: relative; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .15s, box-shadow .15s; }
.post-card:hover { border-color: #bfd4f6; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); }
.post-card:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(28, 114, 232, .15); }
.post-card .post-card-cat { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--brand); margin: 0 0 6px; }
.post-card h2,
.post-card h3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 8px; }
.post-card h2 a,
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card:hover h2 a,
.post-card:hover h3 a { color: var(--brand-600); }
/* o cartão inteiro é clicável, mas o link continua sendo só o título */
.post-card h2 a::after,
.post-card h3 a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: var(--radius); }
.post-card p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 10px; }
.post-card .post-card-meta { font-size: 13px; color: #64748b; margin: 0; }
@media (min-width: 640px) {
  .post-card { padding: 20px 22px; }
  .post-card h2 { font-size: 20px; }
}

.post-empty { border: 1px dashed #cbd5e1; border-radius: var(--radius); background: var(--soft); padding: 22px 18px; text-align: center; color: var(--muted); }
.post-empty p { margin: 0 0 6px; }
.post-empty p:last-child { margin-bottom: 0; }
.post-empty strong { color: var(--ink); }
