/* =================================================================
   NEWS PAGE — Token-based design matching Eh homepage aesthetic
   ================================================================= */

/* ── Page layout ── */
.section.news-page { padding: 0 0 2rem; border-bottom: none; }

/* ── Page title — Druk Heavy ── */
.news-page__title {
    font-family: 'Druk Heavy', 'Arial Black', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.15;
    color: var(--text);
    margin: 1rem 0 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── Scope section headings ── */
.news-scope-section { margin-bottom: 1.25rem; }
.news-scope-section__heading {
    font-family: 'Druk Heavy', 'Arial Black', sans-serif;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

/* ── Articles ── */
.news-article {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.news-article:last-of-type { border-bottom: none; }

/* ── Lead article ── */
.news-article--lead {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--card-shadow);
    margin-bottom: 0.5rem;
    transition: border-color 0.2s, background-color 0.2s;
}
.news-article--lead:hover { border-color: var(--red); background-color: var(--surface-hover); }
.news-article--lead .news-article__image { margin-bottom: 0.75rem; }
.news-article--lead .news-article__image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
    transition: transform 0.3s ease;
}
.news-article--lead .news-article__image:hover img { transform: scale(1.02); }
.news-article--lead .news-article__title {
    font-family: 'Druk Heavy', 'Arial Black', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--text);
    margin: 0 0 0.4rem;
    letter-spacing: 0.01em;
}
.news-article--lead .news-article__summary {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 0.5rem;
    max-width: 680px;
}

/* Text-only lead */
.news-article--text-only {
    border-left: 3px solid var(--red);
}

/* ── Regular articles ── */
.news-article__title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    margin: 0 0 0.2rem;
}
.news-article__title a {
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: color 0.15s;
}
.news-article__title a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -0.25rem;
    right: -0.25rem;
    transform: translateY(-50%);
    min-height: 44px;
}
.news-article__title a:hover { color: var(--red); }
.news-article__title a:visited { color: var(--muted); }

/* Article meta */
.news-article__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}
.news-article__source {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--red);
}
.news-article__date {
    font-size: 12px;
    color: var(--dim);
}

/* Article summary */
.news-article__summary {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 0.2rem;
}
.news-article:not(.news-article--lead) .news-article__summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Article with thumbnail ── */
.news-article--with-thumb {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 0.75rem;
    align-items: start;
}
.news-article__thumb { order: 1; }
.news-article__thumb img {
    width: 110px;
    height: 78px;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
}
.news-article__body { min-width: 0; }

/* ── Article actions ── */
.news-article__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.news-article__link {
    display: inline-block;
    position: relative;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}
.news-article__link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -0.5rem;
    right: -0.5rem;
    transform: translateY(-50%);
    min-height: 44px;
}
.news-article__link:hover { color: var(--red); text-decoration: underline; }

/* ── RSS link ── */
.news-page .rss-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
    color: var(--muted);
    border: none;
    min-height: 0;
    gap: 0;
    font-size: 0;
    background: none;
    transition: color 0.15s;
}
.news-page .rss-link:hover { color: var(--red); background: none; }
.news-page .rss-link__icon { width: 13px; height: 13px; }

/* ── Load more / View all ── */
.news-scope-section__more {
    display: inline-block;
    position: relative;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: 0.35rem 0;
    transition: color 0.15s;
}
.news-scope-section__more::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -0.5rem;
    right: -0.5rem;
    transform: translateY(-50%);
    min-height: 44px;
}
.news-scope-section__more:hover { color: var(--red); text-decoration: underline; }

.news-load-more {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    margin-top: 0.25rem;
}
.news-load-more:hover {
    background: var(--surface-hover);
    border-color: var(--red);
    color: var(--red);
}
.news-load-more__count {
    font-weight: 400;
    color: var(--dim);
    font-size: 12px;
}

/* ── Desktop: lead article side-by-side ── */
@media (min-width: 769px) {
    .news-article--lead:not(.news-article--text-only) {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: 1.25rem;
        align-items: start;
    }
    .news-article--lead .news-article__image { margin-bottom: 0; }
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .news-page__title { font-size: 1.35rem; }
    .news-scope-section__heading { font-size: 11px; }
    .news-article__source { font-size: 0.94rem; }
    .news-article__date { font-size: 0.94rem; }
    .news-article__summary { font-size: 0.94rem; }
    .news-article__link { font-size: 0.94rem; }
    .news-article--lead .news-article__title { font-size: 1.2rem; }
    .news-article--lead .news-article__summary { font-size: 0.94rem; }
    .news-article__title { font-size: 0.95rem; }
    .news-article--with-thumb { grid-template-columns: 1fr 70px; }
    .news-article__thumb img { width: 70px; height: 50px; }
    .news-scope-section__more { font-size: 0.93rem; }
}

/* ── Loading state during HTMX tab switch ── */
#news-content { transition: opacity 0.15s ease; }
.news-content--loading { opacity: 0.45; pointer-events: none; }
