/*
Theme Name: BeezLoop News
Theme URI: https://beezloop.com/
Author: BeezLoop
Author URI: https://beezloop.com/
Description: BeezLoop's editorial news theme, built on the official BeezLoop Design System (gold/ink/paper palette, Newsreader + Archivo type).
Version: 2026.08.07.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theory-news

MODERN DESIGN SYSTEM - v8.0 (2026 Edition)
==========================================

⭐ 2026 FEATURES:
- Modern CSS Container Queries for component-level responsiveness
- Fluid Typography with clamp() for perfect scaling
- Enhanced Image Placeholders with modern gradients
- Advanced Mobile-First responsive design
- Improved Dark/Light mode with better contrast
- CSS Subgrid for advanced layouts
- Modern color spaces (oklch when supported)
- Enhanced accessibility (WCAG AAA where possible)

COLOR PALETTE:

Light Mode (Default):
- Backgrounds: Pure white (#ffffff) for main content, subtle grey (#f8fafc) for sections
- Text: Very dark (#0f172a) for headings, dark grey (#1e293b) for body, medium grey (#64748b) for meta
- Borders: Light grey (#e2e8f0)
- Accent: Gold (#F5B800)

Dark Mode (Grey Shades ONLY):
- Backgrounds: Dark grey (#1a1a1a) for main, medium grey (#242424) for cards, light grey (#2d2d2d) for inputs
- Text: White (#ffffff) for headings, light grey (#e0e0e0) for body, medium grey (#b3b3b3) for meta
- Borders: Visible grey (#404040)
- Accent: Gold (#F5B800)

KEY PRINCIPLES:
1. Light mode = Dark fonts on light backgrounds
2. Dark mode = Light fonts on grey backgrounds (NO pure black #000000)
3. Consistent grey scale hierarchy in dark mode
4. All text meets WCAG AA contrast standards (4.5:1 minimum)
5. Future-proof with CSS custom properties
6. Mobile-first responsive design
7. Container queries for component responsiveness
*/

/* ===== MODERN GOOGLE FONTS IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,500&family=Archivo:wght@400;500;600;700;800&display=swap');

:root {
    /* ===== BEEZLOOP DESIGN SYSTEM — gold / ink / paper ===== */
    --gold-50: #FFF8E1; --gold-100: #FFEDB8; --gold-300: #FFD666; --gold-500: #F5B800; --gold-600: #D9A300; --gold-700: #B38200;
    --ink-900: #15130E; --ink-700: #2B2820; --ink-500: #54503F; --ink-300: #8A8471;
    --paper-50: #FAF7F0; --paper-100: #F1EBDD; --paper-200: #E4DCC8;

    --primary-color: var(--ink-900);
    --secondary-color: var(--ink-500);
    --accent-color: var(--gold-500);
    --accent-hover: var(--gold-600);
    --accent-deep: var(--gold-700);
    --accent-warm: var(--gold-300);
    --accent-warm-deep: var(--gold-600);
    --text-color: var(--ink-900);
    --text-muted: var(--ink-300);

    /* ===== TYPOGRAPHY — Newsreader (serif, headlines) + Archivo (sans, UI) ===== */
    --body-font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --header-font: 'Newsreader', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;

    /* Fluid typography, calibrated to land on the design system's static
       scale (13/15/17/20/26/34/46/64px) at desktop width. */
    --font-size-xs: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
    --font-size-sm: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
    --font-size-base: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
    --font-size-xl: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
    --font-size-2xl: clamp(1.75rem, 1.5rem + 1vw, 2.125rem);
    --font-size-3xl: clamp(2.25rem, 1.8rem + 1.8vw, 2.875rem);
    --font-size-4xl: clamp(2.75rem, 2rem + 3vw, 4rem);

    /* ===== BACKGROUNDS & SURFACES — flat, opaque, warm paper ===== */
    --white: #ffffff;
    --section-bg: var(--paper-100);
    --light-bg: var(--paper-50);
    --content-shell-bg: var(--paper-50);
    --card-bg: #ffffff;
    --border-color: var(--paper-200);
    --dark-bg: var(--ink-900);
    --body-bg-gradient: var(--paper-50);

    /* Retained for existing bias-meter/badge usage — not part of the
       brand palette, used sparingly for functional (non-brand) accents. */
    --color-sky: #0ea5e9;
    --color-emerald: #10b981;
    --color-violet: #8b5cf6;
    --color-rose: #f43f5e;

    /* ===== LAYOUT ===== */
    --container-width: 1320px;
    --container-padding: clamp(1rem, 3vw, 2rem);
    --section-gap: clamp(2rem, 5vw, 4rem);

    /* ===== TRANSITIONS — flat & confident, no bounce/spring ===== */
    --transition: all 0.2s ease-out;
    --transition-fast: all 0.15s ease-out;
    --transition-slow: all 0.3s ease-out;
    --ease-out: ease-out;
    --ease-spring: ease-out;
    --ease-smooth: ease-out;
    --ease-bounce: ease-out;

    /* ===== ELEVATION — soft, rare shadows; no blur/glow/glass ===== */
    --glass-border: 1px solid var(--paper-200);
    --box-shadow: none;
    --card-shadow: none;
    --hover-shadow: none;
    --glass-blur: none;
    --glass-blur-strong: none;
    --glow-golden: none;
    --glow-blue: none;
    --glow-purple: none;
    --frost-shadow: none;

    /* ===== BIAS INDICATORS (functional, not brand color) ===== */
    --bias-left: #4285f4;
    --bias-center: #9e9e9e;
    --bias-right: #ea4335;

    /* ===== SPACING — 4/8/12/16/24/32/48/64px scale ===== */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 4rem;

    /* ===== BORDER RADIUS — crisp & editorial, 2/6/12px scale ===== */
    --radius-sm: 2px;
    --radius-md: 6px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 999px;

    /* ===== IMAGE PLACEHOLDER COLORS ===== */
    --placeholder-bg: var(--paper-200);
    --placeholder-icon: var(--ink-300);
    --placeholder-text: var(--ink-500);
}

/* Dark Mode - System Theme Responsive */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* ===== DARK MODE — ink surface, paper text, same gold accent ===== */
        --primary-color: var(--paper-50);
        --secondary-color: var(--paper-200);
        --accent-color: var(--gold-500);
        --accent-hover: var(--gold-300);
        --accent-deep: var(--gold-600);
        --accent-warm: var(--gold-300);
        --accent-warm-deep: var(--gold-500);
        --text-color: var(--paper-100);
        --text-muted: rgba(250, 247, 240, 0.6);
        --white: var(--ink-900);
        --section-bg: var(--ink-700);
        --light-bg: var(--ink-900);
        --content-shell-bg: var(--ink-900);
        --card-bg: var(--ink-700);
        --dark-bg: var(--ink-900);
        --border-color: rgba(241, 235, 221, 0.15);
        --glass-border: 1px solid rgba(241, 235, 221, 0.15);
        --box-shadow: none;
        --card-shadow: none;
        --hover-shadow: none;
        --bias-left: #5ea3ff;
        --bias-center: #b3b3b3;
        --bias-right: #ff6b6b;
        --body-bg-gradient: var(--ink-900);

        /* Dark mode image placeholders */
        --placeholder-bg: var(--ink-700);
        --placeholder-icon: var(--paper-200);
        --placeholder-text: var(--paper-100);
    }
}

/* Manual Dark Mode Override */
[data-theme="dark"] {
    /* ===== DARK MODE — ink surface, paper text, same gold accent ===== */
    --primary-color: var(--paper-50);
    --secondary-color: var(--paper-200);
    --accent-color: var(--gold-500);
    --accent-hover: var(--gold-300);
    --accent-deep: var(--gold-600);
    --accent-warm: var(--gold-300);
    --accent-warm-deep: var(--gold-500);
    --text-color: var(--paper-100);
    --text-muted: rgba(250, 247, 240, 0.6);
    --white: var(--ink-900);
    --section-bg: var(--ink-700);
    --light-bg: var(--ink-900);
    --content-shell-bg: var(--ink-900);
    --card-bg: var(--ink-700);
    --dark-bg: var(--ink-900);
    --border-color: rgba(241, 235, 221, 0.15);
    --glass-border: 1px solid rgba(241, 235, 221, 0.15);
    --box-shadow: none;
    --card-shadow: none;
    --hover-shadow: none;
    --bias-left: #5ea3ff;
    --bias-center: #b3b3b3;
    --bias-right: #ff6b6b;
    --body-bg-gradient: var(--ink-900);

    /* Dark mode image placeholders */
    --placeholder-bg: var(--ink-700);
    --placeholder-icon: var(--paper-200);
    --placeholder-text: var(--paper-100);
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body {
        background: #1a1a1a;
        color: var(--text-color);
    }
}

[data-theme="dark"] body {
    background: #1a1a1a;
    color: var(--text-color);
}

/* Dark mode for all elements */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-header,
    :root:not([data-theme="light"]) .theory-sidebar,
    :root:not([data-theme="light"]) .post-card,
    :root:not([data-theme="light"]) .headline-item,
    :root:not([data-theme="light"]) .site-footer,
    :root:not([data-theme="light"]) .trending-bar,
    :root:not([data-theme="light"]) .main-navigation,
    :root:not([data-theme="light"]) article {
        transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    }

    /* .headline-item-vertical keeps its own transition (transform/box-shadow/border-color)
       defined further down — don't clobber it with the shorthand above. */
    :root:not([data-theme="light"]) .headline-item-vertical {
        transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
    }
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .theory-sidebar,
[data-theme="dark"] .post-card,
[data-theme="dark"] .headline-item,
[data-theme="dark"] .site-footer,
[data-theme="dark"] .trending-bar,
[data-theme="dark"] .main-navigation,
[data-theme="dark"] article {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* .headline-item-vertical keeps its own transition (transform/box-shadow/border-color)
   defined further down — don't clobber it with the shorthand above. */
[data-theme="dark"] .headline-item-vertical {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-header {
        background: #1a1a1a;
        border-bottom-color: #404040;
    }

    :root:not([data-theme="light"]) .theory-sidebar {
        background: #242424;
        border-color: #404040;
    }

    :root:not([data-theme="light"]) .theory-sidebar .widget {
        background: #2d2d2d;
        border-color: #404040;
    }

    :root:not([data-theme="light"]) .post-card,
    :root:not([data-theme="light"]) .headline-item,
    :root:not([data-theme="light"]) .headline-item-vertical {
        background: #242424;
        border-color: #404040;
    }

    :root:not([data-theme="light"]) .front-hero-card::before {
        background: rgba(26, 26, 26, 0.7);
    }

    :root:not([data-theme="light"]) .theory-sidebar .widget_search input[type="search"] {
        background: #2d2d2d;
        color: var(--text-color);
        border-color: #404040;
    }

    :root:not([data-theme="light"]) .theory-sidebar .widget_search input[type="search"]::placeholder {
        color: #999999;
    }

    :root:not([data-theme="light"]) .newsletter-form input[type="email"] {
        background: #2d2d2d;
        color: var(--text-color);
        border-color: #404040;
    }

    :root:not([data-theme="light"]) .newsletter-form input[type="email"]::placeholder {
        color: #999999;
    }

    :root:not([data-theme="light"]) .site-footer {
        background: #1a1a1a;
        border-top-color: #404040;
    }

    :root:not([data-theme="light"]) .main-navigation {
        background: #1a1a1a;
        border-color: transparent;
    }
    
    :root:not([data-theme="light"]) .trending-bar {
        background: #1a1a1a;
        border-color: #404040;
    }

    :root:not([data-theme="light"]) .trending-inner::after {
        background: none;
    }

    :root:not([data-theme="light"]) .trending-fallback {
        background: #242424;
    }

    :root:not([data-theme="light"]) .trending-pill {
        background: #2d2d2d;
        color: #ffffff;
        border: 1px solid #404040;
    }

    :root:not([data-theme="light"]) .trending-pill:hover {
        background: #404040;
        color: #ffffff;
        border-color: #505050;
    }

    :root:not([data-theme="light"]) .top-info-bar {
        background: #1a1a1a;
        color: #e0e0e0;
        border-bottom-color: #404040;
    }

    :root:not([data-theme="light"]) .date-time-info,
    :root:not([data-theme="light"]) .weather-info {
        color: #e0e0e0;
    }

    :root:not([data-theme="light"]) .date-time-info span {
        color: #b3b3b3;
    }

    :root:not([data-theme="light"]) .weather-temp {
        color: #ffffff;
    }

    :root:not([data-theme="light"]) .weather-desc {
        color: #b3b3b3;
    }

    :root:not([data-theme="light"]) .weather-location {
        color: #b3b3b3;
    }

    :root:not([data-theme="light"]) .card-title a,
    :root:not([data-theme="light"]) .entry-title,
    :root:not([data-theme="light"]) .entry-title a,
    :root:not([data-theme="light"]) .headline-title,
    :root:not([data-theme="light"]) .headline-title-vert {
        color: var(--primary-color);
    }

    :root:not([data-theme="light"]) .post-card-excerpt,
    :root:not([data-theme="light"]) .entry-meta,
    :root:not([data-theme="light"]) .headline-date,
    :root:not([data-theme="light"]) .headline-date-vert {
        color: var(--secondary-color);
    }

    :root:not([data-theme="light"]) article {
        background: #242424;
        border-color: #404040;
    }
}

[data-theme="dark"] .site-header {
    background: var(--ink-900);
    border-bottom-color: rgba(64, 64, 64, 0.5);
    box-shadow: none;
}

[data-theme="dark"] .theory-sidebar {
    background: var(--ink-700);
    border-color: rgba(64, 64, 64, 0.5);
    box-shadow: none;
}

[data-theme="dark"] .theory-sidebar .widget {
    background: var(--ink-700);
    border-color: rgba(64, 64, 64, 0.5);
    box-shadow: none;
}

[data-theme="dark"] .theory-sidebar .widget:hover {
    box-shadow: none;
    border-color: rgba(245, 184, 0, 0.3);
}

[data-theme="dark"] .headline-item,
[data-theme="dark"] .headline-item-vertical {
    background: var(--ink-700);
    border-color: rgba(64, 64, 64, 0.5);
    color: #ffffff;
    box-shadow: none;
}

[data-theme="dark"] .headline-item:hover,
[data-theme="dark"] .headline-item-vertical:hover {
    box-shadow: none;
    border-color: rgba(245, 184, 0, 0.4);
}

[data-theme="dark"] .post-card .card-title,
[data-theme="dark"] .post-card .card-title a {
    color: #ffffff;
}

[data-theme="dark"] .post-card .post-card-excerpt,
[data-theme="dark"] .post-card-excerpt {
    color: #b3b3b3;
}

[data-theme="dark"] .post-card .author-name {
    color: #b3b3b3;
}

[data-theme="dark"] .post-card .read-more {
    color: #F5B800;
    border-color: #F5B800;
}

[data-theme="dark"] .post-card .read-more:hover {
    background: #F5B800 !important;
    color: #ffffff !important;
    border-color: #F5B800;
}

[data-theme="dark"] .front-hero-card::before {
    background: #1a1a1a;
}

[data-theme="dark"] .theory-sidebar .widget_search input[type="search"] {
    background: #1a1a1a;
    color: var(--text-color);
    border-color: #404040;
}

[data-theme="dark"] .theory-sidebar .widget_search input[type="search"]::placeholder {
    color: #999999;
}

[data-theme="dark"] .newsletter-form input[type="email"] {
    background: #1a1a1a;
    color: var(--text-color);
    border-color: #404040;
}

[data-theme="dark"] .newsletter-form input[type="email"]::placeholder {
    color: #999999;
}

[data-theme="dark"] .site-footer {
    background: var(--ink-900);
    border-top-color: rgba(64, 64, 64, 0.5);
    box-shadow: none;
}

[data-theme="dark"] .main-navigation {
    background: #1a1a1a;
    border-color: transparent;
}

[data-theme="dark"] .trending-bar {
    background: var(--ink-900);
    border-color: rgba(64, 64, 64, 0.5);
    box-shadow: none;
}

[data-theme="dark"] .trending-inner::after {
    background: none;
}

[data-theme="dark"] .trending-fallback {
    background: #1a1a1a;
}

[data-theme="dark"] .top-info-bar {
    background: #1a1a1a;
    color: #ffffff;
    border-bottom-color: #404040;
}

[data-theme="dark"] .date-time-info,
[data-theme="dark"] .weather-info {
    color: #ffffff;
}

[data-theme="dark"] .date-time-info span {
    color: #ffffff;
}

[data-theme="dark"] .weather-temp {
    color: #ffffff;
}

[data-theme="dark"] .weather-desc {
    color: #b3b3b3;
}

[data-theme="dark"] .weather-location {
    color: #ffffff;
}

[data-theme="dark"] .trending-pill {
    background: #1a1a1a;
    color: #ffffff;
}

[data-theme="dark"] .trending-pill:hover {
    background: var(--accent-color);
    color: #ffffff;
}

[data-theme="dark"] .card-title a,
[data-theme="dark"] .entry-title,
[data-theme="dark"] .entry-title a,
[data-theme="dark"] .headline-title,
[data-theme="dark"] .headline-title-vert {
    color: var(--primary-color);
}

[data-theme="dark"] .post-card-excerpt,
[data-theme="dark"] .entry-meta,
[data-theme="dark"] .headline-date,
[data-theme="dark"] .headline-date-vert {
    color: var(--secondary-color);
}

[data-theme="dark"] article {
    background: #1a1a1a;
    border-color: #404040;
}

/* Dark Mode Toggle Button — hidden, kept in DOM for JS event handling */
.theme-toggle {
    display: none !important;
    position: fixed;
    bottom: 20px;
    right: 90px;
    left: auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    border: 2px solid rgba(15, 23, 42, 0.1);
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: var(--transition);
    z-index: 9998;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    .theme-toggle {
        bottom: 90px;
        right: 86px;
        left: auto;
        width: 52px;
        height: 52px;
        z-index: 9998;
        display: flex !important;
        opacity: 1 !important;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        width: 48px;
        height: 48px;
        bottom: 90px;
        right: 82px;
        left: auto;
        display: flex !important;
    }
}

.theme-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.9);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: none;
}

