/* ==========================================================================
   News — Pitchside254 feed styling (listing page, article reader, home snippet)
   Uses the design-system tokens from design-system.css.
   ========================================================================== */

.news-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

/* ---------- Section head ------------------------------------------------- */
.news-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.news-head h1,
.news-head h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.2;
}

.news-head p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 15px;
}

.news-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.news-kicker i { font-size: 15px; }

.news-viewmore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    background: var(--primary-tint);
    border: 1px solid rgba(76, 175, 80, .32);
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
    white-space: nowrap;
}

.news-viewmore:hover {
    background: var(--primary);
    color: var(--text-on-primary);
    transform: translateY(-2px);
}

/* ---------- Category tabs ------------------------------------------------ */
.news-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.news-tabs::-webkit-scrollbar { display: none; }

.news-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--surface-1);
    border: 1px solid var(--divider);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}

.news-tab:hover { color: var(--text-primary); border-color: rgba(76, 175, 80, .4); }

.news-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
}

/* ---------- Cards -------------------------------------------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: rgba(76, 175, 80, .38);
    box-shadow: var(--shadow-float);
}

.news-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    overflow: hidden;
}

.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.news-card:hover .news-card-media img { transform: scale(1.05); }

.news-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.news-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-body h3 {
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.news-card-body p {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 14px;
}

.news-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-disabled);
}

.news-meta i { font-size: 14px; vertical-align: -2px; }
.news-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Featured (lead) card ---------------------------------------- */
.news-lead {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    background: var(--surface-1);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 24px;
    transition: border-color .22s ease, box-shadow .22s ease;
}

.news-lead:hover {
    border-color: rgba(76, 175, 80, .38);
    box-shadow: var(--shadow-float);
}

.news-lead-media {
    position: relative;
    min-height: 260px;
    background: var(--surface-2);
}

.news-lead-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-lead-body {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-lead-body h2 {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--text-primary);
    margin: 10px 0 12px;
}

.news-lead-body p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

@media (max-width: 767px) {
    .news-lead { grid-template-columns: 1fr; }
    .news-lead-media { min-height: 200px; }
    .news-lead-body { padding: 18px; }
    .news-lead-body h2 { font-size: 20px; }
    .news-head h1, .news-head h2 { font-size: 22px; }
    .news-wrap { padding: 22px 14px 36px; }
}

/* ---------- Home page snippet ------------------------------------------- */
.news-snippet {
    padding: 44px 0;
    background: var(--bg-section, #171717);
}

.news-snippet .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Horizontal scroll on small screens so the snippet stays compact. */
@media (max-width: 767px) {
    .news-snippet .news-grid {
        display: flex;
        overflow-x: auto;
        gap: 14px;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .news-snippet .news-grid::-webkit-scrollbar { display: none; }
    .news-snippet .news-card {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }
}

/* ---------- Pagination --------------------------------------------------- */
.news-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.news-pager a,
.news-pager span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--surface-1);
    border: 1px solid var(--divider);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s ease;
}

.news-pager a:hover { color: var(--text-primary); border-color: rgba(76, 175, 80, .4); }

.news-pager .current {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-primary);
}

.news-pager .disabled { opacity: .4; pointer-events: none; }

/* ---------- Article reader ---------------------------------------------- */
.article-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 28px 16px 48px;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 18px;
}

.article-back:hover { color: var(--primary); }

.article-title {
    font-size: 32px;
    line-height: 1.22;
    font-weight: 800;
    color: var(--text-primary);
    margin: 10px 0 14px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--text-disabled);
    font-size: 13px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--divider);
    margin-bottom: 22px;
}

.article-meta span { display: inline-flex; align-items: center; gap: 5px; }

.article-hero {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 22px;
    display: block;
}

.article-body {
    color: var(--text-primary);
    font-size: 17px;
    line-height: 1.75;
}

.article-body p { margin: 0 0 18px; }
.article-body h2 { font-size: 22px; font-weight: 800; margin: 28px 0 12px; }
.article-body h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; }
.article-body ul,
.article-body ol { margin: 0 0 18px 20px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.article-body blockquote {
    margin: 22px 0;
    padding: 12px 18px;
    border-left: 3px solid var(--primary);
    background: var(--primary-tint);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}

.article-source {
    margin-top: 28px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: var(--surface-1);
    border: 1px solid var(--divider);
    color: var(--text-secondary);
    font-size: 14px;
}

.article-source a { color: var(--primary); font-weight: 700; text-decoration: none; }
.article-source a:hover { text-decoration: underline; }

@media (max-width: 767px) {
    .article-title { font-size: 24px; }
    .article-body { font-size: 16px; }
}

/* ---------- Empty state -------------------------------------------------- */
.news-empty {
    text-align: center;
    padding: 56px 20px;
    background: var(--surface-1);
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
}

.news-empty i { font-size: 40px; color: var(--text-disabled); display: block; margin-bottom: 12px; }

/* ---------- Powered-by strip (news section footer only) ------------------ */
.news-poweredby {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--surface-1);
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    flex-wrap: wrap;
}

.news-poweredby i { color: var(--primary); font-size: 17px; }

.news-poweredby a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.news-poweredby a:hover { text-decoration: underline; }
