/* ===== Tokens ===== */
:root {
    --bg: #F3F5F9;
    --surface: #FFFFFF;
    --surface-alt: #EDEFF5;
    --header-bg: #10162B;
    --header-surface: #182036;
    --text: #10162B;
    --muted: #667085;
    --border: #E3E6EE;
    --accent: #E8293B;
    --accent-2: #FF5A6E;

    --on-header: #F4F5F8;
    --on-header-muted: #9CA3B8;

    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --container-width: 1380px;
    --radius: 10px;
    --radius-sm: 6px;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.22; letter-spacing: -0.01em; overflow-wrap: break-word; word-break: break-word; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}

.nf-container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--space-5); }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--accent); color: #fff;
    padding: var(--space-3) var(--space-4); z-index: 999;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

/* ===== Breaking News Bar ===== */
.nf-breaking-bar { background: var(--accent); color: #fff; overflow: hidden; }
.nf-breaking-inner { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-2) var(--space-5); }
.nf-breaking-label {
    background: rgba(0,0,0,0.2); color: #fff; font-size: 0.7rem; font-weight: 800;
    letter-spacing: 0.08em; text-transform: uppercase; padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm); flex-shrink: 0;
}
.nf-breaking-track { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; }

/* ===== Header ===== */
.nf-site-header { background: var(--header-bg); color: var(--on-header); position: relative; }

.nf-header-main {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--header-bg);
    transition: box-shadow 0.25s ease, padding 0.25s ease, background 0.25s ease;
}

.nf-site-header.nf-scrolled .nf-header-main {
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    background: rgba(16, 22, 43, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nf-header-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-2) var(--space-5); font-size: 0.8125rem; color: var(--on-header-muted);
    border-bottom: 1px solid rgba(255,255,255,0.08); gap: var(--space-4); max-width: 1800px;
}

.nf-header-date { flex-shrink: 0; }

.nf-utility-links { display: flex; gap: var(--space-5); min-width: 0; overflow: hidden; }
.nf-utility-links a { color: var(--on-header-muted); transition: color 0.15s; white-space: nowrap; }
.nf-utility-links a:hover { color: #fff; }

.nf-header-top-right { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }

.nf-social-links { display: flex; gap: var(--space-3); align-items: center; }
.nf-social-links a { color: var(--on-header-muted); display: inline-flex; transition: color 0.15s; }
.nf-social-links a:hover { color: #fff; }

.nf-header-actions { display: flex; align-items: center; gap: var(--space-3); }

.nf-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; color: var(--on-header); border-radius: 50%;
    transition: background 0.15s;
}
.nf-icon-btn:hover { background: rgba(255,255,255,0.08); }
.nf-icon-moon { display: none; }

.nf-header-main {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-5); gap: var(--space-5); min-width: 0; max-width: 1800px;
}

.nf-logo-block { display: flex; flex-direction: column; flex-shrink: 0; min-width: 0; }
.nf-logo-text { font-size: 1.625rem; font-weight: 900; letter-spacing: -0.02em; color: #fff; white-space: nowrap; }
.nf-logo img { height: auto; width: 170px; }

/* ===== Expandable Search Overlay ===== */
.nf-search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0 var(--space-5);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
    z-index: 55;
}

.nf-search-overlay.open {
    max-height: 90px;
    opacity: 1;
    padding: var(--space-4) var(--space-5);
}

.nf-search-overlay-form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 640px;
    margin: 0 auto;
    color: var(--on-header-muted);
}

.nf-search-overlay-form input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.0625rem;
    padding: var(--space-2) 0;
    outline: none;
    transition: border-color 0.15s;
}
.nf-search-overlay-form input:focus { border-bottom-color: var(--accent); }
.nf-search-overlay-form input::placeholder { color: var(--on-header-muted); }

