/*
Theme Name: Theory News
Theme URI: https://beezloop.com/
Author: BeezLoop
Author URI: https://beezloop.com/
Description: An edgy news site theme with interactive opinion theories and discussions
Version: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theory-news
*/

:root {
    --primary-color: #0f172a;
    --secondary-color: #475569;
    --accent-color: #ffd700;
    --text-color: #1e293b;
    --body-font: 'Montserrat', sans-serif;
    --header-font: 'Montserrat', sans-serif;
    --white: #ffffff;
    --section-bg: #f4f7fb;
    --light-bg: #f8fafc;
    --dark-bg: #0f172a;
    --container-width: 1350px;
    --transition: all 0.25s ease;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --glass-border: 1px solid rgba(148, 163, 184, 0.25);
    --frost-effect: blur(16px) saturate(160%);
    --frost-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    --box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    --bias-left: #ffd700;
    --bias-center: #94a3b8;
    --bias-right: #ef4444;
    --gradient: linear-gradient(135deg, rgba(255,215,0,0.16) 0%, rgba(255,183,0,0.08) 100%);
}

/* Dark Mode - System Theme Responsive */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #e2e8f0;
        --secondary-color: #94a3b8;
        --accent-color: #ffd700;
        --text-color: #cbd5e1;
        --white: #191919;
        --section-bg: #191919;
        --light-bg: #191919;
        --dark-bg: #191919;
        --glass-border: 1px solid rgba(148, 163, 184, 0.2);
        --frost-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
        --box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
        --bias-left: #ffd700;
        --bias-center: #94a3b8;
        --bias-right: #f87171;
    }
}

/* Manual Dark Mode Override */
[data-theme="dark"] {
    --primary-color: #e2e8f0;
    --secondary-color: #94a3b8;
    --accent-color: #ffd700;
    --text-color: #cbd5e1;
    --white: #191919;
    --section-bg: #191919;
    --light-bg: #191919;
    --dark-bg: #191919;
    --glass-border: 1px solid rgba(148, 163, 184, 0.2);
    --frost-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
    --box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
    --bias-left: #ffd700;
    --bias-center: #94a3b8;
    --bias-right: #f87171;
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body,
    [data-theme="dark"] body {
        background-color: #191919;
        color: var(--text-color);
    }
}

