/*
 * Estilos do blog da ACE Bootcamp.
 * A primeira parte (cores, botões, menu, rodapé, WhatsApp) é a mesma da página inicial,
 * para o blog ficar com o mesmo visual. A segunda parte é exclusiva do blog.
 */

/* ================= BASE COMPARTILHADA COM A PÁGINA INICIAL ================= */
:root {
    --bg: #07060b;
    --surface: #0f0e15;
    --surface-2: #16141f;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.16);
    --text: #f4f3f8;
    --text-dim: #a2a0ae;
    --text-faint: #6b6978;
    --purple: #a78bfa;
    --purple-dim: #7c5cf0;
    --violet: #8b5cf6;
    --cyan: #22d3ee;
    --pink: #e879f9;
    --grad: linear-gradient(100deg, #a78bfa 0%, #e879f9 45%, #22d3ee 100%);
    --nav-h: 84px;
    --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
html, body { overflow-x: clip; }
::selection { background: var(--purple); color: #0a0a0c; }
.display { font-family: 'Chakra Petch', 'Inter', sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: none; padding: 0 clamp(24px, 4vw, 72px); }
.grad-text {
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
    background-size: 200% auto; animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

/* ---------------- BOTÕES ---------------- */
.btn {
    position: relative; display: inline-flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 14px; letter-spacing: .2px; padding: 16px 28px;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
    cursor: pointer; border: none; font-family: inherit;
}
.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--grad); background-size: 200% auto; color: #0a0a0c; }
.btn-primary:hover { background-position: right center; transform: translateY(-2px); }
.btn-glow { filter: drop-shadow(0 0 18px rgba(167,139,250,.45)); }
.btn-ghost {
    color: var(--text); background: rgba(255,255,255,0.06); backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px var(--border-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

/* ---------------- NAV ---------------- */
header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    padding-top: env(safe-area-inset-top, 0px);
    transition: background .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}
header.scrolled { background: rgba(7,6,11,0.78); backdrop-filter: blur(14px) saturate(140%); border-color: var(--border); }
nav.wrap { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand img { height: 44px; width: auto; }
@media (max-width: 900px) { .brand img { height: 32px; } }
.navlinks { display: flex; gap: 6px; font-size: 14px; font-weight: 500; }
.navlinks a { color: var(--text-dim); padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s; }
.navlinks a:hover, .navlinks a.active { color: var(--text); background: rgba(255,255,255,0.07); }
.nav-cta { font-size: 13px; padding: 11px 18px; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); width: 44px; height: 44px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto; transition: transform .3s, opacity .3s; }
header.open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
header.open .menu-btn span:nth-child(2) { opacity: 0; }
header.open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) {
    .menu-btn { display: block; }
    .nav-cta { display: none; }
    .navlinks {
        position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
        flex-direction: column; gap: 0; padding: 12px 16px 24px;
        background: rgba(7,6,11,0.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
        transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .3s var(--ease);
    }
    .navlinks a { font-size: 18px; padding: 14px 12px; border-radius: 8px; }
    header.open { background: rgba(7,6,11,0.96); }
    header.open .navlinks { transform: none; opacity: 1; pointer-events: auto; }
}

.tag {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--cyan); font-size: 12.5px; font-weight: 700; letter-spacing: 1.6px; margin-bottom: 16px;
}
.tag::before { content: ""; width: 22px; height: 2px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

.card {
    position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
    transition: transform .35s var(--ease), border-color .35s;
}
.card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(167,139,250,.16), transparent 45%);
}
.card:hover { transform: translateY(-4px); border-color: rgba(167,139,250,.35); }
.card:hover::before { opacity: 1; }

/* ---------------- FOOTER ---------------- */
footer { border-top: 1px solid var(--border); padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
footer .brand img { height: 22px; opacity: .75; }
footer .links { display: flex; gap: 22px; font-size: 13.5px; color: var(--text-dim); flex-wrap: wrap; }
footer .links a:hover { color: var(--text); }
footer .copy { font-size: 12.5px; color: var(--text-faint); }

/* ---------------- WHATSAPP FLUTUANTE ---------------- */
.wa-float {
    position: fixed; z-index: 150;
    right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
    background: #25d366; color: #fff; box-shadow: 0 10px 30px rgba(37,211,102,.35), 0 4px 12px rgba(0,0,0,.4);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.wa-float::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; z-index: -1;
    animation: wa-ring 2.4s ease-out infinite;
}
@keyframes wa-ring { from { transform: scale(1); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }
.wa-float:hover { transform: scale(1.08); box-shadow: 0 14px 36px rgba(37,211,102,.5), 0 4px 12px rgba(0,0,0,.4); }
.wa-float .wa-tip {
    position: absolute; right: 72px; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text);
    background: rgba(15,14,21,.9); backdrop-filter: blur(8px); border: 1px solid var(--border-strong);
    padding: 8px 12px; border-radius: 10px; opacity: 0; transform: translateX(6px); pointer-events: none; transition: .25s var(--ease);
}
.wa-float:hover .wa-tip, .wa-float:focus-visible .wa-tip { opacity: 1; transform: none; }
@media (max-width: 600px) { .wa-float { width: 56px; height: 56px; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); } }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= BLOG ================= */

/* No blog não há foto de fundo atrás do menu, então ele já começa sólido */
header { background: rgba(7,6,11,0.82); backdrop-filter: blur(14px) saturate(140%); border-color: var(--border); }

main { padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-faint); margin-bottom: 28px; }
.breadcrumbs a { color: var(--text-dim); transition: color .2s; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current] { color: var(--text-dim); }

.dot-sep { margin: 0 6px; color: var(--text-faint); }

/* ---------- Topo da listagem ---------- */
.blog-hero {
    position: relative; padding: 72px 0 56px; overflow: hidden; isolation: isolate;
    border-bottom: 1px solid var(--border);
}
.blog-hero::before {
    content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; z-index: -1;
    background: radial-gradient(circle, rgba(139,92,246,.28), transparent 65%); filter: blur(20px);
}
.blog-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .3; pointer-events: none;
    background-image: linear-gradient(rgba(167,139,250,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(167,139,250,.12) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, #000, transparent 90%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
}
.blog-title {
    font-family: 'Barlow Condensed', 'Inter', sans-serif; text-transform: uppercase; font-weight: 700;
    font-size: clamp(42px, 6vw, 80px); line-height: .98; letter-spacing: -.5px; max-width: 900px; text-wrap: balance;
}
.blog-lead { font-family: 'Barlow', 'Inter', sans-serif; margin-top: 20px; max-width: 620px; font-size: clamp(17px, 1.6vw, 19px); color: var(--text-dim); }

/* ---------- Filtro de categorias ---------- */
.blog-list { padding: 48px 0 110px; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.cat-chip {
    font-family: inherit; font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 999px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); transition: .2s;
}
.cat-chip:hover { color: var(--text); border-color: var(--border-strong); }
.cat-chip.is-active { background: rgba(167,139,250,.14); border-color: var(--purple); color: var(--text); }

/* ---------- Cards de artigo ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { display: flex; }
.post-card-link { display: flex; flex-direction: column; width: 100%; }
.post-card-img { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-2); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post-card:hover .post-card-img > img { transform: scale(1.05); }
.post-card-placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    background: radial-gradient(circle at 30% 30%, rgba(139,92,246,.35), transparent 60%), linear-gradient(135deg, #1a1530, #0c0b12);
}
.post-card-placeholder img { width: 38% !important; height: auto !important; opacity: .55; }
.post-card-cat {
    position: absolute; left: 16px; top: 16px; font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    padding: 6px 12px; border-radius: 999px; background: rgba(7,6,11,.72); backdrop-filter: blur(8px); border: 1px solid var(--border-strong); color: var(--cyan);
}
.post-card-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card-body h3 { font-family: 'Chakra Petch', sans-serif; font-size: 21px; line-height: 1.25; font-weight: 700; transition: color .2s; }
.post-card:hover h3 { color: #fff; }
.post-card-body p { margin-top: 10px; color: var(--text-dim); font-size: 14.5px; flex: 1; }
.post-card-meta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-faint); }

/* Primeiro artigo em destaque */
.post-card.featured { grid-column: 1 / -1; }
.post-card.featured .post-card-link { flex-direction: row; }
.post-card.featured .post-card-img { flex: 1.25; aspect-ratio: auto; min-height: 380px; }
.post-card.featured .post-card-body { flex: 1; padding: clamp(28px, 4vw, 48px); justify-content: center; }
.post-card.featured h3 { font-size: clamp(26px, 3vw, 38px); }
.post-card.featured p { flex: 0; font-size: 16px; }
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
    .post-grid { grid-template-columns: 1fr; }
    .post-card.featured .post-card-link { flex-direction: column; }
    .post-card.featured .post-card-img { min-height: 0; aspect-ratio: 16/9; }
}

/* Lista vazia */
.blog-empty { padding: clamp(36px, 6vw, 64px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.blog-empty:hover { transform: none; }
.blog-empty-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: var(--purple); background: rgba(167,139,250,.1); box-shadow: inset 0 0 0 1px rgba(167,139,250,.25); }
.blog-empty h2 { font-family: 'Chakra Petch', sans-serif; font-size: 26px; }
.blog-empty p { color: var(--text-dim); max-width: 460px; margin-bottom: 8px; }
.blog-empty-filter { color: var(--text-dim); padding: 40px 0; text-align: center; }

/* ---------- Página do artigo ---------- */
.post-wrap { max-width: 800px; }
.post-hero { padding: 64px 0 40px; position: relative; isolation: isolate; }
.post-hero::before {
    content: ""; position: absolute; inset: -30% auto auto 50%; transform: translateX(-50%); width: 900px; height: 600px; z-index: -1;
    background: radial-gradient(ellipse, rgba(139,92,246,.22), transparent 65%); filter: blur(10px);
}
.post-title {
    font-family: 'Barlow Condensed', 'Inter', sans-serif; font-weight: 700; text-transform: uppercase;
    font-size: clamp(38px, 5.4vw, 64px); line-height: 1; letter-spacing: -.3px; text-wrap: balance;
}
.post-lead { font-family: 'Barlow', 'Inter', sans-serif; margin-top: 20px; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; color: #cfcdd9; }
.post-meta { display: flex; align-items: center; gap: 14px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }
.author-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-strong); flex-shrink: 0; }
.author-badge img { width: 26px; height: 26px; }
.post-meta-text { display: flex; flex-direction: column; font-size: 13.5px; color: var(--text-dim); }
.post-meta-text strong { color: var(--text); font-size: 14.5px; }

.post-cover { max-width: 1100px; margin-bottom: 56px; }
.post-cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 22px; border: 1px solid var(--border); }
.post-cover figcaption { margin-top: 12px; font-size: 13px; color: var(--text-faint); text-align: center; }