.nf-search-overlay-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--on-header-muted);
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.nf-search-overlay-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nf-tagline { font-size: 0.8125rem; color: var(--on-header-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nf-main-actions { display: none; align-items: center; gap: var(--space-2); flex-shrink: 0; }

.nf-nav-toggle {
    display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; transition: background 0.15s;
}
.nf-nav-toggle:hover { background: rgba(255,255,255,0.08); }
.nf-nav-toggle-bar {
    display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nf-nav-toggle[aria-expanded="true"] .nf-nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nf-nav-toggle[aria-expanded="true"] .nf-nav-toggle-bar:nth-child(2) { opacity: 0; }
.nf-nav-toggle[aria-expanded="true"] .nf-nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nf-nav-panel { display: flex; align-items: center; justify-content: space-between; flex: none; gap: var(--space-5); min-width: 0; }
.nf-primary-nav { min-width: 0; }
.nf-nav-inner { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }

.nf-nav-link {
    display: inline-block; padding: var(--space-2) 0; font-size: 0.9375rem; font-weight: 600;
    color: var(--on-header-muted); white-space: nowrap; position: relative;
    transition: color 0.15s;
}
.nf-nav-link::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--accent); transform: scaleX(0); transition: transform 0.2s ease;
}
.nf-nav-link:hover, .nf-nav-link.active { color: #fff; }
.nf-nav-link:hover::after, .nf-nav-link.active::after { transform: scaleX(1); }

.nf-header-cta { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.nf-nav-panel-footer { display: none; }
.nf-cta-label { display: none; }
.nf-theme-toggle-mobile { display: none; }

.nf-btn-subscribe {
    display: inline-flex; align-items: center; justify-content: center;
    padding: var(--space-2) var(--space-5); background: var(--accent); color: #fff;
    border-radius: 999px; font-weight: 700; font-size: 0.875rem; white-space: nowrap;
    transition: opacity 0.15s;
}
.nf-btn-subscribe:hover { opacity: 0.9; }

/* ===== Trending Strip (header) ===== */
.nf-trending-strip-bar {
    display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-5);
    border-top: 1px solid rgba(255,255,255,0.08); overflow-x: auto; max-width: 1800px;
}
.nf-trending-strip-label {
    display: flex; align-items: center; gap: var(--space-2); font-size: 0.8125rem; font-weight: 700;
    color: var(--accent); flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.03em;
}
.nf-trending-pills { display: flex; gap: var(--space-2); flex-wrap: nowrap; }
.nf-trending-pill {
    display: inline-flex; align-items: center; padding: var(--space-1) var(--space-4);
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 999px;
    font-size: 0.8125rem; font-weight: 600; color: var(--on-header-muted); white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.nf-trending-pill:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Ad Slots ===== */
.nf-ad-slot { display: flex; align-items: center; justify-content: center; padding: var(--space-4) var(--space-5); text-align: center; overflow: hidden; }
.nf-ad-sidebar { margin-bottom: var(--space-6); }

/* ===== Kicker / Badges ===== */
.nf-kicker {
    display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-2);
}
.nf-badge {
    display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
    padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
    background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border);
}
.nf-badge-sponsored { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.nf-badge-breaking { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Section Headers ===== */
.nf-section-title {
    font-size: 1.375rem; font-weight: 800; padding-bottom: var(--space-2);
    margin-bottom: var(--space-5); position: relative; display: inline-block;
}
.nf-section-title::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px;
    background: var(--accent); border-radius: 2px;
}
.nf-section-header {
    display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-5);
}
.nf-section-header .nf-section-title { margin-bottom: 0; }
.nf-view-all { font-size: 0.875rem; font-weight: 700; color: var(--accent); }
.nf-view-all:hover { text-decoration: underline; }

main { display: block; padding: var(--space-7) 0; }

/* ===== Hero Carousel ===== */
.nf-hero-section { padding: var(--space-7) 0; background: var(--header-bg); color: var(--on-header); margin: 20px;
    border-radius: 20px; margin-top: -25px;}

.nf-hero-carousel { position: relative; overflow: hidden; }
.nf-hero-track { display: flex; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.nf-hero-slide { flex: 0 0 100%; min-width: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-7); align-items: center; }

.nf-hero-text h1 { font-size: 2.5rem; color: #fff; margin-bottom: var(--space-4); line-height: 1.15; }
.nf-hero-text p { color: var(--on-header-muted); font-size: 1.0625rem; margin-bottom: var(--space-5); max-width: 560px; }
.nf-hero-text { min-width: 0; }

.nf-hero-actions { display: flex; gap: var(--space-3); margin-bottom: var(--space-6); flex-wrap: wrap; }

.nf-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9375rem; transition: opacity 0.15s, background 0.15s; }
.nf-btn:hover { opacity: 0.92; }
.nf-btn-primary { background: var(--accent); color: #fff; }
.nf-btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff; }
.nf-btn-outline:hover { background: rgba(255,255,255,0.08); }

.nf-hero-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

.nf-hero-controls { display: flex; align-items: center; gap: var(--space-4); margin-top: 20px; }
.nf-hero-dots { display: flex; gap: var(--space-2); }
.nf-hero-dot { width: 24px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.25); border: none; padding: 0; cursor: pointer; transition: background 0.15s; }
.nf-hero-dot.active { background: var(--accent); }
.nf-hero-arrows { display: flex; gap: var(--space-2); margin-left: auto; }
.nf-hero-arrow {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
    color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s;
}
.nf-hero-arrow:hover { background: rgba(255,255,255,0.1); }