.theme-toggle:active {
    transition: var(--transition-fast);
}

.theme-toggle svg {
    width: 26px;
    height: 26px;
    transition: transform 0.4s var(--ease-out);
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle {
    background: rgba(36, 36, 36, 0.95);
    color: #F5B800;
    border-color: rgba(245, 184, 0, 0.3);
    box-shadow: none;
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(36, 36, 36, 1);
    box-shadow: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

*, *::before, *::after { box-sizing: border-box; }

html { 
    scroll-behavior: smooth; 
    background-color: var(--light-bg);
    /* Ultra-smooth scrolling with momentum */
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    padding-top: 32px;
    transition: padding-top 0.3s ease;
    font-family: var(--body-font);
    color: var(--text-color);
    background: var(--body-bg-gradient, var(--white));
    /* Soft ambient color wash echoing the accent + warm decorative colors */
    background-image:
        radial-gradient(at 0% 0%, rgba(245, 184, 0, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(201, 137, 95, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 184, 0, 0.04) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(201, 137, 95, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
    line-height: 1.8;
    font-size: 18px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    
    /* Modern 2026: Better touch scrolling */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    
    /* Prevent text size adjustment on mobile */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    
}

/* Dark mode gradient background */
[data-theme="dark"] body {
    background: #1a1a1a;
    background-image: 
        radial-gradient(at 0% 0%, rgba(245, 184, 0, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
}

body.topbar-hidden {
    padding-top: 0;
}

img { 
    max-width: 100%; 
    height: auto; 
    display: block;
    /* Modern image enhancements */
    border-radius: 0;
    transition: var(--transition);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Hover effect for images */
img:hover {
    box-shadow: none;
}

/* Image loading optimization */
img[loading="lazy"] {
    opacity: 0;
    animation: fadeInImage 0.6s var(--ease-out) forwards;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Better image aspect ratios */
.post-card-thumb img,
.post-thumbnail img {
    object-fit: cover;
    width: 100%;
    aspect-ratio: 16/9;
}

/* Premium image overlays */
.post-card-thumb,
.post-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.post-card-thumb::after,
.post-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.post-card:hover .post-card-thumb::after,
.post-thumbnail:hover::after {
    opacity: 1;
}

/* ==========================================
   VINTAGE FILM-GRAIN / SCRATCH IMAGE OVERLAY
   Procedural noise (SVG feTurbulence) + faint
   diagonal scratch lines — original, code-
   generated texture, no stock imagery.
   ========================================== */
:root {
    --grain-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --scratch-texture:
        repeating-linear-gradient(
            115deg,
            rgba(255, 255, 255, 0.06) 0px,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent 55px
        ),
        repeating-linear-gradient(
            72deg,
            rgba(255, 255, 255, 0.04) 0px,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px,
            transparent 90px
        );
}

.post-card-thumb::before,
.post-thumbnail::before,
.headline-thumb::before,
.headline-thumb-vert::before,
.front-hero-card::after,
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--scratch-texture), var(--grain-texture);
    background-size: auto, 140px 140px;
    mix-blend-mode: overlay;
    opacity: 0.5;
    pointer-events: none;
}

.headline-thumb-vert {
    position: relative;
}

/* ==========================================
   IMAGE PLACEHOLDERS (2026 Modern Style)
   ========================================== */

/* Base placeholder styles for missing images */
.placeholder-image,
img:not([src]),
img[src=""],
img[src*="placeholder"] {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--placeholder-bg);
    border: 2px dashed var(--border-color);
    border-radius: 0;
    min-height: 200px;
    width: 100%;
    overflow: hidden;
}

/* Icon for placeholders */
.placeholder-image::before,
img:not([src])::before,
img[src=""]::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
    position: absolute;
}

/* Text label for placeholders */
.placeholder-image::after,
img:not([src])::after,
img[src=""]::after {
    content: 'Image';
    position: absolute;
    bottom: 12px;
    font-size: var(--font-size-sm);
    color: var(--placeholder-text);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Specific placeholder for thumbnails */
.post-card-thumb img:not([src]),
.post-card-thumb img[src=""],
.post-thumbnail img:not([src]),
.post-thumbnail img[src=""] {
    min-height: 200px;
    background: var(--placeholder-bg);
}

/* Hero/Featured image placeholders */
.front-hero-card:not([style*="background-image"]),
.hero-placeholder {
    background: var(--placeholder-bg) !important;
    position: relative;
    min-height: 400px;
}

.front-hero-card:not([style*="background-image"])::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 1;
}

/* Animate placeholder on load */
@keyframes placeholder-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.placeholder-image,
img:not([src]),
img[src=""] {
    animation: placeholder-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Dark mode placeholder adjustments */
[data-theme="dark"] .placeholder-image::before,
[data-theme="dark"] img:not([src])::before,
[data-theme="dark"] img[src=""]::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23404040" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>');
}

/* Skeleton loading effect for images */
.skeleton-image {
    background: linear-gradient(
        90deg,
        var(--light-bg) 0%,
        var(--card-bg) 50%,
        var(--light-bg) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive placeholder heights */
@media (max-width: 768px) {
    .placeholder-image,
    img:not([src]),
    img[src=""] {
        min-height: 160px;
    }
    
    .placeholder-image::before,
    img:not([src])::before,
    img[src=""]::before {
        width: 48px;
        height: 48px;
    }
    
    .front-hero-card:not([style*="background-image"]) {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .placeholder-image,
    img:not([src]),
    img[src=""] {
        min-height: 140px;
    }
    
    .front-hero-card:not([style*="background-image"]) {
        min-height: 250px;
    }
}

/* End of Image Placeholders */
/* ========================================== */

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

a:hover { color: #D9A300; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Middle content column gets a visibly darker surface so it reads as
   distinct from the page background showing through on either side. */
#content {
    max-width: var(--container-width);
    margin: 0 auto;
    background: var(--content-shell-bg);
}

/* ==========================================
   2026 MOBILE-FIRST RESPONSIVE TYPOGRAPHY
   Enhanced for Maximum Readability
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--header-font);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75em;
    /* Smooth text rendering */
    text-rendering: optimizeLegibility;
    /* Modern text effects */
    transition: color var(--transition);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1.15;
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

h6 {
    font-size: var(--font-size-base);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Enhanced paragraph styling */
p {
    margin: 0 0 1em;
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text-color);
    font-weight: 400;
}

/* Better link styling */
a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition);
    position: relative;
}

a:hover {
    color: #D9A300;
}

/* Animated underline for text links */
p a,
.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(245, 184, 0, 0.4);
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    transition: all var(--transition);
}

p a:hover,
.entry-content a:hover {
    color: #D9A300;
    text-decoration-color: #D9A300;
    text-underline-offset: 6px;
}

/* Enhanced list styling */
ul, ol {
    margin: 0 0 1.5em;
    padding-left: 2em;
    line-height: 1.8;
}

li {
    margin-bottom: 0.5em;
    font-size: var(--font-size-base);
}

/* Blockquote styling */
blockquote {
    margin: 2em 0;
    padding: 1.5em 2em;
    border-left: 4px solid var(--accent-color);
    background: var(--light-bg);
    border-radius: 0;
    font-size: var(--font-size-lg);
    font-style: italic;
    color: var(--secondary-color);
    box-shadow: none;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Code styling */
code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
    border-radius: 0;
}

code {
    padding: 0.2em 0.4em;
    background: var(--light-bg);
    color: var(--gold-700);
    font-weight: 500;
}

pre {
    padding: 1.5em;
    background: var(--primary-color);
    color: #ffffff;
    overflow-x: auto;
    margin: 1.5em 0;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ==========================================
   ULTRA-MODERN BUTTON SYSTEM (2026)
   Premium Animations & Interactions
   ========================================== */

/* Base button styles */
button,
.btn,
.button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.wp-block-button__link,
.read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 32px;
    font-family: var(--body-font);
    font-size: var(--font-size-base);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-color) 0%, #D9A300 100%);
    color: #ffffff;
    box-shadow: none;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
    will-change: transform, box-shadow;
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
}

/* Shine effect overlay */
button::before,
.btn::before,
.button::before,
input[type="submit"]::before,
.read-more::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.6s var(--ease-out);
}

/* Hover state */
button:not(.nav-action-btn):not(.mobile-nav-chat-btn):not(.mobile-nav-theme-btn):not(.menu-toggle):hover,
.btn:hover,
.button:hover,
input[type="submit"]:hover,
.read-more:hover {
    transform: translateY(-3px);
    box-shadow: none;
    background: linear-gradient(135deg, #FFD666 0%, #F5B800 100%);
}

button:not(.nav-action-btn):not(.mobile-nav-chat-btn):not(.mobile-nav-theme-btn):not(.menu-toggle):hover::before,
.btn:hover::before,
.button:hover::before,
input[type="submit"]:hover::before,
.read-more:hover::before {
    transform: translateX(100%) skewX(-15deg);
}

/* Active/pressed state */
button:not(.nav-action-btn):not(.mobile-nav-chat-btn):not(.mobile-nav-theme-btn):not(.menu-toggle):active,
.btn:active,
.button:active,
input[type="submit"]:active,
.read-more:active {
    transform: translateY(-1px);
    box-shadow: none;
    transition-duration: 0.1s;
}

/* Focus state */
button:focus,
.btn:focus,
.button:focus,
input[type="submit"]:focus,
.read-more:focus {
    outline: none;
    box-shadow: none;
}

/* Disabled state */
button:disabled,
.btn:disabled,
.button:disabled,
input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary button variant */
.btn-secondary,
.button-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    box-shadow: none;
}

.btn-secondary:hover,
.button-secondary:hover {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

/* Outline button variant */
.btn-outline,
.button-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    box-shadow: none;
}

.btn-outline:hover,
.button-outline:hover {
    background: var(--light-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Ghost button variant */
.btn-ghost,
.button-ghost {
    background: transparent;
    color: var(--primary-color);
    border: none;
    box-shadow: none;
    padding: 12px 24px;
}

.btn-ghost:hover,
.button-ghost:hover {
    background: rgba(245, 184, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: none;
}

/* Button sizes */
.btn-sm,
.button-sm {
    padding: 10px 20px;
    font-size: var(--font-size-sm);
}

.btn-lg,
.button-lg {
    padding: 18px 40px;
    font-size: var(--font-size-lg);
}

.btn-xl,
.button-xl {
    padding: 22px 48px;
    font-size: var(--font-size-xl);
}

/* Icon buttons */
.btn-icon,
.button-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

.btn-icon svg,
.button-icon svg {
    width: 24px;
    height: 24px;
}

/* Button group */
.btn-group,
.button-group {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Loading state */
.btn-loading,
.button-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-loading::after,
.button-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ripple effect on click */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

button.ripple::after,
.btn.ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.5);
    animation: ripple 0.6s ease-out;
}

/* Pulse animation for CTA buttons */
@keyframes pulse {
    0%, 100% {
        box-shadow: none;
    }
    50% {
        box-shadow: none;
    }
}

.btn-pulse,
.button-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Dark mode button styles */
[data-theme="dark"] button:not(.nav-action-btn):not(.mobile-nav-chat-btn):not(.mobile-nav-theme-btn):not(.menu-toggle),
[data-theme="dark"] .btn,
[data-theme="dark"] .button,
[data-theme="dark"] input[type="submit"],
[data-theme="dark"] .read-more {
    background: linear-gradient(135deg, var(--accent-color) 0%, #D9A300 100%);
    color: #ffffff;
    box-shadow: none;
}

[data-theme="dark"] button:not(.nav-action-btn):not(.mobile-nav-chat-btn):not(.mobile-nav-theme-btn):not(.menu-toggle):hover,
[data-theme="dark"] .btn:hover,
[data-theme="dark"] .button:hover,
[data-theme="dark"] input[type="submit"]:hover,
[data-theme="dark"] .read-more:hover {
    box-shadow: none;
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .button-secondary {
    background: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

[data-theme="dark"] .btn-outline,
[data-theme="dark"] .button-outline {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .button-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ==========================================
   MODERN FORM INPUTS (2026)
   ========================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--body-font);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--text-color);
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 0;
    outline: none;
    transition: all var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-color);
    box-shadow: none;
    transform: translateY(-2px);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Dark mode form inputs */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #999999;
}

/* ==========================================
   SMOOTH SCROLLING & ANIMATIONS (2026)
   Ultra-Premium Motion Design
   ========================================== */

/* Smooth scroll snap for sections */
.scroll-snap-container {
    scroll-snap-type: y proximity;
    scroll-padding-top: 100px;
}

.scroll-snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* Parallax scroll effect base */
.parallax-section {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.parallax-layer {
    transform: translateZ(0);
    will-change: transform;
}

/* Fade-in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation utility classes */
.animate-fade-in {
    animation: fadeIn 0.8s var(--ease-out) forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s var(--ease-out) forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s var(--ease-out) forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s var(--ease-out) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s var(--ease-spring) forwards;
}

/* Stagger animation delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Hover lift effect for cards */
.hover-lift {
    transition: transform 0.4s var(--ease-out),
                box-shadow 0.4s var(--ease-out);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: none;
}

/* .hover-glow removed — a blurred rainbow glow effect (never actually
   applied to any element in the templates) that directly contradicted the
   brand system's "no blur/glow, flat surfaces only" rule. */

/* Smooth entrance for page load */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageEnter 0.6s var(--ease-out);
}

/* Skeleton loader */
@keyframes skeletonWave {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--light-bg) 0%,
        rgba(226, 232, 240, 0.5) 50%,
        var(--light-bg) 100%
    );
    background-size: 200% 100%;
    animation: skeletonWave 1.5s ease-in-out infinite;
    border-radius: 0;
}

/* Micro-interactions for better UX */
.interactive {
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
}

.interactive:hover {
    opacity: 0.85;
}

.interactive:active {
    opacity: 0.7;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Rotate animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 20s linear infinite;
}

/* Gradient shift animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Smooth focus indicators */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 0;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================
   ENHANCED CARD ANIMATIONS
   ========================================== */

.post-card,
.headline-item,
.headline-item-vertical {
    /* Smooth entrance */
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

/* Stagger card animations */
.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }

.headline-item:nth-child(1) { animation-delay: 0.05s; }
.headline-item:nth-child(2) { animation-delay: 0.1s; }
.headline-item:nth-child(3) { animation-delay: 0.15s; }
.headline-item:nth-child(4) { animation-delay: 0.2s; }
.headline-item:nth-child(5) { animation-delay: 0.25s; }
.headline-item:nth-child(6) { animation-delay: 0.3s; }

/* ==========================================
   SCROLL-BASED ANIMATIONS
   ========================================== */

/* Fade in as elements enter viewport */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out),
                transform 0.8s var(--ease-out);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-600));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Optimized for readability on all devices */
@media (max-width: 768px) {
    body {
        line-height: 1.65;
    }
    
    p {
        line-height: 1.6;
    }
}