/* Texto do artigo */
.prose { font-family: 'Barlow', 'Inter', sans-serif; font-size: 19px; line-height: 1.75; color: #d9d7e2; }
.prose > * + * { margin-top: 1.15em; }
.prose h2, .prose h3, .prose h4 { font-family: 'Chakra Petch', sans-serif; color: var(--text); line-height: 1.25; scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose h2 { font-size: clamp(26px, 2.6vw, 32px); margin-top: 2em; }
.prose h3 { font-size: clamp(21px, 2vw, 24px); margin-top: 1.7em; }
.prose h4 { font-size: 19px; margin-top: 1.5em; }
.prose a { color: var(--purple); text-decoration: underline; text-decoration-color: rgba(167,139,250,.45); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.prose a:hover { color: #c4b5fd; text-decoration-color: currentColor; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--purple); }
.prose blockquote {
    border-left: 3px solid var(--purple); padding: 6px 0 6px 22px; color: var(--text); font-size: 1.08em; font-style: italic;
    background: linear-gradient(90deg, rgba(167,139,250,.08), transparent);
}
.prose img { border-radius: 16px; border: 1px solid var(--border); margin-inline: auto; }
.prose figure figcaption, .prose img + em { display: block; text-align: center; font-size: 14px; color: var(--text-faint); margin-top: 8px; }
.prose hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.prose code { font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9em; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { color: var(--text); font-family: 'Chakra Petch', sans-serif; }
.prose iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 16px; }

.post-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.post-tags li { font-size: 13px; color: var(--text-dim); padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }

/* Compartilhar */
.share { display: flex; align-items: center; gap: 10px; margin-top: 36px; padding: 22px 0; border-block: 1px solid var(--border); flex-wrap: wrap; }
.share-label { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-faint); margin-right: 6px; }
.share-btn {
    position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); transition: .2s; font-family: inherit;
}
.share-btn:hover { color: var(--text); border-color: rgba(167,139,250,.45); background: rgba(167,139,250,.1); }
.share-copy-ok {
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); white-space: nowrap; font-size: 12px; font-weight: 600;
    padding: 6px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
    opacity: 0; pointer-events: none; transition: .2s var(--ease);
}
.share-copy.copied .share-copy-ok { opacity: 1; transform: translate(-50%, 0); }

/* Chamada no fim do artigo */
.post-cta {
    margin: 48px 0 0; padding: clamp(28px, 4vw, 44px); border-radius: 24px; position: relative; overflow: hidden; isolation: isolate;
    background: radial-gradient(ellipse at 100% 0%, rgba(139,92,246,.28), transparent 60%), var(--surface);
    border: 1px solid rgba(167,139,250,.3);
}
.post-cta .tag { margin-bottom: 12px; }
.post-cta h2 { font-family: 'Chakra Petch', sans-serif; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; }
.post-cta p { color: var(--text-dim); margin-top: 12px; max-width: 560px; }
.post-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Relacionados */
.post { padding-bottom: 96px; }
.related { padding: 80px 0 110px; border-top: 1px solid var(--border); }
.related-title { font-family: 'Chakra Petch', sans-serif; font-size: clamp(26px, 3vw, 34px); margin-bottom: 28px; }

@media (max-width: 600px) {
    .prose { font-size: 18px; }
    .post-hero { padding-top: 40px; }
    .post-cover { padding: 0; }
    .post-cover img { border-radius: 0; border-inline: 0; }
}