/* ===== Layout Grids ===== */
.nf-layout { display: grid; grid-template-columns: 1fr 360px; gap: var(--space-7); min-width: 0; margin-top: 50px;}
.nf-two-col { display: block: 1fr 1fr; gap: var(--space-6); min-width: 0; }

/* ===== Top Stories ===== */
.nf-story-lead { margin-bottom: var(--space-5); }
.nf-story-lead img { width: 100%; aspect-ratio: 16/7.6; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--space-4); }
.nf-story-lead h3 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.nf-story-lead h3 a:hover { color: var(--accent); }

.nf-story-row { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.nf-story-row:last-child { border-bottom: none; padding-bottom: 0; }
.nf-story-row img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.nf-story-row > div { min-width: 0; }
.nf-story-row h4 { font-size: 1rem; line-height: 1.3; margin-bottom: var(--space-1); }
.nf-story-row h4 a:hover { color: var(--accent); }

.nf-meta { font-size: 0.8125rem; color: var(--muted); display: flex; align-items: center; gap: var(--space-2); }
.nf-meta a:hover { color: var(--accent); }

/* ===== Sidebar: Latest News list ===== */
.nf-sidebar-block { margin-bottom: var(--space-7); }
.nf-news-item { display: flex; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.nf-news-item:last-child { border-bottom: none; }
.nf-news-item img { width: 65px; height: 65px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; max-width: 64px; }
.nf-news-item > div { min-width: 0; }
.nf-news-item h4 { font-size: 0.9375rem; line-height: 1.35; margin-bottom: var(--space-1); }
.nf-news-item h4 a:hover { color: var(--accent); }

/* ===== Newsletter Card (sidebar) ===== */
.nf-newsletter-card {
    background: var(--header-bg); color: var(--on-header); border-radius: var(--radius);
    padding: var(--space-6); text-align: left;
}
.nf-newsletter-card-icon {
    width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4);
}
.nf-newsletter-card h3 { color: #fff; font-size: 1.125rem; margin-bottom: var(--space-2); }
.nf-newsletter-card p { color: var(--on-header-muted); font-size: 0.875rem; margin-bottom: var(--space-4); }
.nf-newsletter-card input {
    width: 100%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: #fff;
    margin-bottom: var(--space-3);
}
.nf-newsletter-card input::placeholder { color: var(--on-header-muted); }
.nf-newsletter-card button { width: 100%; }
.nf-newsletter-message { font-size: 0.8125rem; margin-top: var(--space-3); min-height: 1.2em; }
.nf-newsletter-message.success { color: #6EE7B7; }
.nf-newsletter-message.error { color: #FCA5A5; }

/* ===== Category Icon Grid ===== */
.nf-category-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-4);
}
.nf-category-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: var(--space-5) var(--space-3); display: flex; flex-direction: column; align-items: center;
    gap: var(--space-3); text-align: center; transition: border-color 0.15s, transform 0.15s;
}
.nf-category-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.nf-category-icon {
    width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 14%, transparent);
    color: var(--cat-color, var(--accent));
}
.nf-category-card span { font-size: 0.875rem; font-weight: 700; }

/* ===== Editor's Picks Grid ===== */
.nf-picks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.nf-pick-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--space-3); }
.nf-pick-card h4 { font-size: 1.0625rem; margin-bottom: var(--space-2); line-height: 1.3; }
.nf-pick-card h4 a:hover { color: var(--accent); }
.nf-pick-card p { font-size: 0.875rem; color: var(--muted); margin-bottom: var(--space-2); }