[data-theme="dark"] body {
    background-color: #191919;
    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"]) .headline-item-vertical,
    :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;
    }
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .theory-sidebar,
[data-theme="dark"] .post-card,
[data-theme="dark"] .headline-item,
[data-theme="dark"] .headline-item-vertical,
[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;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-header {
        background: rgba(25, 25, 25, 0.7);
        border-bottom-color: rgba(71, 85, 105, 0.2);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        backdrop-filter: blur(20px) saturate(180%);
    }
    
    :root:not([data-theme="light"]) .theory-sidebar {
        background: linear-gradient(180deg, rgba(35, 35, 35, 0.7) 0%, rgba(25, 25, 25, 0.6) 100%);
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    :root:not([data-theme="light"]) .theory-sidebar .widget {
        background: rgba(35, 35, 35, 0.6);
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    :root:not([data-theme="light"]) .post-card,
    :root:not([data-theme="light"]) .headline-item,
    :root:not([data-theme="light"]) .headline-item-vertical {
        background: rgba(35, 35, 35, 0.7);
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    :root:not([data-theme="light"]) .front-hero-card::before {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.5) 100%);
    }
    
    :root:not([data-theme="light"]) .theory-sidebar .widget_search input[type="search"] {
        background: rgba(35, 35, 35, 0.8);
        color: var(--text-color);
        border-color: rgba(71, 85, 105, 0.4);
    }
    
    :root:not([data-theme="light"]) .theory-sidebar .widget_search input[type="search"]::placeholder {
        color: #64748b;
    }
    
    :root:not([data-theme="light"]) .newsletter-form input[type="email"] {
        background: rgba(35, 35, 35, 0.9);
        color: var(--text-color);
        border-color: rgba(71, 85, 105, 0.4);
    }
    
    :root:not([data-theme="light"]) .newsletter-form input[type="email"]::placeholder {
        color: #64748b;
    }
    
    :root:not([data-theme="light"]) .site-footer {
        background: #191919;
        border-top-color: rgba(71, 85, 105, 0.3);
    }
    
    :root:not([data-theme="light"]) .main-navigation {
        background: rgba(25, 25, 25, 0.98);
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    :root:not([data-theme="light"]) .trending-bar {
        background: rgba(35, 35, 35, 0.7);
        border-color: rgba(71, 85, 105, 0.3);
    }
    
    :root:not([data-theme="light"]) .trending-inner::after {
        background: linear-gradient(to left, rgba(35, 35, 35, 0.7) 0%, transparent 100%);
    }
    
    :root:not([data-theme="light"]) .trending-fallback {
        background: rgba(35, 35, 35, 0.7);
    }
    
    :root:not([data-theme="light"]) .trending-pill {
        background: rgba(55, 55, 55, 0.8);
        color: #e2e8f0;
    }
    
    :root:not([data-theme="light"]) .trending-pill:hover {
        background: var(--accent-color);
        color: #ffffff;
    }
    
    :root:not([data-theme="light"]) .top-info-bar {
        background: #2d2d2d;
        color: #ffffff;
        border-bottom-color: rgba(71, 85, 105, 0.3);
    }
    
    :root:not([data-theme="light"]) .date-time-info,
    :root:not([data-theme="light"]) .weather-info {
        color: #ffffff;
    }
    
    :root:not([data-theme="light"]) .date-time-info span {
        color: #e2e8f0;
    }
    
    :root:not([data-theme="light"]) .weather-temp {
        color: #ffffff;
    }
    
    :root:not([data-theme="light"]) .weather-desc {
        color: #cbd5e1;
    }
    
    :root:not([data-theme="light"]) .weather-location {
        color: #ffd700;
    }
    
    :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: rgba(35, 35, 35, 0.7);
        border-color: rgba(71, 85, 105, 0.3);
    }
}

[data-theme="dark"] .site-header {
    background: rgba(25, 25, 25, 0.7);
    border-bottom-color: rgba(71, 85, 105, 0.2);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}

[data-theme="dark"] .theory-sidebar {
    background: linear-gradient(180deg, rgba(35, 35, 35, 0.7) 0%, rgba(25, 25, 25, 0.6) 100%);
    border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .theory-sidebar .widget {
    background: rgba(35, 35, 35, 0.6);
    border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .post-card,
[data-theme="dark"] .headline-item,
[data-theme="dark"] .headline-item-vertical {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(71, 85, 105, 0.4);
    color: #e2e8f0;
}

[data-theme="dark"] .post-card .card-title,
[data-theme="dark"] .post-card .card-title a {
    color: #f1f5f9;
}

[data-theme="dark"] .post-card .post-card-excerpt,
[data-theme="dark"] .post-card-excerpt {
    color: #cbd5e1;
}

[data-theme="dark"] .post-card .author-name {
    color: #94a3b8;
}

[data-theme="dark"] .post-card .read-more {
    color: #1e293b;
}

[data-theme="dark"] .post-card .read-more:hover {
    color: #1e293b;
}

[data-theme="dark"] .front-hero-card::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.5) 100%);
}

[data-theme="dark"] .theory-sidebar .widget_search input[type="search"] {
    background: rgba(35, 35, 35, 0.8);
    color: var(--text-color);
    border-color: rgba(71, 85, 105, 0.4);
}

[data-theme="dark"] .theory-sidebar .widget_search input[type="search"]::placeholder {
    color: #64748b;
}

[data-theme="dark"] .newsletter-form input[type="email"] {
    background: rgba(35, 35, 35, 0.9);
    color: var(--text-color);
    border-color: rgba(71, 85, 105, 0.4);
}

[data-theme="dark"] .newsletter-form input[type="email"]::placeholder {
    color: #64748b;
}

[data-theme="dark"] .site-footer {
    background: #191919;
    border-top-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .main-navigation {
    background: rgba(25, 25, 25, 0.98);
    border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .trending-bar {
    background: rgba(35, 35, 35, 0.7);
    border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .trending-inner::after {
    background: linear-gradient(to left, rgba(35, 35, 35, 0.7) 0%, transparent 100%);
}

[data-theme="dark"] .trending-fallback {
    background: rgba(35, 35, 35, 0.7);
}

[data-theme="dark"] .top-info-bar {
    background: #2d2d2d;
    color: #ffffff;
    border-bottom-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .date-time-info,
[data-theme="dark"] .weather-info {
    color: #ffffff;
}

[data-theme="dark"] .date-time-info span {
    color: #e2e8f0;
}

[data-theme="dark"] .weather-temp {
    color: #ffffff;
}

[data-theme="dark"] .weather-desc {
    color: #cbd5e1;
}

[data-theme="dark"] .weather-location {
    color: #ffd700;
}

[data-theme="dark"] .trending-pill {
    background: rgba(55, 55, 55, 0.8);
    color: #e2e8f0;
}

[data-theme="dark"] .trending-pill:hover {
    background: var(--accent-color);
    color: #ffffff;
}

[data-theme="dark"] .top-info-bar {
    background: #2d2d2d;
    color: #cbd5e1;
    border-bottom-color: rgba(71, 85, 105, 0.3);
}

[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: rgba(35, 35, 35, 0.7);
    border-color: rgba(71, 85, 105, 0.3);
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #19191980;
    color: #ffd700;
    border: 2px solid #ffd700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9998;
    opacity: 1;
}

.theme-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.theme-toggle:hover {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #1e293b;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[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);
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    margin: 0;
    font-family: var(--body-font);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

img { max-width: 100%; height: auto; display: block; }

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--accent-color); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    overflow-x: hidden;
}

.wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section-heading {
    font-size: 1.4rem;
    text-align: left;
    color: var(--primary-color);
    margin: 28px 0;
    font-weight: 800;
    letter-spacing: -0.2px;
    text-transform: uppercase;
}

.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: #e5e7eb;
    color: #1f2937;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    position: relative;
    z-index: 1001;
}

.top-info-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0) 0%, rgba(59, 130, 246, 0.4) 50%, rgba(59, 130, 246, 0) 100%);
    opacity: 0.3;
}

