/* ============================================
   RusCOD news feed — modern list only (no hero)
   Escapes style.css .container grid (1fr 300px)
   ============================================ */

.news-feed-page {
    --nf-accent: #3fa9f5;
    --nf-accent-soft: rgba(63, 169, 245, 0.14);
    --nf-ink: rgba(255, 255, 255, 0.94);
    --nf-muted: rgba(255, 255, 255, 0.58);
    --nf-faint: rgba(255, 255, 255, 0.34);
    --nf-line: rgba(255, 255, 255, 0.09);
    --nf-panel: linear-gradient(165deg, rgba(16, 20, 28, 0.94), rgba(8, 10, 14, 0.97));
    --nf-row: rgba(14, 17, 24, 0.55);
    overflow-x: hidden;
}

/* Break out of site .container / .main-content grid */
.news-feed-page .main-content.nf-main {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    min-height: auto;
}

.news-feed-page .nf-page {
    display: block !important;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2.75rem;
    box-sizing: border-box;
}

.news-feed-page .nf-page .container,
.news-feed-page .nf-main > .container {
    display: block !important;
    grid-template-columns: none !important;
}

.nf-page-head {
    margin: 0 0 1.1rem;
    animation: nfFadeUp 0.5s ease both;
}

.nf-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.35rem, 2.8vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    margin: 0 0 0.3rem;
    line-height: 1.15;
}

.nf-brand span { color: var(--nf-accent); }

.nf-lead {
    margin: 0;
    color: var(--nf-muted);
    font-size: 0.95rem;
    max-width: 34rem;
    line-height: 1.45;
}

.nf-admin {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0 0 1.15rem;
    animation: nfFadeUp 0.5s ease 0.06s both;
}

.nf-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 1.75rem 2rem;
    align-items: start;
    animation: nfFadeUp 0.5s ease 0.1s both;
}

.nf-col { min-width: 0; }

.nf-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--nf-accent);
    margin: 0 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* Compact feed rows — cover LEFT when real featured_image exists */
.nf-feed {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.nf-item {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--nf-line);
    border-radius: 10px;
    background: var(--nf-row);
    color: inherit;
    transition: border-color 0.22s ease, background 0.22s ease;
}

.nf-item:hover {
    border-color: rgba(63, 169, 245, 0.32);
    background: rgba(18, 24, 34, 0.72);
}

.nf-item.is-pinned {
    border-left: 3px solid var(--nf-accent);
}

.nf-item.is-featured {
    background: linear-gradient(120deg, rgba(63, 169, 245, 0.08), rgba(14, 17, 24, 0.55) 42%);
}

.nf-item:hover .nf-title a { color: var(--nf-accent); }

.nf-thumb {
    width: 128px;
    height: 86px;
    flex: 0 0 128px;
    border-radius: 8px;
    overflow: hidden;
    background: #0e1218;
    border: 1px solid var(--nf-line);
    align-self: center;
}

.nf-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.nf-item:hover .nf-thumb img { transform: scale(1.04); }

.nf-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nf-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.28rem;
    min-height: 0;
}

.nf-badges:empty { display: none; }

.nf-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.14rem 0.42rem;
    border-radius: 4px;
    border: 1px solid var(--nf-line);
    color: var(--nf-muted);
    line-height: 1.2;
}

.nf-badge--pin {
    color: var(--nf-accent);
    border-color: rgba(63, 169, 245, 0.35);
    background: var(--nf-accent-soft);
}

.nf-badge--feat {
    color: #f0c674;
    border-color: rgba(240, 198, 116, 0.35);
    background: rgba(240, 198, 116, 0.1);
}

.nf-badge--cat {
    color: var(--nf-muted);
}

.nf-title {
    margin: 0 0 0.28rem;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--nf-ink);
    line-height: 1.35;
}

.nf-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nf-excerpt {
    margin: 0;
    color: var(--nf-muted);
    font-size: 0.86rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nf-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.85rem;
    margin-top: 0.42rem;
    color: var(--nf-faint);
    font-size: 0.74rem;
    align-items: center;
}

.nf-meta-row i { margin-right: 0.2rem; }

.nf-admin-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--nf-accent);
    font-size: 0.74rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.nf-admin-link:hover { color: #fff; }
.nf-admin-link--danger { color: rgba(231, 76, 60, 0.85); }

.nf-side {
    flex: 0 0 auto;
    color: var(--nf-faint);
    font-size: 0.72rem;
    white-space: nowrap;
    padding-top: 0.2rem;
    align-self: flex-start;
}

.nf-empty {
    padding: 1.75rem 1rem;
    color: var(--nf-muted);
    border: 1px solid var(--nf-line);
    border-radius: 10px;
    background: var(--nf-row);
}

.nf-empty h3 {
    color: #fff;
    margin: 0 0 0.4rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
}

.nf-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

.nf-widget {
    padding: 1rem 1.05rem;
    border: 1px solid var(--nf-line);
    border-radius: 10px;
    background: var(--nf-panel);
}

.nf-widget-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nf-ink);
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nf-widget-title i { color: var(--nf-accent); }

