/* Blog (templates/blog): lista de posts e página do post */
.bl {
    --bl-brand: #294940;
    --bl-brand-dark: #1c352e;
    --bl-accent: #ffc107;
    --bl-bg: #f6f5ef;
    --bl-ink: #13201c;
    --bl-muted: #5a6964;
    --bl-line: #e3e1d6;
    background: var(--bl-bg);
    color: var(--bl-ink);
    font-family: 'Plus Jakarta Sans', Arial, sans-serif;
    overflow-x: clip;
}
.bl h1, .bl h2, .bl h3 { font-family: inherit; color: inherit; letter-spacing: -0.02em; }
.bl a { color: inherit; }

/* Topo */
.bl-hero { position: relative; background: var(--bl-brand); color: #fff; padding: 56px 0 64px; overflow: hidden; }
.bl-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 15% 15%, rgba(255, 193, 7, .22), transparent 40%),
                radial-gradient(circle at 100% 100%, rgba(255, 255, 255, .08), transparent 45%);
}
.bl-hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .12;
    background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1px); background-size: 22px 22px;
}
.bl-hero .container { position: relative; z-index: 1; }
.bl-eyebrow { display: inline-flex; align-items: center; gap: .45rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); padding: .4rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: #fff; text-decoration: none; }
.bl-eyebrow i { color: var(--bl-accent); }
.bl-hero-title { font-weight: 800; font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.05; margin: 1rem 0 .75rem; color: #fff; }
.bl-hero-title span { color: var(--bl-accent); }
.bl-hero p { font-size: 1.1rem; color: rgba(255, 255, 255, .85); max-width: 620px; margin: 0; }

/* Lista */
.bl-list { padding: 48px 0 72px; }
.bl-section-title { font-weight: 800; font-size: 1.5rem; margin: 0 0 1.25rem; }
.bl-card {
    display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--bl-line); border-radius: 22px; overflow: hidden;
    text-decoration: none; transition: transform .2s ease, box-shadow .2s ease;
}
.bl-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(19, 32, 28, .12); }
.bl-card-cover { aspect-ratio: 1200 / 630; background: #e9f1ed; overflow: hidden; }
.bl-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.bl-card:hover .bl-card-cover img { transform: scale(1.04); }
.bl-card-cover.is-empty { display: grid; place-items: center; color: var(--bl-brand); font-size: 2.5rem; }
.bl-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.bl-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--bl-muted); font-size: .82rem; font-weight: 600; }
.bl-meta i { margin-right: .25rem; }
.bl-card h2, .bl-card h3 { font-weight: 800; font-size: 1.2rem; line-height: 1.3; margin: .6rem 0 .5rem; }
.bl-card p { color: var(--bl-muted); font-size: .95rem; margin: 0 0 1rem; }
.bl-more { margin-top: auto; font-weight: 700; color: var(--bl-brand); display: inline-flex; align-items: center; gap: .35rem; }
.bl-card:hover .bl-more i { transform: translateX(3px); }
.bl-more i { transition: transform .2s ease; }