.top-info-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.top-info-inner {
    display: flex;
    width: 100%;
    max-width: var(--container-width);
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 10px 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: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.weather-desc {
    text-transform: capitalize;
    color: #4b5563;
}

.weather-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffd700;
    font-weight: 600;
}

@media (max-width: 768px) {
    /* Prevent horizontal overflow on mobile */
    body, html {
        max-width: 100vw;
        overflow-x: hidden !important;
    }
    
    .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
    }
    
    * {
        max-width: 100vw;
    }
    
    img, video, iframe {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .top-info-bar .container {
        padding: 0 1.5rem;
    }

    .top-info-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .date-time-info,
    .weather-info {
        width: 100%;
        justify-content: center;
        letter-spacing: 0.03em;
    }
}

/* Header & Navigation */
.site-header {
    background: rgba(255, 255, 255, 0.75);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.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: -1px;
    margin: 0;
    color: var(--primary-color);
    transition: var(--transition);
}

.custom-logo-link {
    display: block;
    max-width: 200px;
    height: auto;
    transition: var(--transition);
    padding: 8px 0;
}

.custom-logo {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* 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;
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
    box-shadow: 0 10px 24px rgba(255, 215, 0, 0.3);
}
.menu-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
.menu-toggle:hover {
    transform: translateY(-2px);
}
.menu-toggle .menu-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #1e293b;
    margin: 3px 0;
    transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
    border-radius: 2px;
}
.menu-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, #ffb700 0%, #ff9700 100%);
    box-shadow: 0 16px 30px rgba(255, 215, 0, 0.4);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar {
    background: #1e293b;
}
.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(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
    transform: translateY(-6px) 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: 700;
    font-size: 1.1rem;
    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: var(--primary-color);
}

.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%;
}

body.menu-open {
    overflow: hidden;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    -webkit-backdrop-filter: blur(6px) saturate(160%);
    backdrop-filter: blur(6px) saturate(160%);
    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: 10px;
    padding: 16px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.headline-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.headline-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.headline-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.headline-title a:hover {
    color: var(--accent-color);
}

.headline-desc {
    font-size: 0.9rem;
    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: 0.85rem;
    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;
}

.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 {
    color: var(--accent-color);
}

.entry-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.post-thumbnail {
    margin: -3rem -3rem 3rem;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.post-thumbnail:hover img {
    transform: scale(1.05);
}

.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);
}

.single-post .post-thumbnail {
    margin: 0 0 2.5rem;
    border-radius: 22px;
    box-shadow: 0 24px 48px rgba(15,23,42,0.18);
}
.single-post .post-thumbnail img {
    border-radius: inherit;
}
.single-post .entry-header {
    max-width: 780px;
    margin: 0 0 1.8rem;
    text-align: left;
}
.single-post .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);
}
.single-post .entry-title a {
    color: inherit;
    text-decoration: none;
}
.single-post .entry-title a:hover {
    color: var(--accent-color);
}
.single-post .entry-meta {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-bottom: 1.4rem;
}
.single-post .entry-content {
    padding-left: 2rem;
    padding-right: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
}
.single-post .entry-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}
.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.single-post .entry-footer {
    padding-left: 2rem;
    padding-right: 2rem;
}
.single-post .entry-content img,
.single-post .entry-content figure img {
    border-radius: 20px;
    box-shadow: 0 18px 42px rgba(15,23,42,0.18);
    margin: 2rem 0;
}
.single-post .entry-content figure {
    margin: 2rem 0;
}
.single-post .entry-content figure figcaption {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 0.6rem;
    text-align: center;
}

