/* ══════════════════════════════════════════════════════════════
   AUTEM — Artigo de blog

   Carregado só em posts (ver inc/autem-blog.php). Todo o estilo é
   escopado em .autem-post, então nada aqui vaza para as páginas
   montadas pelo Elementor nem briga com o tema.

   A ideia central: o conteúdo que a automação envia é HTML
   SEMÂNTICO e sem estilo — <h2>, <p>, <ul>, <blockquote>, <figure>.
   A aparência mora aqui. Assim um ajuste de design vale para todos
   os artigos de uma vez, sem reescrever post nenhum.
   ══════════════════════════════════════════════════════════════ */

.autem-post {
  --ap-blue:    #3a4fd6;
  --ap-green:   #45ebcb;
  --ap-ink:     #0d0a1a;
  --ap-muted:   #5a5470;
  --ap-border:  #e2e0ee;
  --ap-soft:    #f9fafd;
  --ap-lav:     #e4edff;
  --ap-largura: 720px;   /* ~75 caracteres por linha, confortável para leitura */

  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--ap-ink);
  background: #fff;
}

/* ─── Cabeçalho ─── */
.autem-post-hero {
  background: var(--ap-blue);
  color: #fff;
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
}
.autem-post-wrap { width: 100%; max-width: var(--ap-largura); margin: 0 auto; padding: 0 24px; }
.autem-post-hero .autem-post-wrap { max-width: 880px; }

.autem-post-trilha { font-size: 13px; color: rgba(255,255,255,.75); margin: 0 0 20px; }
.autem-post-trilha a { color: rgba(255,255,255,.75); text-decoration: none; }
.autem-post-trilha a:hover { color: #fff; text-decoration: underline; }
.autem-post-trilha span { margin: 0 6px; }

/* O style.css do site tem `a, button … { min-height: 44px }` para touch
   target. A etiqueta é inline-block, então herdava os 44px e o texto subia
   para o topo da caixa. */
.autem-post-cat {
  display: inline-block;
  min-height: 0; line-height: 1.4;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  background: var(--ap-green); color: var(--ap-blue);
  padding: 5px 11px; border-radius: 4px; text-decoration: none;
}
.autem-post-titulo {
  font-size: clamp(30px, 4.4vw, 48px); font-weight: 400;
  letter-spacing: -1.6px; line-height: 1.12;
  margin: 18px 0 16px; color: #fff; text-wrap: balance;
}
.autem-post-resumo {
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7;
  color: rgba(255,255,255,.88); margin: 0; max-width: 680px;
}
.autem-post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 26px; font-size: 14px; color: rgba(255,255,255,.8);
}
.autem-post-meta .sep { opacity: .45; }

/* ─── Capa ─── */
.autem-post-capa { max-width: 1000px; margin: 0 auto; padding: 0 24px; transform: translateY(-36px); }
/* A proporção recomendada é 16:9 (1600x900). O recorte abaixo garante que
   uma imagem em retrato ou quadrada não tome a tela inteira. */
.autem-post-capa img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 16 / 9; object-fit: cover; object-position: center;
  border-radius: 16px; box-shadow: 0 24px 60px rgba(13,10,26,.22);
}

/* ─── Corpo ─── */
.autem-post-corpo { padding: 8px 0 clamp(56px, 7vw, 88px); }
/* ATENÇÃO: as regras de p, h2, h3, ul e ol abaixo precisam usar `auto` nas
   laterais. Um `margin: X 0 Y` ali vence este auto — a regra é mais
   específica — e o texto cola na borda esquerda no desktop. */
.autem-post-corpo > * { max-width: var(--ap-largura); margin-left: auto; margin-right: auto; }

