/*
Theme Name: NiftyTechFinds
Theme URI: https://niftytechfinds.com
Author: NiftyTechFinds Team
Author URI: https://niftytechfinds.com
Description: A premium skeuomorphic WordPress theme designed for tech and AI innovation blogs. Features realistic shadows, glossy surfaces, raised buttons, and a futuristic control panel aesthetic. Version 2.0 with advanced homepage post selection, sticky sidebar tab, and admin-friendly link management.
Version: 2.3.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: niftytechfinds
Tags: blog, tech, ai, skeuomorphic, magazine, responsive, featured-images, custom-menu, threaded-comments
*/

/* ========================================
   TABLE OF CONTENTS
   ========================================
   1. CSS Variables & Reset
   2. Base Typography
   3. Skeuomorphic Design System
   4. Layout Components
   5. Navigation (Header)
   6. Hero Section
   7. Animated Divider
   8. Category Filter Bar
   9. Section Headers
   10. Cards & Posts
   11. Featured Layout
   12. Trending Section
   13. Quick Links Grid
   14. Sticky Sidebar Tab
   15. Single Post
   16. Sidebar & Widgets
   17. Archive & Pagination
   18. Footer
   19. Scroll to Top
   20. Utilities
   21. Animations
   22. Accessibility Helpers
   23. Template Components
   24. Responsive Design
   ======================================== */

/* ========================================
   1. CSS VARIABLES & RESET
   ======================================== */
:root {
    --ntf-bg: #0B0F1A;
    --ntf-bg-light: #0f1424;
    --ntf-graphite: #1a1d23;
    --ntf-graphite-light: #252a33;
    --ntf-graphite-dark: #121418;
    --ntf-slate: #2d333b;
    --ntf-slate-light: #3d4550;
    --ntf-silver: #c0c5ce;
    --ntf-chrome: #e8eaed;
    --ntf-chrome-light: #f5f6f7;

    --ntf-cyan: #00E5FF;
    --ntf-cyan-dark: #00B8D4;
    --ntf-orange: #FF7A18;
    --ntf-orange-dark: #E66A10;

    --ntf-surface-dark: linear-gradient(145deg, #252a33 0%, #1a1d23 100%);
    --ntf-surface-glossy: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);

    --shadow-raised: 0 2px 4px rgba(0,0,0,0.3), 0 8px 16px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    --shadow-raised-hover: 0 4px 8px rgba(0,0,0,0.4), 0 12px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
    --shadow-inset: inset 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 2px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.05);
    --shadow-button: 0 3px 6px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -2px 0 rgba(0,0,0,0.2);
    --shadow-button-active: inset 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 2px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.05);
    --shadow-card: 0 4px 12px rgba(0,0,0,0.25), 0 8px 24px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
    --shadow-card-hover: 0 8px 20px rgba(0,0,0,0.35), 0 16px 40px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.12);
    --shadow-metallic: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15), inset 0 -1px 0 rgba(0,0,0,0.2);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    --ntf-header-height: 72px;
    --ntf-sticky-tab-width: 300px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ntf-chrome);
    background: var(--ntf-bg);
    min-height: 100vh;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ntf-cyan); text-decoration: none; transition: color var(--transition-fast); cursor: pointer; }
a:hover { color: #fff; }

/* ========================================
   2. BASE TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ntf-chrome-light);
    margin-bottom: var(--space-md);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
p { margin-bottom: var(--space-md); color: var(--ntf-silver); }
strong, b { color: var(--ntf-chrome-light); font-weight: 600; }
code, pre { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--ntf-graphite-light); padding: 0.2em 0.4em; border-radius: var(--radius-sm); color: var(--ntf-cyan); }
pre { background: var(--ntf-graphite-dark); padding: var(--space-lg); border-radius: var(--radius-md); overflow-x: auto; margin-bottom: var(--space-lg); box-shadow: var(--shadow-inset); border: 1px solid rgba(255,255,255,0.05); }
pre code { background: none; padding: 0; color: var(--ntf-silver); }
blockquote { background: var(--ntf-surface-dark); border-left: 4px solid var(--ntf-cyan); padding: var(--space-lg); margin: var(--space-xl) 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; box-shadow: var(--shadow-card); font-style: italic; }
blockquote p:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-lg); background: var(--ntf-graphite-light); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
th, td { padding: var(--space-md); text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
th { background: var(--ntf-slate); font-weight: 600; color: var(--ntf-chrome-light); text-transform: uppercase; font-size: 0.85em; letter-spacing: 0.05em; }
tr:hover { background: rgba(255,255,255,0.02); }

/* ========================================
   3. SKEUOMORPHIC DESIGN SYSTEM
   ======================================== */
.ntf-raised { background: var(--ntf-surface-dark); box-shadow: var(--shadow-raised); border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.05); }
.ntf-inset { background: var(--ntf-graphite-dark); box-shadow: var(--shadow-inset); border-radius: var(--radius-md); border: 1px solid rgba(0,0,0,0.2); }
.ntf-metallic { background: linear-gradient(180deg, #3d4550 0%, #2d333b 50%, #252a33 100%); box-shadow: var(--shadow-metallic); border-radius: var(--radius-md); }
.ntf-glossy { position: relative; overflow: hidden; }
.ntf-glossy::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 50%, transparent 100%); border-radius: var(--radius-md) var(--radius-md) 0 0; pointer-events: none; }

