/* WhatsApp BSP (covercut) — Blog. Identidade visual herdada da landing. */
:root {
    --bg: #03040b;
    --bg-1: #060810;
    --bg-2: #0b0d18;
    --bg-3: #111320;
    --border: rgba(255, 255, 255, 0.07);
    --border-md: rgba(255, 255, 255, 0.12);
    --green: #25D366;
    --green-dk: #1aad52;
    --green-dim: rgba(37, 211, 102, 0.12);
    --green-txt: #4ade80;
    --text: #e8ecf2;
    --text-2: #8b9ab8;
    --text-3: #4e5a72;
    --red: #f87171;
    --yellow: #fbbf24;
    --blue: #60a5fa;
}

* , *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

.bg-grid {
    position: fixed; inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 36px 36px; pointer-events: none; z-index: 0;
}
/* Orbs de atmosfera (mesmo fundo da landing) */
.orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; }
.orb-1 { width: 700px; height: 700px; background: radial-gradient(circle, rgba(37, 211, 102, 0.13) 0%, transparent 70%); top: -280px; left: -200px; animation: orbFloat 18s ease-in-out infinite; }
.orb-2 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(37, 211, 102, 0.07) 0%, transparent 70%); bottom: 5%; right: -180px; animation: orbFloat 24s ease-in-out infinite reverse; }
.orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(96, 165, 250, 0.06) 0%, transparent 70%); top: 40%; left: 40%; animation: orbFloat 30s ease-in-out infinite; }
@keyframes orbFloat { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(30px, -40px); } 66% { transform: translate(-20px, 30px); } }
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }

/* Header */
header.blog-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(3, 4, 11, 0.8);
    backdrop-filter: blur(12px) saturate(1.6);
    border-bottom: 1px solid var(--border);
}
.blog-header .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.6rem; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.2rem; }
.logo-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--green-dim); color: var(--green); }
.logo-accent { color: var(--green); }
.blog-header nav { display: flex; gap: 1.4rem; align-items: center; }
.blog-header nav a { color: var(--text-2); font-size: 0.92rem; transition: color .2s; }
.blog-header nav a:hover { color: var(--text); }
.btn-solid { background: var(--green); color: #04120a; font-weight: 600; padding: 0.5rem 1rem; border-radius: 9px; }
.btn-solid:hover { background: var(--green-dk); }
.blog-header nav a.active { color: var(--green-txt); }
.blog-back { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--border-md); padding: 0.45rem 0.9rem; border-radius: 9px; color: var(--text) !important; }
.blog-back:hover { border-color: var(--green); color: var(--green-txt) !important; }
.blog-nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; padding: 0.2rem 0.4rem; line-height: 1; }
@media (max-width: 680px) {
    .blog-header .inner { flex-wrap: wrap; height: auto; padding-top: 0.65rem; padding-bottom: 0.65rem; }
    .blog-nav-toggle { display: block; }
    .blog-header nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 0.8rem 0 0.3rem; }
    .blog-header nav.open { display: flex; }
    .blog-back { align-self: flex-start; }
}