.section-heading {
    font-size: 1.35rem;
    text-align: left;
    color: var(--primary-color);
    margin: 28px 0;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

[data-theme="dark"] .section-heading {
    color: var(--primary-color);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* Top info strip */
.top-info-bar {
    background: #f8fbff;
    color: #1f2937;
    font-size: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.top-info-bar.hidden {
    transform: translateY(-100%);
}

.top-info-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(245, 184, 0, 0) 0%, rgba(245, 184, 0, 0.4) 50%, rgba(245, 184, 0, 0) 100%);
    opacity: 0.6;
}

.top-info-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.top-info-inner {
    display: flex;
    width: 100%;
    max-width: var(--container-width);
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 6px 0;
}

.date-time-info,
.weather-info {
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    color: #1f2937;
}

.date-time-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #374151;
}

.current-time {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.weather-info {
    color: #374151;
}

.weather-temp {
    font-size: 1.125rem;
    color: #1f2937;
    font-weight: 700;
}

.weather-desc {
    text-transform: capitalize;
    color: #4b5563;
}

.weather-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #F5B800;
    font-weight: 600;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem !important;
    }

    img, video, iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Hide top info bar on mobile */
    .top-info-bar {
        display: none !important;
    }

    /* Adjust body padding since topbar is hidden */
    body {
        padding-top: 0 !important;
    }

    .site-header {
        top: 0 !important;
    }

    /* MOBILE GLASSMORPHISM OPTIMIZATION - Reduce blur for better performance */
    .site-header,
    .site-footer,
    .trending-bar,
    .post-card,
    .headline-item,
    .headline-item-vertical,
    .theory-sidebar,
    .theory-sidebar .widget {
    }

    /* Ensure touch targets are at least 44x44px */
    .menu-toggle,
    .hero-cta,
    button,
    a.read-more,
    .read-more-btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* Optimize card shadows on mobile */
    .post-card {
        box-shadow: none !important;
    }

    .post-card:hover {
        box-shadow: none !important;
    }

    /* Dark mode mobile optimizations */
    [data-theme="dark"] .site-header,
    [data-theme="dark"] .site-footer,
    [data-theme="dark"] .trending-bar,
    [data-theme="dark"] .post-card,
    [data-theme="dark"] .headline-item,
    [data-theme="dark"] .headline-item-vertical,
    [data-theme="dark"] .theory-sidebar,
    [data-theme="dark"] .theory-sidebar .widget {
    }
}

/* Header & Navigation */
.site-header {
    background: #ffffff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none;
    transition: var(--transition);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1.5rem;
    overflow: visible;
}

.site-title {
    font-family: var(--header-font);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--primary-color);
    transition: var(--transition);
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo {
    max-width: 200px;
    height: auto;
    display: block;
}

/* The new BeezLoop lockup is a wide horizontal wordmark (~4.4:1), much
   wider per pixel of width than the old square-ish mark this 200px value
   was originally tuned for — on a 320-375px phone that leaves very little
   room next to the hamburger + theme-toggle icons without this. */
@media (max-width: 480px) {
    .custom-logo {
        max-width: 130px;
    }
}

@media (min-width: 481px) and (max-width: 900px) {
    .custom-logo {
        max-width: 160px;
    }
}

/* Logo switching for light/dark mode */
.logo-dark {
    display: none;
}

.logo-light {
    display: block;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

[data-theme="dark"] .logo-light {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .logo-dark {
        display: block;
    }
    
    :root:not([data-theme="light"]) .logo-light {
        display: none;
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    border-radius: 0;
    padding: 8px;
    cursor: pointer;
    transition: transform 0.3s var(--ease-out);
    box-shadow: none;
    position: relative;
    will-change: transform;
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
.menu-toggle:hover {
    opacity: 0.8;
}

.menu-toggle .menu-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0;
    background: #2a2a2a;
    transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
    border-radius: 0;
}
.menu-toggle[aria-expanded="true"] {
    opacity: 0.8;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

.main-navigation {
    margin-left: auto;
    display: flex;
    align-items: center; /* vertically center nav links with site title/logo */
    transition: max-height 0.35s var(--ease-out), opacity 0.25s ease, transform 0.35s var(--ease-out);
}

.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2.5rem;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.5rem 0;
    transition: var(--transition);
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.main-navigation a:hover {
    color: #0f172a;
}

.main-navigation a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.main-navigation li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.main-navigation li:hover::after {
    width: 100%;
}

/* ==========================================
   HEADER NAV ACTION BUTTONS (Chat + Theme)
   ========================================== */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: 2.5rem;
    flex-shrink: 0;
}

.nav-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0;
    border: none;
    background: none;
    box-shadow: none;
    outline: none;
    color: var(--secondary-color);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.nav-action-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-action-btn:hover,
.nav-action-btn:focus,
.nav-action-btn:focus-visible,
.nav-action-btn:active {
    color: #F5B800 !important;
    background: none !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.nav-action-btn:hover::before,
.nav-action-btn::before {
    display: none !important;
}

.nav-action-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-action-btn svg {
    flex-shrink: 0;
}

/* Icon-only: hide the text label on Chat and Theme nav buttons */
.nav-chat-btn span,
.nav-theme-btn span {
    display: none;
}

/* Sun icon shows in dark mode; moon icon shows in light mode */
.nav-sun-icon { display: none; }
.nav-moon-icon { display: block; }

[data-theme="dark"] .nav-sun-icon { display: block; }
[data-theme="dark"] .nav-moon-icon { display: none; }

[data-theme="dark"] .nav-action-btn {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .nav-action-btn:hover,
[data-theme="dark"] .nav-action-btn:focus,
[data-theme="dark"] .nav-action-btn:active {
    color: #F5B800;
    background: none;
    box-shadow: none;
}

/* nav-actions (Chat + Theme toggle) stay visible on mobile too — the mobile
   bottom nav is off by default, so the header icons are the only guaranteed
   way to reach these controls on small screens. */
@media (max-width: 768px) {
    .nav-actions {
        gap: 0.5rem;
        margin-left: 0.5rem;
    }

    /* Comfortable 44px+ tap targets for the header icon buttons — the
       icon itself is small, but the tappable area needs to be bigger. */
    .nav-action-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem;
        justify-content: center;
    }

    .nav-action-btn:active {
        color: #F5B800;
    }
}

body.menu-open {
    overflow: hidden;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    
    
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-out);
    z-index: 999;
}

body.menu-open::after {
    opacity: 1;
    pointer-events: auto;
}

/* Top Stories / Headlines Section */
.theory-news-headlines {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 3rem;
}

.headline-card {
    background: var(--white);
    border: 1px solid var(--section-bg);
    border-radius: 0;
    padding: 16px;
    box-shadow: none;
    transition: all 0.4s ease-out;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.headline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F5B800 0%, #D9A300 50%, #F5B800 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.headline-card:hover::before {
    opacity: 1;
}

.headline-card:hover {
    box-shadow: none;
    transform: translateY(-4px);
    border-color: rgba(245, 184, 0, 0.3);
}

.headline-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.headline-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.headline-title a:hover {
    color: #D9A300;
}

[data-theme="dark"] .headline-title a:hover {
    color: #f1f5f9;
}

.headline-desc {
    font-size: 1.05rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.headline-meta {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-top: auto;
}

/* Main Content Styles */
.site-main {
    padding: 0rem 0;
}

.entry-header {
    text-align: left;
    margin-bottom: 4rem;
    max-width: 800px;
}

/* Shared page hero (About / Contact / Advertise / etc — see
   theory_news_render_page_hero()). Gives standalone pages consistent top
   spacing, with or without a featured image. */
.page-hero {
    text-align: center;
    margin: 0 0 3rem;
}

.page-hero-plain {
    padding: 4rem 1.5rem 2.5rem;
    background: var(--light-bg);
    border-radius: 0;
}

.page-hero-image {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 6rem 1.5rem 3rem;
    overflow: hidden;
}

.page-hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.65) 100%);
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.page-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
    color: inherit;
}

.page-hero-plain .page-hero-title {
    color: var(--primary-color);
}

.page-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    margin: 0;
}

.page-entry-content {
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .page-hero-plain {
        padding: 2.5rem 1.25rem 2rem;
    }

    .page-hero-image {
        min-height: 220px;
        padding: 4rem 1.25rem 2rem;
    }
}

.entry-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    transition: var(--transition);
}

.entry-title:hover,
.entry-title a:hover {
    color: #D9A300;
}

[data-theme="dark"] .entry-title:hover,
[data-theme="dark"] .entry-title a:hover {
    color: #f1f5f9;
}

.entry-meta {
    color: #64748b;
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.post-thumbnail {
    margin: -3rem -3rem 3rem;
    overflow: hidden;
    border-radius: 0;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.post-thumbnail:hover img {
    opacity: 0.92;
}

.post-thumbnail.post-video video {
    width: 100%;
    height: auto;
    display: block;
}

.animate-init {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    will-change: opacity, transform;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Breadcrumbs — the current-page crumb (usually the full article title)
   shrinks and truncates with an ellipsis instead of wrapping or
   overflowing, which is what made these look too long on mobile; the
   Home/category crumbs stay fixed-width since they're always short. */
.theory-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0 0 1rem;
    overflow: hidden;
}

.theory-breadcrumbs a {
    color: var(--secondary-color);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.theory-breadcrumbs a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.theory-breadcrumbs .sep {
    margin: 0 0.4em;
    opacity: 0.5;
    flex-shrink: 0;
}

.theory-breadcrumbs [aria-current="page"] {
    color: var(--primary-color);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

[data-theme="dark"] .theory-breadcrumbs a,
[data-theme="dark"] .theory-breadcrumbs .sep {
    color: #94a3b8;
}

[data-theme="dark"] .theory-breadcrumbs [aria-current="page"] {
    color: #e2e8f0;
}

@media (max-width: 768px) {
    .theory-breadcrumbs {
        font-size: 0.8rem;
        margin: 0.75rem 0 0.75rem;
    }
}

:is(.single-post, .single-theory_article) .post-thumbnail {
    margin: 0 0 2.5rem;
    border-radius: 0;
    box-shadow: none;
}
:is(.single-post, .single-theory_article) .post-thumbnail img,
:is(.single-post, .single-theory_article) .post-thumbnail video {
    border-radius: 0;
}
:is(.single-post, .single-theory_article) .entry-header {
    max-width: 780px;
    margin: 0 0 1.8rem;
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: left;
}
:is(.single-post, .single-theory_article) .entry-title {
    font-size: clamp(2rem, 2.6vw + 1rem, 2.8rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}
:is(.single-post, .single-theory_article) .entry-title a {
    color: inherit;
    text-decoration: none;
}
:is(.single-post, .single-theory_article) .entry-title a:hover {
    color: #D9A300;
}
:is(.single-post, .single-theory_article) .entry-meta {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1.4rem;
}

/* Article content blends directly with the page background instead of
   sitting in its own white card. */
:is(.single-post, .single-theory_article) article {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

:is(.single-post, .single-theory_article) .entry-content {
    padding-left: 2rem;
    padding-right: 2rem;
    line-height: 1.8;
    font-size: 1.4rem;
}

:is(.single-post, .single-theory_article) .entry-content p {
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    font-size: 1.4rem;
    font-weight: 450;
}
:is(.single-post, .single-theory_article) .entry-content h2,
:is(.single-post, .single-theory_article) .entry-content h3,
:is(.single-post, .single-theory_article) .entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    font-weight: 700;
}

:is(.single-post, .single-theory_article) .entry-title {
    color: #0f172a;
    font-weight: 800;
}

:is(.single-post, .single-theory_article) .entry-footer {
    padding-left: 2rem;
    padding-right: 2rem;
}
:is(.single-post, .single-theory_article) .entry-content img,
:is(.single-post, .single-theory_article) .entry-content figure img {
    border-radius: 0;
    box-shadow: none;
    margin: 2rem auto;
    display: block;
    max-width: 100%;
    height: auto;
}
:is(.single-post, .single-theory_article) .entry-content figure {
    margin: 2rem auto;
    display: block;
    max-width: 100%;
}
:is(.single-post, .single-theory_article) .entry-content figure figcaption {
    font-size: 1.05rem;
    color: var(--secondary-color);
    margin-top: 0.6rem;
    text-align: center;
}

/* Archive & Category Page Styles */
.archive-header {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(245, 184, 0, 0.2);
}

.archive-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.archive-description {
    font-size: 1.25rem;
    color: #334155;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 450;
}

.archive-description p {
    margin: 0;
}

.no-posts-found {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 0;
    box-shadow: none;
}

.no-posts-found h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.no-posts-found p {
    color: var(--secondary-color);
    font-size: 1.25rem;
}

/* Pagination Styles */
.pagination-wrapper {
    margin: 3rem 0 2rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.view-all-wrapper {
    display: flex;
    justify-content: center;
    margin: 2rem 0 0.5rem;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 0;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: var(--transition);
}

.view-all-btn:hover {
    background: var(--accent-color);
    color: #ffffff;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1.5px solid rgba(148, 163, 184, 0.2);
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease-out;
    box-shadow: none;
}

.page-numbers:hover {
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.15), rgba(255, 183, 0, 0.15));
    border-color: #F5B800;
    color: #F5B800;
    transform: translateY(-2px);
    box-shadow: none;
}

.page-numbers.current {
    background: linear-gradient(135deg, #F5B800 0%, #D9A300 100%);
    color: #ffffff;
    border-color: #F5B800;
    font-weight: 700;
    box-shadow: none;
}

.page-numbers.dots {
    border: none;
    background: transparent;
    box-shadow: none;
    cursor: default;
    color: var(--secondary-color);
}

.page-numbers.dots:hover {
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
}

.page-numbers.prev,
.page-numbers.next {
    padding: 0 16px;
    font-weight: 600;
}

/* Dark mode pagination */
[data-theme="dark"] .pagination-wrapper {
    border-top-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .page-numbers {
    background: #242424;
    border-color: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

[data-theme="dark"] .page-numbers:hover {
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.2), rgba(255, 183, 0, 0.2));
    border-color: #F5B800;
    color: #F5B800;
}

[data-theme="dark"] .page-numbers.current {
    background: linear-gradient(135deg, #F5B800 0%, #D9A300 100%);
    color: #ffffff;
}

[data-theme="dark"] .page-numbers.dots {
    color: #94a3b8;
}

/* Dark mode archive styles */
[data-theme="dark"] .archive-header {
    border-bottom-color: rgba(245, 184, 0, 0.3);
}

[data-theme="dark"] .archive-title {
    color: #f1f5f9;
}

[data-theme="dark"] .archive-description {
    color: #cbd5e1;
}

[data-theme="dark"] .no-posts-found {
    background: rgba(26, 26, 26, 0.75);
    
    
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

[data-theme="dark"] .no-posts-found h2 {
    color: #f1f5f9;
}

[data-theme="dark"] .no-posts-found p {
    color: #cbd5e1;
}

/* Dark mode article content styling */
[data-theme="dark"] :is(.single-post, .single-theory_article) article {
    background: transparent;
    border: none;
    box-shadow: none;
}

[data-theme="dark"] :is(.single-post, .single-theory_article) .entry-title {
    color: #f8fafc;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] :is(.single-post, .single-theory_article) .entry-content p {
    color: #e2e8f0;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] :is(.single-post, .single-theory_article) .entry-content h2,
[data-theme="dark"] :is(.single-post, .single-theory_article) .entry-content h3,
[data-theme="dark"] :is(.single-post, .single-theory_article) .entry-content h4 {
    color: #f1f5f9;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] :is(.single-post, .single-theory_article) .entry-meta {
    color: #cbd5e1;
}

/* Search Box Styling */
.search-form {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-form input[type="search"],
.search-form .search-field {
    width: 100%;
    padding: 12px 20px;
    padding-right: 120px;
    font-size: 16px;
    background: var(--white);
    border: var(--glass-border);
    border-radius: 0;
    outline: none;
    transition: var(--transition);
    
    
    box-shadow: none;
}

.search-form input[type="search"]:focus,
.search-form .search-field:focus {
    box-shadow: none;
}

.search-form button[type="submit"],
.search-form .search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: #D9A300;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 0;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-form button[type="submit"]:hover,
.search-form .search-submit:hover {
    background: #D9A300;
    transform: translateY(-50%);
    box-shadow: none;
}

[data-theme="dark"] .search-form button[type="submit"],
[data-theme="dark"] .search-form .search-submit {
    background: #F5B800;
    color: #ffffff;
}

[data-theme="dark"] .search-form button[type="submit"]:hover,
[data-theme="dark"] .search-form .search-submit:hover {
    background: #FFD666;
    box-shadow: none;
}

/* Front page hero and layout */
.front-hero {
    background-size: cover;
    background-position: center;
    color: var(--primary-color);
    padding: 72px 0;
    border-bottom: 1px solid var(--section-bg);
}

/* Hero and Top Stories Grid Layout */
.front-hero-stories-wrapper {
    padding: 0rem 0 1rem;
    position: relative;
    overflow: hidden;
}

/* Soft ambient blob + dotted-grid decoration echoing the site's warm/blue
   accent pairing — purely decorative, sits behind the actual content. */
/* No decorative background blob/dot-grid here — the BeezLoop system is
   flat, opaque surfaces only (no gradients, textures, or patterns). */
.front-hero-stories-wrapper > .wrap {
    position: relative;
    z-index: 1;
}

.hero-stories-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

/* Hero Carousel Styles */
.hero-carousel {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    min-height: 520px;
    box-shadow: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background: var(--primary-color);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide:nth-child(1) {
    background-color: #B38200;
}

.hero-slide:nth-child(2) {
    background-color: #2B2820;
}

.hero-slide:nth-child(3) {
    background-color: #54503F;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.hero-slide.has-video {
    background-color: var(--primary-color);
}

.hero-slide-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide-video {
        display: none;
    }
    .hero-slide.has-video {
        background-size: cover;
        background-position: center;
    }
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 60px;
    height: 5px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.carousel-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #ffffff;
    transition: width 5s linear;
    box-shadow: none;
}

.carousel-indicator.active .carousel-progress-bar {
    width: 100%;
}

.carousel-indicator:hover {
    background: var(--paper-100);
}

.front-hero-card {
    position: relative;
    border-radius: 0;
    padding: 60px 40px;
    background: var(--primary-color);
    background-size: cover;
    background-position: center;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    overflow: hidden;
}

.front-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.35) 100%);
    border-radius: 0;
}

.front-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
}

.top-stories-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.headlines-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.headline-item-vertical {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    min-height: 100px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 0;
    border: 2px solid var(--border-color);
    box-shadow: none;
    overflow: hidden;
    padding: 14px;
    will-change: transform;
    position: relative;
    isolation: isolate;
}

.headline-item-vertical::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s var(--ease-out);
}

.headline-item-vertical:hover {
    transform: translateY(-3px);
    box-shadow: none;
    border-color: rgba(245, 184, 0, 0.4);
}

.headline-item-vertical:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.headline-item-vertical:hover .headline-thumb-vert img {
    transform: rotate(2deg);
}

.headline-thumb-vert {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0;
}

.headline-thumb-vert img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--ease-out);
    will-change: transform;
    border-radius: 0;
}

.headline-item-vertical:hover .headline-thumb-vert img {
    transform: rotate(2deg);
}

.headline-body-vert {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

/* Limit top stories sidebar to 4 items */
.top-stories-sidebar .headline-item-vertical:nth-child(n+5) {
    display: none;
}

.headline-title-vert {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.headline-date-vert {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (max-width: 960px) {
    .hero-stories-grid {
        grid-template-columns: 1fr;
    }

    .front-hero-card {
        min-height: 400px;
    }

    /* Compact hero on mobile only — desktop keeps the full-size carousel.
       overflow:visible (overriding the desktop rule) + extra height so a
       long, unclamped headline can still spill safely instead of being
       invisibly cut off. */
    .hero-carousel {
        min-height: unset;
        height: 360px;
        overflow: visible;
        /* Full-bleed edge-to-edge on mobile, breaking out of .wrap's padding */
        position: relative;
        left: 50%;
        right: 50%;
        width: 100vw;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .hero-slide {
        padding: 20px 24px;
    }

    /* Full title always shown on mobile — no line-clamp/truncation, font
       shrinks instead so long headlines still fit without being cut off.
       !important required: the unclamped base .hero-title/.hero-subtitle
       rule sits later in this file, so at equal specificity it would win
       the cascade over this media query despite the query matching. */
    .hero-title {
        font-size: clamp(1rem, 5vw, 1.35rem) !important;
        margin: 0 0 0.4rem !important;
        line-height: 1.2 !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        overflow: visible !important;
    }

    .hero-subtitle {
        font-size: clamp(0.75rem, 3.2vw, 0.9rem) !important;
        margin: 0 0 0.75rem !important;
        line-height: 1.4 !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        overflow: visible !important;
    }

    .hero-cta {
        padding: 9px 22px;
        font-size: 0.9rem;
    }

    .hero-cta svg {
        width: 16px;
        height: 16px;
    }

    .carousel-indicators {
        bottom: 10px;
        gap: 6px;
    }

    .carousel-indicator {
        width: 36px;
        height: 4px;
        border-radius: 0;
    }

    /* Top Stories sidebar headlines: full title shown, no 2-line clamp */
    .headline-title-vert {
        font-size: 1rem;
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

}

.front-hero .wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}


.front-hero .wrap { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:60px 20px; }

/* Top headlines strip */
.top-headlines { 
    padding: 12px 0 40px; 
    background: transparent;
}
.top-headlines .wrap {
    padding: 0 4px;
}
.top-headlines .headlines-list { 
    display: flex; 
    gap: 18px; 
    overflow-x: auto; 
    padding: 8px 6px;
}
.headline-item {
    display: flex;
    flex-direction: column;
    width: 220px;
    text-align: left;
    color: inherit;
    text-decoration: none;
    transition: all 0.5s var(--ease-spring);
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 0;
    border: 2px solid var(--border-color);
    box-shadow: none;
    overflow: hidden;
    isolation: isolate;
    position: relative;
    will-change: transform, box-shadow;
}

.headline-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(245, 184, 0, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.headline-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300), var(--gold-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .headline-item:hover {
        transform: translateY(-12px);
        box-shadow: none;
        border-color: rgba(245, 184, 0, 0.5);
    }

    .headline-item:hover::before {
        opacity: 1;
    }

    .headline-item:hover::after {
        transform: scaleX(1);
    }

    .headline-item:hover .headline-thumb img {
        transform: rotate(-2deg);
    }
}
.headline-thumb { position: relative; overflow: hidden; z-index: 1; }
.headline-thumb img { 
    width: 100%; 
    height: 120px; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.6s var(--ease-spring);
    will-change: transform;
}

.headline-item:hover .headline-thumb img { 
    transform: rotate(-2deg);
}
.headline-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.headline-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    line-height: 1.3;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.headline-item:hover .headline-title {
    color: var(--accent-color);
}
.headline-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 0.03em;
}

@media (min-width: 900px) {
    .top-headlines .headlines-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; overflow: visible; }
    .headline-item { width: auto; height: 100%; }
}

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

    .single-layout .theory-sidebar {
        position: static;
        top: auto;
    }
}


.hero-title {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    margin: 0 0 1rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.7),
                 0 8px 40px rgba(0,0,0,0.5),
                 0 2px 4px rgba(0,0,0,0.9);
    /* Always fits within the hero regardless of headline length, instead
       of only being constrained on the mobile breakpoint below. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 900px;
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6),
                 0 4px 24px rgba(0,0,0,0.4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Re-triggers the entrance animation every time a slide becomes active
   (not just on first page load) — a CSS animation restarts whenever an
   element newly starts matching a selector that declares one, which
   happens here each time hero-carousel.js swaps the .active class to a
   different slide, giving each rotation a smoother, more deliberate feel
   instead of the title/subtitle just being static under the crossfade. */
.hero-slide.active .hero-title {
    animation: fadeInUp 0.7s var(--ease-out) 0.15s backwards;
}

.hero-slide.active .hero-subtitle {
    animation: fadeInUp 0.7s var(--ease-out) 0.3s backwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #D9A300 100%);
    color: #ffffff;
    padding: 12px 26px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all 0.5s var(--ease-spring);
    box-shadow: none;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
    isolation: isolate;
}

.hero-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.3) 100%
    );
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.8s var(--ease-out);
}

