/* =============================================================================
   blog/assets/blog.css — só o blog. Carregado depois de /dist/style.css
   (ver templates/layout.php), nunca dentro dele: o resto do site não precisa
   baixar tipografia de artigo que nunca vai usar.

   Reaproveita as CSS custom properties já definidas em :root por
   dist/style.css (--ink-950, --brand-500, --radius, --shadow-soft...) em vez
   de redeclarar valores — se a paleta mudar na home, este arquivo acompanha
   sozinho. As classes .btn/.btn-primary/.chip-light/.card-soft/.surface-dark/
   .grid-lines usadas nos templates já vêm do style.css principal; aqui só
   entra o que é específico do blog: grade de cards, chips de categoria,
   sumário, paginação e a tipografia do HTML que o Parsedown gera a partir do
   Markdown (onde não existe elemento para colar uma classe Tailwind em tempo
   de build).
   ============================================================================= */

/* ---- Card de post (listagem, categoria, "Leia também") ------------------- */

.blog-card {
    overflow: hidden;
}

.blog-card__img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--ink-900, #0B1220);
}

.blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.blog-card:hover .blog-card__img img {
    transform: scale(1.05);
}

.blog-card__resumo {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Chips de categoria (filtro da listagem) ------------------------------ */

.blog-chip {
    display: inline-flex;
    align-items: center;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    background: #fff;
    color: var(--ink-700, #1E293B);
    border: 1px solid #E2E8F0;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.blog-chip:hover {
    border-color: #F9CDD0;
    color: var(--brand-600, #BF0411);
}

.blog-chip--ativa,
.blog-chip--ativa:hover {
    background: var(--brand-500, #E10514);
    border-color: var(--brand-500, #E10514);
    color: #fff;
}

/* ---- Sumário automático (post com 3+ H2) ---------------------------------- */

.blog-sumario {
    background: #F8FAFC;
    border: 1px solid #E9EEF5;
    border-radius: var(--radius, 18px);
    padding: 1.4rem 1.6rem;
    margin-bottom: 2.5rem;
}

.blog-sumario__titulo {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-700, #1E293B);
    margin: 0 0 .75rem;
}

.blog-sumario ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: sumario;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.blog-sumario li {
    counter-increment: sumario;
    font-size: .92rem;
}

.blog-sumario li::before {
    content: counter(sumario) ". ";
    color: var(--brand-500, #E10514);
    font-weight: 700;
}

.blog-sumario a {
    color: var(--ink-800, #131C2E);
    text-decoration: none;
}

.blog-sumario a:hover {
    color: var(--brand-600, #BF0411);
    text-decoration: underline;
}

/* ---- CTA de fim de post (mesma linguagem visual do .btn-primary) --------- */

.blog-cta {
    margin-top: 3.5rem;
    padding: 2.4rem 2rem;
    border-radius: var(--radius, 18px);
    text-align: center;
    background:
        radial-gradient(560px 280px at 15% -20%, rgba(225, 5, 20, .16), transparent 60%),
        linear-gradient(180deg, var(--ink-950, #070B14) 0%, var(--ink-800, #131C2E) 100%);
}

.blog-cta h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: #fff;
    margin: 0 0 .6rem;
    line-height: 1.3;
}

.blog-cta p {
    color: #CBD5E1;
    font-size: .96rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Corpo do post: tipografia do HTML gerado pelo Parsedown -------------- */

.post-content {
    font-size: 17.5px;
    line-height: 1.75;
    color: var(--ink-800, #131C2E);
}

.post-content>*+* {
    margin-top: 1.35em;
}

.post-content h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--ink-950, #070B14);
    margin-top: 2.4em;
    scroll-margin-top: 96px;
}

.post-content h3 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.35;
    color: var(--ink-950, #070B14);
    margin-top: 2em;
    scroll-margin-top: 96px;
}

.post-content p,
.post-content ul,
.post-content ol {
    font-size: 1em;
}

.post-content ul,
.post-content ol {
    padding-left: 1.4em;
}

.post-content li+li {
    margin-top: .5em;
}

.post-content ul li {
    list-style: disc;
}

.post-content ol li {
    list-style: decimal;
}

.post-content a {
    color: var(--brand-600, #BF0411);
    text-decoration: underline;
    text-decoration-color: #F9CDD0;
    text-underline-offset: 2px;
}

.post-content a:hover {
    text-decoration-color: currentColor;
}

.post-content strong {
    font-weight: 700;
    color: var(--ink-950, #070B14);
}

.post-content blockquote {
    border-left: 3px solid var(--brand-500, #E10514);
    background: #FDF2F3;
    padding: 1.1em 1.4em;
    border-radius: 0 12px 12px 0;
    color: var(--ink-700, #1E293B);
    font-style: italic;
}

.post-content blockquote p {
    margin: 0;
}

.post-content code {
    background: #F1F5F9;
    color: var(--ink-800, #131C2E);
    padding: .15em .4em;
    border-radius: 6px;
    font-size: .88em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.post-content pre {
    background: var(--ink-950, #070B14);
    color: #E2E8F0;
    padding: 1.2em 1.4em;
    border-radius: 12px;
    overflow-x: auto;
}

.post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92em;
}

.post-content th,
.post-content td {
    border: 1px solid #E2E8F0;
    padding: .6em .85em;
    text-align: left;
}

.post-content thead th {
    background: #F8FAFC;
    font-weight: 700;
    color: var(--ink-900, #0B1220);
}

.post-content tbody tr:nth-child(even) {
    background: #FBFCFE;
}

.post-content hr {
    border: none;
    border-top: 1px solid #E2E8F0;
    margin: 2.5em 0;
}

.post-content figure.post-figure {
    margin: 0;
}

.post-content figure.post-figure img {
    width: 100%;
    height: auto;
    border-radius: var(--radius, 18px);
    box-shadow: var(--shadow-soft);
}

.post-content figure.post-figure figcaption {
    margin-top: .65em;
    font-size: .85em;
    color: #64748B;
    text-align: center;
}

.post-content img:not(figure.post-figure img) {
    width: 100%;
    height: auto;
    border-radius: var(--radius, 18px);
}