/* Theory Container Styles */
/* Theory Section */
.theory-container {
    background: var(--section-bg);
    padding: 4rem;
    margin: 4rem 0;
    position: relative;
    border-radius: 20px;
    box-shadow: var(--frost-shadow);
    -webkit-backdrop-filter: var(--frost-effect);
    backdrop-filter: var(--frost-effect);
    border: var(--glass-border);
}

/* 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: 24px;
    outline: none;
    transition: var(--transition);
    -webkit-backdrop-filter: var(--frost-effect);
    backdrop-filter: var(--frost-effect);
    box-shadow: var(--frost-shadow);
}

.search-form input[type="search"]:focus,
.search-form .search-field:focus {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.search-form button[type="submit"],
.search-form .search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-form button[type="submit"]:hover,
.search-form .search-submit:hover {
    opacity: 0.9;
}

.theory-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
    border-radius: 20px 20px 0 0;
}

/* 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: 2rem 0 3rem;
}

.hero-stories-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

/* Hero Carousel Styles */
.hero-carousel {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    min-height: 520px;
    box-shadow: 0 24px 48px rgba(15,23,42,0.18);
}

.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: #c17a5f;
}

.hero-slide:nth-child(2) {
    background-color: #a89968;
}

.hero-slide:nth-child(3) {
    background-color: #7b8fa3;
}

.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%);
}

/* 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: 3px;
    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: rgba(255, 255, 255, 0.95);
    transition: width 5s linear;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.carousel-indicator.active .carousel-progress-bar {
    width: 100%;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Carousel Controls */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.carousel-prev svg,
.carousel-next svg {
    color: var(--primary-color);
}

/* Dark mode for carousel controls */
[data-theme="dark"] .carousel-prev,
[data-theme="dark"] .carousel-next {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .carousel-prev:hover,
[data-theme="dark"] .carousel-next:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .carousel-prev svg,
[data-theme="dark"] .carousel-next svg {
    color: #f1f5f9;
}

/* 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: 3px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.carousel-indicator.active .carousel-progress-bar {
    width: 100%;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

.front-hero-card {
    position: relative;
    border-radius: 22px;
    padding: 60px 40px;
    background: var(--primary-color);
    background-size: cover;
    background-position: center;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 24px 48px rgba(15,23,42,0.18);
}

.front-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: inherit;
}

.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: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    background: rgba(255,255,255,0.82);
    border-radius: 12px;
    border: 1px solid rgba(226,232,240,0.65);
    box-shadow: 0 4px 12px rgba(15,23,42,0.08);
    overflow: hidden;
    padding: 12px;
}

.headline-item-vertical:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 20px rgba(15,23,42,0.14);
}

.headline-thumb-vert {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
}

.headline-thumb-vert img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.headline-item-vertical:hover .headline-thumb-vert img {
    transform: scale(1.05);
}

.headline-body-vert {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.headline-title-vert {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.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;
    }
    
    .hero-carousel,
    .front-hero-card {
        min-height: 400px;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
    }
    
    .carousel-prev {
        left: 12px;
    }
    
    .carousel-next {
        right: 12px;
    }
    
    .hero-slide {
        padding: 40px 24px;
    }
}

.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: 24px 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: var(--transition);
    background: rgba(255,255,255,0.82);
    border-radius: 16px;
    border: 1px solid rgba(226,232,240,0.65);
    box-shadow: 0 12px 30px rgba(15,23,42,0.12);
    overflow: hidden;
    isolation: isolate;
    position: relative;
}
.headline-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(241,245,249,0.15) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.headline-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(15,23,42,0.18);
}
.headline-item:hover::before {
    opacity: 1;
}
.headline-thumb { position: relative; overflow: hidden; z-index: 1; }
.headline-thumb img { width: 100%; height: 120px; object-fit: cover; display: block; transition: transform 0.25s ease; }
.headline-item:hover .headline-thumb img { transform: scale(1.05); }
.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: 1rem; color: var(--primary-color); line-height: 1.25; }
.headline-date { font-size: 0.82rem; color: var(--secondary-color); font-weight: 600; letter-spacing: 0.02em; }

@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: 42px;
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 4px 24px rgba(0,0,0,0.4);
}

.hero-subtitle {
    font-size: 18px;
    margin: 0 0 20px;
    color: #fff;
    max-width: 900px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-cta {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #1e293b;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}
.hero-cta:hover { 
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    color: #1e293b;
}

/* 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: 12px;
    box-shadow: var(--box-shadow);
    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-block;
    background: transparent !important;
    color: #ffd700 !important;
    border: 2px solid #ffd700;
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.read-more:hover { 
    background: linear-gradient(135deg, #ffd700, #ffb700) !important;
    color: #1e293b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* 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;
}
.bias-meter .bias-seg {
    height: 6px;
    border-radius: 6px;
    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 {
    font-size: 0.8rem;
    color: var(--secondary-color);
}
.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:8px; }
.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%;
}

.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 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(--white);
    border: 1px solid var(--section-bg);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

/* Override for horizontal cards - Desktop only */
@media (min-width: 969px) {
    /* Horizontal layout for desktop */
    .posts-grid .post-card.horizontal-card {
        display: flex !important;
        flex-direction: row !important;
        gap: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !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;
        padding: 0 !important;
        border: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    
    /* Image comes first in HTML, push it to the right on desktop */
    .posts-grid .post-card.horizontal-card .post-card-thumb,
    article.post-card.horizontal-card .post-card-thumb {
        order: 2;
        flex-shrink: 0;
        width: 480px;
        height: auto;
        border-radius: 0;
        overflow: hidden;
        display: flex;
        align-items: center;
    }

    /* Content comes second in HTML, keep it on the left on desktop */
    .posts-grid .post-card.horizontal-card .post-card-content,
    article.post-card.horizontal-card .post-card-content {
        order: 1;
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 20px 24px 20px 0;
        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;
    }
}

/* Footer styling */
.site-footer {
    background: #f7f8fb;
    padding: 48px 0 32px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--secondary-color);
}

.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: 0.95rem;
}