.hero-cta:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #FFD666 0%, #F5B800 100%);
}

.hero-cta:hover::before {
    transform: translateX(100%) skewX(-15deg);
}

.hero-cta:active {
    transform: translateY(-1px) !important;
    box-shadow: none !important;
    transition-duration: 0.1s;
}

/* Add icon support */
.hero-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.4s var(--ease-spring);
}

.hero-cta:hover svg {
    transform: translateX(4px);
}

/* Constrain hero image inside centered card (not full-width) */
.front-hero {
    padding: 20px 0; /* reduced spacing above/below hero */
}
.front-hero .front-hero-card {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}
.front-hero .front-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
    z-index: 1;
}
.front-hero .front-hero-content { 
    padding: 48px 28px; 
    display:flex; 
    flex-direction:column; 
    align-items:center; 
    text-align:center;
    position: relative;
    z-index: 2;
}


/* Read more and link styles */
.read-more {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #F5B800 0%, #D9A300 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 22px !important;
    border-radius: var(--radius-full) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.02em;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: none !important;
}

.read-more::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
    pointer-events: none;
}

.read-more:hover {
    background: linear-gradient(135deg, #F5B800 0%, #D9A300 100%) !important;
    color: #0a0a0a !important;
    transform: translateY(-2px) !important;
    box-shadow: none !important;
    border: none !important;
}

.read-more:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .read-more {
    background: linear-gradient(135deg, #F5B800 0%, #D9A300 100%) !important;
    color: #ffffff !important;
    border: none !important;
}

[data-theme="dark"] .read-more:hover {
    background: linear-gradient(135deg, #F5B800 0%, #D9A300 100%) !important;
    color: #0a0a0a !important;
    box-shadow: none !important;
}

/* Ensure links inside the grid are clearly clickable */

/* Bias meter under articles */
.bias-meter {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 6px;
    align-items: center;
    margin: 6px 0 4px;
}

/* On the single-article card the bias meter is a direct child of the
   (unpadded) article element, so it needs its own inset to match the
   entry-header/entry-content text above and below it. */
:is(.single-post, .single-theory_article) .bias-meter {
    padding-left: 2rem;
    padding-right: 2rem;
}
.bias-meter .bias-seg {
    height: 6px;
    border-radius: 0;
    background: var(--section-bg);
    opacity: 0.4;
}
.bias-meter.bias-left .bias-seg.left { background: var(--bias-left); opacity: 1; }
.bias-meter.bias-center .bias-seg.center { background: var(--bias-center); opacity: 1; }
.bias-meter.bias-right .bias-seg.right { background: var(--bias-right); opacity: 1; }
.bias-meter .bias-text {
    /* Hidden — the colored bar segments convey the lean; the label is
       still exposed to assistive tech via aria-label on .bias-meter. */
    display: none;
}
.post-card a { color: inherit; text-decoration: none; }
.post-card a:hover { text-decoration: underline; }

/* Featured article layout adjustments */
.featured-article { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }
.featured-article .featured-media img { width:100%; height:100%; object-fit:cover; border-radius: 0; }
.featured-article .featured-content { display:flex; flex-direction:column; gap:12px; }
.featured-article .entry-title a { color: var(--primary-color); text-decoration:none; }
.featured-article .entry-title a:hover { text-decoration: underline; }

.front-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

.single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.5rem;
    align-items: start;
}

.single-layout .site-main {
    min-width: 0;
    padding: 0 0rem;
}

.single-layout .theory-sidebar {
    width: 100%;
}

.main-column { min-width: 0; }

.sidebar {
    width: 100%;
}

.front-layout .news-main {
    display: block;
    width: 100%;
}

.front-layout .news-main .posts-grid {
    width: 100%;
}

.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* U.S. News: two columns side by side, and full-width since this section
   has no sidebar next to it (unlike the main Latest News grid above it).
   Scoped to min-width so mobile falls through untouched to the theme's
   standard .posts-grid flex-column stacking (see mobile breakpoints below) —
   forcing display:grid unconditionally here used to out-specificity that
   mobile reset and silently break the horizontal-card layout on phones. */
.front-layout.us-news-section {
    grid-template-columns: 1fr;
}

@media (min-width: 901px) {
    .us-news-section .posts-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem;
    }
}

/* Shorten excerpt for first article only */
.posts-grid .post-card.horizontal-card:first-child .post-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-card {
    display: flex;
    gap: 1rem;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    padding: 1.5rem;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.5s var(--ease-spring);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
    isolation: isolate;
}

.post-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 50%,
        rgba(245, 184, 0, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* The animated rainbow-shifting border glow that used to live here is
   removed — flat, editorial cards per the brand system, no glow/blur and
   no color mixing outside the gold family. */

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: none;
}

.post-card:hover::before {
    opacity: 1;
}

.post-card:hover::after {
    opacity: 0.3;
}

/* Smooth image zoom on card hover */
.post-card:hover img {
    transform: rotate(1deg);
}

/* Override for horizontal cards - Desktop only */
@media (min-width: 969px) {
    /* Horizontal layout for desktop - Full width cards */
    .posts-grid .post-card.horizontal-card {
        display: flex !important;
        flex-direction: row !important;
        gap: 0 !important;
        padding: 0 !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        background: var(--card-bg) !important;
        box-shadow: none !important;
        transition: all 0.4s ease-out !important;
        position: relative !important;
    }

    /* Gradient accent bar on hover */
    .posts-grid .post-card.horizontal-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #F5B800 0%, #D9A300 50%, #F5B800 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 1;
    }

    .posts-grid .post-card.horizontal-card:hover::before {
        opacity: 1;
    }

    .posts-grid .post-card.horizontal-card:hover {
        transform: translateY(-4px);
        box-shadow: none !important;
        border-color: rgba(245, 184, 0, 0.3) !important;
    }

    /* Stronger specificity to override base .post-card styles */
    .posts-grid article.horizontal-card.post-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    /* Thumbnail on LEFT side */
    .posts-grid .post-card.horizontal-card .post-card-thumb,
    article.post-card.horizontal-card .post-card-thumb {
        order: 1;
        flex: 0 0 280px;
        height: auto;
        overflow: hidden;
        display: flex;
        align-items: center;
    }

    .posts-grid .post-card.horizontal-card .post-card-thumb img,
    article.post-card.horizontal-card .post-card-thumb img {
        width: 100%;
        height: 100%;
        min-height: 200px;
        object-fit: cover;
    }

    /* Content on RIGHT side */
    .posts-grid .post-card.horizontal-card .post-card-content,
    article.post-card.horizontal-card .post-card-content {
        order: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 20px 24px;
        box-shadow: none !important;
    }

    .posts-grid .post-card.horizontal-card .post-card-body,
    article.post-card.horizontal-card .post-card-body {
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

/* Tablet breakpoint - Hybrid approach with smaller thumbnails */
@media (min-width: 769px) and (max-width: 968px) {
    .posts-grid .post-card.horizontal-card {
        display: flex !important;
        flex-direction: row !important;
        gap: 0 !important;
        padding: 0 !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        background: var(--card-bg) !important;
    }

    /* Thumbnail on LEFT side - smaller for tablet */
    .posts-grid .post-card.horizontal-card .post-card-thumb,
    article.post-card.horizontal-card .post-card-thumb {
        order: 1;
        flex: 0 0 200px;
        height: auto;
        overflow: hidden;
        display: flex;
        align-items: center;
    }

    .posts-grid .post-card.horizontal-card .post-card-thumb img,
    article.post-card.horizontal-card .post-card-thumb img {
        width: 100%;
        height: 100%;
        min-height: 180px;
        object-fit: cover;
    }

    /* Content on RIGHT side */
    .posts-grid .post-card.horizontal-card .post-card-content,
    article.post-card.horizontal-card .post-card-content {
        order: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 16px 20px;
    }

    .posts-grid .post-card.horizontal-card .post-card-body {
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* Footer styling */
.site-footer {
    background: var(--paper-100);
    padding: 48px 0 32px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    color: #64748b;
    box-shadow: none;
}

.site-footer .wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    text-align: center;
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.footer-menu li {
    padding: 6px 12px;
}

.footer-menu li + li::before {
    content: "/";
    color: rgba(100, 116, 139, 0.45);
    margin-right: 12px;
}

.footer-menu a {
    color: #475569;
    letter-spacing: 0.2px;
    transition: color 0.18s ease, transform 0.18s ease;
}

.footer-menu a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-divider {
    width: 100%;
    max-width: var(--container-width);
    height: 1px;
    margin: 0 auto 28px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0) 0%, rgba(148, 163, 184, 0.5) 50%, rgba(148, 163, 184, 0) 100%);
    border: 0;
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-size: 1rem;
    color: #475569;
}

.footer-copy {
    margin: 0;
}

.footer-social {
    list-style: none;
    display: flex;
    gap: 18px;
    padding: 0;
    margin: 0;
    align-items: center;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease-out;
    box-shadow: none;
    position: relative;
}

.footer-social svg {
    width: 20px;
    height: 20px;
    display: block;
    color: var(--text-color);
    opacity: 0.7;
    transition: all 0.3s ease-out;
}

.footer-social a:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.15), rgba(255, 183, 0, 0.15));
    border-color: #F5B800;
    box-shadow: none;
}