.autem-post-corpo p {
  font-size: 17px; line-height: 1.75; color: #28243a;
  margin: 0 auto 22px; padding: 0 24px;
}
.autem-post-corpo h2 {
  font-size: clamp(23px, 2.6vw, 30px); font-weight: 800;
  letter-spacing: -.6px; line-height: 1.25; color: var(--ap-blue);
  margin: 48px auto 16px; padding: 0 24px;
}
.autem-post-corpo h3 {
  font-size: clamp(18px, 1.9vw, 21px); font-weight: 800;
  line-height: 1.35; color: var(--ap-ink);
  margin: 34px auto 12px; padding: 0 24px;
}
.autem-post-corpo ul,
.autem-post-corpo ol { margin: 0 auto 24px; padding: 0 24px 0 48px; }
.autem-post-corpo li { font-size: 17px; line-height: 1.7; color: #28243a; margin-bottom: 10px; }
.autem-post-corpo li::marker { color: var(--ap-blue); font-weight: 700; }

.autem-post-corpo a { color: var(--ap-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.autem-post-corpo a:hover { color: #2c3db0; }
.autem-post-corpo strong { font-weight: 800; color: var(--ap-ink); }

.autem-post-corpo blockquote {
  margin: 34px auto; padding: 4px 24px 4px 28px;
  border-left: 3px solid var(--ap-green);
  font-size: 19px; line-height: 1.6; color: var(--ap-blue); font-weight: 500;
}
.autem-post-corpo blockquote p { padding: 0; font-size: inherit; line-height: inherit; color: inherit; }

.autem-post-corpo figure { margin: 34px auto; max-width: 1000px; padding: 0 24px; }
.autem-post-corpo figure img { width: 100%; height: auto; display: block; border-radius: 12px; }
.autem-post-corpo figcaption {
  margin-top: 10px; font-size: 13px; line-height: 1.5;
  color: var(--ap-muted); text-align: center;
}

/* Caixa de destaque: <aside class="autem-destaque"> */
.autem-post-corpo .autem-destaque {
  background: var(--ap-lav); border-radius: 14px;
  padding: 24px 26px; margin: 34px auto;
  max-width: calc(var(--ap-largura) - 48px);
}
.autem-post-corpo .autem-destaque p { padding: 0; margin: 0 0 10px; font-size: 16px; }
.autem-post-corpo .autem-destaque p:last-child { margin-bottom: 0; }
.autem-post-corpo .autem-destaque strong { color: var(--ap-blue); }

/* Tabela */
.autem-post-corpo table {
  width: calc(100% - 48px); max-width: calc(var(--ap-largura) - 48px);
  margin: 30px auto; border-collapse: collapse; font-size: 15px;
}
.autem-post-corpo th {
  background: var(--ap-blue); color: #fff; font-weight: 800;
  text-align: left; padding: 12px 14px;
}
.autem-post-corpo td { padding: 12px 14px; border-bottom: 1px solid var(--ap-border); line-height: 1.6; }
.autem-post-corpo tr:nth-child(even) td { background: var(--ap-soft); }

/* ─── Aviso legal ─── */
.autem-post-aviso {
  max-width: var(--ap-largura); margin: 0 auto; padding: 22px 24px 0;
  border-top: 1px solid var(--ap-border);
  font-size: 12.5px; line-height: 1.65; color: var(--ap-muted);
}

/* ─── Rodapé do artigo ─── */
.autem-post-fim { background: var(--ap-soft); padding: clamp(44px, 6vw, 72px) 0; }
.autem-post-fim .autem-post-wrap { max-width: 880px; }
.autem-post-cta {
  background: var(--ap-blue); color: #fff; border-radius: 18px;
  padding: clamp(28px, 4vw, 44px); text-align: center;
}
.autem-post-cta h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 400; letter-spacing: -.8px; margin: 0 0 10px; }
.autem-post-cta p { font-size: 16px; line-height: 1.7; color: rgba(255,255,255,.88); margin: 0 0 24px; }
.autem-post-cta a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ap-green); color: var(--ap-blue);
  font-size: 16px; font-weight: 800; padding: 15px 30px;
  border-radius: 6px; text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
/* verde com texto azul dá 4,28:1; no hover inverte para branco sobre azul (6,42:1) */
.autem-post-cta a:hover,
.autem-post-cta a:focus-visible { background: #2c3db0; color: #fff; transform: translateY(-2px); }

@media (max-width: 640px) {
  .autem-post-capa { transform: translateY(-20px); }
  .autem-post-corpo p, .autem-post-corpo li { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .autem-post-cta a:hover { transform: none; }
}