.footer-menu li {
    display: flex;
    align-items: center;
    padding: 6px 12px;
}

.footer-menu li + li {
    padding-left: 0;
}

.footer-menu li + li::before {
    content: "/";
    color: rgba(100, 116, 139, 0.45);
    margin-right: 12px;
    font-weight: 400;
}

.footer-menu a {
    color: var(--secondary-color);
    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: 0.9rem;
    color: var(--secondary-color);
}

.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: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.footer-social img {
    width: 18px;
    height: 18px;
    display: block;
    filter: grayscale(100%);
    opacity: 0.75;
    transition: opacity 0.18s ease, filter 0.18s ease;
}

.footer-social a:hover {
    transform: translateY(-3px);
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    box-shadow: 0 12px 24px rgba(255, 215, 0, 0.2);
}

.footer-social a:hover img {
    filter: none;
    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-links {
        margin-bottom: 22px;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Sub-article / card stacked layout: image then title then excerpt then read-more */
.post-card {
    display: block;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--section-bg);
    background: var(--white);
}
.post-card-thumb img { width:100%; height:200px; object-fit:cover; display:block; }
.post-card-body { padding: 12px 14px; }
.post-card .card-title { font-size: 1.35rem; margin: 0 0 8px; font-weight:800 }
.post-card .post-card-excerpt { color: var(--secondary-color); margin-bottom: 12px; }
.post-card .read-more { display:inline-block; }

/* Dark mode for standard post cards */
[data-theme="dark"] .post-card {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(71, 85, 105, 0.4);
}

[data-theme="dark"] .post-card .card-title,
[data-theme="dark"] .post-card .card-title a {
    color: #f1f5f9;
}

[data-theme="dark"] .post-card .post-card-excerpt {
    color: #cbd5e1;
}

[data-theme="dark"] .post-card .read-more {
    color: #1e293b;
}

/* 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: 0 !important;
    border-bottom: 1px solid #e5e7eb !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;
}

/* Horizontal card base styles - typography and common elements */

.post-card.horizontal-card .card-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    color: var(--text-color);
}

.post-card.horizontal-card .card-title a {
    color: inherit;
    text-decoration: none;
}

.post-card.horizontal-card .card-title a:hover {
    text-decoration: none;
    color: var(--accent-color);
}

.post-card.horizontal-card .post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.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: var(--accent-color);
}

.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: #ffd700;
}

.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: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.post-card.horizontal-card .post-card-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
    max-width: 100%;
}

.post-card.horizontal-card .read-more-btn {
    display: inline-block;
    padding: 0;
    background: transparent;
    color: #ffd700;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    align-self: flex-start;
    margin-top: auto;
}

.post-card.horizontal-card .read-more-btn:hover {
    color: #ffb700;
    transform: translateX(4px);
    text-decoration: underline;
}

.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: #fff;
}

[data-theme="dark"] .post-card.horizontal-card .card-title a:hover {
    color: var(--accent-color);
}

