/* ============================================================
   NEWSROOM PAGE
   ============================================================ */

/* ── Hero ── */
.newsroom-hero {
    position: relative; width: 100%; height: 35vh; min-height: 240px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    margin-top: calc(-1 * var(--nav-height));
}

.newsroom-hero__canvas { position: absolute; inset: 0; z-index: 0; }
.newsroom-hero__canvas canvas { width: 100% !important; height: 100% !important; display: block; }

.newsroom-hero__overlay {
    position: absolute; inset: 0; z-index: 1;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}

.newsroom-hero__content {
    position: relative; z-index: 2; text-align: center;
    padding: 0 2rem; padding-top: var(--nav-height);
}

.newsroom-hero__title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700;
    color: #fff; line-height: 1.15; margin: 0 0 0.6rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.newsroom-hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    color: rgba(255,255,255,0.8); margin: 0;
}

.newsroom-hero__fade {
    position: absolute; bottom: 0; left: 0; right: 0; height: 140px; z-index: 2;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
}

[data-theme="light"] .newsroom-hero__fade {
    height: 80px;
    background: linear-gradient(to bottom, transparent 0%, rgba(236,232,244,0.3) 30%, #ece8f4 100%);
}

/* ── Container ── */
.newsroom-container {
    max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 4rem;
}

/* ── Layout ── */
.rss-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Sidebar ── */
.newsroom-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
    max-height: calc(100vh - var(--nav-height) - 2rem);
    overflow-y: auto;
    background: rgba(20,16,34,0.65);
    border: 1px solid rgba(139,92,246,0.14);
    border-radius: 14px;
    padding: 1.25rem;
}

[data-theme="light"] .newsroom-sidebar {
    background: rgba(255,255,255,0.72);
    border-color: rgba(139,92,246,0.10);
}

.newsroom-sidebar__section {
    margin-bottom: 1.5rem;
}

.newsroom-sidebar__title {
    font-family: var(--font-display);
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem; padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* ── Search ── */
.newsroom-search { margin-bottom: 0; }

.newsroom-search__input {
    width: 100%; padding: 10px 14px; border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary); font-size: 0.82rem;
    font-family: var(--font-body);
    outline: none; transition: border-color 0.2s;
    box-sizing: border-box;
}

.newsroom-search__input:focus {
    border-color: rgba(139,92,246,0.4);
}

[data-theme="light"] .newsroom-search__input {
    background: rgba(0,0,0,0.02);
}

/* ── Filter Buttons ── */
.filter-group {
    display: flex; flex-direction: column; gap: 2px;
}

.filter-btn {
    display: flex; align-items: center; justify-content: flex-start;
    padding: 7px 12px; background: none; border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-family: var(--font-display); font-size: 0.75rem; font-weight: 500;
    cursor: pointer; transition: all 0.15s ease;
    text-align: left; width: 100%;
}

.filter-btn:hover {
    background: rgba(147,102,255,0.06);
    color: var(--text-secondary);
}

.filter-btn--active {
    background: rgba(147,102,255,0.15);
    color: var(--accent);
    font-weight: 600;
}

[data-theme="light"] .filter-btn--active {
    background: rgba(124,58,237,0.08);
}

.filter-btn__label {
    display: flex; align-items: center; gap: 8px;
}

.filter-btn__dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

