/* =====================================================
   Useful.gg — News page
   ===================================================== */

/* ─── News Listing Page ─────────────────────────────── */
.news-page {
    padding-top: calc(var(--nav-height, 60px) + 24px);
    min-height: 100vh;
    padding-bottom: 80px;
}

.news-header {
    margin-bottom: 40px;
}

.news-header-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.news-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-white);
    margin: 0 0 6px;
}

.news-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Category filters */
.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    font-family: inherit;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: var(--radius-pill);
    transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
}

.news-filter-btn:hover {
    border-color: var(--neon-pink);
    color: var(--text-white);
    box-shadow: 0 0 10px var(--neon-pink-glow);
}

.news-filter-btn.active {
    background: var(--gradient-vice-90);
    border-color: transparent;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ─── Article Grid ─────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.news-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: inherit;
    text-decoration: none;
}

.news-card:hover {
    border-color: var(--neon-pink);
    box-shadow: var(--shadow-glow);
}

.news-card.is-hidden { display: none; }

.news-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-darker);
}

.news-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-image--mark {
    display: flex;
    align-items: flex-end;
    padding: 14px 16px;
    background: var(--gradient-vice);
}

.news-card-image--mark span {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

.news-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding: 20px;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.news-card-category { color: var(--neon-pink-bright); }

.news-card-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-white);
}

.news-card-excerpt {
    margin: 0;
    flex: 1;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.news-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* ─── Article ──────────────────────────────────────── */
.article-page {
    padding-top: calc(var(--nav-height, 60px) + 8px);
    min-height: 100vh;
    padding-bottom: 80px;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 40px;
    padding-bottom: 40px;
}

.article-main { min-width: 0; }

.article-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.article-category-badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--gradient-vice-90);
    color: #fff;
    font-size: 0.68rem;
    letter-spacing: 0.6px;
}

.article-date { color: var(--text-dim); }

.article-title {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-white);
}

.article-author {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.article-author strong { color: var(--text-white); font-weight: 600; }

.article-body {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.article-body h2 {
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-white);
}

.article-body p { margin: 0 0 16px; }

.article-body a {
    color: var(--neon-pink-bright);
    text-underline-offset: 2px;
}

.article-body strong { color: var(--text-white); font-weight: 700; }

.article-body ul {
    margin: 0 0 16px 1.25rem;
    padding: 0;
}

.article-body li { margin-bottom: 6px; }

.article-body hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

.article-body em { color: var(--text-dim); }

.article-hero-image {
    margin: 0 0 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-darker);
}

.article-hero-image img,
.article-body img {
    display: block;
    width: 100%;
    height: auto;
}

.article-body figure {
    margin: 0 0 22px;
}

.article-body figure img {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.article-body figcaption {
    margin-top: 8px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-dim);
}

.article-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 0 0 20px;
}

.article-table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    font-size: 0.875rem;
    line-height: 1.5;
}

.article-table th,
.article-table td {
    border: 1px solid var(--border);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.article-table th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-white);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.article-table td strong { color: var(--text-white); }

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.article-tag {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--nav-height, 60px) + 16px);
    align-self: start;
}

.article-sidebar-section {
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.article-sidebar-title {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.article-share-buttons,
.article-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-share-btn {
    display: flex;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.article-share-btn:hover,
.article-sidebar-link:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink-bright);
}

.article-sidebar-link {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.article-share-strip { display: none; }

@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
}

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-header-top { flex-direction: column; align-items: flex-start; }
    .article-title { font-size: 1.45rem; }
    .article-share-strip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
    }
    .article-share-strip-back {
        color: var(--text-secondary);
        font-size: 0.78rem;
        font-weight: 600;
        text-decoration: none;
    }
    .article-share-strip-actions { display: flex; gap: 8px; }
    .article-share-strip-btn {
        padding: 6px 10px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--bg-card);
        color: var(--text-secondary);
        font: inherit;
        font-size: 0.75rem;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
    }
}