/* ===== Opinion / Writers Sidebar ===== */
.nf-writer-item { display: flex; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.nf-writer-item:last-child { border-bottom: none; }
.nf-writer-avatar, .nf-writer-avatar-fallback {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.nf-writer-avatar-fallback {
    background: var(--header-bg); color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.0625rem;
}
.nf-writer-item h4 { font-size: 0.9375rem; line-height: 1.35; margin-bottom: var(--space-1); }
.nf-writer-item > div { min-width: 0; }
.nf-writer-item h4 a:hover { color: var(--accent); }
.nf-writer-name { color: var(--accent); font-weight: 700; font-size: 0.8125rem; }
.nf-writer-date { color: var(--muted); font-size: 0.8125rem; }

/* ===== Trending Strip ===== */
.nf-trending-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-5); }
.nf-trending-card { position: relative; }
.nf-trending-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--space-3); }
.nf-trending-num {
    position: absolute; top: var(--space-3); left: var(--space-3); background: var(--accent); color: #fff;
    font-weight: 800; font-size: 0.8125rem; width: 30px; height: 30px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.nf-trending-card h4 { font-size: 0.9375rem; line-height: 1.3; }
.nf-trending-card h4 a:hover { color: var(--accent); }

/* ===== Newsletter Band (legacy, still used as pre-footer band on non-home pages) ===== */
.nf-newsletter-band { background: var(--header-bg); color: #fff; padding: var(--space-6) 0; }
.nf-newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; }
.nf-newsletter-copy h2 { font-size: 1.5rem; margin-bottom: var(--space-1); color: #fff; }
.nf-newsletter-copy p { color: var(--on-header-muted); font-size: 0.9375rem; }
.nf-newsletter-form { display: flex; gap: var(--space-2); flex: 0 0 auto; }
.nf-newsletter-form input { padding: var(--space-3) var(--space-4); border: none; border-radius: var(--radius-sm); min-width: 260px; }
.nf-newsletter-form button { background: var(--accent); color: #fff; font-weight: 700; padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm); }

/* ===== Footer ===== */
.nf-site-footer { background: var(--header-bg); color: var(--on-header); }
.nf-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: var(--space-6); padding: var(--space-8) 0 var(--space-6); }
.nf-footer-col h3 { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: var(--space-4); }
.nf-footer-col ul li { margin-bottom: var(--space-2); }
.nf-footer-col ul li a { color: var(--on-header-muted); font-size: 0.9375rem; }
.nf-footer-col ul li a:hover { color: #fff; }
.nf-footer-logo-img { max-height: 36px; width: auto; display: block; }
.nf-footer-brand p { color: var(--on-header-muted); font-size: 0.9375rem; margin: var(--space-3) 0 var(--space-4); line-height: 1.6; }
.nf-footer-social { display: flex; gap: var(--space-3); }
.nf-footer-social a {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15);
    display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: background 0.15s;
}
.nf-footer-social a:hover { background: rgba(255,255,255,0.1); }
.nf-footer-newsletter input {
    width: 100%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06); color: #fff; margin-bottom: var(--space-3);
}
.nf-footer-newsletter input::placeholder { color: var(--on-header-muted); }
.nf-footer-bottom {
    padding: var(--space-5) 0; border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: space-between; font-size: 0.8125rem; color: var(--on-header-muted); flex-wrap: wrap; gap: var(--space-3);
}

/* ===== Shared Buttons / Forms ===== */
.nf-btn-block { width: 100%; }
.nf-form-group { margin-bottom: var(--space-4); }
.nf-form-label { display: block; font-size: 0.8125rem; font-weight: 700; margin-bottom: var(--space-2); }
.nf-form-input, .nf-form-textarea {
    width: 100%; padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
}
.nf-form-input:focus, .nf-form-textarea:focus { border-color: var(--accent); }

.nf-alert { padding: var(--space-4); border-radius: var(--radius-sm); font-size: 0.9375rem; margin-bottom: var(--space-5); }
.nf-alert-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.nf-alert-error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

/* ===== Pagination ===== */
.pagination { display: flex; gap: var(--space-2); justify-content: center; margin-top: var(--space-7); flex-wrap: wrap; }
.page-link {
    display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px;
    padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--text);
}
.page-link:hover { border-color: var(--accent); }
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-ellipsis { display: inline-flex; align-items: center; color: var(--muted); }

