/* ============================================================
   BLOG (nov/2026) — listagem e artigo
   Carregado depois do style.css e do landing.css (que já trazem
   menu com CTA, .faq-item, .final-cta e o skip-link). Só lê os
   tokens do tema: azul, laranja, bege, Oswald e Inter.

   1. Cabeçalhos (listagem e artigo)
   2. Cartões de post
   3. Artigo: layout com sumário lateral
   4. Texto do artigo
   5. Resumo, CTA no meio, FAQ, autor e compartilhar
   ============================================================ */

.blog-page main {
    padding-top: 80px; /* menu fixo */
}

/* Nos títulos do artigo, o padrão do tema (Oswald maiúsculo, entrelinha 1.1)
   fica; só o tamanho acompanha a tela. */

.post-breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: var(--text-slate);
    margin-bottom: 1.25rem;
}

.post-breadcrumb li + li::before {
    content: "›";
    margin-right: 0.5rem;
    color: #94a3b8;
}

.post-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.post-breadcrumb a:hover {
    text-decoration: underline;
}

.post-breadcrumb [aria-current] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 22ch;
}

@media (min-width: 768px) {
    .post-breadcrumb [aria-current] { max-width: none; }
}

.post-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}


/* ---------- 1. CABEÇALHOS ---------- */

.bloglist-header {
    background-color: var(--secondary);
    padding: 2.5rem 0 2.75rem;
}

.bloglist-title {
    font-size: clamp(2.6rem, 10vw, 4.5rem);
    line-height: 0.95;
    color: var(--primary);
    margin-bottom: 1rem;
}

.bloglist-lead {
    font-size: clamp(1.0625rem, 3.6vw, 1.25rem);
    line-height: 1.55;
    color: var(--text-slate);
    max-width: 44rem;
}

.post-header {
    background-color: var(--secondary);
    padding-top: 2.5rem;
    /* A foto "senta" metade no bege, metade no branco. */
    background-image: linear-gradient(to bottom, var(--secondary) 72%, var(--white) 72%);
}

.post-header__inner,
.post-hero {
    max-width: 72rem;
}

.post-header__inner > * {
    max-width: 52rem;
}

.post-title {
    font-size: clamp(2.1rem, 8vw, 3.75rem);
    line-height: 1.02;
    color: var(--primary);
    margin: 0.5rem 0 1rem;
    text-wrap: balance;
}

.post-dek {
    font-size: clamp(1.0625rem, 3.4vw, 1.25rem);
    line-height: 1.55;
    color: var(--text-slate);
    max-width: 44rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-slate);
}

.post-meta strong {
    color: var(--text-dark);
    font-weight: 600;
}

.post-hero {
    margin-top: 2rem;
}

.post-hero__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-hero);
    background-color: var(--primary);
}

@media (min-width: 1024px) {
    .bloglist-header { padding: 3.5rem 0 4rem; }
    .post-header { padding-top: 3.5rem; }
}


/* ---------- 2. CARTÕES DE POST ---------- */

.bloglist {
    padding: 2.5rem 0 4rem;
}

.post-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* auto-fit: com 2 posts, duas colunas largas; com 3+, três. Nunca uma
   coluna vazia sobrando. */
@media (min-width: 768px) {
    .post-grid { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
}

.post-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--dur-card) var(--ease-card), box-shadow var(--dur-card) var(--ease-card), border-color var(--dur-card) var(--ease-card);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(20, 67, 157, 0.3);
}

.post-card__link {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    height: 100%;
    padding-bottom: 1.5rem;
    color: inherit;
    text-decoration: none;
}

.post-card__link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 1.25rem;
}

.post-card__image {
    display: block;
    margin-bottom: 0.65rem;
    overflow: hidden;
    background-color: var(--primary);
}

.post-card__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.7s var(--ease-card);
}

.post-card:hover .post-card__image img {
    transform: scale(1.04);
}

.post-card .post-tag,
.post-card__title,
.post-card__excerpt,
.post-card__meta {
    padding: 0 1.5rem;
}

.post-card__title {
    font-size: 1.5rem;
    line-height: 1.1;
    color: var(--primary);
    text-wrap: balance;
}

.post-card__excerpt {
    color: var(--text-slate);
    line-height: 1.6;
    flex: 1;
}

.post-card__meta {
    font-size: 0.8125rem;
    color: #64748b;
}