[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: 12px !important;
        overflow: hidden !important;
        margin-bottom: 20px !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !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: 6px !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: 10px !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(30, 41, 59, 0.85) !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: #1e293b !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: 0 10px 30px rgba(0,0,0,0.06);
    border-radius: 12px;
}
.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: var(--light-bg);
    padding: 10px 0 6px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 0;
    overflow: hidden;
}
.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: rgba(255, 215, 0, 0.1);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 16px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    border: 1px solid rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.trending-item:hover {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}

[data-theme="dark"] .trending-item {
    background: rgba(255, 215, 0, 0.15);
    color: #e2e8f0;
    border-color: rgba(255, 215, 0, 0.4);
}

[data-theme="dark"] .trending-item:hover {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #1e293b;
}

.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: var(--primary-color);
    border-radius: 18px;
    font-size: 0.98rem;
    font-weight: 600;
    padding: 6px 18px;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: background 0.18s;
    cursor: pointer;
    border: none;
    outline: none;
    flex-shrink: 0;
}
.trending-pill:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    color: #ffd700;
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.trending-loading {
    color: var(--secondary-color);
    font-size: 0.95rem;
    opacity: 0.7;
}

.front-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

.main-column { min-width: 0; }

.sidebar {
    width: 100%;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.post-card {
    display: flex;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--section-bg);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

/* Sub-article / card stacked layout: image then title then excerpt then read-more */
.post-card {
    display: block;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--section-bg);
    background: var(--white);
}
.post-card-thumb img { width:100%; height:200px; object-fit:cover; display:block; }
.post-card-body { padding: 12px 14px; }
.post-card .card-title { font-size: 1.35rem; margin: 0 0 8px; font-weight:800 }
.post-card .post-card-excerpt { color: var(--secondary-color); margin-bottom: 12px; }
.post-card .read-more { display:inline-block; }

/* Featured card - larger visual weight but still uses .post-card structure */
.post-card.featured-card,
.post-card.post-card-featured {
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border-radius: 12px;
}
.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); }

/* Ensure grid and featured share consistent spacing */
.post-card { margin-bottom: 0; }

@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr; }
    .featured-article { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; gap: 15px; }
}

.post-card-thumb img {
    width: 160px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.post-card .post-card-body { display:flex; flex-direction:column; justify-content:center; }
.post-card .card-title a { color: var(--primary-color); text-decoration:none; }
.post-card .card-title a:hover { text-decoration: underline; }

.post-card .card-meta {
    font-size: 12px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-top: 6px;
}

.featured-article {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: center;
    padding: 28px;
    background: var(--white);
    border-radius: 8px;
}
.featured-media img { width: 100%; height: 320px; object-fit: cover; border-radius: 8px; }
.featured-title { font-size: 1.8rem; margin-bottom: 0.75rem; }
.featured-excerpt { color: var(--secondary-color); }

.post-card-body { flex: 1; }
.post-card-title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.post-card-excerpt { color: var(--secondary-color); margin-bottom: 0.5rem; }

/* Sidebar widgets */
.theory-sidebar .widget { background: rgba(255,255,255,0.22); padding: 1rem; margin-bottom: 1rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.35); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); }
.widget-title { font-size: 1.05rem; margin-bottom: 0.5rem; font-weight: 700; }

/* Sidebar specific styling */
.theory-sidebar {
    width: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.24) 100%);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.35);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}
.theory-sidebar .widget { padding: 16px; }
.theory-sidebar .widget_search .search-form,
.theory-sidebar .search-form {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch;
}
.theory-sidebar .widget_search label,
.theory-sidebar .search-form label {
    width: 100%;
    margin: 0;
    display: block;
}
.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 {
    width: 100%;
    padding: 14px 16px;
    border-radius: 25px;
    background: white;
    color: var(--primary-color);
    border: none;
    font-size: 0.95rem;
    font-weight: 400;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}
.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: 0 4px 16px rgba(0, 0, 0, 0.12);
    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"] {
    position: static !important;
    padding: 14px 20px;
    margin: 0;
    width: 100%;
    font-size: 1rem;
    background: var(--light-bg) !important;
    color: var(--text-color) !important;
    border: 2px solid #ffd700;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-transform: none;
    transform: none !important;
    right: auto !important;
    top: auto !important;
}
.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, #ffd700, #ffb700) !important;
    color: #1e293b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

/* Sidebar widget titles higher contrast */
.theory-sidebar .widget .widget-title { color: var(--primary-color); }

.widget_advert .ad-placeholder {
    display: grid;
    place-items: center;
    min-height: 250px;
    border-radius: 14px;
    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;
}