/* ===== Generic listing rows (category/tag/search pages) ===== */
.nf-article-row { display: flex; gap: var(--space-5); padding: var(--space-5) 0; border-bottom: 1px solid var(--border); }
.nf-article-row:first-child { padding-top: 0; }
.nf-article-row img { width: 200px; height: 130px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.nf-article-row-body h3 { font-size: 1.25rem; margin-bottom: var(--space-2); }
.nf-article-row-body { min-width: 0; }
.nf-article-row-body h3 a:hover { color: var(--accent); }
.nf-article-row-body p { color: var(--muted); font-size: 0.9375rem; margin-bottom: var(--space-2); }
.nf-main-col, .nf-sidebar { min-width: 0; }

/* ===== Article Page ===== */

.nf-reading-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
    background: transparent; pointer-events: none;
}
.nf-reading-progress-bar {
    height: 100%; width: 0%; background: var(--accent); transition: width 0.1s ease-out;
}

.nf-article-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-7); align-items: start; }
.nf-article-main { min-width: 0; max-width: 760px; }
.nf-article-sidebar { position: sticky; top: var(--space-5); min-width: 0; }

.nf-article-header { margin-bottom: var(--space-6); }
.nf-article-header h1 { font-size: 2.25rem; margin: var(--space-3) 0; }
.nf-article-header .nf-badge { margin-right: var(--space-2); }
.nf-article-dek { font-size: 1.1875rem; color: var(--muted); line-height: 1.5; margin-bottom: var(--space-5); }

.nf-byline {
    display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) 0;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: var(--space-4);
}
.nf-byline-avatar, .nf-byline-avatar-fallback {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.nf-byline-avatar-fallback {
    background: var(--header-bg); color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.0625rem;
}
.nf-byline-name { font-weight: 700; font-size: 0.9375rem; display: block; margin-bottom: 2px; }
.nf-byline-name:hover { color: var(--accent); }
.nf-byline-info { min-width: 0; }

.nf-share-row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-6); }
.nf-share-label { font-size: 0.8125rem; font-weight: 700; color: var(--muted); margin-right: var(--space-1); }
.nf-share-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
    display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nf-share-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.nf-copy-feedback { font-size: 0.8125rem; color: var(--accent); font-weight: 600; }

.nf-article-featured-img { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--space-6); }

.nf-article-body { font-size: 1.125rem; line-height: 1.75; color: var(--text); max-width: 760px; }
.nf-article-body > p:first-of-type::first-letter {
    font-size: 3.5em; font-weight: 800; float: left; line-height: 0.85; padding: 0.05em 0.08em 0 0; color: var(--accent);
}
.nf-article-body p { margin-bottom: var(--space-5); }
.nf-article-body h2 { font-size: 1.625rem; margin: var(--space-6) 0 var(--space-4); }
.nf-article-body h3 { font-size: 1.3rem; margin: var(--space-5) 0 var(--space-3); }
.nf-article-body img { border-radius: var(--radius); margin: var(--space-5) 0; }
.nf-article-body ul, .nf-article-body ol { margin: 0 0 var(--space-5) var(--space-6); }
.nf-article-body li { margin-bottom: var(--space-2); }
.nf-article-body a { color: var(--accent); text-decoration: underline; }
.nf-article-body blockquote {
    border-left: 3px solid var(--accent); padding-left: var(--space-5); margin: var(--space-6) 0;
    font-size: 1.2rem; font-style: italic; color: var(--muted); font-weight: 600;
}

.nf-article-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-6) 0; }
.nf-tag-pill { font-size: 0.8125rem; padding: var(--space-2) var(--space-4); border: 1px solid var(--border); border-radius: 999px; color: var(--muted); transition: border-color 0.15s, color 0.15s; }
.nf-tag-pill:hover { border-color: var(--accent); color: var(--accent); }