/* Destaque: imagem ao lado do texto a partir do tablet. */
.post-card--featured .post-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.post-card__more {
    padding: 0 1.5rem;
    margin-top: 0.4rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.post-card__more::after {
    content: " →";
}

@media (min-width: 900px) {
    .post-card--featured .post-card__link {
        display: grid;
        grid-template-columns: 1.15fr 1fr;
        align-items: center;
        gap: 0;
        padding-bottom: 0;
    }

    .post-card--featured .post-card__image {
        margin-bottom: 0;
        height: 100%;
    }

    .post-card--featured .post-card__image img {
        height: 100%;
        aspect-ratio: auto;
        min-height: 22rem;
    }

    .post-card--featured .post-card__body {
        padding: 2.5rem 1rem;
    }

    .post-card--featured .post-card__title {
        font-size: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .post-card,
    .post-card:hover,
    .post-card__image img,
    .post-card:hover .post-card__image img {
        transform: none;
        transition: none;
    }
}


/* ---------- 3. ARTIGO: LAYOUT ---------- */

/* Celular: sumário recolhível no topo, texto em coluna única.
   Desktop: sumário + CTA fixos à esquerda, texto em ~68 caracteres. */
.post-layout {
    display: grid;
    gap: 2rem;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}

.post-body {
    min-width: 0;
    max-width: 44rem;
}

.post-aside__cta {
    display: none;
}

@media (min-width: 1024px) {
    .post-layout {
        grid-template-columns: 17rem minmax(0, 44rem);
        gap: 4rem;
        justify-content: center;
        padding-top: 3.5rem;
        padding-bottom: 4rem;
    }

    .post-aside__sticky {
        position: sticky;
        top: 104px;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .post-aside__cta {
        display: block;
        background-color: var(--primary);
        color: var(--white);
        border-radius: 1rem;
        padding: 1.5rem;
    }

    .post-aside__cta p {
        color: var(--blue-light);
        font-size: 0.9375rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .post-aside__cta .post-aside__cta-title {
        font-family: var(--font-heading);
        font-size: 1.375rem;
        font-weight: 700;
        line-height: 1.1;
        text-transform: uppercase;
        color: var(--white);
        margin-bottom: 0.5rem;
    }

    .post-aside__cta .btn {
        color: var(--white);
    }
}

.post-toc {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: var(--white);
}

.post-toc summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary);
}

.post-toc summary::-webkit-details-marker { display: none; }

.post-toc summary::after {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--dur-card) var(--ease-card);
}

.post-toc[open] summary::after {
    transform: rotate(-135deg) translateY(-2px);
}

.post-toc ol {
    list-style: none;
    padding: 0 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.post-toc a {
    display: block;
    padding: 0.4rem 0 0.4rem 0.75rem;
    border-left: 2px solid #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text-slate);
    text-decoration: none;
}

.post-toc a:hover,
.post-toc a.is-active {
    color: var(--primary);
    border-left-color: var(--accent);
}

.post-toc a.is-active {
    font-weight: 600;
}


/* ---------- 4. TEXTO DO ARTIGO ---------- */

.post-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #1e293b;
}

@media (min-width: 768px) {
    .post-content { font-size: 1.125rem; }
}

.post-content > * + * {
    margin-top: 1.25rem;
}

.post-content h2 {
    font-size: clamp(1.6rem, 5.5vw, 2.125rem);
    line-height: 1.1;
    color: var(--primary);
    margin-top: 3rem;
    text-wrap: balance;
}

.post-content h3 {
    font-size: 1.375rem;
    color: var(--primary);
    margin-top: 2rem;
}

.post-content h2 + *,
.post-content h3 + * {
    margin-top: 0.85rem;
}

.post-content ul,
.post-content ol {
    padding-left: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-content li::marker {
    color: var(--accent);
}

.post-content a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(20, 67, 157, 0.35);
    text-underline-offset: 3px;
}

.post-content a:hover {
    text-decoration-color: var(--primary);
}

.post-content strong {
    color: var(--text-dark);
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--accent);
    background-color: var(--secondary);
    border-radius: 0 1rem 1rem 0;
}

.post-content blockquote p {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    line-height: 1.3;
    color: var(--primary);
}

.post-formula {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--primary);
    background: rgba(20, 67, 157, 0.06);
    border: 1px dashed rgba(20, 67, 157, 0.35);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    text-align: center;
}

.post-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1rem;
}


/* ---------- 5. RESUMO, CTA, FAQ, AUTOR, COMPARTILHAR ---------- */

/* "Em resumo": a resposta curta no topo. É o trecho que buscadores e
   assistentes de IA citam, e o que o leitor apressado lê. */
.post-summary {
    background-color: rgba(20, 67, 157, 0.05);
    border: 1px solid rgba(20, 67, 157, 0.15);
    border-radius: 1rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 2.25rem;
}

.post-summary__title {
    font-size: 1.125rem;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.post-summary ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.post-summary li {
    position: relative;
    padding-left: 1.6rem;
    line-height: 1.55;
    color: var(--text-dark);
}

.post-summary li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.6rem no-repeat;
}

.post-inline-cta {
    margin: 2.5rem 0 !important;
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: var(--primary);
    color: var(--blue-light);
    font-size: 1rem;
    line-height: 1.55;
}

.post-inline-cta .post-inline-cta__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.post-inline-cta .btn {
    margin-top: 1rem;
    color: var(--white);
    text-decoration: none;
}

/* No desktop o botão vai ao lado do texto. */
@media (min-width: 1024px) {
    .post-inline-cta {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0 1.5rem;
    }

    .post-inline-cta .post-inline-cta__title { grid-column: 1; }
    .post-inline-cta p:not(.post-inline-cta__title) { grid-column: 1; }
    .post-inline-cta .btn { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}

.post-faq {
    margin-top: 3.5rem;
}

.post-faq > h2 {
    font-size: clamp(1.6rem, 5.5vw, 2.125rem);
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.post-faq .faq-list {
    max-width: none;
}

.post-faq .faq-item {
    border-color: #e2e8f0;
    box-shadow: none;
}

.post-author {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-slate);
}

.post-author img {
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
}

.post-author__name {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-slate);
}

.post-share__btn {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: var(--white);
    font: inherit;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.post-share__btn:hover {
    border-color: var(--primary);
}

.post-share__btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.post-related {
    background-color: var(--secondary);
    padding: 4rem 0;
}

.post-related .section-title {
    font-size: clamp(2rem, 7vw, 3rem);
}

@media (min-width: 768px) {
    .post-related { padding: 5rem 0; }
}