/* Newsletter Widget */
.widget_newsletter {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 183, 0, 0.05) 100%);
    border: 2px solid #ffd700;
    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: 25px;
    font-size: 0.95rem;
    outline: none;
    background: white;
    color: var(--primary-color);
    font-weight: 400;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease;
}
.newsletter-form input[type="email"]:focus {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.newsletter-form input[type="email"]::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
.newsletter-submit {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 100%;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.3);
}
.newsletter-submit:hover {
    background: #0d1829;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.4);
}

@media (min-width: 1024px) {
    .theory-sidebar .widget_search .search-form,
    .theory-sidebar .search-form {
        max-width: 280px;
    }
    .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 {
        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: 8px; 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) {
    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        display: none;
    }

    .main-navigation.is-open {
        display: block;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        background: #0f172a;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        border-radius: 16px;
        z-index: 9999;
        margin: 0 1rem;
        animation: slideDown 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        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 cubic-bezier(0.68, -0.55, 0.265, 1.55);
        position: relative;
        overflow: hidden;
    }

    .main-navigation a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(135deg, #ffd700, #ffb700);
        transform: scaleY(0);
        transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .main-navigation a:hover,
    .main-navigation a:focus {
        background: rgba(255, 215, 0, 0.1);
        padding-left: 2rem;
        color: #ffd700;
    }

    .main-navigation a:hover::before,
    .main-navigation a:focus::before {
        transform: scaleY(1);
    }
    
    [data-theme="dark"] .main-navigation.is-open {
        background: #2d2d2dc2;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }
    
    [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(255, 215, 0, 0.15);
        color: #ffd700;
    }

    .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 { 
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Nuclear-level sidebar hiding - use all possible methods */
    .theory-sidebar,
    .sidebar,
    aside.theory-sidebar,
    aside.sidebar,
    div.theory-sidebar,
    div.sidebar,
    .front-layout > .theory-sidebar,
    .front-layout > .sidebar,
    .single-layout > .theory-sidebar,
    .single-layout > .sidebar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        pointer-events: none !important;
    }
}

@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-info-bar .container { padding: 0 1rem; }
    .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: 16px; margin: 0 1rem; }
    .front-hero .wrap { padding: 28px 20px 90px; }
    .hero-title { 
        font-size: 1.6rem; 
        margin-bottom: 10px;
        line-height: 1.15;
    }
    .hero-subtitle { 
        font-size: 0.9rem;
        margin-bottom: 20px;
        line-height: 1.45;
    }
    .hero-cta {
        font-size: 0.85rem;
        padding: 11px 20px;
    }
    .front-layout { gap: 2rem; padding: 0 1rem; }
    .news-main { display: grid; gap: 1.25rem; padding: 0 1rem; }
    .post-card {
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(15,23,42,0.12);
    }
    
    /* Force proper card layout for horizontal cards on mobile */
    .posts-grid .post-card.horizontal-card,
    article.post-card.horizontal-card {
        border-radius: 12px !important;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15), 0 2px 6px rgba(15, 23, 42, 0.08) !important;
        border: none !important;
        background: var(--white) !important;
        margin-bottom: 20px !important;
    }
    
    .post-card-thumb img {
        height: 190px;
        border-radius: 16px 16px 0 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: 12px 12px 0 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, #ffd700 0%, #ffb700 100%) !important;
        color: #1e293b !important;
        border-radius: 24px !important;
        text-decoration: none !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        margin-top: 8px !important;
        box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2) !important;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    }
    
    .posts-grid .post-card.horizontal-card .read-more-btn:hover,
    article.post-card.horizontal-card .read-more-btn:hover {
        transform: scale(1.05) translateY(-2px) !important;
        box-shadow: 0 5px 16px rgba(255, 215, 0, 0.4) !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.2rem; margin: 24px 1rem 16px; padding-left: 0; }
    .theory-sidebar { margin-top: 2rem; padding: 0 1rem; }
    .menu-toggle { padding: 9px 10px; }
    .main-navigation { right: -20px; left: -20px; border-radius: 24px; }
    .main-navigation ul { padding: 18px 24px 22px; }
    
    /* Single post article page mobile formatting */
    .single-post .entry-content {
        font-size: 1.1rem;
        line-height: 1.8;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .single-post .entry-content p {
        font-size: 1.1rem;
        line-height: 1.8;
        margin-bottom: 1.2rem;
    }
    
    .single-post .entry-content h1,
    .single-post .entry-content h2,
    .single-post .entry-content h3 {
        font-size: 1.4rem;
        line-height: 1.4;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .single-post .entry-content img,
    .single-post .entry-content figure img {
        border-radius: 12px;
        margin: 1.5rem 0;
        max-width: 100%;
        height: auto;
    }
    
    .single-post .entry-header {
        margin-bottom: 2rem;
    }
    
    .entry-title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    .theory-container {
        padding: 1.5rem;
        margin: 2rem 0;
    }
}

@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;
    }
}