.footer-social a:hover svg {
    color: #F5B800;
    opacity: 1;
    transform: rotate(5deg);
}

[data-theme="dark"] .footer-menu a:hover {
    color: #F5B800;
}

[data-theme="dark"] .footer-social a {
    background: #242424;
    border-color: rgba(245, 184, 0, 0.2);
}

[data-theme="dark"] .footer-social svg {
    color: #f1f5f9;
    opacity: 0.8;
}

[data-theme="dark"] .footer-social a:hover {
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.2), rgba(255, 183, 0, 0.2));
    border-color: #F5B800;
    box-shadow: none;
}

[data-theme="dark"] .footer-social a:hover svg {
    color: #F5B800;
    opacity: 1;
}

@media (max-width: 768px) {
    .footer-menu li + li::before {
        display: none;
    }

    .footer-menu li {
        padding: 6px 10px;
    }

    .footer-meta {
        flex-direction: column;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Card hover effects — scoped to devices with real hover (mouse/trackpad)
   so a tap on touchscreens can't leave the card stuck in its "lifted"
   state until the next unrelated tap. */
@media (hover: hover) and (pointer: fine) {
    .post-card:hover:not(.horizontal-card) {
        box-shadow: none;
        transform: translateY(-2px);
    }

    [data-theme="dark"] .post-card:hover:not(.horizontal-card) {
        box-shadow: none;
        border-color: rgba(245, 184, 0, 0.3);
    }
}

.post-card-thumb img { 
    width:100%; 
    height:200px; 
    object-fit:cover; 
    display:block;
    filter: brightness(1.05) contrast(1.02);
}
.post-card-body { padding: 16px 18px; }
.post-card .card-title {
    font-size: 1.25rem;
    margin: 0 0 10px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

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

.post-card .card-title a:hover {
    color: #D9A300;
}

[data-theme="dark"] .post-card .card-title a:hover {
    color: #f1f5f9;
}

.post-card .post-card-excerpt {
    color: #334155;
    margin-bottom: 12px;
    font-size: 1.05rem;
    line-height: 1.5;
    font-weight: 450;
}
.post-card .read-more { 
    display:inline-block;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 1.05rem;
}

/* Dark mode for standard post cards */
[data-theme="dark"] .post-card {
    background: var(--ink-700);
    border-color: rgba(64, 64, 64, 0.5);
    box-shadow: none;
}

[data-theme="dark"] .post-card::before {
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.05), transparent);
}

[data-theme="dark"] .post-card:hover {
    box-shadow: none;
    border-color: rgba(245, 184, 0, 0.4);
    transform: translateY(-6px);
}

[data-theme="dark"] .post-card .card-title,
[data-theme="dark"] .post-card .card-title a {
    color: #f8fafc;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .post-card .post-card-excerpt {
    color: #e2e8f0;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .post-card .read-more {
    color: #F5B800;
    border-color: #F5B800;
}

/* Horizontal card layout for latest news - image on right */
.posts-grid .post-card.horizontal-card,
article.post-card.horizontal-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    gap: 0 !important;
    padding: 20px 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease;
}

.posts-grid .post-card.horizontal-card:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
    transform: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .posts-grid .post-card.horizontal-card:hover,
[data-theme="dark"] article.post-card.horizontal-card:hover {
    background-color: rgba(245, 184, 0, 0.03) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Horizontal card base styles - typography and common elements */

.post-card.horizontal-card .card-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
    color: #0f172a;
    text-transform: uppercase;
}

.post-card.horizontal-card .card-title a {
    color: inherit;
    text-decoration: none;
}

.post-card.horizontal-card .card-title a:hover {
    text-decoration: none;
    color: #D9A300;
}

[data-theme="dark"] .post-card.horizontal-card .card-title a:hover {
    color: #f1f5f9;
}

.post-card.horizontal-card .post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #475569;
    margin-bottom: 8px;
    flex-wrap: wrap;
    font-weight: 500;
}

.post-card.horizontal-card .post-meta .post-date {
    font-weight: 500;
}

.post-card.horizontal-card .post-meta .read-time {
    font-weight: 500;
}

.post-card.horizontal-card .post-meta .author-name {
    font-weight: 600;
    color: #000000;
}

.post-card.horizontal-card .post-meta .meta-separator {
    color: #d1d5db;
    font-weight: 400;
}

[data-theme="dark"] .post-card.horizontal-card .post-meta {
    color: #9ca3af;
}

[data-theme="dark"] .post-card.horizontal-card .post-meta .author-name {
    color: #F5B800;
}

.post-card.horizontal-card .post-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-card.horizontal-card .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.post-card.horizontal-card .author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card.horizontal-card .author-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.post-card.horizontal-card .post-card-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #334155;
    margin: 0;
    max-width: 100%;
    font-weight: 450;
}

/* Every "Read More" link renders as a real button, everywhere — this base
   rule covers all contexts (plain grid cards, horizontal cards, archive,
   sports/social/local pages); more specific selectors below only adjust
   sizing, never the button treatment itself. */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 10px 22px;
    background: linear-gradient(135deg, #F5B800 0%, #D9A300 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: auto;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #FFD666 0%, #F5B800 100%);
    box-shadow: none;
}

.post-card.horizontal-card .post-card-thumb img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    display: block;
}

/* Dark mode for horizontal cards */
[data-theme="dark"] .post-card.horizontal-card {
    border-bottom-color: #404040;
    background: transparent;
}

[data-theme="dark"] .post-card.horizontal-card .card-title {
    color: #ffffff;
}

[data-theme="dark"] .post-card.horizontal-card .card-title a:hover {
    color: #f1f5f9;
}

[data-theme="dark"] .post-card.horizontal-card .author-name {
    color: #e5e7eb;
}

[data-theme="dark"] .post-card.horizontal-card .post-card-excerpt {
    color: #9ca3af;
}