/* Buttons */
.ntf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
    padding: 0.875rem 1.75rem; font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem;
    text-transform: uppercase; letter-spacing: 0.03em; border: none; border-radius: var(--radius-md);
    cursor: pointer; transition: all var(--transition-fast); position: relative; overflow: hidden;
    text-decoration: none; color: var(--ntf-chrome);
}
.ntf-btn::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%); pointer-events: none; }
.ntf-btn-primary { background: linear-gradient(180deg, var(--ntf-orange) 0%, var(--ntf-orange-dark) 100%); color: #0B0F1A; box-shadow: var(--shadow-button); }
.ntf-btn-primary:hover { background: linear-gradient(180deg, #ff9040 0%, var(--ntf-orange) 100%); color: #0B0F1A; transform: translateY(-1px); box-shadow: 0 5px 10px rgba(255,122,24,0.3), var(--shadow-button); }
.ntf-btn-secondary { background: linear-gradient(180deg, var(--ntf-slate-light) 0%, var(--ntf-slate) 100%); box-shadow: var(--shadow-button); }
.ntf-btn-secondary:hover { background: linear-gradient(180deg, var(--ntf-slate) 0%, var(--ntf-graphite-light) 100%); transform: translateY(-1px); }
.ntf-btn-accent { background: linear-gradient(180deg, var(--ntf-cyan) 0%, var(--ntf-cyan-dark) 100%); color: #0B0F1A; box-shadow: var(--shadow-button); }
.ntf-btn-accent:hover { background: linear-gradient(180deg, #40EFFF 0%, var(--ntf-cyan) 100%); color: #0B0F1A; transform: translateY(-1px); }
.ntf-btn-sm { padding: 0.625rem 1.25rem; font-size: 0.85rem; }
.ntf-btn-lg { padding: 1.125rem 2.25rem; font-size: 1.05rem; }

/* Newsletter signup CTA (homepage + below every post) */
.ntf-subscribe-wrap { padding-top: 0; }
.ntf-subscribe { padding: var(--space-2xl) var(--space-xl); border-radius: var(--radius-lg); background: var(--ntf-surface-dark); box-shadow: var(--shadow-card); }
.ntf-subscribe-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-2xl); align-items: center; max-width: 980px; margin: 0 auto; }
.ntf-subscribe-chip { margin-bottom: var(--space-md); }
.ntf-subscribe-title { font-family: var(--font-heading); font-size: 1.75rem; line-height: 1.25; color: var(--ntf-chrome-light); margin-bottom: var(--space-sm); }
.ntf-subscribe-text { color: var(--ntf-silver); font-size: 0.975rem; margin: 0; }
.ntf-subscribe-form .mailpoet_form { padding: 0 !important; background: none !important; }
/* MailPoet's default form ships its own heading, blurb and name field. The
   section already supplies that copy, so suppress the duplicates and keep the
   form down to one email field plus the button. */
.ntf-subscribe-form .mailpoet_form h1,
.ntf-subscribe-form .mailpoet_form h2,
.ntf-subscribe-form .mailpoet_form h3,
.ntf-subscribe-form .mailpoet_form h4,
.ntf-subscribe-form .mailpoet_form > p:not(.mailpoet_paragraph),
.ntf-subscribe-form .mailpoet_form .mailpoet_paragraph:has(> input[type="text"]) { display: none !important; }
.ntf-subscribe-form .mailpoet_text,
.ntf-subscribe-form input[type="email"],
.ntf-subscribe-form input[type="text"] { width: 100%; padding: 0.85rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--ntf-slate-light); background: var(--ntf-graphite-dark); color: var(--ntf-chrome); box-shadow: var(--shadow-inset); font-family: var(--font-primary); font-size: 1rem; }
.ntf-subscribe-form input::placeholder { color: var(--ntf-silver); opacity: 1; }
.ntf-subscribe-form input:focus-visible { outline: 2px solid var(--ntf-cyan); outline-offset: 2px; }
.ntf-subscribe-form .mailpoet_submit { width: 100%; margin-top: var(--space-sm); padding: 0.85rem 1.25rem; border: 0; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: #06121a; background: linear-gradient(180deg, var(--ntf-cyan) 0%, var(--ntf-cyan-dark) 100%); box-shadow: var(--shadow-button); transition: transform var(--transition-fast); }
.ntf-subscribe-form .mailpoet_submit:hover { transform: translateY(-1px); }
.ntf-subscribe-form .mailpoet_submit:active { box-shadow: var(--shadow-button-active); transform: none; }
.ntf-subscribe-form .mailpoet_paragraph { margin-bottom: var(--space-sm); }
.ntf-subscribe-form .mailpoet_validate_success { color: #7ee787; }
.ntf-subscribe-form .mailpoet_validate_error { color: #ffb4a2; }
@media (max-width: 768px) {
    .ntf-subscribe { padding: var(--space-xl) var(--space-lg); }
    .ntf-subscribe-inner { grid-template-columns: 1fr; gap: var(--space-lg); }
    .ntf-subscribe-title { font-size: 1.4rem; }
}

/* Chips */
.ntf-chip {
    display: inline-flex; align-items: center; gap: var(--space-xs);
    padding: 0.375rem 0.875rem; font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em; border-radius: var(--radius-xl);
    background: var(--ntf-surface-dark); box-shadow: var(--shadow-button);
    border: 1px solid rgba(255,255,255,0.08); transition: all var(--transition-fast);
}
.ntf-chip:hover { background: var(--ntf-slate); transform: translateY(-1px); }
.ntf-chip-accent { background: linear-gradient(180deg, rgba(0,229,255,0.2) 0%, rgba(0,229,255,0.1) 100%); border-color: rgba(0,229,255,0.3); color: var(--ntf-cyan); }
.ntf-chip-accent:hover { background: linear-gradient(180deg, rgba(0,229,255,0.3) 0%, rgba(0,229,255,0.15) 100%); color: #fff; }
/* Chips and meta text that overlay a featured photo get an opaque backdrop so
   contrast never depends on the image behind them (WCAG AA 4.5:1). */
.ntf-hero-card-meta .ntf-chip-accent { background: rgba(11,15,26,0.92); border-color: rgba(0,229,255,0.45); color: var(--ntf-cyan); }
.ntf-hero-card-meta > span:not(.ntf-chip) { color: var(--ntf-chrome); text-shadow: 0 1px 3px rgba(0,0,0,0.9); }

/* Tags */
.ntf-tag { display: inline-block; padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 500; background: var(--ntf-graphite-light); border-radius: var(--radius-sm); color: var(--ntf-silver); transition: all var(--transition-fast); }
.ntf-tag:hover { background: var(--ntf-slate); color: var(--ntf-chrome); }

/* Form Elements */
.ntf-input { width: 100%; padding: 0.875rem 1rem; font-family: var(--font-primary); font-size: 1rem; color: var(--ntf-chrome); background: var(--ntf-graphite-dark); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); box-shadow: var(--shadow-inset); transition: all var(--transition-fast); }
.ntf-input:focus { outline: none; border-color: var(--ntf-cyan); box-shadow: var(--shadow-inset), 0 0 0 3px rgba(0,229,255,0.1); }
.ntf-input::placeholder { color: var(--ntf-silver); opacity: 0.6; }

/* ========================================
   4. LAYOUT COMPONENTS
   ======================================== */
.ntf-container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 var(--space-lg); }
.ntf-container-narrow { max-width: 800px; }
.ntf-section { padding: var(--space-3xl) 0; }
.ntf-section-sm { padding: var(--space-xl) 0; }
.ntf-grid { display: grid; gap: var(--space-xl); }
.ntf-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ntf-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ntf-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ntf-section-alt { background: var(--ntf-bg-light); }

/* ========================================
   5. NAVIGATION (Header)
   ======================================== */
.ntf-header {
    position: sticky; top: 0; z-index: 1000;
    background: linear-gradient(180deg, rgba(11,15,26,0.97) 0%, rgba(11,15,26,0.95) 100%);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all var(--transition-normal);
}
.ntf-header.is-scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5), 0 0 40px rgba(0,229,255,0.05); }
.ntf-header-inner { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-lg); height: var(--ntf-header-height); }

/* Logo */
.ntf-logo { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--ntf-chrome-light); text-decoration: none; }
.ntf-logo:hover { color: var(--ntf-chrome-light); }
.ntf-logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--ntf-cyan) 0%, var(--ntf-cyan-dark) 100%); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,229,255,0.3), inset 0 1px 0 rgba(255,255,255,0.3); }
.ntf-logo-icon svg { width: 22px; height: 22px; color: #0B0F1A; }

/* Nav */
.ntf-nav { display: flex; align-items: center; flex: 1; min-width: 0; justify-content: center; overflow: visible; }
.ntf-nav-menu { display: flex; list-style: none; gap: 2px; margin: 0; padding: 0; align-items: center; }
.ntf-nav-menu > li { flex-shrink: 0; position: relative; }
.ntf-nav-link { display: flex; align-items: center; gap: var(--space-xs); padding: 0.5rem 0.875rem; font-size: 0.875rem; font-weight: 500; color: var(--ntf-silver); border-radius: var(--radius-md); transition: all var(--transition-fast); text-decoration: none; white-space: nowrap; }
.ntf-nav-link:hover, .ntf-nav-link.active { color: var(--ntf-chrome-light); background: rgba(255,255,255,0.05); }
.ntf-nav-link.active { background: linear-gradient(180deg, rgba(0,229,255,0.15) 0%, rgba(0,229,255,0.05) 100%); color: var(--ntf-cyan); }

/* Desktop Dropdown Menu
   Scoped to .ntf-nav: the mobile menu reuses .ntf-dropdown for its top-level
   submenu, and these absolute/hidden rules used to make it invisible there. */
.ntf-nav .ntf-nav-menu > .menu-item-has-children {
    position: relative;
    /* The chevron is a sibling of the link, so the item must be a row. */
    display: flex;
    align-items: center;
}
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(8px);
    min-width: 220px;
    background: var(--ntf-graphite);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 1px rgba(0,229,255,0.1);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1001;
    pointer-events: none;
}
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
}
.ntf-nav .ntf-nav-menu > .menu-item-has-children.is-open > .ntf-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown .ntf-nav-link {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
    border-radius: 0;
    white-space: nowrap;
}
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown .ntf-nav-link:hover {
    background: rgba(255,255,255,0.05);
}
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown .sub-menu {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 200px;
    background: var(--ntf-graphite);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
}
/* :focus-within so third-level items are reachable by keyboard, not just hover. */
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown .menu-item-has-children:hover > .sub-menu,
.ntf-nav .ntf-nav-menu > .menu-item-has-children > .ntf-dropdown .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Nav link with children */
.ntf-nav-link--has-children { gap: 4px; }

/* Submenu Toggle Chevron */
.ntf-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    color: var(--ntf-silver);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 0;
    margin-left: 2px;
}
.ntf-submenu-toggle:hover { color: var(--ntf-cyan); }
.ntf-submenu-toggle svg { transition: transform var(--transition-fast); }

/* Header Actions */
.ntf-header-actions { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; margin-left: auto; }
.ntf-header-action-btn {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--ntf-silver);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}
.ntf-header-action-btn:hover {
    color: var(--ntf-cyan);
    border-color: rgba(0,229,255,0.3);
    background: rgba(0,229,255,0.08);
    box-shadow: 0 2px 12px rgba(0,229,255,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ntf-header-action-btn:active { transform: scale(0.95); }

/* Mobile Menu Toggle */
.ntf-menu-toggle {
    display: none; flex-direction: column; gap: 5px; padding: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: all var(--transition-fast);
}
.ntf-menu-toggle:hover { border-color: rgba(0,229,255,0.3); background: rgba(0,229,255,0.08); }
.ntf-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ntf-chrome); transition: all var(--transition-fast); border-radius: 2px; }
.ntf-menu-toggle:hover span { background: var(--ntf-cyan); }
.ntf-menu-toggle.active { border-color: rgba(0,229,255,0.3); background: rgba(0,229,255,0.08); }
.ntf-menu-toggle.active span { background: var(--ntf-cyan); }
.ntf-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.ntf-menu-toggle.active span:nth-child(2) { opacity: 0; }
.ntf-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.ntf-mobile-menu { position: fixed; top: var(--ntf-header-height); left: 0; right: 0; bottom: 0; background: var(--ntf-bg); z-index: 999; padding: var(--space-xl); overflow-y: auto; transform: translateX(100%); transition: transform var(--transition-normal); }
.ntf-mobile-menu.is-open { transform: translateX(0); }
.ntf-mobile-menu .ntf-nav-menu { flex-direction: column; gap: 0; width: 100%; }
.ntf-mobile-menu .ntf-nav-menu > li { width: 100%; flex-shrink: 1; }
.ntf-mobile-menu .ntf-nav-link { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-sm); font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,0.05); border-radius: 0; }
/* The chevron toggle is a sibling of the link, so lay the two out on one row
   and let the submenu span the full width underneath. */
