/* ==========================================================================
   BLOG STYLES — American Virtual Partners
   Loaded after style.css and reuses its variables and fonts
   (--bg, --section, --panel, --line, --blue, --blue-soft, --text, --muted;
   Bebas Neue headings, DM Sans body, Rajdhani labels).
   Only blog-specific classes live here (prefixed "blog-" / "post-").
   ========================================================================== */

/* Keep blog content above the particle canvas added by effects.js */
.blog-page main > section,
.blog-page main > article { position: relative; z-index: 1; }

.blog-wrap { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }

/* Shared label style (matches .kicker / buttons) */
.blog-tag,
.blog-meta,
.blog-num {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.blog-tag { font-size: 12px; color: var(--blue-soft); }
.blog-meta { font-size: 11px; color: var(--muted); letter-spacing: .12em; }

/* ---------- Image frame (gradient shows while a photo loads / if it fails) ---------- */
.blog-img {
    position: relative; display: block; overflow: hidden;
    background: linear-gradient(135deg, var(--panel), #0a3a73);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}
.blog-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
a:hover > .blog-img img, a:hover .blog-img img { transform: scale(1.04); }

/* ==========================================================================
   HERO — large feature image left, headline right
   ========================================================================== */
.blog-hero { padding: 40px 0 56px; border-top: 1px solid #112744; }
.blog-hero-grid {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px;
    border-bottom: 1px solid var(--line-soft); padding-bottom: 48px;
}
.blog-hero-grid > a { display: block; }
.blog-hero-grid > a .blog-img { height: 100%; min-height: 380px; }
.blog-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 8px 0; }
/* Page heading above the featured post */
.blog-pagehead {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px;
    flex-wrap: wrap; padding: 24px 0 32px;
}
.blog-pagehead h1 { margin: 12px 0 0; text-align: left; font-size: clamp(3rem, 6vw, 5.4rem); }
.blog-pagehead > p { max-width: 40ch; font-size: 1.05rem; line-height: 1.75; }

/* Featured post title */
.blog-feature-title { margin: 14px 0 0; font-size: clamp(2.1rem, 3.4vw, 3.3rem); line-height: 1; }
.blog-feature-title a { transition: color .2s; }
.blog-feature-title a:hover { color: var(--blue-soft); }
.blog-hero-copy .blog-meta { margin-top: 18px; }
.blog-hero-lede { margin-top: 0; padding-top: 20px; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.75; max-width: 34ch; }
.blog-hero-link { align-self: flex-start; margin-top: 22px; }
.blog-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; max-width: 420px; }
.blog-thumbs a { display: block; }
.blog-thumbs .blog-img { aspect-ratio: 1; border-radius: 6px; }

/* ==========================================================================
   SECTIONS & HEADINGS
   ========================================================================== */
.blog-section { padding: 100px 0; }
.blog-section.alt {
    background: linear-gradient(180deg, rgba(5, 20, 40, .2), rgba(5, 20, 40, .6));
    border-top: 1px solid #112744; border-bottom: 1px solid #112744;
}
.blog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.blog-num { display: block; font-size: 13px; letter-spacing: .22em; color: var(--blue-soft); margin-bottom: 14px; }
.blog-title { position: relative; isolation: isolate; }
.blog-title::before {
    content: attr(data-ghost); position: absolute; left: -.04em; top: 50%; transform: translateY(-52%);
    font-size: 1.75em; white-space: nowrap; color: transparent;
    -webkit-text-stroke: 1px rgba(126, 183, 255, .22); pointer-events: none; z-index: -1;
}

/* ---------- Category filter ---------- */
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.blog-filters button {
    cursor: pointer; padding: 9px 16px; border-radius: 6px;
    font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 11px;
    letter-spacing: .14em; text-transform: uppercase;
    border: 1px solid var(--line); background: rgba(7, 29, 56, .65); color: var(--muted);
    transition: .2s;
}
.blog-filters button:hover { border-color: var(--blue); color: var(--text); }
.blog-filters button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ==========================================================================
   ARTICLE CARD GRID — first card gets the blue highlight
   ========================================================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(180deg, rgba(7, 29, 56, .96), rgba(5, 20, 40, .95));
    border: 1px solid var(--line-soft); border-radius: 8px;
    box-shadow: 0 10px 28px rgba(2, 7, 20, .18);
    transition: .2s;
}
.blog-card:hover { transform: translateY(-3px); border-color: var(--line); box-shadow: 0 0 26px rgba(10, 126, 249, .14); }
.blog-card .blog-img { aspect-ratio: 16 / 10; border: 0; border-radius: 0; }
.blog-card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.blog-card h3 { font-size: 1.85rem; }
.blog-card p { font-size: 15px; line-height: 1.75; }
.blog-card .blog-meta { margin-top: auto; padding-top: 8px; }

.blog-card.is-featured {
    background: linear-gradient(180deg, #0a7ef9, #0668d0);
    border-color: var(--blue);
    box-shadow: 0 0 32px rgba(10, 126, 249, .3);
}
.blog-card.is-featured .blog-tag,
.blog-card.is-featured .blog-meta { color: #dcebff; }
.blog-card.is-featured p { color: rgba(255, 255, 255, .88); }
.blog-card[hidden] { display: none; }

/* ==========================================================================
   STATS STRIP + GUIDES
   ========================================================================== */
.blog-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center;
    background: linear-gradient(180deg, rgba(7, 29, 56, .96), rgba(5, 20, 40, .95));
    border: 1px solid var(--line-soft); border-radius: 8px;
    padding: 40px 16px; margin-bottom: 100px;
}
.blog-stats .icon { width: 44px; height: 44px; }
.blog-stats .icon svg { width: 19px; height: 19px; }
.blog-stats strong {
    display: block; margin: 14px 0 2px;
    font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: .05em;
    font-size: clamp(2.4rem, 4vw, 3.2rem); line-height: 1; color: var(--text);
}
.blog-stats span {
    font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 12px;
    letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

.blog-guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-guide { display: block; }
.blog-guide .blog-img { aspect-ratio: 4 / 3; }
.blog-guide .blog-img::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(2, 12, 27, .1) 30%, rgba(2, 12, 27, .75));
}
.blog-play {
    position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 58px; height: 58px; border-radius: 50%; background: var(--blue);
    box-shadow: 0 0 24px rgba(10, 126, 249, .45);
    display: grid; place-items: center; color: #fff;
    font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .14em;
}
.blog-guide h3 { margin: 20px 0 8px; font-size: 1.85rem; }
.blog-guide p { font-size: 15px; line-height: 1.75; }

/* ==========================================================================
   SINGLE POST (roundup template)
   ========================================================================== */
.post-hero { padding: 72px 0 40px; text-align: center; border-top: 1px solid #112744; }
.post-hero h1 { margin: 18px auto 0; max-width: 24ch; font-size: clamp(2.5rem, 4.4vw, 4.2rem); line-height: 1; }
.post-hero .blog-meta { display: block; margin-top: 22px; }
.post-cover { aspect-ratio: 21 / 9; margin-bottom: 64px; }
.post-body { max-width: 760px; margin-inline: auto; padding-bottom: 100px; }
.post-body p { font-size: 17px; line-height: 1.9; }
.post-intro {
    border-left: 2px solid var(--blue); padding-left: 22px; margin: 0 0 56px;
    font-size: 19px !important; color: #c9d7ea;
}
.post-body h2 { margin: 64px 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); font-size: clamp(2.2rem, 4vw, 3.2rem); }
.post-body > h3 { margin: 56px 0 16px; }
.post-quote {
    display: grid; grid-template-columns: 52px 1fr; gap: 18px; margin: 0 0 16px; padding: 22px;
    background: linear-gradient(180deg, rgba(7, 29, 56, .96), rgba(5, 20, 40, .95));
    border: 1px solid var(--line-soft); border-radius: 8px;
}
.post-avatar {
    width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid rgba(10, 126, 249, .38); background: rgba(10, 126, 249, .08);
    color: var(--blue-soft); font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: .08em;
}
.post-quote blockquote { margin: 0; color: #dce9fa; font-size: 16px; line-height: 1.8; font-style: italic; }
.post-quote figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.post-quote figcaption b { color: var(--blue-soft); font-weight: 500; }
.post-summary {
    padding: 30px; border-radius: 8px;
    background: #062040; border: 1px solid rgba(10, 126, 249, .5);
    box-shadow: 0 0 32px rgba(10, 126, 249, .1);
}
.post-summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-summary li { position: relative; padding-left: 26px; color: #dce9fa; line-height: 1.7; }
.post-summary li::before {
    content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px;
    border-radius: 50%; background: var(--blue); box-shadow: 0 0 10px rgba(10, 126, 249, .6);
}
.post-cta {
    text-align: center; margin-top: 56px; padding: 52px 30px; border-radius: 8px;
    background: linear-gradient(180deg, rgba(7, 29, 56, .96), rgba(5, 20, 40, .95));
    border: 1px solid rgba(10, 126, 249, .45);
}
.post-cta h2 { margin: 18px 0 16px; padding: 0; border: 0; }
.post-cta p { max-width: 560px; margin: 0 auto 26px; }
.post-back { margin-top: 48px; }
.post-body p + p { margin-top: 18px; }
.post-body a:not(.btn) { color: var(--blue-soft); text-decoration: underline; text-underline-offset: 3px; }
.post-body > ul, .post-body > ol { margin: 18px 0 0; padding-left: 22px; color: var(--muted); font-size: 17px; line-height: 1.9; }
.post-body > ul li::marker, .post-body > ol li::marker { color: var(--blue-soft); }
.post-figure { margin: 40px 0; }
.post-figure .blog-img { aspect-ratio: 16 / 9; }
.post-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; }


/* ---------- "More coming soon" placeholder card ---------- */
.blog-card.is-soon {
    background: rgba(7, 29, 56, .35); border-style: dashed; border-color: var(--line);
    justify-content: center; box-shadow: none;
}
.blog-card.is-soon:hover { transform: none; }
.blog-card.is-soon .blog-card-body { justify-content: center; flex: 0 1 auto; padding: 36px 28px; }
.blog-card.is-soon .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- Article body extras ---------- */
.post-lead { font-size: 19px !important; color: #c9d7ea; }
.post-hero a.blog-tag:hover { color: var(--text); }
.post-body h2 + p, .post-body h3 + p { margin-top: 0; }
.post-body > h3 { margin: 44px 0 14px; font-size: 1.9rem; }
.post-body > ul { margin: 18px 0; }
.post-body > p + ul, .post-body > ul + p { margin-top: 18px; }
.post-points { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.post-points li {
    padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: 8px;
    background: rgba(7, 29, 56, .6); line-height: 1.75;
}
.post-points li b { color: var(--text); font-weight: 500; }
.post-points li::marker { content: ""; }

.post-pull {
    margin: 32px 0; padding: 22px 26px; border-left: 2px solid var(--blue);
    background: linear-gradient(90deg, rgba(10, 126, 249, .12), rgba(10, 126, 249, 0));
    color: #dce9fa; font-size: 19px; line-height: 1.7;
}

.post-table { margin: 24px 0 28px; overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 8px; }
.post-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-table th, .post-table td { padding: 14px 18px; text-align: left; vertical-align: top; }
.post-table th {
    font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--blue-soft); background: #062040; white-space: nowrap;
}
.post-table td { color: var(--muted); border-top: 1px solid var(--line-soft); line-height: 1.6; }
.post-table td:first-child { color: var(--text); font-weight: 500; }

.post-faq { display: grid; gap: 10px; margin-top: 8px; }
.post-faq details {
    border: 1px solid var(--line-soft); border-radius: 8px;
    background: linear-gradient(180deg, rgba(7, 29, 56, .96), rgba(5, 20, 40, .95));
}
.post-faq summary {
    cursor: pointer; list-style: none; padding: 18px 52px 18px 22px; position: relative;
    color: var(--text); font-weight: 500; line-height: 1.5;
}
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after {
    content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
    color: var(--blue-soft); font-size: 22px; font-weight: 300;
}
.post-faq details[open] summary::after { content: "\2212"; }
.post-faq details p { padding: 0 22px 20px; font-size: 16px !important; }

.post-cta .kicker { font-size: 11px; }
.post-related { padding-top: 0; }
.post-related .kicker { margin-bottom: 20px; }
.blog-cta-section { padding-top: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
    .blog-hero-grid { grid-template-columns: 1fr; }
    .blog-hero-grid > a .blog-img { min-height: 0; aspect-ratio: 16 / 9; }
    .blog-hero-copy { padding-top: 0; }
    .blog-grid, .blog-guides { grid-template-columns: repeat(2, 1fr); }
    .blog-stats { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
}
@media (max-width: 760px) {
    .blog-wrap { width: min(100% - 32px, 1240px); }
    .blog-section { padding: 72px 0; }
    .blog-grid, .blog-guides { grid-template-columns: 1fr; }
    .blog-pagehead h1 { font-size: clamp(2.8rem, 14vw, 4.4rem); }
    .post-table th { white-space: normal; }
    .blog-title::before { font-size: 1.35em; }
    .blog-stats { margin-bottom: 72px; }
    .post-cover { aspect-ratio: 16 / 10; }
    .post-quote { grid-template-columns: 1fr; }
}