/* Listagem */
.blog-hero { text-align: center; padding: 3.5rem 0 1.5rem; }
.blog-hero .eyebrow { color: var(--green-txt); font-family: 'DM Mono', monospace; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.blog-hero h1 { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin: 0.6rem 0; line-height: 1.1; }
.blog-hero p { color: var(--text-2); max-width: 620px; margin: 0 auto; }

/* Busca + assuntos */
.blog-search { display: flex; align-items: center; gap: 0.6rem; max-width: 580px; margin: 1.75rem auto 0; background: var(--bg-2); border: 1px solid var(--border-md); border-radius: 12px; padding: 0.5rem 0.5rem 0.5rem 0.9rem; }
.blog-search i { color: var(--text-3); }
.blog-search input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 0.95rem; min-width: 0; }
.blog-search input::placeholder { color: var(--text-3); }
.blog-search .blog-search-clear { color: var(--text-3); padding: 0 0.3rem; }
.blog-search .blog-search-clear:hover { color: var(--text); }
.blog-search button { background: var(--green); color: #04120a; border: none; font-weight: 600; padding: 0.5rem 1.1rem; border-radius: 8px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.blog-search button:hover { background: var(--green-dk); }
.blog-topics { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 1rem auto 0; max-width: 820px; }
.blog-topics .topic { font-size: 0.85rem; color: var(--text-2); border: 1px solid var(--border); padding: 0.35rem 0.85rem; border-radius: 999px; transition: border-color .2s, color .2s, background .2s; }
.blog-topics .topic:hover { border-color: var(--green); color: var(--text); }
.blog-topics .topic.active { background: var(--green-dim); border-color: var(--green); color: var(--green-txt); }
.blog-topics .topic span { opacity: 0.55; font-size: 0.78rem; }
.blog-results-info { text-align: center; color: var(--text-2); font-size: 0.88rem; margin: 1.5rem 0 -0.5rem; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; padding: 2rem 0 3rem; }
.post-card {
    display: flex; flex-direction: column;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 14px; padding: 1.4rem; transition: border-color .2s, transform .2s;
}
.post-card:hover { border-color: var(--green); transform: translateY(-3px); }
.post-card .card-thumb { display: block; width: calc(100% + 2.8rem); height: 220px; object-fit: cover; margin: -1.4rem -1.4rem 1.1rem -1.4rem; border-radius: 14px 14px 0 0; background: var(--bg-3); }
.post-card .cat { display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--green-txt); background: var(--green-dim); padding: 0.2rem 0.6rem; border-radius: 999px; margin-bottom: 0.75rem; align-self: flex-start; }
.post-card h2 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; }
.post-card p { color: var(--text-2); font-size: 0.92rem; flex: 1; }
.post-card .meta { color: var(--text-3); font-size: 0.8rem; margin-top: 1rem; }

/* Artigo */
article.post { padding: 2.5rem 0 1rem; }
.breadcrumb { font-size: 0.82rem; color: var(--text-3); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--green-txt); }
article.post .cat { display: inline-block; font-size: 0.74rem; font-weight: 600; color: var(--green-txt); background: var(--green-dim); padding: 0.25rem 0.7rem; border-radius: 999px; }
article.post h1 { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.9rem, 4.5vw, 2.7rem); font-weight: 800; line-height: 1.12; margin: 1rem 0 0.75rem; }
article.post .post-meta { color: var(--text-3); font-size: 0.85rem; margin-bottom: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.post-hero { display: block; width: 100%; max-width: 100%; height: auto; max-height: 620px; object-fit: cover; border-radius: 16px; border: 1px solid var(--border); margin: 0 0 2.2rem; background: var(--bg-3); }
/* rede de segurança: nenhuma imagem do artigo estoura o bloco */
article.post img, .post-body img { max-width: 100%; height: auto; }
/* imagem/vídeo inseridos no editor visual: responsivos e centralizados */
.post-body img, .post-body video { display: block; margin: 1.6rem auto; border-radius: 12px; border: 1px solid var(--border); }
.post-body video { width: 100%; max-width: 100%; height: auto; background: #000; }
.post-body iframe { display: block; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; margin: 1.6rem auto; border: 0; border-radius: 12px; }
.post-body figure { margin: 1.6rem 0; }
.post-body figure img, .post-body figure video { margin: 0 auto; }
.post-body figcaption { text-align: center; font-size: 0.9rem; color: var(--text-3); margin-top: 0.5rem; }

.post-body { font-size: 1.05rem; }
.post-body h2 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.6rem; font-weight: 700; margin: 2.2rem 0 0.8rem; }
.post-body h3 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.25rem; font-weight: 600; margin: 1.6rem 0 0.6rem; }
.post-body p { margin: 0 0 1.1rem; color: #d5dcea; }
.post-body ul, .post-body ol { margin: 0 0 1.2rem 1.4rem; color: #d5dcea; }
.post-body li { margin-bottom: 0.4rem; }
.post-body strong { color: var(--text); }
.post-body a { color: var(--green-txt); text-decoration: underline; text-underline-offset: 2px; }
.post-body code { font-family: 'DM Mono', monospace; background: var(--bg-3); border: 1px solid var(--border); border-radius: 6px; padding: 0.1rem 0.4rem; font-size: 0.9em; color: var(--green-txt); }
.post-body blockquote { border-left: 3px solid var(--green); background: var(--bg-2); padding: 0.8rem 1.2rem; margin: 1.4rem 0; border-radius: 0 8px 8px 0; color: var(--text-2); }

/* Leia também (artigos relacionados) */
.related { margin: 3rem 0 1rem; }
.related > h2 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 1.1rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 680px) { .related-grid { grid-template-columns: 1fr; } }
.related-card { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color .2s, transform .2s; }
.related-card:hover { border-color: var(--green); transform: translateY(-3px); }
.related-card img { width: 100%; height: 120px; object-fit: cover; display: block; background: var(--bg-3); }
.related-title { padding: 0.85rem 1rem; font-weight: 600; font-size: 0.95rem; line-height: 1.35; color: var(--text); }

/* CTA final */
.post-cta { margin: 3rem 0; padding: 2rem; text-align: center; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--border-md); border-radius: 16px; }
.post-cta h3 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.4rem; margin-bottom: 0.5rem; }
.post-cta p { color: var(--text-2); margin-bottom: 1.2rem; }