.ntf-mobile-menu .menu-item-has-children {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ntf-mobile-menu .menu-item-has-children > .ntf-nav-link { border-bottom: none; }
.ntf-mobile-menu .menu-item-has-children > .sub-menu { grid-column: 1 / -1; }
.ntf-mobile-menu .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(255,255,255,0.02);
    border-radius: var(--radius-sm);
    list-style: none;
    margin: 0;
    padding: 0;
}
.ntf-mobile-menu .menu-item-has-children.is-open > .sub-menu { max-height: 500px; }
/* Only top-level items get a toggle, so deeper levels open with their parent. */
.ntf-mobile-menu .sub-menu .sub-menu { max-height: none; overflow: visible; }
.ntf-mobile-menu .sub-menu .ntf-nav-link { padding: var(--space-sm) var(--space-lg); font-size: 1rem; padding-left: var(--space-xl); color: var(--ntf-silver); }
.ntf-mobile-menu .sub-menu .sub-menu .ntf-nav-link { padding-left: calc(var(--space-xl) + var(--space-lg)); font-size: 0.95rem; }
.ntf-mobile-menu .sub-menu .ntf-nav-link:hover { background: rgba(255,255,255,0.03); }
/* 44px touch target. */
.ntf-mobile-menu .ntf-submenu-toggle { width: 44px; height: 44px; margin: 0; }

/* Search Overlay
   No unconditional display: it would defeat the [hidden] attribute. */
.ntf-search-overlay { position: fixed; inset: 0; background: rgba(11,15,26,0.95); backdrop-filter: blur(10px); z-index: 2000; align-items: flex-start; justify-content: center; padding-top: 20vh; opacity: 0; visibility: hidden; transition: opacity var(--transition-normal), visibility var(--transition-normal); }
.ntf-search-overlay.is-open { opacity: 1; visibility: visible; }
.ntf-search-overlay:not([hidden]) { display: flex; }
.ntf-search-overlay-inner { width: 100%; max-width: 700px; padding: 0 var(--space-xl); }
.ntf-search-overlay-inner .ntf-input { font-size: 1.5rem; padding: 1.25rem 1.5rem; background: var(--ntf-graphite); border: 2px solid rgba(0,229,255,0.2); border-radius: var(--radius-lg); color: var(--ntf-chrome-light); }
.ntf-search-overlay-inner .ntf-input:focus { border-color: var(--ntf-cyan); box-shadow: 0 0 40px rgba(0,229,255,0.1); }
.ntf-search-close { position: absolute; top: var(--space-xl); right: var(--space-xl); background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); color: var(--ntf-silver); cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast); }
.ntf-search-close:hover { color: #fff; background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); }

/* ========================================
   6. HERO SECTION
   ======================================== */
.ntf-hero { position: relative; padding: var(--space-3xl) 0; overflow: hidden; }
.ntf-hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(0,229,255,0.08) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(255,122,24,0.05) 0%, transparent 40%), var(--ntf-bg); z-index: -1; }
.ntf-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xl); align-items: center; }
.ntf-hero-content { max-width: 600px; }
.ntf-hero-badge { display: inline-flex; align-items: center; gap: var(--space-sm); padding: 0.5rem 1rem; background: linear-gradient(180deg, rgba(0,229,255,0.15) 0%, rgba(0,229,255,0.05) 100%); border: 1px solid rgba(0,229,255,0.2); border-radius: var(--radius-xl); font-size: 0.85rem; font-weight: 600; color: var(--ntf-cyan); margin-bottom: var(--space-lg); }
.ntf-hero-badge::before { content: ''; width: 8px; height: 8px; background: var(--ntf-cyan); border-radius: 50%; box-shadow: 0 0 10px var(--ntf-cyan), 0 0 20px var(--ntf-cyan); animation: ntf-pulse 2s infinite; }
@keyframes ntf-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--ntf-cyan); } 50% { opacity: 0.5; box-shadow: 0 0 20px var(--ntf-cyan); } }
.ntf-hero-title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; line-height: 1.1; margin-bottom: var(--space-lg); background: linear-gradient(135deg, var(--ntf-chrome-light) 0%, var(--ntf-silver) 50%, var(--ntf-cyan) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.ntf-hero-description { font-size: 1.15rem; color: var(--ntf-silver); margin-bottom: var(--space-xl); line-height: 1.7; }
.ntf-hero-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }

/* Hero Card */
.ntf-hero-card { background: var(--ntf-surface-dark); border-radius: var(--radius-xl); box-shadow: var(--shadow-card), 0 0 60px rgba(0,229,255,0.08); overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.ntf-hero-card-image { position: relative; height: 280px; overflow: hidden; }
.ntf-hero-card-image img { width: 100%; height: 100%; object-fit: cover; }
.ntf-hero-card-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, rgba(11,15,26,0.9) 100%); }
.ntf-hero-card-content { padding: var(--space-xl); }
.ntf-hero-card-meta { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); font-size: 0.85rem; color: var(--ntf-silver); }
.ntf-hero-card-title { font-size: 1.5rem; margin-bottom: var(--space-sm); }
.ntf-hero-card-title a { color: var(--ntf-chrome-light); text-decoration: none; }
.ntf-hero-card-title a:hover { color: var(--ntf-cyan); }
.ntf-hero-card-excerpt { color: var(--ntf-silver); font-size: 0.95rem; line-height: 1.6; }

/* ========================================
   7. ANIMATED DIVIDER
   ======================================== */
.ntf-divider-section { padding: var(--space-xl) 0; }
.ntf-animated-divider { position: relative; height: 4px; border-radius: 2px; overflow: visible; }
.ntf-divider-line { position: absolute; inset: 0; background: linear-gradient(90deg, var(--ntf-cyan), var(--ntf-orange), var(--ntf-cyan)); background-size: 200% 100%; border-radius: 2px; animation: ntf-divider-flow 4s linear infinite; }
.ntf-divider-glow { position: absolute; inset: -4px; background: linear-gradient(90deg, rgba(0,229,255,0.3), rgba(255,122,24,0.3), rgba(0,229,255,0.3)); background-size: 200% 100%; filter: blur(8px); border-radius: 4px; animation: ntf-divider-flow 4s linear infinite; }
.ntf-divider-dot { position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; background: #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 10px #fff, 0 0 20px var(--ntf-cyan); animation: ntf-divider-dot 4s linear infinite; }
@keyframes ntf-divider-flow { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes ntf-divider-dot { 0% { left: 0; } 50% { left: 100%; } 100% { left: 0; } }

/* ========================================
   8. CATEGORY FILTER BAR
   ======================================== */
.ntf-filter-section { padding: var(--space-xl) 0 0; position: sticky; top: var(--ntf-header-height); z-index: 50; background: var(--ntf-bg); }
.ntf-filter-bar { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md) 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.ntf-filter-bar::-webkit-scrollbar { display: none; }

/* Pills style */
.ntf-filter-bar--pills .ntf-filter-btn { padding: 0.625rem 1.5rem; background: var(--ntf-surface-dark); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-xl); color: var(--ntf-silver); font-size: 0.9rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all var(--transition-fast); display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow-button); font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.02em; }
.ntf-filter-bar--pills .ntf-filter-btn:hover { color: var(--ntf-chrome-light); background: var(--ntf-slate); border-color: rgba(255,255,255,0.15); }
.ntf-filter-bar--pills .ntf-filter-btn--active { background: linear-gradient(180deg, var(--ntf-cyan) 0%, var(--ntf-cyan-dark) 100%); color: #0B0F1A; border-color: var(--ntf-cyan); box-shadow: 0 0 15px rgba(0,229,255,0.3), var(--shadow-button); }

/* Underline style */
.ntf-filter-bar--underline .ntf-filter-btn { padding: 0.75rem 1.25rem; background: none; border: none; border-bottom: 2px solid transparent; color: var(--ntf-silver); font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; font-family: var(--font-primary); }
.ntf-filter-bar--underline .ntf-filter-btn:hover { color: var(--ntf-chrome-light); }
.ntf-filter-bar--underline .ntf-filter-btn--active { color: var(--ntf-cyan); border-bottom-color: var(--ntf-cyan); }

/* Chips style */
.ntf-filter-bar--chips .ntf-filter-btn { padding: 0.5rem 1rem; background: var(--ntf-graphite-light); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-md); color: var(--ntf-silver); font-size: 0.85rem; cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.ntf-filter-bar--chips .ntf-filter-btn:hover { background: var(--ntf-slate); color: var(--ntf-chrome-light); }
.ntf-filter-bar--chips .ntf-filter-btn--active { background: rgba(0,229,255,0.15); border-color: rgba(0,229,255,0.3); color: var(--ntf-cyan); }
.ntf-filter-count { font-size: 0.75rem; background: rgba(255,255,255,0.1); padding: 0.1rem 0.4rem; border-radius: 10px; }

/* Filter results: loading + empty states */
.ntf-filter-results { position: relative; min-height: 120px; transition: opacity var(--transition-fast); }
.ntf-filter-results.is-loading { opacity: 0.35; pointer-events: none; }
.ntf-filter-results.is-loading::after { content: ""; position: absolute; top: 40px; left: 50%; width: 34px; height: 34px; margin-left: -17px; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--ntf-cyan); border-radius: 50%; animation: ntf-filter-spin 0.8s linear infinite; }
@keyframes ntf-filter-spin { to { transform: rotate(360deg); } }
.ntf-filter-empty { text-align: center; color: var(--ntf-silver); padding: var(--space-2xl) 0; font-size: 1rem; }
@media (prefers-reduced-motion: reduce) {
    .ntf-filter-results.is-loading::after { animation: none; }
}

