/*
 * Blog Escale Mais: só o que é do blog. A base (cores, fontes, navbar,
 * botões, cards, FAQ, rodapé) vem do escalemais-ui.css, comum a todos os sites.
 */

/* ---------- Categorias (chips) ---------- */
.blog-cats { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.blog-cats a { display: inline-flex; align-items: center; gap: .375rem; padding: .4rem .9rem; border-radius: 9999px; background: var(--em-surface); border: 1px solid var(--em-line); color: var(--em-ink-70); font-size: .875rem; font-weight: 500; text-decoration: none; transition: border-color .2s, color .2s; }
.blog-cats a:hover { border-color: rgb(0 76 255 / .4); color: var(--em-navy); }
.blog-cats a[aria-current="page"] { background: var(--em-blue); border-color: var(--em-blue); color: #fff; }
.blog-cats small { font-size: .75rem; opacity: .6; }

/* ---------- Cards de post ---------- */
.post-card { display: flex; flex-direction: column; height: 100%; padding: 1.5rem; background: var(--em-surface); border: 1px solid var(--em-line-soft); border-radius: 1.25rem; color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.post-card:hover { border-color: rgb(0 76 255 / .3); box-shadow: 0 12px 32px -18px rgb(var(--em-ink-rgb) / .35); transform: translateY(-2px); }
.post-card h2, .post-card h3 { margin: .9rem 0 0; font-size: 1.1875rem; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; color: var(--em-navy); text-wrap: balance; }
.post-card p { margin: .6rem 0 0; font-size: .9375rem; line-height: 1.6; color: var(--em-ink-65); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-top: auto; padding-top: 1.25rem; font-size: .8125rem; color: var(--em-ink-55); }
.post-meta span + span::before { content: '·'; margin-right: .75rem; color: rgb(var(--em-ink-rgb) / .3); }

.post-destaque { display: grid; gap: 1.5rem; padding: 2rem; border-radius: 1.75rem; background: var(--em-deep); color: #fff; text-decoration: none; position: relative; overflow: hidden; }
.post-destaque::after { content: ''; position: absolute; right: -8rem; top: -10rem; width: 28rem; height: 28rem; border-radius: 9999px; background: radial-gradient(circle, rgb(0 76 255 / .55), transparent 65%); pointer-events: none; }
.post-destaque > * { position: relative; z-index: 1; }
.post-destaque h2 { margin: .9rem 0 0; font-size: 1.75rem; line-height: 1.15; font-weight: 700; letter-spacing: -.025em; color: #fff; text-wrap: balance; }
.post-destaque p { margin: .9rem 0 0; font-size: 1.0625rem; line-height: 1.6; color: rgb(255 255 255 / .72); max-width: 44rem; }
.post-destaque .post-meta { color: rgb(255 255 255 / .55); padding-top: 1.5rem; }
.post-destaque .em-chip { background: rgb(255 255 255 / .1); color: #fff; }
.post-destaque-ler { display: inline-flex; align-items: center; gap: .375rem; margin-top: 1.5rem; font-weight: 600; color: #fff; }
.post-destaque-ler svg { width: 1rem; height: 1rem; transition: transform .2s; }
.post-destaque:hover .post-destaque-ler svg { transform: translateX(3px); }
@media (min-width: 768px) { .post-destaque { padding: 3rem; } .post-destaque h2 { font-size: 2.25rem; } }

/* ---------- Artigo ---------- */
.artigo-topo { max-width: 50rem; }
.artigo-topo .em-h1 { font-size: 2.125rem; line-height: 1.1; }
@media (min-width: 640px) { .artigo-topo .em-h1 { font-size: 2.75rem; } }
.artigo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1.5rem; font-size: .875rem; color: var(--em-ink-60); }
.artigo-meta img { width: 2rem; height: 2rem; border-radius: 9999px; background: var(--em-deep); padding: .35rem; }
.artigo-meta strong { color: var(--em-navy); font-weight: 600; }

.artigo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
@media (min-width: 1100px) { .artigo { grid-template-columns: minmax(0, 1fr) 16rem; gap: 4rem; } }
.artigo-corpo { min-width: 0; max-width: 46rem; }

.sumario { display: none; }
@media (min-width: 1100px) {
    .sumario { display: block; position: sticky; top: 6.5rem; align-self: start; max-height: calc(100vh - 8rem); overflow: auto; }
}
.sumario p { margin: 0 0 .75rem; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--em-ink-55); }
.sumario ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--em-line); }
.sumario ol a { display: block; padding: .375rem 0 .375rem 1rem; margin-left: -1px; border-left: 2px solid transparent; font-size: .875rem; line-height: 1.4; color: var(--em-ink-65); text-decoration: none; }
.sumario ol a:hover { color: var(--em-link); border-left-color: var(--em-blue); }
.sumario-cta { margin-top: 1.5rem; padding: 1.25rem; border-radius: 1rem; background: var(--em-surface); border: 1px solid var(--em-line-soft); }
.sumario-cta strong { display: block; font-size: .9375rem; color: var(--em-navy); }
.sumario-cta span { display: block; margin-top: .35rem; font-size: .8125rem; line-height: 1.5; color: var(--em-ink-60); }
.sumario-cta .em-btn { margin-top: 1rem; width: 100%; justify-content: center; }

.sumario-movel { margin: 0 0 2rem; padding: 1rem 1.25rem; border-radius: 1rem; background: var(--em-surface); border: 1px solid var(--em-line-soft); }
.sumario-movel summary { cursor: pointer; font-weight: 600; color: var(--em-navy); }
.sumario-movel ol { margin: .75rem 0 0; padding-left: 1.25rem; }
.sumario-movel li + li { margin-top: .35rem; }
.sumario-movel a { color: var(--em-ink-70); text-decoration: none; }
@media (min-width: 1100px) { .sumario-movel { display: none; } }

.resumo { margin: 0 0 2.5rem; padding: 1.5rem 1.5rem 1.5rem 1.75rem; border-radius: 1.25rem; background: var(--em-surface); border: 1px solid var(--em-line-soft); border-left: 4px solid var(--em-blue); }
.resumo h2 { margin: 0 0 .75rem; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--em-link); }
.resumo ul { margin: 0; padding-left: 1.1rem; color: var(--em-ink-80); line-height: 1.65; }
.resumo li + li { margin-top: .4rem; }

/* Texto do post: complementa o .em-prose. */
.em-prose { color: var(--em-ink-80); }
.em-prose h2 { scroll-margin-top: 6.5rem; }
.em-prose h3 { scroll-margin-top: 6.5rem; }
.em-prose img { display: block; max-width: 100%; height: auto; border-radius: 1rem; }
.em-prose blockquote { margin-left: 0; margin-right: 0; padding: 1rem 1.25rem; border-radius: 1rem; background: rgb(0 76 255 / .06); color: var(--em-navy); }
.em-prose blockquote > :first-child { margin-top: 0; }
.em-prose blockquote > :last-child { margin-bottom: 0; }
.em-prose code { padding: .1em .35em; border-radius: .35rem; background: rgb(var(--em-ink-rgb) / .06); font-size: .9em; }
.em-prose hr { border: 0; border-top: 1px solid var(--em-line); margin: 2.5em 0; }
.em-prose .tabela { overflow-x: auto; margin-left: -.25rem; margin-right: -.25rem; padding: 0 .25rem; }
.em-prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; background: var(--em-surface); border-radius: 1rem; overflow: hidden; box-shadow: 0 0 0 1px var(--em-line-soft); }
.em-prose th, .em-prose td { padding: .75rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--em-line-soft); }
.em-prose th { background: rgb(var(--em-ink-rgb) / .03); color: var(--em-navy); font-weight: 600; }
.em-prose tr:last-child td { border-bottom: 0; }
.em-prose li > p { margin: 0; }

