/* =========================================================
   Blog: índice e artigo
   ========================================================= */

/* ---------- índice ---------- */
.blog-hero {
    background: var(--paper);
    padding: clamp(44px, 5vw, 78px) 0 clamp(28px, 3vw, 40px);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(20, 34, 25, 0.14) 1px, transparent 0);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 0%, #000 0%, transparent 72%);
    mask-image: radial-gradient(ellipse 70% 60% at 60% 0%, #000 0%, transparent 72%);
    opacity: 0.5;
    pointer-events: none;
}

.blog-hero .container { position: relative; z-index: 1; }

.blog-hero h1 {
    font-size: clamp(38px, 5.4vw, 68px);
    max-width: 18ch;
}

.blog-lede {
    margin-top: 20px;
    font-family: var(--display);
    font-size: clamp(19px, 1.9vw, 24px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.42;
    color: var(--leaf-deep);
    max-width: 56ch;
}

.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.chip-cat {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--line-strong);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    transition: var(--transition);
}

.chip-cat:hover { box-shadow: inset 0 0 0 1px var(--forest); color: var(--forest); }

.chip-cat.ativo {
    background: var(--forest);
    color: var(--paper);
    box-shadow: none;
}

.blog-lista { background: var(--paper-2); }

.grid-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card-post {
    display: flex;
    flex-direction: column;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.card-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-img { aspect-ratio: 2 / 1; overflow: hidden; background: var(--paper-2); }

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

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

.card-img.sem-foto {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(90% 120% at 100% 0%, #23553D 0%, transparent 62%),
        linear-gradient(150deg, #1D4433 0%, #122C20 100%);
}

.card-img.sem-foto span {
    font-family: var(--display);
    font-size: 22px;
    font-style: italic;
    color: rgba(250, 245, 236, 0.72);
}

.card-txt {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 22px 24px 24px;
    flex-grow: 1;
}

.card-cat {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--leaf-deep);
}

.card-txt h2 {
    font-size: 21px;
    line-height: 1.22;
}

.card-txt h2 a { color: inherit; }

.card-post:hover .card-txt h2 a { color: var(--apricot-texto); }

.card-txt p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
    flex-grow: 1;
}

.card-meta {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    opacity: 0.8;
}

.sem-resultado {
    text-align: center;
    padding: 40px 0 0;
    color: var(--ink-soft);
}

/* ---------- artigo ---------- */
.post-topo {
    background: var(--paper);
    padding: clamp(30px, 4vw, 54px) 0 clamp(24px, 3vw, 36px);
}

.migalhas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.migalhas a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--leaf-deep);
}
.migalhas a:hover { color: var(--apricot-texto); }

.post-topo h1 {
    font-size: clamp(32px, 4.6vw, 58px);
    max-width: 22ch;
}

/* linha fina: promessa do texto, entre o título e a linha de data */
.linha-fina {
    margin-top: 18px;
    font-family: var(--display);
    font-size: clamp(19px, 1.85vw, 24px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.45;
    color: var(--leaf-deep);
    max-width: 58ch;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink-soft);
}

.post-meta strong { color: var(--ink); font-weight: 700; }

.post-meta .ponto { opacity: 0.5; }

.autora-mini {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 1px solid var(--line);
}

.post-capa {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 28px;
}

.post-capa img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
}

.post .container { padding-top: clamp(34px, 4vw, 56px); padding-bottom: clamp(30px, 4vw, 50px); }

.post-corpo {
    max-width: 720px;
    margin: 0 auto;
}

.post-corpo p {
    font-size: 17.5px;
    line-height: 1.82;
    color: var(--ink-2);
    margin-bottom: 20px;
}

.post-corpo > p:first-child {
    font-family: var(--sans);
    font-size: clamp(18.5px, 1.5vw, 21px);
    font-weight: 400;
    line-height: 1.68;
    color: var(--ink);
}

.post-corpo h2 {
    margin: 46px 0 16px;
    font-size: clamp(25px, 2.8vw, 34px);
    max-width: 24ch;
}