/* ========================================
   9. SECTION HEADERS
   ======================================== */
.ntf-section-header { text-align: center; margin-bottom: var(--space-2xl); }
.ntf-section-header--row { display: flex; justify-content: space-between; align-items: flex-end; text-align: left; }
.ntf-section-title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; display: flex; align-items: center; justify-content: center; gap: var(--space-sm); }
.ntf-section-header--row .ntf-section-title { justify-content: flex-start; }
.ntf-section-title-bar { width: 60px; height: 3px; background: linear-gradient(90deg, var(--ntf-cyan), transparent); margin: var(--space-sm) auto 0; border-radius: 2px; }
.ntf-section-header--row .ntf-section-title-bar { margin: var(--space-sm) 0 0; }
.ntf-section-title-bar--orange { background: linear-gradient(90deg, var(--ntf-orange), transparent); }

/* ========================================
   10. CARDS & POSTS
   ======================================== */
/* Columns come from the .ntf-grid-* utility the templates pair this with.
   Duplicating them here beat the responsive overrides on specificity. */
.ntf-posts-grid { display: grid; gap: var(--space-xl); }
.ntf-posts-list { display: flex; flex-direction: column; gap: var(--space-lg); }

/* Post Card - Grid */
.ntf-post-card { background: var(--ntf-surface-dark); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); border: 1px solid rgba(255,255,255,0.05); overflow: hidden; transition: all var(--transition-normal); height: 100%; display: flex; flex-direction: column; }
.ntf-post-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-6px); }
.ntf-post-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; position: relative; z-index: 2; cursor: pointer; }
.ntf-post-card-image { position: relative; height: 200px; overflow: hidden; }
.ntf-post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.ntf-post-card:hover .ntf-post-card-image img { transform: scale(1.08); }
/* Sits on top of the featured image, so it needs its own opaque backdrop —
   a translucent tint over an arbitrary photo can drop below WCAG AA 4.5:1. */
.ntf-post-card-category { position: absolute; top: var(--space-md); left: var(--space-md); z-index: 2; background: rgba(11,15,26,0.92); border-color: rgba(0,229,255,0.45); color: var(--ntf-cyan); backdrop-filter: blur(4px); }
.ntf-post-card-category:hover { background: rgba(11,15,26,0.96); color: var(--ntf-cyan); }
.ntf-post-card-content { padding: var(--space-lg); flex: 1; display: flex; flex-direction: column; }
.ntf-post-card-meta { display: flex; align-items: center; gap: var(--space-md); font-size: 0.8rem; color: var(--ntf-silver); margin-bottom: var(--space-sm); flex-wrap: wrap; }
.ntf-post-card-meta span { display: flex; align-items: center; gap: 4px; }
.ntf-post-card-meta .ntf-meta-category { color: var(--ntf-cyan); font-weight: 500; }
.ntf-post-card-title { font-size: 1.15rem; margin-bottom: var(--space-sm); line-height: 1.4; }
.ntf-post-card-title a { color: var(--ntf-chrome-light); }
.ntf-post-card-title a:hover { color: var(--ntf-cyan); }
.ntf-post-card-excerpt { font-size: 0.9rem; color: var(--ntf-silver); line-height: 1.6; flex: 1; }
.ntf-post-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.05); }
.ntf-post-card-author { display: flex; align-items: center; gap: var(--space-sm); font-size: 0.85rem; color: var(--ntf-silver); }
.ntf-post-card-author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ntf-slate); }
.ntf-post-card-read-more { font-size: 0.85rem; color: var(--ntf-cyan); display: flex; align-items: center; gap: 4px; font-weight: 500; }
.ntf-post-card-read-more svg { transition: transform var(--transition-fast); }
.ntf-post-card:hover .ntf-post-card-read-more svg { transform: translateX(4px); }

/* Post Card - List */
.ntf-post-card-list { overflow: hidden; }
.ntf-post-card-list .ntf-post-card-link { flex-direction: row; }
.ntf-post-card-list-inner { display: flex; gap: var(--space-xl); width: 100%; }
.ntf-post-card-list-image { width: 300px; min-height: 200px; overflow: hidden; flex-shrink: 0; }
.ntf-post-card-list-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.ntf-post-card-list:hover .ntf-post-card-list-image img { transform: scale(1.05); }
.ntf-post-card-list-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: var(--space-lg) var(--space-lg) var(--space-lg) 0; }

/* ========================================
   11. FEATURED LAYOUT
   ======================================== */
.ntf-featured-layout { display: flex; flex-direction: column; gap: var(--space-xl); }
.ntf-featured-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; background: var(--ntf-surface-dark); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); border: 1px solid rgba(255,255,255,0.05); overflow: hidden; transition: all var(--transition-normal); }
.ntf-featured-card:hover { box-shadow: var(--shadow-card-hover); }
.ntf-featured-card-link { display: contents; text-decoration: none; color: inherit; }
/* display: contents makes link children act as grid items of .ntf-featured-card.
   Clicking anywhere on image or content still follows the link. */
.ntf-featured-card-image { position: relative; min-height: 400px; overflow: hidden; }
.ntf-featured-card-image img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform var(--transition-slow); }
.ntf-featured-card:hover .ntf-featured-card-image img { transform: scale(1.05); }
.ntf-featured-card-content { padding: var(--space-2xl); display: flex; flex-direction: column; justify-content: center; }
.ntf-featured-card-badge { display: inline-flex; align-items: center; gap: var(--space-xs); padding: 0.375rem 0.875rem; background: linear-gradient(180deg, rgba(255,122,24,0.2) 0%, rgba(255,122,24,0.1) 100%); border: 1px solid rgba(255,122,24,0.3); border-radius: var(--radius-xl); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--ntf-orange); margin-bottom: var(--space-md); width: fit-content; }
.ntf-featured-card-title { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: var(--space-md); line-height: 1.2; }
.ntf-featured-card-title a { color: var(--ntf-chrome-light); }
.ntf-featured-card-title a:hover { color: var(--ntf-cyan); }
.ntf-featured-card-excerpt { font-size: 1rem; color: var(--ntf-silver); line-height: 1.7; margin-bottom: var(--space-lg); }
.ntf-featured-card-meta { display: flex; align-items: center; gap: var(--space-lg); font-size: 0.85rem; color: var(--ntf-silver); }
.ntf-featured-card-meta span { display: flex; align-items: center; gap: 6px; }

/* ========================================
   12. TRENDING SECTION
   ======================================== */