.nf-widget-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.nf-widget-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-decoration: none;
    color: inherit;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nf-widget-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.nf-widget-item-title {
    color: var(--nf-ink);
    font-size: 0.86rem;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.nf-widget-item:hover .nf-widget-item-title { color: var(--nf-accent); }

.nf-widget-item-meta {
    color: var(--nf-faint);
    font-size: 0.72rem;
}

.nf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.nf-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--nf-line);
    border-radius: 6px;
    padding: 0.28rem 0.55rem;
    font-size: 0.74rem;
    color: var(--nf-muted);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.nf-tag:hover {
    border-color: rgba(63, 169, 245, 0.45);
    color: #fff;
    background: var(--nf-accent-soft);
}

.nf-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.nf-pager a,
.nf-pager span {
    min-width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--nf-line);
    border-radius: 8px;
    color: var(--nf-muted);
    text-decoration: none;
    padding: 0 0.65rem;
    font-size: 0.84rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.nf-pager .current {
    border-color: rgba(63, 169, 245, 0.5);
    color: #fff;
    background: rgba(63, 169, 245, 0.12);
}

.nf-pager a:hover {
    color: #fff;
    border-color: rgba(63, 169, 245, 0.4);
}

@keyframes nfFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .nf-page-head,
    .nf-admin,
    .nf-layout,
    .nf-thumb img {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 960px) {
    .nf-layout {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }
}

@media (max-width: 640px) {
    .news-feed-page .nf-page {
        padding: 0.65rem 0.9rem 2rem;
    }

    .nf-item {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .nf-thumb {
        width: 88px;
        height: 68px;
        flex-basis: 88px;
    }

    .nf-title { font-size: 0.96rem; }
    .nf-side { display: none; }
}

/* ============================================
   Homepage news — feed rows inside standard
   content-section / content-layer / section-title
   ============================================ */

.home-news {
    --nf-accent: #3fa9f5;
    --nf-accent-soft: rgba(63, 169, 245, 0.14);
    --nf-ink: rgba(255, 255, 255, 0.94);
    --nf-muted: rgba(255, 255, 255, 0.58);
    --nf-faint: rgba(255, 255, 255, 0.34);
    --nf-line: rgba(255, 255, 255, 0.09);
    --nf-panel: linear-gradient(165deg, rgba(16, 20, 28, 0.94), rgba(8, 10, 14, 0.97));
    --nf-row: rgba(14, 17, 24, 0.55);
}

.home-news-feed {
    animation: nfFadeUp 0.5s ease 0.06s both;
}

.home-news-feed .nf-item {
    animation: nfFadeUp 0.45s ease both;
}

@media (prefers-reduced-motion: reduce) {
    .home-news-feed,
    .home-news-feed .nf-item {
        animation: none !important;
    }
}

@media (max-width: 640px) {
    .home-news-feed .nf-side {
        display: none;
    }
}

/* Light theme */
html[data-theme="light"] .news-feed-page,
html[data-theme="light"] .home-news-feed {
    --nf-ink: #1a2332;
    --nf-muted: #5a6a7c;
    --nf-faint: #6a7a8c;
    --nf-line: rgba(26, 35, 50, 0.12);
    --nf-panel: linear-gradient(165deg, #ffffff, #f4f7fb);
    --nf-row: #ffffff;
    --nf-accent-soft: rgba(63, 169, 245, 0.14);
}

html[data-theme="light"] .nf-brand {
    color: #1a2332 !important;
}

html[data-theme="light"] .nf-lead,
html[data-theme="light"] .nf-meta,
html[data-theme="light"] .nf-excerpt,
html[data-theme="light"] .nf-empty,
html[data-theme="light"] .nf-side-meta {
    color: #5a6a7c !important;
}

html[data-theme="light"] .nf-item,
html[data-theme="light"] .nf-side-card,
html[data-theme="light"] .nf-panel {
    background: #ffffff !important;
    border-color: rgba(45, 140, 214, 0.28) !important;
    color: #1a2332;
}

html[data-theme="light"] .nf-title,
html[data-theme="light"] .nf-title a,
html[data-theme="light"] .nf-side-title a {
    color: #1a2332 !important;
}

html[data-theme="light"] .nf-admin-link {
    color: #1a5f96 !important;
}

html[data-theme="light"] .nf-admin-link:hover {
    color: #0d3a5c !important;
}

html[data-theme="light"] .nf-badge {
    color: #134a72 !important;
    background: rgba(63, 169, 245, 0.14) !important;
}