.filter-btn__dot--deepgreen { background: #4B993F; }
.filter-btn__dot--green { background: #7DBD73; }
.filter-btn__dot--neutral { background: #9D9D9D; }
.filter-btn__dot--blue { background: #73AABD; }
.filter-btn__dot--deepblue { background: #738ABD; }

/* ── Clear Button ── */
.newsroom-clear {
    width: 100%; padding: 8px; border-radius: 8px; border: none;
    background: rgba(239,68,68,0.08); color: #ef4444;
    font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s ease;
    display: none;
}

.newsroom-clear:hover { background: rgba(239,68,68,0.15); }

.filter-clear--visible { display: block; }

/* ── Mobile Toggle ── */
.filter-toggle-mobile { display: none; margin-bottom: 1rem; }

.newsroom-mobile-toggle {
    width: 100%; padding: 10px; border-radius: 10px;
    border: 1px solid rgba(139,92,246,0.14);
    background: rgba(20,16,34,0.65);
    color: var(--text-secondary);
    font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.04em;
}

[data-theme="light"] .newsroom-mobile-toggle {
    background: rgba(255,255,255,0.72);
    border-color: rgba(139,92,246,0.10);
}

/* ── Feed Status ── */
.feed-status {
    font-size: 0.78rem; color: var(--text-muted);
    font-family: var(--font-display); font-weight: 500;
    padding: 0 0 1rem;
}

/* ── Article Cards ── */
.article-feed {
    display: flex; flex-direction: column; gap: 6px;
}

.article-card {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 12px 16px;
    background: rgba(75,153,63,0.12);
    border: 1px solid rgba(75,153,63,0.25);
    border-radius: 10px;
    text-decoration: none; color: inherit;
    transition: all 0.15s ease;
    cursor: pointer;
}

.article-card:hover {
    filter: brightness(1.15);
}

[data-theme="light"] .article-card:hover {
    filter: brightness(0.97);
}

.article-card__left {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 2px; flex-shrink: 0; min-width: 65px;
}

.article-card__source {
    font-family: var(--font-display);
    font-size: 0.72rem; font-weight: 700;
}

.article-card__date {
    font-size: 0.6rem; color: var(--text-muted);
    font-family: var(--font-display); font-weight: 500;
}

.article-card__body {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 6px;
}

.article-card__title {
    font-family: var(--font-display);
    font-size: 0.85rem; font-weight: 600;
    color: var(--text-primary); line-height: 1.45;
}

.article-card:hover .article-card__title {
    color: var(--accent);
}

.article-card__cat {
    display: inline-block; align-self: flex-start;
    font-size: 0.6rem; padding: 2px 8px; border-radius: 9999px;
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    font-family: var(--font-display); font-weight: 500;
}

[data-theme="light"] .article-card__cat {
    background: rgba(0,0,0,0.03);
}

.article-card__arrow {
    flex-shrink: 0; margin-top: 2px;
    opacity: 0; transform: translateX(-4px);
    transition: all 0.15s ease; color: var(--text-muted);
}

.article-card:hover .article-card__arrow {
    opacity: 1; transform: translateX(0);
}

/* ── Tag (affiliation badge) ── */
.tag { font-size: 0.6rem; padding: 2px 8px; border-radius: 9999px; font-weight: 600; font-family: var(--font-display); }
.tag--deepgreen, .tag--deep_green { background: rgba(75,153,63,0.15); color: #4B993F; }
.tag--green { background: rgba(125,189,115,0.12); color: #7DBD73; }
.tag--neutral { background: rgba(157,157,157,0.1); color: #9D9D9D; }
.tag--blue { background: rgba(115,170,189,0.12); color: #73AABD; }
.tag--deepblue, .tag--deep_blue { background: rgba(115,138,189,0.15); color: #738ABD; }
.btn--xs { font-size: 0.55rem; padding: 1px 6px; }

/* ── Feed Messages ── */
.feed-message {
    text-align: center; padding: 2rem 1rem;
    color: var(--text-muted); font-size: 0.85rem;
}

@keyframes pulse-load {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

#feedLoading p, #feedLoadingMore p {
    animation: pulse-load 1.5s ease-in-out infinite;
}

#feedEnd p {
    font-size: 0.72rem; font-family: var(--font-display);
    letter-spacing: 0.05em; text-transform: uppercase;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(139,92,246,0.2) transparent;
}

[data-theme="light"] * {
    scrollbar-color: rgba(139,92,246,0.15) transparent;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .rss-layout {
        grid-template-columns: 1fr;
    }

    .newsroom-sidebar {
        position: static; max-height: none;
        display: none;
    }

    .newsroom-sidebar.sidebar--mobile-open {
        display: block;
        margin-bottom: 1rem;
    }

    .filter-toggle-mobile { display: block; }

}
