/* ── NEWS / DISPATCHES v2 ── */

.news-hero {
    padding: calc(60px + 4.5rem) 0 4rem;
    position: relative; overflow: hidden;
}
.news-hero::before {
    content: '';
    position: absolute; inset: 0; z-index: 0;
    background: url('assets/heroes/news-hero.jpg') center 50% / cover no-repeat;
    opacity: .15;
    pointer-events: none;
    filter: saturate(.4);
}
.news-hero .container { position: relative; z-index: 1; }
.news-hero .hero-pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--blue);
}

/* ── LAYOUT ── */
.news-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 3rem;
    align-items: start;
}

/* ── FILTERS ── */
.news-filters {
    display: flex; flex-wrap: wrap; gap: .5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.news-filter {
    font-family: 'Inter', sans-serif;
    font-size: .72rem; font-weight: 600;
    color: rgba(255,255,255,.35);
    padding: .4rem .85rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: none;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.news-filter:hover {
    color: var(--white);
    border-color: rgba(18,107,250,.5);
    background: rgba(18,107,250,.08);
}
.news-filter.active {
    color: var(--white);
    border-color: var(--blue);
    background: rgba(18,107,250,.15);
}

/* ── FEED ── */
.news-section {
    padding: 3rem 0 4rem;
}
.news-feed {
    display: flex; flex-direction: column; gap: 1.25rem;
}
.news-empty {
    font-size: .9rem; color: rgba(255,255,255,.3);
    text-align: center; padding: 4rem 0;
}

/* ── LOAD MORE ── */
.news-load-more {
    display: block;
    margin: 2rem auto 0;
    font-family: 'Inter', sans-serif;
    font-size: .82rem; font-weight: 600;
    color: var(--blue);
    background: none;
    border: 1px solid rgba(18,107,250,.35);
    border-radius: 8px;
    padding: .65rem 1.5rem;
    cursor: pointer;
    transition: all .15s;
}
.news-load-more:hover {
    background: rgba(18,107,250,.08);
    border-color: var(--blue);
}

/* ── CARD ── */
.news-card {
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,.02);
    transition: border-color .18s, background .18s, transform .18s;
}
.news-card:hover {
    border-color: rgba(18,107,250,.35);
    background: rgba(18,107,250,.04);
    transform: translateY(-2px);
}
.news-card-meta {
    display: flex; align-items: center; gap: .75rem;
    margin-bottom: .75rem;
}
.news-tag {
    font-size: .6rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--blue);
    padding: .18rem .5rem;
    border: 1px solid rgba(18,107,250,.3);
    border-radius: 4px;
    background: rgba(18,107,250,.06);
    white-space: nowrap;
}
.news-card-meta time {
    font-size: .72rem; color: rgba(255,255,255,.25);
}
.news-card h2 {
    font-size: 1.05rem; font-weight: 700;
    line-height: 1.35; margin-bottom: .5rem;
    letter-spacing: -.25px;
}
.news-card h2 a {
    color: var(--white);
    transition: color .15s;
}
.news-card h2 a:hover { color: var(--blue); }
.news-card > p {
    font-size: .85rem; color: rgba(255,255,255,.42);
    line-height: 1.7; margin-bottom: .75rem;
}
.news-card-footer {
    display: flex; align-items: center; justify-content: space-between;
}
.news-author {
    font-size: .7rem; color: rgba(255,255,255,.2);
    font-weight: 500;
}

