/* =====================================================
   MW4.GG — News System CSS
   ===================================================== */

/* ─── News Listing Page ─────────────────────────────── */
.news-page {
    padding-top: calc(var(--nav-height, 56px) + 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;
    text-transform: uppercase;
}

.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);
    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: 0;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.news-filter-btn:hover {
    border-color: var(--accent-yellow);
    color: var(--text-white);
}

.news-filter-btn.active {
    background: var(--accent-yellow);
    border-color: var(--accent-yellow);
    color: #000;
}

/* ─── Featured Article ──────────────────────────────── */
.news-featured {
    margin-bottom: 40px;
}

.news-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.news-featured-card:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-2px);
}

.news-featured-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-darker);
}

.news-featured-image--placeholder {
    background: repeating-linear-gradient(45deg, var(--bg-card) 0, var(--bg-card) 10px, var(--bg-darker) 10px, var(--bg-darker) 20px);
}

.news-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-featured-card:hover .news-featured-image img {
    transform: scale(1.05);
}

.news-featured-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.news-featured-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-featured-category {
    color: var(--accent-yellow);
    font-weight: 700;
}

.news-featured-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-white);
    line-height: 1.3;
    margin: 0;
}

.news-featured-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.news-featured-readmore {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}

/* ─── Article Grid ─────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-3px);
}

.news-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-darker);
}

.news-card-image--placeholder {
    background: repeating-linear-gradient(45deg, var(--bg-card) 0, var(--bg-card) 10px, var(--bg-darker) 10px, var(--bg-darker) 20px);
    aspect-ratio: 16/9;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-category {
    color: var(--accent-yellow);
    font-weight: 700;
}

.news-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.4;
    margin: 0;
}

.news-card-excerpt {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.news-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* ─── Article Detail ───────────────────────────────── */
.article-page {
    padding-top: calc(var(--nav-height, 56px) + 20px);
    min-height: 100vh;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding-bottom: 60px;
}

.article-main { min-width: 0; }

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.article-breadcrumb a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.article-breadcrumb a:hover { color: var(--accent-yellow); }
.article-breadcrumb svg { opacity: 0.5; }

.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;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-category-badge {
    background: var(--accent-yellow);
    color: #000;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 1px;
}

.article-date { color: var(--text-dim); }

.article-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-white);
    line-height: 1.25;
    margin: 0 0 12px;
}

.article-author {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
}

.article-author strong {
    color: var(--text-white);
    font-weight: 600;
}

/* Mobile share strip */
.article-share-strip {
    display: none;
    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 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.article-share-strip-back:hover { color: var(--accent-yellow); }

.article-share-strip-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-share-strip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.article-share-strip-btn:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

/* Hero image */
.article-hero-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    margin-bottom: 32px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article body */
.article-body {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.article-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 32px 0 12px;
}

.article-body p { margin: 0 0 16px; }

.article-body a {
    color: var(--accent-yellow);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.article-body a:hover { opacity: 0.8; }

.article-body strong {
    color: var(--text-white);
    font-weight: 700;
}

.article-body ul,
.article-body ol {
    margin: 0 0 16px 24px;
    padding: 0;
}

.article-body li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.article-body blockquote {
    border-left: 3px solid var(--accent-yellow);
    margin: 24px 0;
    padding: 16px 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-style: italic;
}

.article-body blockquote p { margin: 0; }

.article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

.article-body img {
    max-width: 100%;
    border: 1px solid var(--border);
    margin: 16px 0;
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 4px 10px;
    transition: border-color 0.2s, color 0.2s;
}

.article-tag:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

/* Sidebar */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: calc(var(--nav-height, 56px) + 20px);
    max-height: calc(100vh - var(--nav-height, 56px) - 40px);
    overflow-y: auto;
}

.article-sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
}

.article-sidebar-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.article-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.article-share-btn:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.article-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-sidebar-link {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.article-sidebar-link:hover { color: var(--accent-yellow); }

/* Loading / not found states */
.article-loading,
.article-not-found {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.article-not-found h1 {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 12px;
}

.article-not-found a { color: var(--accent-yellow); }

/* ─── Home News Carousel ─────────────────────────────── */
.home-news-section {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: 60px 0;
}

.home-news-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 12px;
}

.home-news-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-white);
    margin: 0 0 4px;
}

.home-news-sub {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
}

.home-news-all {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-yellow);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.home-news-all:hover { opacity: 0.7; }

.home-news-track-wrap { overflow: hidden; }

.home-news-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.home-news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s, transform 0.2s;
}

.home-news-card:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-3px);
}

.home-news-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-darker);
    flex-shrink: 0;
}

.home-news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.home-news-card:hover .home-news-card-image img {
    transform: scale(1.06);
}

.home-news-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.home-news-card-cat {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-yellow);
}

.home-news-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.4;
    margin: 0;
}

.home-news-card-date {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: auto;
    padding-top: 6px;
}

.home-news-empty {
    font-size: 0.9rem;
    color: var(--text-dim);
    padding: 40px 0;
    text-align: center;
    grid-column: 1 / -1;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .home-news-track { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .news-featured-card { grid-template-columns: 1fr; }
    .news-featured-body { padding: 20px; }
    .news-grid { grid-template-columns: 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; max-height: none; }
    .article-share-strip { display: flex; }
    .article-title { font-size: 1.5rem; }
    .home-news-track { grid-template-columns: repeat(2, 1fr); }
    .news-header-top,
    .home-news-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .news-grid,
    .home-news-track { grid-template-columns: 1fr; }
    .news-featured-title { font-size: 1.3rem; }
}