.ntf-trending-grid { display: flex; flex-direction: column; gap: 0; }
.ntf-trending-card { border-bottom: 1px solid rgba(255,255,255,0.05); }
.ntf-trending-card:last-child { border-bottom: none; }
.ntf-trending-card-link { display: flex; align-items: center; gap: var(--space-xl); padding: var(--space-lg); text-decoration: none; color: inherit; transition: all var(--transition-fast); border-radius: var(--radius-md); position: relative; z-index: 2; cursor: pointer; }
.ntf-trending-card-link:hover { background: rgba(255,255,255,0.02); }
.ntf-trending-num { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: var(--ntf-orange); min-width: 60px; text-align: center; opacity: 0.6; line-height: 1; }
.ntf-trending-card:hover .ntf-trending-num { opacity: 1; }
.ntf-trending-card-content { flex: 1; }
.ntf-trending-card-title { font-size: 1.15rem; font-weight: 600; margin-bottom: var(--space-xs); color: var(--ntf-chrome-light); transition: color var(--transition-fast); }
.ntf-trending-card:hover .ntf-trending-card-title { color: var(--ntf-cyan); }
.ntf-trending-card-meta { display: flex; gap: var(--space-md); font-size: 0.8rem; color: var(--ntf-silver); }
.ntf-trending-card-meta span { display: flex; align-items: center; gap: 4px; }
.ntf-trending-card-image { width: 80px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.ntf-trending-card-image img { width: 100%; height: 100%; object-fit: cover; }

/* ========================================
   13. QUICK LINKS GRID
   ======================================== */
.ntf-quick-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-lg); }
.ntf-quick-link-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); padding: var(--space-xl) var(--space-lg); text-align: center; text-decoration: none; color: inherit; transition: all var(--transition-normal); position: relative; z-index: 2; cursor: pointer; }
.ntf-quick-link-icon { width: 56px; height: 56px; background: linear-gradient(135deg, var(--ntf-slate) 0%, var(--ntf-graphite-light) 100%); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--ntf-cyan); box-shadow: var(--shadow-raised); transition: all var(--transition-normal); }
.ntf-quick-link-card:hover .ntf-quick-link-icon { background: linear-gradient(135deg, var(--ntf-cyan) 0%, var(--ntf-cyan-dark) 100%); color: #0B0F1A; box-shadow: 0 8px 20px rgba(0,229,255,0.3), var(--shadow-raised); transform: translateY(-4px); }
.ntf-quick-link-label { font-family: var(--font-heading); font-size: 0.95rem; font-weight: 600; color: var(--ntf-chrome-light); }

/* ========================================
   14. STICKY SIDEBAR TAB (KEY FEATURE)
   ======================================== */
.ntf-single-layout { padding: var(--space-2xl) 0; }
.ntf-single-layout-inner { display: flex; gap: var(--space-2xl); align-items: flex-start; }
.ntf-single-content-area { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-2xl); flex: 1; min-width: 0; }
.ntf-single-main { min-width: 0; }
.ntf-single-content-area .ntf-sidebar { position: sticky; top: 100px; width: auto; }

/* Sticky Sidebar Container */
.ntf-sticky-sidebar { width: var(--ntf-sticky-tab-width, 300px); flex-shrink: 0; position: sticky; top: calc(var(--ntf-header-height) + var(--space-xl)); max-height: calc(100vh - var(--ntf-header-height) - var(--space-2xl)); overflow-y: auto; border-radius: var(--radius-lg); background: var(--ntf-surface-dark); border: 1px solid rgba(255,255,255,0.05); box-shadow: var(--shadow-card); padding: var(--space-md); }

/* Tab Toggle Button (for mobile / collapsed) */
.ntf-sticky-tab-toggle { display: none; align-items: center; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); background: linear-gradient(180deg, var(--ntf-slate-light) 0%, var(--ntf-slate) 100%); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-md); color: var(--ntf-cyan); font-family: var(--font-heading); font-size: 0.9rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-button); transition: all var(--transition-fast); width: 100%; }
.ntf-sticky-tab-toggle:hover { background: linear-gradient(180deg, var(--ntf-slate) 0%, var(--ntf-graphite-light) 100%); }
.ntf-sticky-tab-toggle-icon { display: flex; }

/* Tab Navigation */
.ntf-sticky-tab-nav { display: flex; gap: 2px; padding: 4px; background: var(--ntf-graphite-dark); border-radius: var(--radius-md); margin-bottom: var(--space-lg); box-shadow: var(--shadow-inset); flex-shrink: 0; overflow-x: auto; }
.ntf-sticky-tab-nav-btn { flex: 1; min-width: 0; padding: 8px 6px; background: none; border: none; border-radius: 7px; color: var(--ntf-silver); font-size: 0.72rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; font-family: var(--font-primary); }
.ntf-sticky-tab-nav-btn:hover { color: var(--ntf-chrome-light); background: rgba(255,255,255,0.03); }
.ntf-sticky-tab-nav-btn--active { background: var(--ntf-slate); color: var(--ntf-cyan); box-shadow: var(--shadow-button-active); }
.ntf-sticky-tab-nav-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Tab Panels Container */
.ntf-sticky-tab-panels { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--ntf-slate) transparent; }
.ntf-sticky-tab-panels::-webkit-scrollbar { width: 4px; }
.ntf-sticky-tab-panels::-webkit-scrollbar-track { background: transparent; }
.ntf-sticky-tab-panels::-webkit-scrollbar-thumb { background: var(--ntf-slate); border-radius: 4px; }

/* Tab Panels */
.ntf-sticky-tab-panel { display: none; padding: var(--space-md); background: var(--ntf-surface-dark); border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.05); margin-bottom: var(--space-md); box-shadow: var(--shadow-card); animation: ntf-fadeIn 0.2s ease; }
.ntf-sticky-tab-panel--active { display: block; }
@keyframes ntf-fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.ntf-sticky-tab-panel-title { font-size: 0.85rem; font-weight: 700; color: var(--ntf-chrome-light); margin-bottom: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid rgba(255,255,255,0.05); text-transform: uppercase; letter-spacing: 0.05em; }

/* Sticky TOC */
.ntf-sticky-toc-list { list-style: none; padding: 0; margin: 0; }
.ntf-sticky-toc-list li { border-bottom: 1px solid rgba(255,255,255,0.03); }
.ntf-sticky-toc-list li:last-child { border-bottom: none; }
.ntf-sticky-toc-list a { display: block; padding: 6px 0; font-size: 0.82rem; color: var(--ntf-silver); text-decoration: none; transition: all var(--transition-fast); line-height: 1.4; }
.ntf-sticky-toc-list a:hover, .ntf-sticky-toc-list a.active { color: var(--ntf-cyan); padding-left: 8px; }

/* Sticky List (categories, recent, pages) */
.ntf-sticky-list { list-style: none; padding: 0; margin: 0; }
.ntf-sticky-list li { border-bottom: 1px solid rgba(255,255,255,0.03); }
.ntf-sticky-list li:last-child { border-bottom: none; }
.ntf-sticky-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); padding: 8px 0; font-size: 0.88rem; color: var(--ntf-silver); text-decoration: none; transition: all var(--transition-fast); }
.ntf-sticky-list a:hover { color: var(--ntf-cyan); padding-left: 6px; }
.ntf-sticky-list a svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }
.ntf-sticky-list a:hover svg { opacity: 1; }
.ntf-sticky-list-count { font-size: 0.72rem; background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 10px; color: var(--ntf-silver); }
.ntf-sticky-list-active a { color: var(--ntf-cyan); font-weight: 600; }
.ntf-sticky-list-compact a { font-size: 0.82rem; padding: 5px 0; }
.ntf-sticky-list-date { font-size: 0.72rem; color: var(--ntf-silver); opacity: 0.6; margin-left: auto; flex-shrink: 0; }

/* Sticky Tags */
.ntf-sticky-tags-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.ntf-sticky-tags-cloud .ntf-tag { font-size: 0.72rem; padding: 3px 8px; }

/* Sticky Share Grid */
.ntf-sticky-share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.ntf-sticky-share-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; background: var(--ntf-graphite-light); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-sm); color: var(--ntf-silver); font-size: 0.78rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); text-decoration: none; font-family: var(--font-primary); }
.ntf-sticky-share-btn:hover { color: var(--ntf-cyan); border-color: rgba(0,229,255,0.2); background: rgba(0,229,255,0.05); transform: translateY(-1px); }
.ntf-sticky-share-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Sticky Tab Widgets */
.ntf-sticky-tab-panel-widgets .ntf-widget { margin-bottom: var(--space-md); }
.ntf-sticky-tab-panel-widgets .ntf-widget:last-child { margin-bottom: 0; }

/* ========================================
   15. SINGLE POST
   ======================================== */