.post-corpo h3 {
    margin: 34px 0 12px;
    font-size: clamp(19px, 1.7vw, 23px);
}

.post-corpo ul,
.post-corpo ol {
    margin: 0 0 24px;
    padding: 0;
}

.post-corpo li {
    position: relative;
    padding: 9px 0 9px 30px;
    font-size: 16.5px;
    line-height: 1.72;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line-soft, rgba(20, 34, 25, 0.08));
}

.post-corpo ul li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 20px;
    width: 8px;
    height: 8px;
    border-radius: 60% 0 60% 0;
    background: var(--leaf);
}

.post-corpo ol { counter-reset: item; }

.post-corpo ol li { padding-left: 38px; }

.post-corpo ol li::before {
    counter-increment: item;
    content: counter(item);
    position: absolute;
    left: 0;
    top: 10px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--forest);
    color: var(--paper);
    font-family: var(--display);
    font-size: 13px;
}

.post-corpo a {
    color: var(--leaf-deep);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.post-corpo a:hover { color: var(--apricot-texto); }

.post-corpo blockquote {
    margin: 30px 0;
    padding: 22px 26px;
    background: var(--paper-2);
    border-left: 3px solid var(--leaf);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.post-corpo blockquote p {
    font-family: var(--display);
    font-size: 20px;
    font-style: italic;
    line-height: 1.55;
    color: var(--ink);
    margin: 0;
}

/* imagens de conteudo. o :not() e obrigatorio: sem ele a regra tambem pega o
   icone dentro dos botoes de CTA e estica o SVG de 20px ate a largura do texto */
.post-corpo img:not(.btn-icon):not(.social-icon):not(.contact-icon) {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    margin: 26px 0;
}

.post-corpo .tabwrap { overflow-x: auto; margin: 26px 0; }

.post-corpo table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 15.5px;
}

.post-corpo th,
.post-corpo td {
    border: 0;
    background: transparent;
    padding: 13px 18px;
    text-align: left;
}

.post-corpo thead th {
    background: var(--forest);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.post-corpo tbody tr { border-bottom: 1px solid var(--line); }
.post-corpo tbody tr:last-child { border-bottom: 0; }

.post-cta {
    margin: 34px 0;
    text-align: center;
}

.post-cta .cta-button {
    max-width: 100%;
}

.post-ponte {
    margin-top: 34px;
    padding: 20px 24px;
    background: var(--apricot-tint);
    border-radius: var(--radius);
    font-size: 16.5px;
    color: #7A3A16;
}

.post-ponte a { color: #7A3A16; font-weight: 700; }

/* caixa da autora */
.autora-box {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    max-width: 820px;
    margin: 50px auto 0;
    padding: 30px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.autora-box > img {
    width: 104px;
    height: 104px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 1px solid var(--line);
}

.autora-box h2 { font-size: 25px; margin: 6px 0 10px; }

.autora-box p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-soft);
    margin-bottom: 20px;
}

.autora-box a { color: var(--leaf-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- responsivo ---------- */
@media (max-width: 1024px) {
    .grid-posts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .post-capa { padding: 0 22px; }

    .autora-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 18px;
    }

    .autora-box .cta-button { width: 100%; }
}

@media (max-width: 620px) {
    .grid-posts { grid-template-columns: 1fr; }

    .post-corpo p { font-size: 17px; }

    /* tabela vira cartão */
    .post-corpo .tabwrap { overflow: visible; }
    .post-corpo table { border: 0; background: transparent; }
    .post-corpo thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .post-corpo table, .post-corpo tbody, .post-corpo tr, .post-corpo th, .post-corpo td { display: block; width: auto; }
    .post-corpo tbody tr {
        background: var(--paper-card);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 4px 18px 16px;
        margin-bottom: 12px;
    }
    .post-corpo tbody th, .post-corpo tbody td { border: 0; padding: 13px 0 0; }
    .post-corpo tbody td::before {
        content: attr(data-rotulo);
        display: block;
        margin-bottom: 3px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.13em;
        text-transform: uppercase;
        color: var(--ink-soft);
    }
}