/* ── SHARE BUTTONS ── */
.share-btns {
    display: flex; gap: .4rem;
}
.share-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: rgba(255,255,255,.3);
    transition: all .15s;
}
.share-btn:hover {
    color: var(--white);
    border-color: rgba(255,255,255,.2);
    background: rgba(255,255,255,.05);
}
.share-li:hover { color: #0077B5; border-color: rgba(0,119,181,.4); }
.share-x:hover  { color: var(--white); }
.share-em:hover { color: var(--blue); border-color: rgba(18,107,250,.4); }

/* ── SIDEBAR ── */
.news-sidebar {
    position: sticky;
    top: 80px;
}
.news-archive h3,
.news-stats h3 {
    font-size: .68rem; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,.25);
    margin-bottom: 1rem;
}
.archive-year {
    margin-bottom: 1.25rem;
}
.archive-year h4 {
    font-size: .9rem; font-weight: 800;
    color: rgba(255,255,255,.5);
    margin-bottom: .5rem;
}
.archive-months {
    display: flex; flex-wrap: wrap; gap: .35rem;
}
.archive-month-btn {
    font-family: 'Inter', sans-serif;
    font-size: .68rem; font-weight: 500;
    color: rgba(255,255,255,.3);
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .25rem .5rem;
    cursor: pointer;
    transition: all .15s;
}
.archive-month-btn span {
    font-size: .58rem;
    color: rgba(255,255,255,.15);
    margin-left: .15rem;
}
.archive-month-btn:hover {
    color: var(--white);
    border-color: rgba(18,107,250,.4);
    background: rgba(18,107,250,.06);
}
.archive-month-btn.active {
    color: var(--white);
    border-color: var(--blue);
    background: rgba(18,107,250,.12);
}
.news-stats {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.stats-range {
    font-size: .72rem;
    color: rgba(255,255,255,.2);
    line-height: 1.6;
}

/* ── SINGLE POST ── */
.news-post-section {
    padding: calc(60px + 3rem) 0 4rem;
}
.news-back {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .82rem; font-weight: 600;
    color: rgba(255,255,255,.35);
    margin-bottom: 2.5rem;
    transition: color .15s;
}
.news-back:hover { color: var(--blue); }

.news-post {
    max-width: 720px;
}
.news-post-meta {
    display: flex; align-items: center; gap: .75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.news-post h1 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 900; line-height: 1.2;
    letter-spacing: -.75px;
    margin-bottom: 2rem;
}
.news-post-body {
    font-size: .95rem;
    color: rgba(255,255,255,.6);
    line-height: 1.85;
}
.news-post-body p { margin-bottom: 1.25rem; }
.news-post-body p:last-child { margin-bottom: 0; }
.news-post-body a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.news-post-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: .85em;
    background: rgba(18,107,250,.1);
    padding: .15rem .4rem;
    border-radius: 4px;
}
.news-post-body blockquote {
    border-left: 2px solid var(--blue);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: rgba(255,255,255,.45);
    font-style: italic;
}

/* ── POST CTA BOX ── */
.news-cta-box {
    margin: 2.5rem 0;
    padding: 1.75rem 2rem;
    border: 1px solid rgba(18,107,250,.25);
    border-radius: 12px;
    background: rgba(18,107,250,.04);
}
.news-cta-box p {
    font-size: .9rem;
    color: rgba(255,255,255,.55);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}
.news-cta-box .btn-primary-lg {
    font-size: .85rem;
    padding: .75rem 1.5rem;
}

/* ── POST SHARE ── */
.news-post-share {
    display: flex; align-items: center; gap: .75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.news-post-share span {
    font-size: .72rem; font-weight: 600;
    color: rgba(255,255,255,.25);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.news-post-share .share-btn {
    width: 34px; height: 34px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .news-layout {
        grid-template-columns: 1fr;
    }
    .news-sidebar {
        position: static;
        display: flex; flex-wrap: wrap; gap: 2rem;
        padding-top: 2rem;
        border-top: 1px solid var(--border);
    }
    .news-archive, .news-stats {
        flex: 1; min-width: 200px;
    }
    .news-stats {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}
@media (max-width: 768px) {
    .news-card { padding: 1.25rem 1.5rem; }
    .news-post h1 { font-size: 1.4rem; }
    .news-cta-box { padding: 1.25rem 1.5rem; }
}
@media (max-width: 480px) {
    .news-hero { padding-top: calc(60px + 2.5rem); }
    .news-card { padding: 1rem 1.25rem; }
    .news-card-footer { flex-direction: column; align-items: flex-start; gap: .5rem; }
}