.nf-author-box { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: var(--space-6) 0; }
.nf-author-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.nf-author-avatar-fallback { width: 56px; height: 56px; border-radius: 50%; background: var(--header-bg); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 800; flex-shrink: 0; }
.nf-author-box h4 { font-size: 1rem; margin-bottom: var(--space-1); }
.nf-author-box p { font-size: 0.9375rem; color: var(--muted); }
.nf-author-box a:hover { color: var(--accent); }

.nf-related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); margin-top: var(--space-4); }
.nf-related-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); margin-bottom: var(--space-3); }
.nf-related-item h4 { font-size: 0.9375rem; line-height: 1.4; }
.nf-related-item h4 a:hover { color: var(--accent); }

/* ===== Comments ===== */
.nf-comments-section { margin-top: var(--space-8); }
.nf-comment { display: flex; gap: var(--space-3); padding: var(--space-5) 0; border-bottom: 1px solid var(--border); }
.nf-comment-avatar {
    width: 38px; height: 38px; border-radius: 50%; background: var(--header-bg); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9375rem; flex-shrink: 0;
}
.nf-comment-content { min-width: 0; flex: 1; }
.nf-comment-replies { margin-left: calc(38px + var(--space-3)); margin-top: var(--space-4); }
.nf-comment-replies .nf-comment { border-bottom: none; padding-bottom: 0; }
.nf-comment-header { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-2); }
.nf-comment-author { font-weight: 800; font-size: 0.9375rem; }
.nf-comment-date { font-size: 0.8125rem; color: var(--muted); }
.nf-comment-body { font-size: 0.9375rem; margin-bottom: var(--space-2); }
.nf-reply-btn { font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.nf-reply-btn:hover { color: var(--accent); }
.nf-comment-form { margin-top: var(--space-6); }
.nf-comment-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.nf-cancel-reply { display: none; font-size: 0.8125rem; color: var(--accent); margin-bottom: var(--space-3); }
.nf-cancel-reply.active { display: inline-block; }

/* ===== Article Sidebar Widgets ===== */
.nf-sidebar-heading {
    font-size: 1rem; font-weight: 800; margin-bottom: var(--space-4); padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--border);
}
.nf-sidebar-link-item { padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.nf-sidebar-link-item:last-child { border-bottom: none; }
.nf-sidebar-link-item a { display: block; font-size: 0.9375rem; font-weight: 600; margin-bottom: var(--space-1); line-height: 1.35; }
.nf-sidebar-link-item a:hover { color: var(--accent); }

/* ===== Back to Top ===== */
.nf-back-to-top {
    position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: 50;
    width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nf-back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.nf-back-to-top:hover { opacity: 0.9; }

/* ===== Card Elevation Polish ===== */
.nf-story-lead, .nf-pick-card, .nf-trending-card, .nf-related-item, .nf-category-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nf-pick-card:hover, .nf-trending-card:hover, .nf-related-item:hover {
    transform: translateY(-3px);
}
.nf-pick-card:hover img, .nf-trending-card:hover img, .nf-related-item:hover img, .nf-story-lead:hover img {
    filter: brightness(1.05);
}
.nf-story-lead img, .nf-pick-card img, .nf-trending-card img, .nf-related-item img, .nf-hero-image img {
    transition: filter 0.2s ease;
}
.nf-news-item img, .nf-story-row img {
    transition: opacity 0.2s ease;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .nf-footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .nf-trending-strip { grid-template-columns: repeat(3, 1fr); }
    .nf-picks-grid { grid-template-columns: repeat(2, 1fr); }
    .nf-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .nf-layout { grid-template-columns: 1fr; margin-top: 20px; }
    .nf-two-col { grid-template-columns: 1fr; }
    .nf-hero-slide { grid-template-columns: 1fr; }
    .nf-hero-image { order: -1; }
    .nf-article-layout { grid-template-columns: 1fr; }
    .nf-article-sidebar { position: static; }
}

@media (max-width: 640px) {
    .nf-header-top { display: none; }

    .nf-header-main { flex-wrap: nowrap; padding: var(--space-2) var(--space-4)!important; gap: var(--space-2); }
    .nf-logo-text { font-size: 1rem; }
    .nf-tagline { font-size: 0.6875rem; max-width: 50vw; }
    .nf-logo img { width: 112px; height: auto; }

    .nf-main-actions { display: flex; flex-direction: row; align-items: center; gap: 2px; flex-shrink: 0; }
    .nf-search-desktop { display: none; }
    .nf-theme-toggle-mobile { display: flex; }
    .nf-nav-toggle { display: flex; }

    .nf-nav-panel {
        display: flex; position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--header-bg); border-top: 1px solid rgba(255,255,255,0.08);
        padding: 0 var(--space-5); max-height: 0; overflow: hidden; opacity: 0;
        transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
    }
    .nf-nav-panel.open {
        max-height: calc(100vh - 64px); overflow-y: auto; opacity: 1;
        padding: var(--space-4) var(--space-5) var(--space-5);
    }

    .nf-primary-nav { width: 100%; }
    .nf-nav-inner { flex-direction: column; align-items: stretch; gap: 0; }
    .nf-nav-link { width: 100%; padding: var(--space-3) 0; border-bottom: 1px solid rgba(255,255,255,0.08); }

    .nf-header-cta {
        flex-direction: column; align-items: stretch; width: 100%; gap: var(--space-2);
        margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid rgba(255,255,255,0.08);
    }
    .nf-btn-subscribe { width: 100%; padding: var(--space-3); text-align: center; }

    .nf-nav-panel-footer { display: block; margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid rgba(255,255,255,0.08); }
    .nf-nav-panel-links { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
    .nf-nav-panel-links a { font-size: 0.8125rem; color: var(--on-header-muted); }
    .nf-nav-panel-links a:hover { color: #fff; }
    .nf-nav-panel-bottom { display: flex; align-items: center; justify-content: space-between; }
    .nf-nav-panel-date { font-size: 0.75rem; color: var(--on-header-muted); }
    .nf-nav-panel-bottom .nf-social-links { display: flex; }

    .nf-site-header { position: relative; }

    .nf-search-overlay { padding: 0 var(--space-4); }
    .nf-search-overlay.open { padding: var(--space-3) var(--space-4); max-height: 76px; }
    .nf-search-overlay-form { gap: var(--space-2); }
    .nf-search-overlay-form input { font-size: 0.9375rem; }
    .nf-search-overlay-form .nf-btn-subscribe { width: auto; padding: var(--space-2) var(--space-4); font-size: 0.875rem; }

    .nf-trending-strip-bar { padding: var(--space-2) var(--space-4)!important; height: auto; gap: var(--space-2); }
    .nf-trending-strip-label { font-size: 0.75rem; }
    .nf-trending-pill { padding: 3px var(--space-3); font-size: 0.75rem; }

    .nf-hero-text h1 { font-size: 1.75rem; }

    .nf-footer-grid { grid-template-columns: 1fr; padding-left: var(--space-4); padding-right: var(--space-4); }
    .nf-trending-strip { grid-template-columns: repeat(2, 1fr); }
    .nf-picks-grid { grid-template-columns: 1fr; }
    .nf-related-grid { grid-template-columns: 1fr; }
    .nf-category-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
    .nf-category-card { padding: var(--space-4) var(--space-3); }

    .nf-article-row { flex-direction: column; }
    .nf-article-row img { width: 100%; height: 180px; }

    .nf-newsletter-inner { flex-direction: column; align-items: flex-start; }
    .nf-newsletter-form { width: 100%; }
    .nf-newsletter-form input { min-width: 0; flex: 1; }

    .nf-comment-form-row { grid-template-columns: 1fr; }
    .nf-article-header h1 { font-size: 1.6rem; }
    .nf-article-body > p:first-of-type::first-letter { font-size: 2.6em; }
    .nf-back-to-top { width: 40px; height: 40px; bottom: var(--space-4); right: var(--space-4); }
    .nf-share-row { flex-wrap: wrap; }
    .nf-article-dek { font-size: 1.0625rem; }

    .nf-container { padding: 0 var(--space-4); margin-top: 0; }
    .nf-site-footer {
    padding-top: 30px;
}
.nf-hero-section {
    border-radius: 10px;
    margin: 10px;
    margin-top: -35px;
}
.nf-hero-controls {
    margin-top: 0;
}
.nf-story-row img {
    width: 70px;
    height: 90px;
    max-width: 70px;
    align-items: center;
}
.nf-story-lead h3 {
    font-size: 1.3rem;
}
}