.ntf-single-header { padding: var(--space-3xl) 0 var(--space-xl); text-align: center; }
.ntf-single-categories { display: flex; justify-content: center; gap: var(--space-sm); margin-bottom: var(--space-lg); flex-wrap: wrap; }
.ntf-single-title { font-size: clamp(2rem, 5vw, 3.5rem); max-width: 900px; margin: 0 auto var(--space-lg); line-height: 1.2; }
.ntf-single-meta { display: flex; justify-content: center; align-items: center; gap: var(--space-lg); flex-wrap: wrap; color: var(--ntf-silver); font-size: 0.9rem; }
.ntf-single-meta-item { display: flex; align-items: center; gap: var(--space-xs); }
.ntf-single-meta-author { display: flex; align-items: center; gap: var(--space-sm); }
.ntf-author-avatar-sm { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ntf-slate); }
.ntf-single-featured-image { margin: var(--space-xl) 0; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-card); }
.ntf-single-featured-image img { width: 100%; height: auto; }
.ntf-single-content { max-width: 100%; padding: var(--space-xl) 0; }
.ntf-single-content h2, .ntf-single-content h3, .ntf-single-content h4 { margin-top: var(--space-2xl); margin-bottom: var(--space-md); }
.ntf-single-content p { font-size: 1.05rem; line-height: 1.8; margin-bottom: var(--space-lg); }
.ntf-single-content a { color: var(--ntf-cyan); border-bottom: 1px dotted var(--ntf-cyan); transition: all var(--transition-fast); }
.ntf-single-content a:hover { color: #fff; border-bottom-color: #fff; }
.ntf-single-content img { border-radius: var(--radius-md); margin: var(--space-xl) 0; box-shadow: var(--shadow-card); }
.ntf-single-content ul, .ntf-single-content ol { margin-bottom: var(--space-lg); padding-left: var(--space-xl); }
.ntf-single-content li { margin-bottom: var(--space-sm); line-height: 1.7; color: var(--ntf-silver); }

/* TOC */
.ntf-toc { background: var(--ntf-surface-dark); border-radius: var(--radius-lg); padding: var(--space-xl); margin: var(--space-xl) 0; box-shadow: var(--shadow-card); border: 1px solid rgba(255,255,255,0.05); }
.ntf-toc-title { font-size: 1.1rem; font-weight: 700; color: var(--ntf-chrome-light); margin-bottom: var(--space-md); display: flex; align-items: center; gap: var(--space-sm); }
.ntf-toc-list { list-style: none; padding: 0; margin: 0; }
.ntf-toc-list li { border-bottom: 1px solid rgba(255,255,255,0.03); }
.ntf-toc-list li:last-child { border-bottom: none; }
.ntf-toc-list a { color: var(--ntf-silver); display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) 0; }
.ntf-toc-list a:hover { color: var(--ntf-cyan); }
.ntf-toc-list a::before { content: '#'; color: var(--ntf-cyan); font-family: var(--font-mono); font-size: 0.85em; }

/* Inline Links */
.ntf-inline-links { margin: var(--space-2xl) 0; padding: var(--space-xl); background: var(--ntf-surface-dark); border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.05); }
.ntf-inline-links h4 { font-size: 1rem; margin-bottom: var(--space-md); color: var(--ntf-chrome-light); }
.ntf-inline-links-grid { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.ntf-inline-link-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--ntf-graphite-light); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-md); font-size: 0.85rem; color: var(--ntf-silver); transition: all var(--transition-fast); text-decoration: none; }
.ntf-inline-link-item:hover { color: var(--ntf-cyan); border-color: rgba(0,229,255,0.2); background: rgba(0,229,255,0.05); }

/* Author Box */
.ntf-author-box { display: flex; gap: var(--space-xl); background: var(--ntf-surface-dark); border-radius: var(--radius-xl); padding: var(--space-xl); margin: var(--space-2xl) 0; box-shadow: var(--shadow-card); border: 1px solid rgba(255,255,255,0.05); }
.ntf-author-box-avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--ntf-slate); box-shadow: var(--shadow-raised); flex-shrink: 0; }
.ntf-author-box-content { flex: 1; }
.ntf-author-box-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-sm); }
.ntf-author-box-name { font-size: 1.35rem; font-weight: 700; color: var(--ntf-chrome-light); display: block; }
.ntf-author-box-role { font-size: 0.85rem; color: var(--ntf-cyan); display: block; margin-top: 2px; }
.ntf-author-box-bio { color: var(--ntf-silver); line-height: 1.7; margin-bottom: var(--space-md); font-size: 0.95rem; }
.ntf-author-box-social { display: flex; gap: var(--space-sm); }
.ntf-author-box-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--ntf-graphite-light); border-radius: var(--radius-md); color: var(--ntf-silver); transition: all var(--transition-fast); }
.ntf-author-box-social a:hover { background: var(--ntf-cyan); color: #0B0F1A; }

/* Share */
.ntf-share { display: flex; align-items: center; gap: var(--space-md); margin: var(--space-xl) 0; padding: var(--space-lg) 0; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); }
.ntf-share-label { font-weight: 600; color: var(--ntf-chrome-light); }
.ntf-share-buttons { display: flex; gap: var(--space-sm); }
.ntf-share-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--ntf-graphite-light); border-radius: var(--radius-md); color: var(--ntf-silver); transition: all var(--transition-fast); box-shadow: var(--shadow-button); cursor: pointer; border: none; }
.ntf-share-btn:hover { background: var(--ntf-cyan); color: #0B0F1A; transform: translateY(-2px); }

/* Post Navigation */
.ntf-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); margin: var(--space-2xl) 0; }
.ntf-post-nav-item { padding: var(--space-xl); background: var(--ntf-surface-dark); border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.05); transition: all var(--transition-normal); text-decoration: none; color: inherit; display: block; position: relative; z-index: 2; cursor: pointer; }
.ntf-post-nav-item:hover { border-color: rgba(0,229,255,0.2); box-shadow: var(--shadow-card-hover); }
.ntf-post-nav-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ntf-cyan); font-weight: 600; display: block; margin-bottom: var(--space-xs); }
.ntf-post-nav-title { font-size: 1rem; font-weight: 600; color: var(--ntf-chrome-light); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Related Posts */
.ntf-related-posts { margin: var(--space-2xl) 0; }
.ntf-related-posts-title { font-size: 1.5rem; margin-bottom: var(--space-xl); text-align: center; }
.ntf-related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }

/* Tags on single */
.ntf-single-tags { display: flex; align-items: flex-start; gap: var(--space-md); margin: var(--space-xl) 0; flex-wrap: wrap; }
.ntf-single-tags-label { font-weight: 600; color: var(--ntf-chrome-light); padding-top: 4px; }
.ntf-tags-cloud { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

/* Comments */
.ntf-comments { margin-top: var(--space-3xl); }
.ntf-comments-title { font-size: 1.5rem; margin-bottom: var(--space-xl); }

/* ========================================
   16. SIDEBAR & WIDGETS
   ======================================== */
.ntf-sidebar { position: sticky; top: 100px; width: 350px; flex-shrink: 0; }
.ntf-widget { background: var(--ntf-surface-dark); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); border: 1px solid rgba(255,255,255,0.05); padding: var(--space-lg); margin-bottom: var(--space-xl); }
.ntf-widget-title { font-size: 1.1rem; font-weight: 700; color: var(--ntf-chrome-light); margin-bottom: var(--space-lg); padding-bottom: var(--space-md); border-bottom: 2px solid; border-image: linear-gradient(90deg, var(--ntf-cyan) 0%, transparent 100%) 1; }

/* ========================================
   17. ARCHIVE & PAGINATION
   ======================================== */
.ntf-archive-header { padding: var(--space-3xl) 0 var(--space-xl); text-align: center; background: radial-gradient(ellipse at 50% 100%, rgba(0,229,255,0.05) 0%, transparent 50%); }
.ntf-archive-title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--space-md); }
.ntf-archive-count { display: inline-flex; align-items: center; gap: var(--space-xs); padding: 0.375rem 1rem; background: var(--ntf-surface-dark); border-radius: var(--radius-xl); font-size: 0.85rem; color: var(--ntf-silver); margin-top: var(--space-md); }
.ntf-archive-layout { display: grid; grid-template-columns: 1fr 350px; gap: var(--space-3xl); }
/* WordPress wraps the page links in .nav-links, so that is the flex row. */
.ntf-pagination { margin-top: var(--space-3xl); }
.ntf-pagination .nav-links { display: flex; justify-content: center; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.ntf-pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 var(--space-md); background: var(--ntf-surface-dark); border-radius: var(--radius-md); font-weight: 600; color: var(--ntf-silver); box-shadow: var(--shadow-button); transition: all var(--transition-fast); text-decoration: none; }
.ntf-pagination a.page-numbers:hover { background: var(--ntf-slate); color: var(--ntf-chrome-light); transform: translateY(-2px); }
.ntf-pagination .page-numbers.current { background: linear-gradient(180deg, var(--ntf-cyan) 0%, var(--ntf-cyan-dark) 100%); color: #0B0F1A; }
.ntf-pagination .page-numbers.dots { background: none; box-shadow: none; min-width: auto; padding: 0 var(--space-xs); }

/* ========================================
   18. FOOTER
   ======================================== */
.ntf-footer { background: var(--ntf-graphite-dark); border-top: 1px solid rgba(255,255,255,0.05); padding-top: var(--space-3xl); }
.ntf-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-3xl); padding-bottom: var(--space-3xl); }
.ntf-footer-brand { max-width: 300px; }
.ntf-footer-logo { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--ntf-chrome-light); margin-bottom: var(--space-md); text-decoration: none; }
.ntf-footer-description { color: var(--ntf-silver); font-size: 0.95rem; line-height: 1.7; margin-bottom: var(--space-lg); }
.ntf-footer-social { display: flex; gap: var(--space-sm); }
.ntf-footer-social a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--ntf-graphite-light); border-radius: var(--radius-md); color: var(--ntf-silver); transition: all var(--transition-fast); box-shadow: var(--shadow-button); }
.ntf-footer-social a:hover { background: var(--ntf-cyan); color: #0B0F1A; transform: translateY(-2px); }
.ntf-footer-column h4 { font-size: 1rem; font-weight: 700; color: var(--ntf-chrome-light); margin-bottom: var(--space-lg); text-transform: uppercase; letter-spacing: 0.05em; }
.ntf-footer-links { list-style: none; padding: 0; margin: 0; }
.ntf-footer-links li { margin-bottom: var(--space-sm); }
.ntf-footer-links a { color: var(--ntf-silver); font-size: 0.9rem; transition: all var(--transition-fast); display: flex; align-items: center; gap: var(--space-xs); text-decoration: none; }
.ntf-footer-links a:hover { color: var(--ntf-cyan); padding-left: var(--space-xs); }
.ntf-footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding: var(--space-lg) 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-md); }
.ntf-footer-copyright { font-size: 0.85rem; color: var(--ntf-silver); }
.ntf-footer-legal { display: flex; gap: var(--space-lg); }
.ntf-footer-legal a { font-size: 0.85rem; color: var(--ntf-silver); text-decoration: none; }
.ntf-footer-legal a:hover { color: var(--ntf-cyan); }