.theory-container h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theory-container h2 i {
    color: var(--secondary-color);
}

.theory-option {
    background: rgba(255, 215, 0, 0.08);
    padding: 2.5rem;
    margin: 2rem 0;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.18);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}

.theory-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.theory-option:hover::before {
    opacity: 0.15;
}

.theory-option:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255,51,102,0.2);
    border-color: var(--accent-color);
}

.theory-option.active {
    border-color: var(--accent-color);
    background: rgba(0,255,204,0.1);
    box-shadow: 0 0 20px rgba(0,255,204,0.2);
}

.theory-option h3 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.theory-option:hover h3 {
    color: var(--accent-color);
}

.posts-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
}

.post-card {
    display: block !important;
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--section-bg);
    box-shadow: var(--box-shadow);
}

.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;
    }
}

.theory-option h3 i {
    color: var(--accent-color);
    font-size: 1rem;
}

.theory-option p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Theory Stats */
.theory-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-bg);
}

.theory-votes,
.theory-comments {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.theory-votes i,
.theory-comments i {
    color: var(--accent-color);
    transition: var(--transition);
}

.theory-option:hover .theory-votes,
.theory-option:hover .theory-comments {
    color: var(--accent-color);
}

.theory-option.active {
    border: 2px solid var(--accent-color);
    background-color: var(--light-bg);
}

/* Article Audio Player */
.article-audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 50px;
    margin: 24px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.audio-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #ffd700;
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3);
}

.audio-play-btn:hover {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #1e293b;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 5px 16px rgba(255, 215, 0, 0.4);
}

.audio-play-btn svg {
    margin-left: 2px;
}

.audio-time {
    font-size: 0.85rem;
    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: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.audio-speed-btn {
    padding: 6px 12px;
    background: transparent;
    border: 2px solid #ffd700;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffd700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 48px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.audio-speed-btn:hover {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #1e293b;
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
    .article-audio-player {
        padding: 12px 16px;
        gap: 8px;
    }
    
    .audio-play-btn {
        width: 38px;
        height: 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: 3rem;
    margin-top: 4rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}

.comments-title {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
}

.theory-prefix {
    background: var(--dark-bg);
    color: white;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    font-size: 1.1em;
    box-shadow: var(--box-shadow);
}

/* 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: 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    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: #ffd700 !important;
    border: 2px solid #ffd700;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    -webkit-appearance: none;
    appearance: none;
}

#commentform input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffd700, #ffb700) !important;
    color: #1e293b !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .theory-container {
        margin: 2rem -1rem;
        padding: 2rem 1rem;
    }
    
    .theory-option {
        padding: 1.5rem;
    }
    
    .entry-title {
        font-size: 2rem;
    }
    
    .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: 2rem;
}

.comments-section {
    background: var(--light-bg);
    padding: 2rem;
    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,
.headline-item {
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.post-card:hover,
.headline-item:hover {
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.15);
}

/* Image Zoom Container */
.post-card-thumb,
.headline-thumb {
    overflow: hidden;
    border-radius: inherit;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    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 0 12px 12px;
    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 {
    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.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: white;
    color: var(--text-color);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    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;
}

.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
   ========================================== */

.bookmark-btn {
    background: transparent !important;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color) !important;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin-left: 12px;
    -webkit-appearance: none;
    appearance: none;
}

.bookmark-btn:hover {
    border-color: #ffd700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1) !important;
    transform: translateY(-1px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bookmark-btn.bookmarked {
    background: rgba(255, 215, 0, 0.2) !important;
    border-color: #ffd700;
    color: #ffd700;
}

.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);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    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;
    padding: 8px 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    -webkit-appearance: none;
    appearance: none;
}

.share-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.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: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    -webkit-appearance: none;
    appearance: none;
}

.share-btn-floating:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: #ffd700;
    color: #ffd700;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.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: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    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(255, 215, 0, 0.2);
    color: #ffd700;
    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);
}

/* ==========================================
   ARTICLE REACTIONS
   ========================================== */

.reaction-bar {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 20px 2rem;
    margin: 32px 0;
}

.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: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.reaction-btn.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

.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: #1e293b;
    color: #e2e8f0;
}

[data-theme="dark"] .search-suggestions {
    background: #1e293b;
}

[data-theme="dark"] .reaction-bar {
    background: #0f172a;
}

[data-theme="dark"] .reaction-btn {
    background: #1e293b;
    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;
}

[data-theme="dark"] .share-btn {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}