/* Chamada para o teste grátis (no meio e no fim do post). */
.cta-box { margin: 2.5rem 0; padding: 1.75rem; border-radius: 1.5rem; background: var(--em-deep); color: #fff; position: relative; overflow: hidden; }
.cta-box::after { content: ''; position: absolute; right: -6rem; bottom: -8rem; width: 20rem; height: 20rem; border-radius: 9999px; background: radial-gradient(circle, rgb(0 76 255 / .5), transparent 65%); pointer-events: none; }
.cta-box > * { position: relative; z-index: 1; }
.cta-box strong { display: block; font-size: 1.25rem; line-height: 1.3; letter-spacing: -.01em; color: #fff; }
.cta-box p { margin: .6rem 0 0 !important; font-size: .9375rem; line-height: 1.6; color: rgb(255 255 255 / .72) !important; }
.cta-box .em-hero-actions { margin-top: 1.25rem; justify-content: flex-start; }
.cta-box a { text-decoration: none !important; }
/* O .em-prose pinta os links de azul; botão dentro do texto mantém a cor própria. */
.em-prose .cta-box .em-btn--primary, .sumario-cta .em-btn--primary { color: #fff; }
.em-prose .cta-box .em-btn--secondary { color: #fff; }
.cta-box .em-btn--secondary { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .2); }

.autor { display: flex; gap: 1rem; align-items: flex-start; margin-top: 3rem; padding: 1.5rem; border-radius: 1.25rem; background: var(--em-surface); border: 1px solid var(--em-line-soft); }
.autor img { width: 3rem; height: 3rem; flex-shrink: 0; border-radius: 9999px; background: var(--em-deep); padding: .6rem; }
.autor strong { display: block; color: var(--em-navy); }
.autor p { margin: .35rem 0 0; font-size: .9375rem; line-height: 1.6; color: var(--em-ink-65); }

.compartilhar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 2rem; font-size: .875rem; color: var(--em-ink-60); }
.compartilhar a { display: inline-flex; align-items: center; gap: .375rem; padding: .4rem .85rem; border-radius: 9999px; background: var(--em-surface); border: 1px solid var(--em-line); color: var(--em-ink-70); font-weight: 500; text-decoration: none; }
.compartilhar a:hover { border-color: rgb(0 76 255 / .4); color: var(--em-navy); }
.compartilhar svg { width: 1rem; height: 1rem; }

.vazio { padding: 3rem 1.5rem; border-radius: 1.5rem; background: var(--em-surface); border: 1px dashed var(--em-line); text-align: center; color: var(--em-ink-60); }

/* ---------- Busca ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.blog-busca { position: relative; display: flex; align-items: center; gap: .375rem; max-width: 36rem; margin: 2rem 0 0; padding: .375rem; border-radius: 9999px; background: var(--em-surface); border: 1px solid var(--em-line); transition: border-color .2s, box-shadow .2s; }
.blog-busca:focus-within { border-color: var(--em-blue); box-shadow: 0 0 0 4px rgb(0 76 255 / .12); }
.blog-busca-icone { flex-shrink: 0; width: 1.25rem; height: 1.25rem; margin-left: .75rem; color: var(--em-ink-55); }
.blog-busca input { flex: 1; min-width: 0; padding: .5rem .25rem; border: 0; background: transparent; color: var(--em-navy); font: inherit; font-size: 1rem; outline: none; }
.blog-busca input::placeholder { color: rgb(var(--em-ink-rgb) / .4); }
.blog-busca input::-webkit-search-cancel-button { cursor: pointer; }
.blog-busca .em-btn { flex-shrink: 0; padding: .55rem 1.25rem; font-size: .9375rem; }
.blog-busca + .blog-cats { margin-top: 1.25rem; }
@media (max-width: 479px) { .blog-busca .em-btn { padding: .55rem .9rem; } }

.lista-info { margin: 0 0 1.25rem; font-size: .9375rem; color: var(--em-ink-65); }
.lista-info strong { color: var(--em-navy); }
.lista-info a { margin-left: .25rem; color: var(--em-link); font-weight: 600; text-decoration: none; }
.lista-info a:hover { text-decoration: underline; }
[data-lista].carregando { opacity: .55; transition: opacity .15s; }

/* ---------- Paginação ---------- */
.paginacao { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: 2.5rem; }
.paginacao ol { display: flex; flex-wrap: wrap; gap: .375rem; margin: 0; padding: 0; list-style: none; }
.paginacao a, .paginacao span { display: inline-flex; align-items: center; justify-content: center; gap: .375rem; min-width: 2.5rem; height: 2.5rem; padding: 0 .75rem; border-radius: 9999px; font-size: .9375rem; font-weight: 500; text-decoration: none; }
.paginacao a { background: var(--em-surface); border: 1px solid var(--em-line); color: var(--em-ink-70); transition: border-color .2s, color .2s; }
.paginacao a:hover { border-color: rgb(0 76 255 / .4); color: var(--em-navy); }
.paginacao [aria-current="page"] { background: var(--em-blue); border: 1px solid var(--em-blue); color: #fff; }
.paginacao .paginacao-salto { min-width: 1.5rem; padding: 0; color: var(--em-ink-55); }
.paginacao svg { width: 1rem; height: 1rem; }