/* ========================================
   19. SCROLL TO TOP
   ======================================== */
#scroll-top { position: fixed; bottom: var(--space-xl); right: var(--space-xl); width: 48px; height: 48px; background: linear-gradient(180deg, var(--ntf-cyan) 0%, var(--ntf-cyan-dark) 100%); color: #0B0F1A; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,229,255,0.3); transition: all var(--transition-fast); z-index: 900; opacity: 0; visibility: hidden; transform: translateY(20px); }
#scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#scroll-top:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(0,229,255,0.5); }
/* display: flex above would otherwise override the hidden attribute. */
#scroll-top[hidden] { display: none; }

/* ========================================
   20. UTILITIES
   ======================================== */
.ntf-text-center { text-align: center; }
.ntf-mb-0 { margin-bottom: 0; }
.ntf-mb-lg { margin-bottom: var(--space-lg); }
.ntf-mb-xl { margin-bottom: var(--space-xl); }
.ntf-hidden { display: none !important; }
/* .ntf-sr-only is an alias of .screen-reader-text (see section 22). */

/* ========================================
   21. ANIMATIONS
   ======================================== */
/*
 * Gated on .ntf-js, which an inline script in <head> adds before first paint.
 * Without scripting the content stays visible instead of being hidden forever,
 * and there is no flash of hidden content while main.js loads.
 */
.ntf-js .ntf-post-card:not(.ntf-fade-in),
.ntf-js .ntf-trending-card:not(.ntf-fade-in),
.ntf-js .ntf-widget:not(.ntf-fade-in),
.ntf-js .ntf-section-header:not(.ntf-fade-in),
.ntf-js .ntf-quick-link-card:not(.ntf-fade-in) {
    opacity: 0;
    transform: translateY(20px);
}
/*
 * Reveal with an animation rather than a transition: once it finishes nothing
 * keeps overriding transform, so the cards' hover lift still works.
 */
.ntf-js .ntf-fade-in { animation: ntf-reveal 0.6s ease; }
@keyframes ntf-reveal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

/* Reduced motion: reveal immediately and neutralise animation.
   Selectors match the .ntf-js specificity above so they actually win. */
@media (prefers-reduced-motion: reduce) {
    .ntf-js .ntf-post-card:not(.ntf-fade-in),
    .ntf-js .ntf-trending-card:not(.ntf-fade-in),
    .ntf-js .ntf-widget:not(.ntf-fade-in),
    .ntf-js .ntf-section-header:not(.ntf-fade-in),
    .ntf-js .ntf-quick-link-card:not(.ntf-fade-in) {
        opacity: 1; transform: none;
    }
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ========================================
   22. ACCESSIBILITY HELPERS
   ======================================== */
/*
 * WordPress core markup (pagination headings, comment-form notes, form labels)
 * and this theme's own labels rely on .screen-reader-text. Without it every one
 * of those strings renders as visible text.
 */
.screen-reader-text,
.ntf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    word-wrap: normal;
}
/* Reveal on focus so keyboard users can see focusable controls. */
.screen-reader-text:focus {
    display: block;
    top: var(--space-sm);
    left: var(--space-sm);
    width: auto;
    height: auto;
    padding: var(--space-sm) var(--space-md);
    margin: 0;
    clip: auto;
    clip-path: none;
    background: var(--ntf-graphite);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-raised);
    color: var(--ntf-cyan);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: normal;
    text-decoration: none;
    z-index: 100000;
}

/* Keyboard focus ring. Pointer users keep the softer component styles. */
:focus-visible { outline: 2px solid var(--ntf-cyan); outline-offset: 2px; }
.ntf-input:focus-visible { outline-offset: 0; }

/* Skip link */
.ntf-skip-link {
    position: absolute;
    top: 0;
    left: -9999px;
    z-index: 100000;
    padding: var(--space-sm) var(--space-lg);
    background: var(--ntf-graphite);
    border: 1px solid var(--ntf-cyan);
    border-radius: 0 0 var(--radius-md) 0;
    color: var(--ntf-cyan);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}
.ntf-skip-link:focus { left: 0; }

/* Anchored headings must clear the sticky header. */
.ntf-single-content h2,
.ntf-single-content h3,
.ntf-single-content h4 {
    scroll-margin-top: calc(var(--ntf-header-height) + var(--space-lg));
}

/* The "Enable Sticky Header" setting adds one of these body classes. */
.ntf-no-sticky-header .ntf-header { position: relative; }
.ntf-no-sticky-header .ntf-filter-section { position: static; }

/* ========================================
   23. TEMPLATE COMPONENTS
   ======================================== */

/* Logo (custom logo image or site title fallback) */
.ntf-logo-image { display: block; width: auto; max-height: 40px; }
.ntf-logo-text { white-space: nowrap; }

/* Search form (searchform.php) */
.ntf-search-form-row { display: flex; gap: var(--space-sm); align-items: stretch; }
.ntf-search-form-row .ntf-input { flex: 1; min-width: 0; }
.ntf-search-form-row .ntf-btn { flex-shrink: 0; }
.ntf-mobile-search { margin-top: var(--space-xl); }
/* The overlay form has no row wrapper: the field fills the dialog. */
.ntf-search-overlay .ntf-search-form { width: 100%; }

/* Table of contents links (classes are generated by main.js) */
.ntf-toc-item { border-bottom: 1px solid rgba(255,255,255,0.03); }
.ntf-toc-item:last-child { border-bottom: none; }
.ntf-toc-link { display: flex; align-items: baseline; gap: var(--space-sm); padding: var(--space-xs) 0; color: var(--ntf-silver); text-decoration: none; line-height: 1.5; }
.ntf-toc-link:hover, .ntf-toc-link.active { color: var(--ntf-cyan); }
.ntf-toc-item--h3 .ntf-toc-link { padding-left: var(--space-md); font-size: 0.95em; }
.ntf-toc-item--h4 .ntf-toc-link { padding-left: var(--space-lg); font-size: 0.9em; }
.ntf-sticky-toc-list .ntf-toc-item--h3 .ntf-toc-link { padding-left: var(--space-sm); }
.ntf-sticky-toc-list .ntf-toc-item--h4 .ntf-toc-link { padding-left: var(--space-md); }

/* Copy-link feedback */
.ntf-copied-check { color: var(--ntf-cyan); }
.ntf-share-btn.is-copied, .ntf-sticky-share-btn.is-copied { color: var(--ntf-cyan); border-color: rgba(0,229,255,0.4); background: rgba(0,229,255,0.1); }

/* Invalid form field */
.ntf-input.is-invalid { border-color: var(--ntf-red, #EF4444); box-shadow: var(--shadow-inset), 0 0 0 3px rgba(239,68,68,0.12); }

/* Sticky tab extras */
.ntf-sticky-tab-toggle-label { flex: 1; text-align: left; }
.ntf-sticky-tab-widget { margin-bottom: var(--space-md); }
.ntf-sticky-tab-widget:last-child { margin-bottom: 0; }
.ntf-sticky-tab-widget-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ntf-chrome-light); margin-bottom: var(--space-sm); }
/* Left tab position: the aside follows the article in the DOM. */
.ntf-sticky-sidebar--left { order: -1; }

/* Single / page extras */
.ntf-inline-links-title { font-size: 1rem; margin-bottom: var(--space-md); color: var(--ntf-chrome-light); }
.ntf-post-nav-next { text-align: right; }
.ntf-post-nav-item:only-child { grid-column: 1 / -1; }
.ntf-page-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin: var(--space-xl) 0; }
.ntf-page-links a, .ntf-page-links > span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 var(--space-sm); background: var(--ntf-surface-dark); border-radius: var(--radius-md); color: var(--ntf-silver); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-button); }
.ntf-page-links a:hover { background: var(--ntf-slate); color: var(--ntf-chrome-light); }
.ntf-page-links > span:first-child { background: none; box-shadow: none; min-width: 0; font-weight: 500; }