/* Paginação / empty */
.pagination { display: flex; justify-content: center; gap: 1rem; padding: 1rem 0 3rem; }
.pagination a, .pagination span { padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 9px; color: var(--text-2); font-size: 0.9rem; }
.pagination a:hover { border-color: var(--green); color: var(--text); }
.pagination .disabled { opacity: 0.35; }
.empty { text-align: center; padding: 4rem 1rem; color: var(--text-3); }

/* Assinatura da newsletter */
.blog-subscribe { text-align: center; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--border-md); border-radius: 18px; padding: 2.5rem 1.5rem; margin: 3rem auto; max-width: 640px; }
.blog-subscribe .sub-icon { font-size: 2rem; color: var(--green); margin-bottom: 0.6rem; }
.blog-subscribe h3 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.5rem; margin-bottom: 0.4rem; }
.blog-subscribe > p { color: var(--text-2); max-width: 440px; margin: 0 auto 1.3rem; }
.sub-form { display: flex; gap: 0.6rem; max-width: 440px; margin: 0 auto; }
.sub-form input { flex: 1; background: var(--bg-3); border: 1px solid var(--border-md); border-radius: 10px; color: var(--text); padding: 0.7rem 0.9rem; font-family: inherit; font-size: 0.95rem; min-width: 0; }
.sub-form input::placeholder { color: var(--text-3); }
.sub-form button { background: var(--green); color: #04120a; border: none; font-weight: 700; padding: 0.7rem 1.4rem; border-radius: 10px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.sub-form button:hover { background: var(--green-dk); }
.sub-note { color: var(--text-3); font-size: 0.75rem; margin-top: 0.9rem; }
.sub-msg { max-width: 440px; margin: 0 auto 1rem; padding: 0.7rem 1rem; border-radius: 10px; font-size: 0.88rem; }
.sub-ok { background: var(--green-dim); color: var(--green-txt); border: 1px solid var(--green); }
.sub-info { background: rgba(96, 165, 250, 0.12); color: var(--blue); border: 1px solid rgba(96, 165, 250, 0.4); }
.sub-err { background: rgba(248, 113, 113, 0.12); color: var(--red); border: 1px solid rgba(248, 113, 113, 0.4); }
@media (max-width: 520px) { .sub-form { flex-direction: column; } }

/* Footer */
footer.blog-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--text-3); font-size: 0.85rem; text-align: center; margin-top: 2rem; }
footer.blog-footer a { color: var(--text-2); }
footer.blog-footer a:hover { color: var(--green-txt); }