.bl-featured { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; margin-bottom: 28px; }
.bl-featured .bl-card-body { padding: 36px; justify-content: center; }
.bl-featured h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.bl-featured p { font-size: 1.02rem; }
.bl-badge { align-self: flex-start; background: #fff4d0; color: #6b4e00; font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; margin-bottom: .75rem; }

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

/* Post */
.bl-post-hero { padding: 40px 0 120px; }
.bl-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: rgba(255, 255, 255, .75); margin-bottom: 1.25rem; list-style: none; padding: 0; }
.bl-crumbs a { color: #fff; text-decoration: none; font-weight: 600; }
.bl-crumbs a:hover { color: var(--bl-accent); }
.bl-crumbs li + li::before { content: '/'; margin-right: .4rem; opacity: .6; }
.bl-crumbs li:last-child { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-post-title { font-weight: 800; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; color: #fff; max-width: 900px; margin: 0 0 1rem; }
.bl-post-hero .bl-meta { color: rgba(255, 255, 255, .8); font-size: .9rem; }

.bl-post-body { margin-top: -90px; position: relative; z-index: 2; padding-bottom: 72px; }
.bl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.bl-article { background: #fff; border: 1px solid var(--bl-line); border-radius: 26px; overflow: hidden; box-shadow: 0 24px 50px rgba(19, 32, 28, .08); }
.bl-article-cover { width: 100%; height: auto; display: block; aspect-ratio: 1200 / 630; object-fit: cover; }
.bl-article-inner { padding: 40px 48px 44px; }

.bl .post-content { font-size: 1.08rem; line-height: 1.8; overflow-wrap: break-word; color: #24322d; }
.bl .post-content > :first-child { margin-top: 0; }
.bl .post-content p { margin-bottom: 1.15rem; }
.bl .post-content img, .bl .post-content video, .bl .post-content iframe { max-width: 100%; height: auto; border-radius: 12px; }
.bl .post-content iframe { aspect-ratio: 16 / 9; width: 100%; }
.bl .post-content figure { margin: 1.75rem 0; }
.bl .post-content figure.image { display: table; }
.bl .post-content figure.align-center, .bl .post-content img.align-center { margin-left: auto; margin-right: auto; display: block; }
.bl .post-content figcaption { font-size: .88rem; color: var(--bl-muted); text-align: center; margin-top: .5rem; }
.bl .post-content table { width: 100%; margin: 1.25rem 0; border-collapse: collapse; font-size: .95rem; }
.bl .post-content table td, .bl .post-content table th { border: 1px solid var(--bl-line); padding: .6rem .75rem; }
.bl .post-content table th, .bl .post-content table tr:first-child td { background: #f3f6f4; font-weight: 700; }
.bl .post-content blockquote { border-left: 4px solid var(--bl-accent); background: #fffaf0; padding: .9rem 1.25rem; color: #4a4a40; margin: 1.5rem 0; border-radius: 0 12px 12px 0; }
.bl .post-content pre { background: #f6f8fa; padding: 1rem; border-radius: 12px; overflow-x: auto; }
.bl .post-content h2, .bl .post-content h3, .bl .post-content h4 { font-weight: 800; color: var(--bl-ink); margin: 2.4rem 0 1rem; line-height: 1.25; scroll-margin-top: 90px; }
.bl .post-content h2 { font-size: 1.65rem; }
.bl .post-content h3 { font-size: 1.3rem; }
.bl .post-content a:not(.btn) { color: var(--bl-brand); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(41, 73, 64, .35); text-underline-offset: 3px; }
.bl .post-content a:not(.btn):hover { text-decoration-color: currentColor; }
.bl .post-content ul, .bl .post-content ol { padding-left: 1.4rem; margin-bottom: 1.15rem; }
.bl .post-content li { margin-bottom: .4rem; }
.bl .post-content li::marker { color: var(--bl-brand); font-weight: 700; }
.bl .post-content hr { margin: 2rem 0; opacity: .15; }

.bl-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--bl-line); }
.bl-share > span { font-weight: 700; margin-right: .25rem; }
.bl .bl-share a, .bl .bl-share button {
    width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; border: 1px solid var(--bl-line); background: #fff;
    color: var(--bl-ink); text-decoration: none; font-size: 1.05rem; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.bl .bl-share a:hover, .bl .bl-share button:hover { background: var(--bl-brand); border-color: var(--bl-brand); color: #fff; }
.bl-share .bl-copied { font-size: .85rem; color: var(--bl-muted); font-weight: 600; }

.bl-inline-cta {
    margin-top: 2rem; background: var(--bl-brand); color: #fff; border-radius: 22px; padding: 28px 30px; display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between; gap: 1rem; position: relative; overflow: hidden;
}
.bl-inline-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0%, rgba(255, 193, 7, .25), transparent 50%); pointer-events: none; }
.bl-inline-cta > * { position: relative; }
.bl-inline-cta strong { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.bl-inline-cta span { color: rgba(255, 255, 255, .8); font-size: .95rem; }
.bl .bl-btn {
    display: inline-flex; align-items: center; gap: .45rem; background: var(--bl-accent); color: #1b1b1b; font-weight: 800; text-decoration: none;
    padding: .85rem 1.3rem; border-radius: 999px; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease;
}
.bl .bl-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(255, 193, 7, .35); color: #1b1b1b; }

/* Lateral do post */
.bl-aside { position: sticky; top: 84px; display: grid; gap: 16px; }
.bl-box { background: #fff; border: 1px solid var(--bl-line); border-radius: 20px; padding: 22px; }
.bl-box-title { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bl-muted); margin-bottom: .8rem; }
.bl-toc { list-style: none; padding: 0; margin: 0; display: grid; gap: .15rem; max-height: 46vh; overflow: auto; }
.bl-toc a { display: block; text-decoration: none; color: var(--bl-muted); font-size: .9rem; font-weight: 600; line-height: 1.35; padding: .4rem .6rem; border-left: 2px solid var(--bl-line); transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.bl-toc a:hover { color: var(--bl-ink); }
.bl-toc a.is-active { color: var(--bl-brand); border-left-color: var(--bl-brand); background: #f1f6f3; }
.bl-toc .is-sub a { padding-left: 1.2rem; font-size: .85rem; }
.bl-side-cta { background: var(--bl-brand-dark); color: #fff; border: 0; position: relative; overflow: hidden; }
.bl-side-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0%, rgba(255, 193, 7, .28), transparent 55%); pointer-events: none; }
.bl-side-cta > * { position: relative; }
.bl-side-cta strong { display: block; font-size: 1.15rem; font-weight: 800; line-height: 1.3; margin-bottom: .4rem; }
.bl-side-cta p { color: rgba(255, 255, 255, .78); font-size: .9rem; margin-bottom: 1rem; }
.bl-side-cta .bl-btn { width: 100%; justify-content: center; }

.bl-toc-mobile { display: none; background: #fff; border: 1px solid var(--bl-line); border-radius: 16px; margin-bottom: 1.75rem; }
.bl-toc-mobile summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.bl-toc-mobile summary::-webkit-details-marker { display: none; }
.bl-toc-mobile summary i { transition: transform .2s ease; }
.bl-toc-mobile[open] summary i { transform: rotate(180deg); }
.bl-toc-mobile .bl-toc { padding: 0 12px 14px; max-height: none; }

.bl-related { margin-top: 56px; }

/* Barra de progresso de leitura */
.bl-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 1100; background: var(--bl-accent, #ffc107); transform-origin: 0 50%; transform: scaleX(0); }

@media (max-width: 1199px) {
    .bl-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; }
    .bl-article-inner { padding: 36px 36px 40px; }
}
@media (max-width: 991px) {
    .bl-layout { grid-template-columns: 1fr; }
    .bl-aside { display: none; }
    .bl-toc-mobile { display: block; }
    .bl-featured { grid-template-columns: 1fr; }
        .bl-featured .bl-card-body { padding: 24px; }
    .bl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .bl-hero { padding: 40px 0 48px; }
    .bl-post-hero { padding: 32px 0 100px; }
    .bl-post-body { margin-top: -76px; }
    .bl-article { border-radius: 20px; }
    .bl-article-inner { padding: 24px 20px 28px; }
    .bl .post-content { font-size: 1.02rem; }
    .bl .post-content h2 { font-size: 1.4rem; }
    .bl-grid { grid-template-columns: 1fr; gap: 18px; }
    .bl-inline-cta { padding: 24px 20px; }
    .bl-inline-cta .bl-btn { width: 100%; justify-content: center; }
    .bl-crumbs li:last-child { max-width: 180px; }
}
@media (prefers-reduced-motion: reduce) {
    .bl *, .bl-progress { transition: none !important; }
}