/* Page template */
.ntf-page-header { padding: var(--space-2xl) 0 var(--space-lg); text-align: center; }
.ntf-page-title { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.2; }
.ntf-page-featured-image { margin: 0 0 var(--space-xl); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-card); }
.ntf-page-featured-image img { display: block; width: 100%; height: auto; }

/* Archive description */
.ntf-archive-description { max-width: 720px; margin: var(--space-md) auto 0; color: var(--ntf-silver); line-height: 1.7; }

/* Empty state / 404 */
.ntf-empty-state { padding: var(--space-2xl); text-align: center; }
.ntf-empty-state h1, .ntf-empty-state h2 { margin-bottom: var(--space-md); }
.ntf-empty-state p { color: var(--ntf-silver); margin-bottom: var(--space-lg); }
.ntf-empty-state .ntf-search-form { max-width: 480px; margin: 0 auto; }
.ntf-404 { padding: var(--space-3xl) var(--space-xl); }
.ntf-404-code { font-family: var(--font-heading); font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 800; line-height: 1; margin-bottom: var(--space-md); color: var(--ntf-cyan); opacity: 0.7; }
.ntf-404-actions { margin: var(--space-lg) 0 0; }

/* Comments */
.ntf-comments-area { margin-top: var(--space-3xl); }
.ntf-comments-closed { color: var(--ntf-silver); font-style: italic; }
.ntf-comment-list { list-style: none; padding: 0; margin: 0 0 var(--space-xl); }
.ntf-comment-list .children { list-style: none; margin: var(--space-md) 0 0; padding-left: var(--space-lg); border-left: 1px solid rgba(255,255,255,0.06); }
.ntf-comment-list li { margin-bottom: var(--space-md); }
.ntf-comment-list .comment-body { padding: var(--space-lg); background: var(--ntf-surface-dark); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.ntf-comment-list .comment-author { display: flex; align-items: center; gap: var(--space-sm); font-weight: 600; color: var(--ntf-chrome-light); }
.ntf-comment-list .comment-author img { border-radius: 50%; border: 2px solid var(--ntf-slate); }
.ntf-comment-list .comment-author .says { display: none; }
.ntf-comment-list .comment-meta { margin-bottom: var(--space-sm); font-size: 0.8rem; }
.ntf-comment-list .comment-metadata a { color: var(--ntf-silver); text-decoration: none; }
.ntf-comment-list .comment-metadata a:hover { color: var(--ntf-cyan); }
.ntf-comment-list .comment-content { color: var(--ntf-silver); line-height: 1.7; }
.ntf-comment-list .comment-content a { color: var(--ntf-cyan); }
.ntf-comment-list .comment-awaiting-moderation { display: block; margin-bottom: var(--space-sm); color: var(--ntf-orange); font-size: 0.85rem; }
.ntf-comment-list .reply { margin-top: var(--space-sm); }
.ntf-comment-list .comment-reply-link { font-size: 0.85rem; font-weight: 600; color: var(--ntf-cyan); text-decoration: none; }
.comment-respond { padding: var(--space-xl); background: var(--ntf-surface-dark); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.comment-reply-title { font-size: 1.25rem; margin-bottom: var(--space-lg); }
.comment-reply-title small { font-size: 0.8rem; font-weight: 400; margin-left: var(--space-sm); }
.comment-form p { margin-bottom: var(--space-md); }
.comment-form label { display: block; margin-bottom: var(--space-xs); font-size: 0.85rem; font-weight: 600; color: var(--ntf-chrome-light); }
.comment-form .required { color: var(--ntf-orange); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] { width: 100%; padding: 0.75rem 1rem; font-family: var(--font-primary); font-size: 0.95rem; color: var(--ntf-chrome); background: var(--ntf-graphite-dark); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); box-shadow: var(--shadow-inset); }
.comment-form textarea { resize: vertical; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: var(--space-sm); }
.comment-form .comment-form-cookies-consent label { margin: 0; font-weight: 400; color: var(--ntf-silver); }
.comment-form .comment-notes { font-size: 0.85rem; color: var(--ntf-silver); }
.comment-form .form-submit { margin-bottom: 0; }

/* Footer secondary link list */
.ntf-footer-links-secondary { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.05); }
.ntf-footer-widget-title { font-size: 1rem; font-weight: 700; color: var(--ntf-chrome-light); margin-bottom: var(--space-md); text-transform: uppercase; letter-spacing: 0.05em; }
.ntf-footer .ntf-widget { background: none; border: none; box-shadow: none; padding: 0; margin-bottom: var(--space-lg); }

/* ========================================
   24. RESPONSIVE DESIGN
   ======================================== */

/* Large Tablet / Small Desktop */
@media (max-width: 1100px) and (min-width: 769px) {
    .ntf-nav-link { padding: 0.5rem 0.625rem; font-size: 0.82rem; }
    .ntf-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .ntf-featured-card { grid-template-columns: 1fr; }
    .ntf-featured-card-image { min-height: 280px; }
}

/* Tablet */
@media (max-width: 1024px) {
    .ntf-hero-grid { grid-template-columns: 1fr; }
    .ntf-hero-featured { display: none; }
    .ntf-archive-layout { grid-template-columns: 1fr; }
    .ntf-sidebar,
    .ntf-single-content-area .ntf-sidebar { width: 100%; position: static; }

    .ntf-sticky-sidebar { position: static; width: 100%; max-height: none; }
    /* The tab column stacks below the article once the grid collapses. */
    .ntf-sticky-sidebar--left { order: 0; }
    .ntf-single-main { max-width: 100%; }
    .ntf-single-content-area { grid-template-columns: 1fr; }
    .ntf-sticky-tab-toggle { display: flex; }
    .ntf-sticky-tab-panels { display: none; }
    .ntf-sticky-tab-panels.is-open { display: block; }

    .ntf-related-posts-grid { grid-template-columns: repeat(2, 1fr); }
    .ntf-footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
    .ntf-post-card-list-inner { flex-direction: column; }
    .ntf-post-card-list-image { width: 100%; min-height: 220px; }

    .ntf-nav { display: none; }
    .ntf-menu-toggle { display: flex; }
}

/* Mobile */
@media (max-width: 768px) {
    .ntf-grid-2, .ntf-grid-3, .ntf-grid-4 { grid-template-columns: 1fr; }
    .ntf-hero-title { font-size: clamp(1.75rem, 8vw, 2.5rem); }
    .ntf-hero-actions { flex-direction: column; }
    .ntf-hero-actions .ntf-btn { width: 100%; justify-content: center; }
    .ntf-section { padding: var(--space-2xl) 0; }
    .ntf-single-layout-inner { flex-direction: column; }
    .ntf-sticky-sidebar { margin-top: var(--space-xl); }
    .ntf-post-nav { grid-template-columns: 1fr; }
    .ntf-author-box { flex-direction: column; text-align: center; align-items: center; }
    .ntf-author-box-social { justify-content: center; }
    .ntf-related-posts-grid { grid-template-columns: 1fr; }
    .ntf-footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); text-align: center; }
    .ntf-footer-brand { max-width: 100%; }
    .ntf-footer-social { justify-content: center; }
    .ntf-footer-bottom { flex-direction: column; text-align: center; gap: var(--space-sm); }
    .ntf-quick-links-grid { grid-template-columns: repeat(2, 1fr); }
    .ntf-trending-card-link { padding: var(--space-md) var(--space-sm); }
    .ntf-trending-num { font-size: 1.8rem; min-width: 40px; }
    .ntf-trending-card-image { display: none; }
    .ntf-single-meta { flex-direction: column; gap: var(--space-sm); }
    .ntf-featured-layout { grid-template-columns: 1fr; }
    .ntf-featured-layout-grid { margin-top: var(--space-lg); }
    .ntf-header-inner { padding: var(--space-sm) var(--space-md); }
    .ntf-logo { font-size: 1.2rem; }
    .ntf-logo-icon { width: 34px; height: 34px; }
    .ntf-header-action-btn { width: 38px; height: 38px; }
    .ntf-search-overlay-inner { padding: 0 var(--space-md); }
    .ntf-search-overlay-inner .ntf-input { font-size: 1.15rem; padding: 1rem; }
    .ntf-share { flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
    .ntf-single-tags { flex-direction: column; }
    .ntf-filter-section { position: static; }
    .ntf-filter-bar { flex-wrap: wrap; justify-content: center; }
    .ntf-filter-btn { font-size: 0.8rem; padding: 0.5rem 0.75rem; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .ntf-container { padding: 0 var(--space-md); }
    .ntf-quick-links-grid { grid-template-columns: 1fr; }
    .ntf-single-header { padding: var(--space-lg) 0; }
    .ntf-single-title { font-size: 1.5rem; }
    .ntf-hero-badge { font-size: 0.78rem; }
}