/* Mobile responsive for horizontal cards */
@media (max-width: 968px) {
    /* Completely reset horizontal card to traditional vertical card on mobile */
    .posts-grid .post-card.horizontal-card,
    article.post-card.horizontal-card,
    .post-card.horizontal-card {
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        margin-bottom: 20px !important;
        background: white !important;
        box-shadow: none !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 0 !important;
    }
    
    /* Image on top - reset order */
    .posts-grid .post-card.horizontal-card .post-card-thumb,
    article.post-card.horizontal-card .post-card-thumb,
    .post-card.horizontal-card .post-card-thumb {
        order: 1 !important;
        width: 100% !important;
        height: 220px !important;
        border-radius: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        flex-shrink: 0 !important;
    }
    
    .posts-grid .post-card.horizontal-card .post-card-thumb img,
    article.post-card.horizontal-card .post-card-thumb img,
    .post-card.horizontal-card .post-card-thumb img {
        width: 100% !important;
        min-height: 220px !important;
        height: 220px !important;
        border-radius: 0 !important;
        object-fit: cover !important;
    }
    
    /* Content below image - reset order */
    .posts-grid .post-card.horizontal-card .post-card-content,
    article.post-card.horizontal-card .post-card-content,
    .post-card.horizontal-card .post-card-content {
        order: 2 !important;
        padding: 0 !important;
        display: block !important;
        flex: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    .posts-grid .post-card.horizontal-card .post-card-body,
    article.post-card.horizontal-card .post-card-body,
    .post-card.horizontal-card .post-card-body {
        padding: 16px !important;
        display: block !important;
        gap: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .posts-grid .post-card.horizontal-card .card-title,
    article.post-card.horizontal-card .card-title,
    .post-card.horizontal-card .card-title {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
        line-height: 1.4 !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .posts-grid .post-card.horizontal-card .card-title a,
    article.post-card.horizontal-card .card-title a,
    .post-card.horizontal-card .card-title a {
        display: inline !important;
        visibility: visible !important;
        color: var(--text-color) !important;
    }
    
    .posts-grid .post-card.horizontal-card .post-meta,
    article.post-card.horizontal-card .post-meta,
    .post-card.horizontal-card .post-meta {
        margin-bottom: 10px !important;
        display: flex !important;
        visibility: visible !important;
    }
    
    .posts-grid .post-card.horizontal-card .post-author-info,
    article.post-card.horizontal-card .post-author-info,
    .post-card.horizontal-card .post-author-info {
        margin-bottom: 12px !important;
        display: flex !important;
        visibility: visible !important;
    }
    
    .posts-grid .post-card.horizontal-card .post-card-excerpt,
    article.post-card.horizontal-card .post-card-excerpt,
    .post-card.horizontal-card .post-card-excerpt {
        margin-bottom: 12px !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .posts-grid .post-card.horizontal-card .read-more-btn,
    article.post-card.horizontal-card .read-more-btn,
    .post-card.horizontal-card .read-more-btn {
        margin-top: 8px !important;
        padding: 10px 18px !important;
        background: var(--accent-color) !important;
        color: white !important;
        border-radius: 0 !important;
        display: inline-block !important;
        visibility: visible !important;
        text-decoration: none !important;
    }
}

/* Mobile optimizations for horizontal cards */
@media (max-width: 640px) {
    .post-card.horizontal-card {
        margin-bottom: 16px !important;
        border-radius: 0 !important;
    }
    
    .post-card.horizontal-card .post-card-thumb {
        height: 200px !important;
    }
    
    .post-card.horizontal-card .post-card-thumb img {
        min-height: 200px !important;
        height: 200px !important;
    }
    
    .post-card.horizontal-card .post-card-body {
        padding: 14px !important;
    }
    
    .post-card.horizontal-card .card-title {
        font-size: 1.1rem !important;
        line-height: 1.35 !important;
        margin-bottom: 8px !important;
    }
    
    /* Dark mode mobile card fixes */
    [data-theme="dark"] .post-card.horizontal-card {
        background: rgba(36, 36, 36, 0.9) !important;
        border-color: rgba(71, 85, 105, 0.4) !important;
    }
    
    [data-theme="dark"] .post-card.horizontal-card .card-title,
    [data-theme="dark"] .post-card.horizontal-card .card-title a {
        color: #f1f5f9 !important;
    }
    
    [data-theme="dark"] .post-card.horizontal-card .post-card-excerpt {
        color: #cbd5e1 !important;
    }
    
    [data-theme="dark"] .post-card.horizontal-card .author-name {
        color: #94a3b8 !important;
    }
    
    [data-theme="dark"] .post-card.horizontal-card .read-more {
        color: #ffffff !important;
    }
    
    .post-card.horizontal-card .post-card-excerpt {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 10px !important;
    }
    
    .post-card.horizontal-card .post-meta {
        font-size: 0.65rem !important;
        margin-bottom: 8px !important;
    }
    
    .post-card.horizontal-card .author-avatar {
        width: 32px !important;
        height: 32px !important;
    }
    
    .post-card.horizontal-card .author-name {
        font-size: 0.85rem !important;
    }
    
    .post-card.horizontal-card .post-author-info {
        margin-bottom: 10px !important;
    }
    
    .post-card.horizontal-card .read-more-btn {
        font-size: 0.9rem !important;
        margin-top: 6px !important;
    }
}

/* Featured card - larger visual weight but still uses .post-card structure */
.post-card.featured-card,
.post-card.post-card-featured {
    box-shadow: none;
    border-radius: 0;
}
.post-card.featured-card .post-card-thumb img,
.post-card.post-card-featured .post-card-thumb img {
    height: 360px !important;
}
.post-card.featured-card .post-card-body,
.post-card.post-card-featured .post-card-body {
    padding: 22px 24px;
}
.post-card.featured-card .card-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
}
.post-card.featured-card .post-card-excerpt { font-size: 1.05rem; color: var(--secondary-color); }

/* Trending Topics Bar */
.trending-bar {
    background: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: none;
}
.trending-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    overflow: hidden;
    position: relative;
}
.trending-inner::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 150px;
    background: linear-gradient(to left, var(--light-bg) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}
.trending-icon {
    display: flex;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.trending-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    animation: buzz 2s ease-in-out infinite;
}

@keyframes buzz {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(-3deg);
    }
    50% {
        transform: translateY(0) rotate(3deg);
    }
    75% {
        transform: translateY(-1px) rotate(-2deg);
    }
}
.trending-list {
    display: flex;
    gap: 12px;
    overflow: visible;
    padding-bottom: 2px;
    padding-right: 200px;
    position: relative;
    width: 100%;
}

/* Auto-scroll animation */
.trending-list.scrolling {
    animation: scroll-trending 30s linear infinite;
}

@keyframes scroll-trending {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.trending-list:hover {
    animation-play-state: paused;
}

/* Faster scroll on mobile */
@media (max-width: 768px) {
    .trending-list.scrolling {
        animation: scroll-trending 15s linear infinite;
    }
}

.trending-item {
    display: inline-flex;
    align-items: center;
    background: var(--section-bg);
    color: var(--text-color);
    border-radius: 0;
    font-size: 1rem;
    font-weight: 500;
    padding: 6px 14px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.trending-item:hover {
    background: var(--accent-color);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: none;
    border-color: var(--accent-color);
}

[data-theme="dark"] .trending-item {
    background: rgba(245, 184, 0, 0.15);
    color: #e2e8f0;
    border-color: rgba(245, 184, 0, 0.4);
}

[data-theme="dark"] .trending-item:hover {
    background: linear-gradient(135deg, #F5B800, #D9A300);
    color: #ffffff;
}

.trending-fallback {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--secondary-color);
    opacity: 0.7;
    padding: 4px 12px 4px 0;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 12px;
    background: var(--light-bg);
    position: relative;
    z-index: 2;
}
.trending-pill {
    display: flex;
    align-items: center;
    background: #ecebe7;
    color: #1a1a1a;
    border-radius: 0;
    font-size: 0.98rem;
    font-weight: 600;
    padding: 6px 18px;
    white-space: nowrap;
    box-shadow: none;
    transition: background 0.18s;
    cursor: pointer;
    border: none;
    outline: none;
    flex-shrink: 0;
}
.trending-pill:hover {
    background: rgba(245, 184, 0, 0.15);
    border-color: #F5B800;
    color: #F5B800;
    transform: translateY(-2px);
    transition: all 0.3s ease-out;
}
.trending-loading {
    color: var(--secondary-color);
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Sidebar widgets */
.theory-sidebar .widget {
    background: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theory-sidebar .widget:hover {
    box-shadow: none;
    transform: translateY(-2px);
}

.widget-title,
h2.widget-title,
h3.widget-title,
.theory-sidebar .widget h1,
.theory-sidebar .widget h2,
.theory-sidebar .widget h3,
.theory-sidebar .widget h4 {
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    padding-bottom: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

/* Sidebar specific styling */
.theory-sidebar {
    width: 100%;
    background: var(--paper-100);
    border-radius: 0;
    padding: 12px;
    box-shadow: none;
    border: 1px solid rgba(226, 232, 240, 0.5);
}
.theory-sidebar .widget { padding: 16px; }
.theory-sidebar .widget_search .search-form,
.theory-sidebar .search-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0 !important;
    background: #ffffff;
    border: 1.5px solid rgba(203, 213, 225, 0.8);
    border-radius: 50px;
    padding: 5px 5px 5px 16px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.theory-sidebar .widget_search .search-form:focus-within,
.theory-sidebar .search-form:focus-within {
    border-color: #F5B800;
    box-shadow: none;
}
.theory-sidebar .widget_search label,
.theory-sidebar .search-form label {
    flex: 1;
    margin: 0;
    display: flex;
    align-items: center;
    min-width: 0;
}
.theory-sidebar .widget_search input[type="search"],
.theory-sidebar .widget_search .search-field,
.theory-sidebar .search-form input[type="search"],
.theory-sidebar .search-form .search-field,
.theory-sidebar input[type="search"],
.theory-sidebar .search-field {
    flex: 1;
    width: 100%;
    padding: 8px 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--primary-color);
    font-size: 0.95rem !important;
    font-weight: 400;
    outline: none;
}
.theory-sidebar .widget_search input[type="search"]:focus,
.theory-sidebar .widget_search .search-field:focus,
.theory-sidebar .search-form input[type="search"]:focus,
.theory-sidebar .search-form .search-field:focus {
    box-shadow: none !important;
    outline: none;
}
.theory-sidebar .widget_search input[type="search"]::placeholder,
.theory-sidebar .widget_search .search-field::placeholder,
.theory-sidebar .search-form input[type="search"]::placeholder,
.theory-sidebar .search-form .search-field::placeholder,
.theory-sidebar input[type="search"]::placeholder,
.theory-sidebar .search-field::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.theory-sidebar .widget_search button[type="submit"],
.theory-sidebar .widget_search .search-form button[type="submit"],
.theory-sidebar .search-form button[type="submit"],
.theory-sidebar .widget_search .search-submit,
.theory-sidebar .search-submit,
.theory-sidebar button[type="submit"] {
    flex-shrink: 0;
    position: static !important;
    width: auto !important;
    padding: 9px 18px !important;
    margin: 0;
    font-size: 0.875rem !important;
    font-weight: 700;
    background: linear-gradient(135deg, #F5B800, #D9A300) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    transform: none !important;
    right: auto !important;
    top: auto !important;
    white-space: nowrap;
}
.theory-sidebar .widget_search button[type="submit"]:hover,
.theory-sidebar .widget_search .search-form button[type="submit"]:hover,
.theory-sidebar .search-form button[type="submit"]:hover,
.theory-sidebar .widget_search .search-submit:hover,
.theory-sidebar .search-submit:hover,
.theory-sidebar button[type="submit"]:hover {
    background: linear-gradient(135deg, #F5B800, #D9A300) !important;
    color: #0a0a0a !important;
    box-shadow: none !important;
    transform: none !important;
}
[data-theme="dark"] .theory-sidebar .widget_search .search-form,
[data-theme="dark"] .theory-sidebar .search-form {
    background: rgba(36, 36, 36, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .theory-sidebar input[type="search"],
[data-theme="dark"] .theory-sidebar .search-field {
    color: #f1f5f9 !important;
}
[data-theme="dark"] .theory-sidebar input[type="search"]::placeholder,
[data-theme="dark"] .theory-sidebar .search-field::placeholder {
    color: #64748b;
}

/* Sidebar widget titles */
.theory-sidebar .widget .widget-title { color: #94a3b8; }
[data-theme="dark"] .widget-title,
[data-theme="dark"] h3.widget-title {
    color: #475569;
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

.widget_advert .ad-placeholder {
    display: grid;
    place-items: center;
    min-height: 250px;
    border-radius: 0;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(203, 213, 225, 0.18));
    color: var(--secondary-color);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

/* ============================================
   RECENT POSTS WIDGET — Numbered + Dividers
   ============================================ */

.widget_recent_entries {
    font-size: 0.78rem !important;
}

.widget_recent_entries ul {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: recent-post-counter;
}

.widget_recent_entries ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    counter-increment: recent-post-counter;
    transition: background 0.15s ease;
    font-size: 0.78rem !important;
    line-height: 1.4;
}

.widget_recent_entries ul li:first-child { padding-top: 2px; }
.widget_recent_entries ul li:last-child { border-bottom: none; padding-bottom: 0; }

.widget_recent_entries ul li::before {
    content: counter(recent-post-counter, decimal-leading-zero);
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #F5B800, #D9A300);
    border-radius: 0;
    padding: 3px 7px;
    margin-top: 2px;
    letter-spacing: 0.03em;
    line-height: 1.4;
    min-width: 30px;
    text-align: center;
}

.widget_recent_entries ul li a {
    font-size: 0.78rem !important;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.45;
    display: block;
    transition: color 0.18s ease;
}

.widget_recent_entries ul li a:hover { color: #D9A300; }

.widget_recent_entries .post-date {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 3px;
    font-weight: 500;
}

[data-theme="dark"] .widget_recent_entries ul li {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .widget_recent_entries ul li::before {
    color: #ffffff;
}

[data-theme="dark"] .widget_recent_entries ul li a {
    color: #e2e8f0;
}

[data-theme="dark"] .widget_recent_entries ul li a:hover { color: #F5B800; }

[data-theme="dark"] .widget_recent_entries .post-date { color: #64748b; }

/* ============================================
   WP BLOCK LATEST POSTS (Gutenberg widget)
   ============================================ */

.wp-block-latest-posts {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wp-block-latest-posts li {
    padding: 9px 0 !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
}

.wp-block-latest-posts li:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.wp-block-latest-posts__post-title {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    display: block;
}

.wp-block-latest-posts__post-title:hover {
    color: #F5B800 !important;
}

.wp-block-latest-posts__post-date {
    display: block;
    font-size: 0.68rem !important;
    color: #94a3b8 !important;
    margin-top: 2px;
}

[data-theme="dark"] .wp-block-latest-posts li {
    border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

[data-theme="dark"] .wp-block-latest-posts__post-title {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .wp-block-latest-posts__post-title:hover {
    color: #F5B800 !important;
}

[data-theme="dark"] .wp-block-latest-posts__post-date {
    color: #64748b !important;
}

/* ============================================
   WP BLOCK LATEST COMMENTS (Gutenberg widget)
   ============================================ */

.wp-block-latest-comments {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wp-block-latest-comments__comment {
    padding: 9px 0 !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
}

.wp-block-latest-comments__comment:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.wp-block-latest-comments__comment-author,
.wp-block-latest-comments__comment-author a,
.wp-block-latest-comments__comment-link {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-decoration: none !important;
}

.wp-block-latest-comments__comment-link:hover,
.wp-block-latest-comments__comment-author a:hover {
    color: #F5B800 !important;
}

.wp-block-latest-comments__comment-date {
    display: block;
    font-size: 0.68rem !important;
    color: #94a3b8 !important;
    margin-top: 2px;
}

.wp-block-latest-comments__comment-excerpt p {
    font-size: 0.72rem !important;
    color: #64748b !important;
    margin: 4px 0 0 !important;
    line-height: 1.4;
}

[data-theme="dark"] .wp-block-latest-comments__comment {
    border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

[data-theme="dark"] .wp-block-latest-comments__comment-author,
[data-theme="dark"] .wp-block-latest-comments__comment-author a,
[data-theme="dark"] .wp-block-latest-comments__comment-link {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .wp-block-latest-comments__comment-link:hover,
[data-theme="dark"] .wp-block-latest-comments__comment-author a:hover {
    color: #F5B800 !important;
}

[data-theme="dark"] .wp-block-latest-comments__comment-date {
    color: #64748b !important;
}

[data-theme="dark"] .wp-block-latest-comments__comment-excerpt p {
    color: #475569 !important;
}

/* ============================================
   WP BLOCK SEARCH (Gutenberg widget)
   ============================================ */

.wp-block-search__label {
    display: block !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
}

[data-theme="dark"] .wp-block-search__label {
    color: #475569 !important;
    border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

.wp-block-search__inside-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1.5px solid rgba(203, 213, 225, 0.8) !important;
    border-radius: 50px !important;
    padding: 5px 5px 5px 16px !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    gap: 0 !important;
}

.wp-block-search__inside-wrapper:focus-within {
    border-color: #F5B800 !important;
    box-shadow: none !important;
}

.wp-block-search__input {
    flex: 1 !important;
    border: none !important;
    background: transparent !important;
    padding: 6px 0 !important;
    font-size: 0.85rem !important;
    color: var(--text-color) !important;
    outline: none !important;
    box-shadow: none !important;
    min-width: 0 !important;
}

.wp-block-search__input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

.wp-block-search__button {
    flex-shrink: 0 !important;
    padding: 9px 18px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #F5B800, #D9A300) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.wp-block-search__button:hover {
    background: linear-gradient(135deg, #F5B800, #D9A300) !important;
    box-shadow: none !important;
    transform: none !important;
}

[data-theme="dark"] .wp-block-search__inside-wrapper {
    background: rgba(36, 36, 36, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .wp-block-search__input {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .wp-block-search__input::placeholder {
    color: #64748b !important;
}

/* Newsletter Widget */
.widget_newsletter {
    background: linear-gradient(135deg, rgba(245, 184, 0, 0.1) 0%, rgba(255, 183, 0, 0.05) 100%);
    border: 2px solid #F5B800;
    color: var(--text-color);
}
.widget_newsletter .widget-title {
    color: var(--primary-color);
    margin-bottom: 8px !important;
}
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.newsletter-form input[type="email"] {
    padding: 14px 16px;
    border: none;
    border-radius: 0;
    font-size: 1.1rem;
    outline: none;
    background: white;
    color: var(--primary-color);
    font-weight: 400;
    box-shadow: none;
    transition: box-shadow 0.2s ease;
}
.newsletter-form input[type="email"]:focus {
    box-shadow: none;
}
.newsletter-form input[type="email"]::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.newsletter-submit {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 0;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 100%;
    box-shadow: none;
}
.newsletter-submit:hover {
    background: #0d1829;
    transform: translateY(-2px);
    box-shadow: none;
}

[data-theme="dark"] .newsletter-submit {
    background: linear-gradient(135deg, #F5B800, #D9A300);
    color: #ffffff;
}

[data-theme="dark"] .newsletter-submit:hover {
    background: linear-gradient(135deg, #FFD666, #F5B800);
    box-shadow: none;
}

@media (min-width: 1024px) {
    .theory-sidebar .widget_search .search-form,
    .theory-sidebar .search-form {
        max-width: 100%;
    }
    .theory-sidebar .widget_search input[type="search"],
    .theory-sidebar .widget_search .search-field,
    .theory-sidebar .search-form input[type="search"],
    .theory-sidebar .search-form .search-field,
    .theory-sidebar input[type="search"],
    .theory-sidebar .search-field {
        font-size: 14px;
    }
    .newsletter-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
    }
    .newsletter-form input[type="email"] {
        width: 100%;
    }
    .newsletter-submit {
        align-self: center;
        padding: 10px 26px;
        width: auto;
        justify-self: end;
    }
}

.recent-list { list-style: none; margin: 0; padding: 0; display:flex; flex-direction:column; gap:12px; }
.recent-item { display:block; }
.recent-link { display:flex; gap:12px; align-items:flex-start; text-decoration: none; color: inherit; transition: transform 0.2s ease; }
.recent-link:hover { transform: translateX(4px); }
.recent-thumb { flex-shrink: 0; width: 80px; height: 80px; overflow: hidden; border-radius: 0; background: var(--light-bg); }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-info { display:flex; flex-direction:column; flex: 1; min-width: 0; }
.recent-title { font-weight:700; font-size:0.95rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-meta { font-size:0.8rem; color:var(--secondary-color); margin-top:4px; }

/* Sticky sidebar on wider screens */
@media (min-width: 1000px) {
    .theory-sidebar { position: sticky; top: 120px; }
}

@media (max-width: 900px) {
    /* Tighten the gap between the logo and the icon cluster so the logo
       has more room to render at its natural size. */
    .site-header-inner {
        gap: 0.75rem;
    }

    .menu-toggle {
        display: flex;
        order: 3;
    }

    .nav-actions {
        order: 2;
    }

    .main-navigation {
        display: none;
    }

    .main-navigation.is-open {
        display: block;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        background: #1a1a1a;
        box-shadow: none;
        border-radius: 0;
        z-index: 9999;
        margin: 0 1rem;
        animation: slideDown 0.3s ease-out;
        overflow: hidden;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 0.75rem 0;
        margin: 0;
        list-style: none;
    }

    .main-navigation li {
        border-bottom: 1px solid rgba(71, 85, 105, 0.4);
        opacity: 0;
        animation: fadeInItem 0.3s ease forwards;
    }

    .main-navigation li:nth-child(1) { animation-delay: 0.05s; }
    .main-navigation li:nth-child(2) { animation-delay: 0.1s; }
    .main-navigation li:nth-child(3) { animation-delay: 0.15s; }
    .main-navigation li:nth-child(4) { animation-delay: 0.2s; }
    .main-navigation li:nth-child(5) { animation-delay: 0.25s; }
    .main-navigation li:nth-child(6) { animation-delay: 0.3s; }

    @keyframes fadeInItem {
        from {
            opacity: 0;
            transform: translateX(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1.05rem;
        font-weight: 700;
        color: #e2e8f0;
        text-align: left;
        text-decoration: none;
        transition: all 0.3s ease-out;
        position: relative;
        overflow: hidden;
    }

    .main-navigation a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(135deg, #F5B800, #D9A300);
        transform: scaleY(0);
        transition: transform 0.3s ease-out;
    }

    .main-navigation a:hover,
    .main-navigation a:focus {
        background: rgba(245, 184, 0, 0.1);
        padding-left: 2rem;
        color: #F5B800;
    }

    .main-navigation a:hover::before,
    .main-navigation a:focus::before {
        transform: scaleY(1);
    }
    
    [data-theme="dark"] .main-navigation.is-open {
        background: #2d2d2dc2;
        box-shadow: none;
    }
    
    [data-theme="dark"] .main-navigation li {
        border-bottom-color: rgba(71, 85, 105, 0.5);
    }
    
    [data-theme="dark"] .main-navigation a {
        color: #e2e8f0;
    }
    
    [data-theme="dark"] .main-navigation a:hover,
    [data-theme="dark"] .main-navigation a:focus {
        background: rgba(245, 184, 0, 0.15);
        color: #F5B800;
    }

    .main-navigation a::after,
    .main-navigation li::after {
        display: none;
    }

    /* Force single column layout and hide sidebar completely */
    .front-layout {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }
    
    .single-layout {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }
    
    .posts-grid {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Hide sidebar on tablets and below */
    .theory-sidebar,
    .sidebar {
        display: none;
    }
}

@media (max-width: 640px) {
    /* First card in Latest News - smaller title and limited excerpt */
    .posts-grid .post-card.horizontal-card:first-child .card-title {
        font-size: 1.35rem !important;
    }
    
    .posts-grid .post-card.horizontal-card:first-child .card-title a {
        font-size: 1.35rem !important;
    }
    
    .posts-grid .post-card.horizontal-card:first-child .post-card-excerpt {
        display: -webkit-box !important;
        -webkit-line-clamp: 6 !important;
        line-clamp: 6 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Shorten all post-card excerpts on homepage */
    .post-card-excerpt {
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .container { padding: 0 1rem; }
    .wrap { padding: 0 1rem; }
    .site-header { padding: 1rem 0; }
    .site-header-inner { gap: 0.75rem; }
    .top-headlines { padding: 16px 0 10px; }
    .top-headlines .wrap { padding: 0 1rem; }
    .top-headlines .headlines-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        overflow: hidden;
        padding: 0;
    }
    .top-headlines .headline-item {
        width: 100%;
        min-width: 0;
    }
    .top-headlines .headline-item:nth-of-type(n+3) {
        display: none;
    }
    .top-headlines .headline-thumb img { height: 140px; }
    .front-hero .front-hero-card { border-radius: 0; margin: 0; }
    .front-hero .wrap { padding: 28px 20px 90px; }
    .front-layout { gap: 2rem; padding: 0; }
    .news-main { display: grid; gap: 1.25rem; padding: 0; }
    .post-card {
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Force proper card layout for horizontal cards on mobile */
    .posts-grid .post-card.horizontal-card,
    article.post-card.horizontal-card {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: var(--white) !important;
        margin-bottom: 20px !important;
    }
    
    .post-card-thumb img {
        height: 190px;
        border-radius: 0;
    }
    
    /* Ensure image spans full width with no rounded corners on sides */
    .posts-grid .post-card.horizontal-card .post-card-thumb img,
    article.post-card.horizontal-card .post-card-thumb img {
        height: 200px !important;
        border-radius: 0 !important;
        width: 100% !important;
    }
    
    .post-card-body { padding: 18px 20px; }
    
    /* Ensure proper padding for horizontal card body on mobile */
    .posts-grid .post-card.horizontal-card .post-card-body,
    article.post-card.horizontal-card .post-card-body {
        padding: 16px 16px 18px 16px !important;
    }
    
    .post-card .card-title { font-size: 1.15rem; }
    
    /* Better title sizing for horizontal cards on mobile */
    .posts-grid .post-card.horizontal-card .card-title,
    article.post-card.horizontal-card .card-title {
        font-size: 1.15rem !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
    }
    
    .post-card .post-card-excerpt { font-size: 0.98rem; }
    
    /* Better excerpt sizing - limit to 4 lines on mobile */
    .posts-grid .post-card.horizontal-card .post-card-excerpt,
    article.post-card.horizontal-card .post-card-excerpt {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        color: #6b7280 !important;
        margin-bottom: 12px !important;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Style the read more button */
    .posts-grid .post-card.horizontal-card .read-more-btn,
    article.post-card.horizontal-card .read-more-btn {
        display: inline-block !important;
        padding: 10px 20px !important;
        background: linear-gradient(135deg, #F5B800 0%, #D9A300 100%) !important;
        color: #ffffff !important;
        border-radius: 0 !important;
        text-decoration: none !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        margin-top: 8px !important;
        box-shadow: none !important;
        transition: all 0.3s ease-out !important;
    }
    
    .posts-grid .post-card.horizontal-card .read-more-btn:hover,
    article.post-card.horizontal-card .read-more-btn:hover {
        transform: translateY(-2px) !important;
        box-shadow: none !important;
    }
    
    /* Smaller meta text */
    .posts-grid .post-card.horizontal-card .post-meta,
    article.post-card.horizontal-card .post-meta {
        font-size: 0.7rem !important;
        margin-bottom: 8px !important;
    }
    
    /* Smaller author info */
    .posts-grid .post-card.horizontal-card .author-avatar,
    article.post-card.horizontal-card .author-avatar {
        width: 35px !important;
        height: 35px !important;
    }
    
    .posts-grid .post-card.horizontal-card .author-name,
    article.post-card.horizontal-card .author-name {
        font-size: 0.9rem !important;
    }
    
    .posts-grid .post-card.horizontal-card .post-author-info,
    article.post-card.horizontal-card .post-author-info {
        margin-bottom: 10px !important;
    }
    
    .post-card.featured-card .post-card-thumb img,
    .post-card.post-card-featured .post-card-thumb img { height: 260px !important; }
    .posts-grid {
        gap: 0 !important;
    }
    .section-heading { font-size: 1.4rem; margin: 24px 0 16px; padding: 0; text-align: left; }
    .theory-sidebar { margin-top: 2rem; padding: 0; }
    .menu-toggle { padding: 9px 10px; min-height: 44px; min-width: 44px; }
    .main-navigation { right: -20px; left: -20px; border-radius: 0; }
    .main-navigation ul { padding: 18px 24px 22px; }
    
    /* Single post article page mobile formatting — .container already
       adds its own 1rem gutter on mobile, so these no longer add extra
       padding on top of it; that was compounding to ~2.5rem per side and
       is what made the article feel cramped instead of full-width. */
    :is(.single-post, .single-theory_article) .entry-content {
        font-size: 1.15rem;
        line-height: 1.75;
        padding-left: 0;
        padding-right: 0;
    }
    
    :is(.single-post, .single-theory_article) .entry-content p {
        font-size: 1.15rem;
        line-height: 1.75;
        margin-bottom: 1.2rem;
    }

    :is(.single-post, .single-theory_article) .entry-content h1,
    :is(.single-post, .single-theory_article) .entry-content h2,
    :is(.single-post, .single-theory_article) .entry-content h3 {
        font-size: 1.4rem;
        line-height: 1.4;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    :is(.single-post, .single-theory_article) .entry-content img,
    :is(.single-post, .single-theory_article) .entry-content figure img {
        border-radius: 0;
        margin: 1.5rem 0;
        max-width: 100%;
        height: auto;
    }

    :is(.single-post, .single-theory_article) .entry-header {
        margin-bottom: 1.5rem;
        padding-left: 0;
        padding-right: 0;
    }

    :is(.single-post, .single-theory_article) .bias-meter {
        padding-left: 0;
        padding-right: 0;
    }

    :is(.single-post, .single-theory_article) .entry-footer {
        padding-left: 0;
        padding-right: 0;
    }

    .entry-title {
        font-size: 1.35rem !important;
        line-height: 1.3 !important;
    }

    .entry-meta {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Archive page mobile styles */
    .archive-header {
        padding: 2rem 0 1.5rem;
        margin-bottom: 1.5rem;
    }

    .archive-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .archive-description {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    /* Pagination mobile styles */
    .pagination-wrapper {
        margin: 2rem 0 1.5rem;
        padding: 1.5rem 0;
    }

    .page-numbers {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 1rem;
    }

    .page-numbers.prev,
    .page-numbers.next {
        padding: 0 12px;
        font-size: 1rem;
    }

    .nav-links {
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .animate-init,
    .animate-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

.posts-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
}

.post-card {
    display: block !important;
    border-radius: 0;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--section-bg);
    box-shadow: none;
}

.post-card-thumb img {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
    display: block;
}

.post-card-body {
    padding: 18px !important;
}

/* Ensure full-width cards look good on very wide screens */
.posts-grid .post-card { max-width: 100%; }

/* Center cards with a comfortable max-width on larger screens */
@media (min-width: 800px) {
    .posts-grid .post-card {
        max-width: 980px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Article Audio Player */
.article-audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 50px;
    margin: 24px 2rem;
    box-shadow: none;
    border: 2px solid rgba(245, 184, 0, 0.3);
}

.audio-play-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5B800, #D9A300);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease-out;
    flex-shrink: 0;
    box-shadow: none;
}

.audio-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.audio-play-btn svg {
    width: 22px;
    height: 22px;
    margin-left: 2px;
}

.audio-time {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 42px;
    text-align: center;
}

.audio-progress {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    background: white;
    border-radius: 0;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: none;
}

.audio-speed-btn {
    padding: 6px 12px;
    background: transparent;
    border: 2px solid #F5B800;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #F5B800;
    cursor: pointer;
    transition: all 0.3s ease-out;
    min-width: 48px;
    box-shadow: none;
}

.audio-speed-btn:hover {
    background: linear-gradient(135deg, #F5B800, #D9A300);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: none;
}

@media (max-width: 768px) {
    .article-audio-player {
        padding: 12px 16px;
        gap: 8px;
        margin: 20px 1.5rem;
    }

    .audio-play-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
    
    .audio-time {
        font-size: 0.75rem;
        min-width: 38px;
    }
    
    .audio-speed-btn {
        font-size: 0.75rem;
        padding: 5px 10px;
        min-width: 42px;
    }
}

/* Comments Section */
.comments-section {
    background: rgba(255, 255, 255, 0.08);
    padding: 3.5rem;
    margin-top: 4rem;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    
    
}

.comments-title {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
}

/* Comment Form */
#commentform {
    margin-top: 2rem;
}

#commentform label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform textarea {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid #eee;
    border-radius: 0;
    margin-bottom: 1rem;
    font-family: var(--body-font);
    transition: border-color 0.3s ease;
}

#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus,
#commentform textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

#commentform input[type="submit"] {
    background: transparent !important;
    color: #F5B800 !important;
    border: 2px solid #F5B800;
    padding: 1rem 2rem;
    border-radius: 0;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease-out;
    -webkit-appearance: none;
    appearance: none;
}

#commentform input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: none;
    background: linear-gradient(135deg, #F5B800, #D9A300) !important;
    color: #ffffff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .site-title {
        font-size: 2.25rem;
    }
    
    .entry-title {
        font-size: 2.25rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        width: 100%;
        text-align: center;
    }
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem;
}

.comments-section {
    background: var(--light-bg);
    padding: 2.5rem;
    margin-top: 2rem;
}

/* ==========================================
   ENHANCED ANIMATIONS & INTERACTIONS
   ========================================== */

/* Scroll Reveal Animations */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out);
    transition-delay: calc(var(--animation-order, 0) * 0.05s);
}

.reveal-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card Hover Effects */
.post-card:not(.horizontal-card),
.headline-item {
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .post-card:hover:not(.horizontal-card),
    .headline-item:hover {
        box-shadow: none;
    }

    [data-theme="dark"] .post-card:hover:not(.horizontal-card),
    [data-theme="dark"] .headline-item:hover {
        box-shadow: none;
        border-color: rgba(245, 184, 0, 0.3);
    }
}

/* Image Zoom Container */
.post-card-thumb,
.headline-thumb {
    overflow: hidden;
    border-radius: 0;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: var(--paper-100);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Skeleton Loading */
.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

img.loaded {
    animation: fade-in 0.4s ease-in;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Pull to Refresh */
.pull-to-refresh {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
}

.pull-to-refresh .pull-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.pull-to-refresh.ready .pull-icon {
    transform: rotate(180deg);
}

.pull-to-refresh.refreshing .pull-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================
   READING PROGRESS BAR
   ========================================== */

.reading-progress-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reading-progress-bar.enabled {
    display: block;
}

.reading-progress-bar.active {
    opacity: 1;
}

.reading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #6366f1);
    width: 0%;
    transition: width 0.1s ease;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    
    
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #1a1a1a;
    padding: 16px 20px;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    transition: transform 0.3s var(--ease-out), opacity 0.3s ease;
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: #10b981;
    color: white;
}

.toast-error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast-warning .toast-icon {
    background: #f59e0b;
    color: white;
}

.toast-info .toast-icon {
    background: var(--accent-color);
    color: white;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

/* Dark mode toast notifications */
[data-theme="dark"] .toast {
    background: rgba(26, 26, 26, 0.95);
    
    
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    box-shadow: none;
}

[data-theme="dark"] .toast-message {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.toast-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--text-color);
}

@media (max-width: 640px) {
    .toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ==========================================
   BOOKMARK BUTTON - DISABLED
   ========================================== */

/* Bookmark functionality has been disabled
.bookmark-btn {
    background: transparent !important;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color) !important;
    padding: 8px 16px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-out;
    margin-left: 12px;
    -webkit-appearance: none;
    appearance: none;
}

.bookmark-btn:hover {
    border-color: #F5B800;
    color: #F5B800 !important;
    background: rgba(245, 184, 0, 0.1) !important;
    transform: translateY(-1px);
    transition: all 0.3s ease-out;
}

.bookmark-btn.bookmarked {
    background: rgba(245, 184, 0, 0.2) !important;
    border-color: #F5B800;
    color: #F5B800 !important;
}

[data-theme="dark"] .bookmark-btn {
    border-color: #94a3b8;
    color: #94a3b8 !important;
}

[data-theme="dark"] .bookmark-btn:hover {
    border-color: #F5B800;
    color: #F5B800 !important;
    background: rgba(245, 184, 0, 0.15) !important;
}

[data-theme="dark"] .bookmark-btn.bookmarked {
    background: rgba(245, 184, 0, 0.25) !important;
    border-color: #F5B800;
    color: #F5B800 !important;
}

.bookmark-btn.bookmarked svg {
    fill: white;
}

.bookmark-btn svg {
    width: 16px;
    height: 16px;
    transition: fill 0.2s ease;
}

.bookmark-btn-small {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    
    
    z-index: 2;
}

.bookmark-btn-small svg {
    width: 18px;
    height: 18px;
}

.bookmark-btn-small .bookmark-text {
    display: none;
}
*/

/* ==========================================
   SHARE BUTTONS
   ========================================== */

.share-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.share-btn {
    background: var(--light-bg) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-color) !important;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease-out;
    -webkit-appearance: none;
    appearance: none;
}

.share-btn:hover {
    background: rgba(245, 184, 0, 0.1) !important;
    border-color: #F5B800;
    color: #F5B800 !important;
    transform: translateY(-2px);
    box-shadow: none;
}

[data-theme="dark"] .share-btn {
    background: rgba(45, 45, 45, 0.8) !important;
    border-color: rgba(148, 163, 184, 0.3);
    color: #cbd5e1 !important;
}

[data-theme="dark"] .share-btn:hover {
    background: rgba(245, 184, 0, 0.15) !important;
    border-color: #F5B800;
    color: #F5B800 !important;
    box-shadow: none;
}

.share-btn svg {
    width: 16px;
    height: 16px;
}

/* Floating Share Buttons */
.floating-share {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%) translateX(-100px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
    transition: transform 0.3s var(--ease-out);
}

.floating-share.visible {
    transform: translateY(-50%) translateX(0);
}

.share-btn-floating {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease-out;
    -webkit-appearance: none;
    appearance: none;
}

.share-btn-floating:hover {
    background: rgba(245, 184, 0, 0.15);
    border-color: #F5B800;
    color: #F5B800;
    opacity: 0.85;
    box-shadow: none;
}

.share-btn-floating svg {
    stroke: currentColor;
}

@media (max-width: 900px) {
    .floating-share {
        display: none;
    }
}

/* ==========================================
   LIVE SEARCH SUGGESTIONS
   ========================================== */

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 0;
    box-shadow: none;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-suggestions.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-section {
    padding: 12px 0;
}

.search-section + .search-section {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.search-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--secondary-color);
    padding: 8px 16px;
}

.search-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-suggestion:hover,
.search-suggestion.selected {
    background: var(--light-bg);
}

.search-suggestion svg {
    flex-shrink: 0;
    color: var(--secondary-color);
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-title mark {
    background: rgba(245, 184, 0, 0.2);
    color: #F5B800;
    font-weight: 700;
}

.suggestion-type {
    font-size: 12px;
    color: var(--secondary-color);
    text-transform: capitalize;
    margin-top: 2px;
}

.search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: var(--secondary-color);
}

.search-view-all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.search-view-all:hover {
    background: var(--light-bg);
}

[data-theme="dark"] .search-view-all {
    color: #F5B800;
}

[data-theme="dark"] .search-view-all:hover {
    background: rgba(245, 184, 0, 0.1);
}

[data-theme="dark"] .suggestion-title mark {
    background: rgba(245, 184, 0, 0.25);
    color: #F5B800;
}

/* ==========================================
   ARTICLE REACTIONS
   ========================================== */

.reaction-bar {
    background: var(--light-bg);
    border-radius: 0;
    padding: 20px 2rem;
    margin: 32px 0;
}

[data-theme="dark"] .reaction-bar {
    background: var(--ink-700);
    border: 1px solid rgba(245, 184, 0, 0.2);
}

.reaction-prompt {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 16px;
    text-align: center;
}

.reactions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.reaction-btn {
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.reaction-btn:hover {
    border-color: #F5B800;
    background: rgba(245, 184, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: none;
    transition: all 0.3s ease-out;
}

[data-theme="dark"] .reaction-btn {
    background: rgba(45, 45, 45, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
}

[data-theme="dark"] .reaction-btn:hover {
    background: rgba(245, 184, 0, 0.15);
    border-color: #F5B800;
    box-shadow: none;
}

.reaction-btn.active {
    background: rgba(245, 184, 0, 0.2);
    border-color: #F5B800;
    color: #F5B800;
}

.reaction-btn.reacted {
    animation: reaction-pop 0.6s var(--ease-out);
}

@keyframes reaction-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.reaction-emoji {
    font-size: 20px;
    line-height: 1;
}

.reaction-count {
    font-size: 13px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    display: none;
}

.reaction-btn.active .reaction-count {
    color: white;
}

@media (max-width: 640px) {
    .reaction-btn {
        padding: 8px 14px;
    }
    
    .reaction-emoji {
        font-size: 18px;
    }
    
    .reaction-count {
        font-size: 12px;
    }
}

/* ==========================================
   ENHANCED TYPOGRAPHY
   ========================================== */

.entry-content > p:first-of-type::first-letter {
    float: left;
    font-size: 4.5em;
    line-height: 0.85;
    margin: 0.1em 0.1em 0 0;
    font-weight: 700;
    color: var(--accent-color);
}

.entry-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 24px;
    margin: 32px 0;
    font-size: 1.15em;
    font-style: italic;
    color: var(--secondary-color);
    position: relative;
}

.entry-content blockquote::before {
    content: '"';
    font-size: 4em;
    position: absolute;
    left: -12px;
    top: -20px;
    color: var(--accent-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

/* ==========================================
   DARK MODE ADJUSTMENTS
   ========================================== */

[data-theme="dark"] .toast {
    background: #242424;
    color: #e2e8f0;
}

[data-theme="dark"] .search-suggestions {
    background: #242424;
}

[data-theme="dark"] .reaction-bar {
    background: #1a1a1a;
}

[data-theme="dark"] .reaction-btn {
    background: #242424;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

[data-theme="dark"] .bookmark-btn {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #94a3b8 !important;
}

/* ==========================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================== */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: var(--ink-900);
    
    
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 8px max(8px, calc(6px + env(safe-area-inset-bottom)));
    z-index: 1000;
    border-radius: 0;
    box-shadow: none;
}

/* Toggled off in the Customizer: collapse the space reserved for the bar */
body.mobile-bottom-nav-hidden {
    padding-bottom: 0 !important;
}

.mobile-bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(245, 184, 0, 0.3) 50%, transparent 100%);
    border-radius: 0;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    body {
        padding-bottom: 68px;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease-out;
    position: relative;
    min-width: 48px;
    border-radius: 0;
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: all 0.3s ease-out;
}

.mobile-nav-item span {
    font-size: 0.6rem;
    font-weight: 600;
    transition: all 0.3s ease-out;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: #F5B800;
    background: rgba(245, 184, 0, 0.15);
}

.mobile-nav-item:hover svg,
.mobile-nav-item.active svg {
    transform: translateY(-2px);
}

.mobile-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, #F5B800, #D9A300);
    border-radius: 0;
}

.mobile-nav-item:active {
    opacity: 0.7;
}

[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(26, 26, 26, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-nav-item {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .mobile-nav-item:hover,
[data-theme="dark"] .mobile-nav-item.active {
    color: #F5B800;
    background: rgba(245, 184, 0, 0.2);
}

/* Mobile nav button styling (chat + theme inherit .mobile-nav-item) */
.mobile-nav-chat-btn,
.mobile-nav-theme-btn {
    background: none;
    border: none;
    box-shadow: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-chat-btn:hover,
.mobile-nav-chat-btn:focus,
.mobile-nav-chat-btn:focus-visible,
.mobile-nav-chat-btn:active,
.mobile-nav-theme-btn:hover,
.mobile-nav-theme-btn:focus,
.mobile-nav-theme-btn:focus-visible,
.mobile-nav-theme-btn:active {
    background: rgba(245, 184, 0, 0.15) !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
}

.mobile-nav-chat-btn::before,
.mobile-nav-theme-btn::before {
    display: none !important;
}

/* Mobile theme button: sun shown in dark mode, moon in light mode */
.mobile-nav-sun-icon { display: none; }
.mobile-nav-moon-icon { display: block; }

[data-theme="dark"] .mobile-nav-sun-icon { display: block; }
[data-theme="dark"] .mobile-nav-moon-icon { display: none; }

/* With 7 items, reduce padding so they fit smaller screens */
@media (max-width: 768px) {
    .mobile-nav-item {
        flex: 1;
        min-width: 0;
        padding: 6px 4px;
    }
    .mobile-nav-item span {
        font-size: 0.55rem;
    }
}

@media (max-width: 380px) {
    .mobile-nav-item {
        padding: 5px 3px;
    }
    .mobile-nav-item svg {
        width: 17px;
        height: 17px;
    }
}

/* ==========================================
   MOBILE SEARCH MODAL
   ========================================== */

.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    background: var(--card-bg);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
    pointer-events: none;
}

.mobile-search-modal.active {
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 10px 12px;
}

.mobile-search-input-wrapper .search-icon {
    color: var(--secondary-color);
    flex-shrink: 0;
}

#mobileSearchInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.125rem;
    color: var(--text-color);
    outline: none;
}

#mobileSearchInput::placeholder {
    color: var(--secondary-color);
}

.search-clear-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-clear-btn:hover {
    color: var(--text-color);
}

.search-close-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    transition: opacity 0.2s ease;
}

.search-close-btn:hover {
    opacity: 0.8;
}

.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.search-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--secondary-color);
}

.search-placeholder svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
}

.search-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.search-error,
.search-no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-color);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-results-header {
    font-size: 1.05rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-weight: 500;
}

.search-result-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: var(--card-bg);
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.search-result-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 0;
    overflow: hidden;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    line-height: 1.3;
}

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

.search-result-date {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: auto;
}

[data-theme="dark"] .mobile-search-modal {
    background: #1a1a1a;
}

[data-theme="dark"] .mobile-search-header {
    background: #1a1a1a;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-search-input-wrapper {
    background: rgba(36, 36, 36, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-result-item {
    background: rgba(36, 36, 36, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-result-item:hover {
    background: rgba(36, 36, 36, 0.8);
}

[data-theme="dark"] .share-btn {
    background: #242424 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}
/* ========================================
   2026 MOBILE & TABLET OPTIMIZATIONS
   ======================================== */

/* Mobile Phones (320px - 768px) */
@media (max-width: 768px) {
    /* Increase touch targets for better usability */
    .post-card,
    .headline-item,
    .headline-item-vertical,
    button,
    .menu-toggle,
    .trending-pill,
    a[role="button"] {
        min-height: 44px; /* Apple's recommended minimum */
        padding: 1.25rem;
    }
    
    /* Better touch feedback */
    .post-card:active {
        opacity: 0.85;
        opacity: 0.95;
        transition: var(--transition-fast);
    }
    
    /* Ensure text remains readable on active state */
    .post-card:active .card-title,
    .post-card:active .post-card-excerpt {
        color: var(--primary-color);
    }
    
    [data-theme="dark"] .post-card:active .card-title,
    [data-theme="dark"] .post-card:active .post-card-excerpt {
        color: #ffffff;
    }
    
    /* Better button feedback */
    button:active,
    .read-more:active {
        opacity: 0.85;
        transition: var(--transition-fast);
    }
    
    /* Navigation improvements */
    .main-navigation a {
        padding: 1rem !important;
        font-size: 1.125rem !important;
        display: flex;
        align-items: center;
        min-height: 48px;
    }
    
    /* Trending pills - larger for easier tapping */
    .trending-pill {
        font-size: 1rem;
        padding: 0.625rem 1rem;
        min-height: 40px;
    }
    
    /* Improve spacing for mobile */
    .container,
    .wrap {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Stack layouts vertically */
    .front-layout,
    .single-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Full-width cards on mobile */
    .post-card {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .post-card-thumb {
        width: 100%;
        height: auto;
    }
    
    .post-card-thumb img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 0;
    }
    
    /* Improve form inputs for mobile */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 14px 16px;
        border-radius: 0;
    }
    
    /* Better modal/overlay handling */
    .mobile-search-modal,
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        overscroll-behavior: contain;
    }

    .menu-overlay {
        bottom: 0;
        z-index: 9999;
    }
}

/* Tablets (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container,
    .wrap {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Hybrid layout for tablets */
    .front-layout,
    .single-layout {
        grid-template-columns: 1fr 280px;
        gap: 2rem;
    }
    
    /* Optimize card sizes for tablets */
    .post-card-thumb img {
        height: 180px;
    }
    
    /* Better use of tablet screen space */
    .theory-news-headlines {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

/* Large Tablets & Small Laptops (1024px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .container {
        max-width: 1024px;
    }
    
    .front-layout,
    .single-layout {
        grid-template-columns: 1fr 300px;
    }
}

/* ==========================================
   MODERN CONTAINER QUERIES (2026)
   ========================================== */

/* Container query support for component-level responsiveness */
@supports (container-type: inline-size) {
    .post-card-container {
        container-type: inline-size;
        container-name: post-card;
    }
    
    /* Adjust card layout based on container width */
    @container post-card (max-width: 400px) {
        .post-card {
            flex-direction: column;
        }
        
        .post-card-thumb {
            width: 100%;
        }
    }
    
    @container post-card (min-width: 401px) {
        .post-card {
            flex-direction: row;
        }
        
        .post-card-thumb {
            flex: 0 0 200px;
        }
    }
}

/* ==========================================
   LANDSCAPE MODE OPTIMIZATIONS
   ========================================== */

@media (max-width: 968px) and (orientation: landscape) {
    /* Optimize for landscape phones */
    body {
        padding-bottom: 52px;
    }

    .mobile-bottom-nav {
        padding: 6px 8px max(6px, calc(4px + env(safe-area-inset-bottom)));
    }

    .mobile-nav-item {
        padding: 5px 8px;
        gap: 2px;
    }

    .mobile-nav-item span {
        font-size: 0.65rem;
    }
    
    .mobile-nav-item svg {
        width: 22px;
        height: 22px;
    }
}

/* ==========================================
   DEVICE-SPECIFIC OPTIMIZATIONS
   ========================================== */

/* iPhone SE / Small phones (320px - 375px) */
@media (max-width: 375px) {
    :root {
        --container-padding: 1rem;
    }
    
    .post-card {
        padding: 1rem;
    }

    /* Compact trending bar */
    .trending-pill {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
    }
}

/* iPhone 12/13/14 Pro Max / Large phones (414px - 428px) */
@media (min-width: 414px) and (max-width: 428px) {
    /* Optimize for larger phone screens */
    .theory-news-headlines {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* iPad Mini / Small tablets (744px - 834px) */
@media (min-width: 744px) and (max-width: 834px) {
    .front-layout,
    .single-layout {
        grid-template-columns: 1fr 260px;
    }
    
    .theory-news-headlines {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Pro / Large tablets (1024px - 1366px) */
@media (min-width: 1024px) and (max-width: 1366px) {
    .container {
        max-width: 960px;
    }
    
    .theory-news-headlines {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   SAFE AREA INSETS (for notched devices)
   ========================================== */

@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(8px, calc(8px + env(safe-area-inset-bottom)));
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }
}

/* ==========================================
   HIGH DPI / RETINA DISPLAYS
   ========================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders on retina displays */
    .post-card,
    .headline-item,
    .headline-item-vertical {
        border-width: 0.5px;
    }
}

/* ============================================
   2026 PERFORMANCE OPTIMIZATIONS & POLISH
   ============================================ */

/* Smooth scroll behavior with modern support */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    
    /* Modern 2026: Better scrollbar customization */
    scrollbar-gutter: stable;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable parallax effects */
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* GPU acceleration for smooth animations.
   NOTE: post-card/headline-item/headline-item-vertical are deliberately excluded —
   they combine backdrop-filter with a hover :hover{ transform: ... } rule, and since
   `transform` isn't additive across rules, hovering replaced this base translateZ(0)
   with the hover's translateY(...), toggling GPU-layer promotion on a blurred element
   every hover/unhover. That's a known Chromium flicker/disappear glitch. */
.hero-cta,
.menu-toggle,
.theme-toggle {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize images for modern displays */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Enhanced focus states for accessibility (WCAG AAA) */
*:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 0;
    box-shadow: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: #ffffff;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 700;
    z-index: 10000;
    border-radius: 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Improved text selection */
::selection {
    background-color: rgba(245, 184, 0, 0.35);
    color: var(--primary-color);
    text-shadow: none;
}

::-moz-selection {
    background-color: rgba(245, 184, 0, 0.35);
    color: var(--primary-color);
    text-shadow: none;
}

[data-theme="dark"] ::selection {
    background-color: rgba(245, 184, 0, 0.45);
    color: #ffffff;
}

[data-theme="dark"] ::-moz-selection {
    background-color: rgba(245, 184, 0, 0.45);
    color: #ffffff;
}

/* Modern custom scrollbar (2026 style) */
::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 0;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #F5B800, #D9A300);
    border-radius: 0;
    border: 3px solid var(--light-bg);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-hover), #F5B800);
    border-width: 2px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    border-color: #1a1a1a;
    background: linear-gradient(135deg, #F5B800, #D9A300);
}

/* Modern loading states with shimmer */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(
        90deg,
        var(--light-bg) 0%,
        var(--card-bg) 50%,
        var(--light-bg) 100%
    );
    background-size: 1000px 100%;
}

[data-theme="dark"] .hero-cta {
    box-shadow: none;
}

[data-theme="dark"] .hero-cta:hover {
    box-shadow: none;
}

/* menu-toggle is icon-only (no background), so its bars need to flip to light in dark mode */
[data-theme="dark"] .menu-toggle .menu-toggle-bar {
    background: #f1f5f9;
}

/* Subtle attention animation */
@keyframes subtle-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.88;
    }
}

/* Print styles for better document printing */
@media print {
    /* Hide navigation and interactive elements */
    .site-header,
    .site-footer,
    .trending-bar,
    .theory-sidebar,
    .menu-toggle,
    .theme-toggle,
    .hero-cta,
    .mobile-bottom-nav,
    .share-buttons,
    .floating-share,
    .mobile-search-modal {
        display: none !important;
    }

    /* Optimize for print */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }

    .post-card,
    .headline-item {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e0e0e0 !important;
    }
    
    /* Show article URLs after links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #666;
    }
    
    /* Remove link URLs for navigation */
    nav a[href]:after,
    .menu a[href]:after {
        content: "";
    }
    
    /* Ensure images fit */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}

/* ==========================================
   EXPERIMENTAL 2026 FEATURES
   ========================================== */

/* Modern CSS nesting support (when available) */
@supports (selector(&)) {
    .post-card {
        & .card-title {
            transition: var(--transition);
        }

        &:hover .card-title {
            color: #D9A300;
        }

        &:hover .card-title a {
            color: #D9A300;
        }
    }

    [data-theme="dark"] .post-card:hover .card-title,
    [data-theme="dark"] .post-card:hover .card-title a {
        color: #f1f5f9;
    }
}

/* Modern color spaces (future-proof) */
@supports (color: oklch(0.5 0.5 180)) {
    :root {
        --accent-oklch: oklch(0.85 0.15 85);
    }
}

/* Subgrid support for advanced layouts */
@supports (grid-template-rows: subgrid) {
    .posts-grid {
        display: grid;
        grid-template-rows: subgrid;
    }
}

/* View transitions API for smooth page changes */
@supports (view-transition-name: main) {
    ::view-transition-old(main),
    ::view-transition-new(main) {
        animation-duration: 0.3s;
    }
}

/* ==========================================
   ACCESSIBILITY ENHANCEMENTS (WCAG AAA)
   ========================================== */

/* Ensure sufficient color contrast */
[data-theme="light"] {
    --text-color: #1e293b; /* 8.59:1 contrast ratio */
    --secondary-color: #475569; /* 7.54:1 contrast ratio */
}

[data-theme="dark"] {
    --text-color: #e2e8f0; /* 12.63:1 contrast ratio */
    --secondary-color: #cbd5e1; /* 14.22:1 contrast ratio */
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    * {
        border-width: 2px !important;
    }
    
    .post-card,
    .headline-item,
    button {
        border-color: currentColor !important;
    }
}

/* Forced colors mode (Windows High Contrast) */
@media (forced-colors: active) {
    .post-card,
    .headline-item,
    button {
        border: 2px solid ButtonText;
    }
    
    .theme-toggle {
        border: 2px solid ButtonText;
        forced-color-adjust: none;
    }
}

/* ==========================================
   PREMIUM FEATURES & ENHANCEMENTS (2026)
   ========================================== */

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-color), #D9A300);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s var(--ease-spring);
    box-shadow: none;
    z-index: 9997;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    transform: translateY(-4px);
    box-shadow: none;
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-3px);
}

[data-theme="dark"] .scroll-to-top {
    box-shadow: none;
}

/* Selection styling */
::selection {
    background: rgba(245, 184, 0, 0.3);
    color: var(--primary-color);
}

::-moz-selection {
    background: rgba(245, 184, 0, 0.3);
    color: var(--primary-color);
}

[data-theme="dark"] ::selection {
    background: rgba(245, 184, 0, 0.4);
    color: #ffffff;
}

/* Custom scrollbar (WebKit browsers) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 0;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-color), #D9A300);
    border-radius: 0;
    border: 2px solid var(--light-bg);
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #FFD666, var(--accent-color));
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    border-color: #2d2d2d;
}

/* Loading spinner */
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    padding: 16px 24px;
    border-radius: 0;
    box-shadow: none;
    border: var(--glass-border);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s var(--ease-spring);
    min-width: 300px;
    text-align: center;
    font-weight: 600;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Badge/Pill component */
.badge,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 700;
    border-radius: var(--radius-full);
    background: rgba(245, 184, 0, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(245, 184, 0, 0.3);
    transition: all 0.3s ease;
}

.badge:hover,
.pill:hover {
    background: rgba(245, 184, 0, 0.25);
    opacity: 0.85;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: var(--primary-color);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 0;
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s var(--ease-out);
    z-index: 10001;
    pointer-events: none;
    box-shadow: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--primary-color);
}

.has-tooltip:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Modern focus ring */
*:focus-visible {
    outline: 3px solid rgba(245, 184, 0, 0.5);
    outline-offset: 3px;
    border-radius: 0;
}

/* Print styles */
@media print {
    .site-header,
    .theme-toggle,
    .scroll-to-top,
    .trending-bar,
    .site-footer,
    .theory-sidebar {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .post-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    a {
        color: inherit;
        text-decoration: underline;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* ==========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================== */

/* Lazy loading images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Intersection Observer animations */
.fade-in-observe {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out),
                transform 0.8s var(--ease-out);
}

.fade-in-observe.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Content loading shimmer */
.shimmer {
    background: linear-gradient(
        90deg,
        var(--light-bg) 0%,
        rgba(226, 232, 240, 0.6) 50%,
        var(--light-bg) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* END OF THEORY NEWS THEME v8.0 (2026 Edition) */
/* ============================================== */
