/*
Theme Name: UVU Review
Theme URI: https://uvureview.com
Author: UVU Review Web Team 2026 | Matthew Franke - Executive Producer, Adam Britsch - Jr. Producer
Author URI: https://uvureview.com
Description: High-performance custom WordPress theme for the UVU Review student newspaper. Optimized for speed with minimal bloat while maintaining exact visual styling.
Version: 1.0.48
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uvureview
Tags: news, magazine, blog, student-newspaper, responsive-design, dark-mode

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/* ============================================
   CRITICAL CSS - Above the Fold
   ============================================ */

/* CSS Variables - Theme Colors */
:root {
    --theme-primary-color: #00843d;
    --theme-primary-hover-color: #275D38;
    --theme-secondary-color: rgba(0, 88, 40, 255);
    --theme-dark-mode-accent-hover: #184627;

    --theme-font-size-big: 34px;
    --theme-font-size-base: 16px;

    --theme-light-bg: #fff;
    --theme-light-text: #292929;
    --theme-light-header: #000;

    --theme-dark-bg: #121211;
    --theme-dark-text: rgba(255, 255, 255, 0.75);
    --theme-dark-header: #fff;

    --text-secondary: #555;
    --text-tertiary: #888;

    --theme-border-radius: 8px;
    --theme-transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-size: var(--theme-font-size-base);
    line-height: 1.6;
    background-color: var(--theme-light-bg);
    color: var(--theme-light-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Montserrat font - will be self-hosted */
body,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--theme-light-header);
    line-height: 1.2;
    font-weight: 600;
}

a {
    color: var(--theme-primary-color);
    text-decoration: none;
    transition: var(--theme-transition);
}

a:hover,
a:focus {
    color: var(--theme-primary-hover-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Dark Mode */
[data-theme="dark"] body {
    background-color: var(--theme-dark-bg);
    color: var(--theme-dark-text);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--theme-dark-header);
}

/* Wrapper & Container */
.wrapper,
.container {
    max-width: 1366px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER - Black bar first, Gray bar below
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add padding to body to account for fixed header.
   JS syncHeaderPadding() overrides these with the real measured value;
   these are CSS fallbacks that fire before JS runs. */
body {
    padding-top: 148px; /* header-main (~107px) + header-top-bar (~38px) */
}

body.admin-bar {
    /* WP already adds html { margin-top: 46px } — don't double-count.
       padding-top stays the same as the base body value. */
    padding-top: 148px;
}

body.admin-bar .site-header {
    top: 46px;
}

@media (min-width: 769px) {
    body.admin-bar .site-header {
        top: 32px; /* Desktop admin bar is shorter */
    }

    body.admin-bar {
        /* WP adds html { margin-top: 32px } on desktop — same logic. */
        padding-top: 148px;
    }
}

/* Header is always visible - no hide on scroll */

/* Scroll Progress Bar */
.scroll-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.scroll-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary-color, #275d38), #3cb371);
    width: 0%;
    transition: width 0.15s ease-out;
    border-radius: 0 2px 2px 0;
}

[data-theme="dark"] .scroll-progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .scroll-progress-fill {
    background: linear-gradient(90deg, #3cb371, #5dbd78);
}

/* ============================================
   ANNOUNCEMENT BANNER
   ============================================ */

.announcement-banner {
    background: var(--banner-bg, #dc2626);
    color: var(--banner-text, #ffffff);
    padding: 0.75rem 0;
    position: relative;
    /* z-index: 1001; */
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Above header positioning - fixed at very top */
.announcement-banner.banner-position-above_header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002; /* Above the header */
}

body.admin-bar .announcement-banner.banner-position-above_header {
    top: 46px;
}

@media (min-width: 769px) {
    body.admin-bar .announcement-banner.banner-position-above_header {
        top: 32px;
    }
}

/* Adjust header position when banner is above it */
body.has-announcement-banner .site-header {
    top: 40px; /* Banner height approximately */
}

body.has-announcement-banner.admin-bar .site-header {
    top: 86px; /* 40px banner + 46px admin bar */
}

@media (min-width: 769px) {
    body.has-announcement-banner.admin-bar .site-header {
        top: 72px; /* 40px banner + 32px admin bar */
    }
}

.announcement-banner .banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Distributed alignment - label left, text center, link right */
.announcement-banner.banner-align-distributed .banner-content {
    justify-content: space-between;
}

.announcement-banner.banner-align-distributed .banner-label {
    flex-shrink: 0;
}

.announcement-banner.banner-align-distributed .banner-text {
    flex: 1;
    text-align: center;
}

.announcement-banner.banner-align-distributed .banner-link {
    flex-shrink: 0;
}

/* Centered alignment - everything centered together */
.announcement-banner.banner-align-centered .banner-content {
    justify-content: center;
}

.announcement-banner.banner-align-centered .banner-text {
    flex: none;
}

.announcement-banner .banner-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--banner-label-bg, #ffffff);
    color: var(--banner-label-text, #dc2626);
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.announcement-banner .banner-label i {
    font-size: 0.8rem;
}

/* Pulse animation for breaking news */
.announcement-banner .banner-pulse {
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: banner-pulse 1.5s ease-in-out infinite;
}

@keyframes banner-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.announcement-banner .banner-text {
    flex: 1;
    text-align: center;
}

.announcement-banner .banner-text a {
    color: inherit;
    text-decoration: underline;
}

.announcement-banner .banner-text a:hover {
    opacity: 0.8;
}

/* Link styles */
.announcement-banner .banner-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--banner-text, #ffffff);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.announcement-banner .banner-link:hover {
    opacity: 0.8;
}

.announcement-banner .banner-link-button {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.375rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.announcement-banner .banner-link-button:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.announcement-banner .banner-link-text {
    text-decoration: underline;
}

.announcement-banner .banner-link-arrow {
    font-weight: 600;
}

.announcement-banner .banner-link-arrow i {
    transition: transform 0.2s;
}

.announcement-banner .banner-link-arrow:hover i {
    transform: translateX(3px);
}

/* Icon-only link (just arrow, no text) */
.announcement-banner .banner-link-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.announcement-banner .banner-link-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.announcement-banner .banner-link-icon i {
    transition: transform 0.2s;
    font-size: 0.9rem;
}

.announcement-banner .banner-link-icon:hover i {
    transform: translateX(2px);
}

/* Full clickable banner */
.announcement-banner.banner-clickable .banner-link-wrapper {
    display: block;
    color: inherit;
    text-decoration: none;
}

.announcement-banner.banner-clickable:hover {
    filter: brightness(1.1);
}

/* Close button */
.announcement-banner .banner-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--banner-text, #ffffff);
    padding: 0.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 1rem;
}

.announcement-banner .banner-close:hover {
    opacity: 1;
}

/* Hidden state */
.announcement-banner.banner-hidden {
    display: none;
}

/* Banner styles */
.announcement-banner.banner-style-minimal {
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.announcement-banner.banner-style-minimal .banner-label {
    background: transparent;
    color: inherit;
    padding: 0;
    font-weight: 700;
}

.announcement-banner.banner-style-breaking {
    animation: banner-attention 3s ease-in-out infinite;
}

#mega-menu-wrap-primary-menu #mega-menu-primary-menu > li.mega-menu-flyout ul.mega-sub-menu {
    z-index: 10000;
}

@keyframes banner-attention {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.05);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .announcement-banner {
        padding: 0.625rem 0;
        font-size: 0.85rem;
    }

    .announcement-banner .banner-content {
        gap: 0.75rem;
        padding-right: 2.5rem; /* Space for close button */
    }

    .announcement-banner .banner-label {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .announcement-banner .banner-close {
        right: 0.5rem;
    }

    .announcement-banner .banner-link-button {
        padding: 0.25rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Adjust body padding when banner is above header */
body.has-announcement-banner {
    padding-top: 180px; /* 140px header + ~40px banner */
}

body.has-announcement-banner.admin-bar {
    /* WP html margin-top handles admin bar offset — same as non-admin-bar value */
    padding-top: 180px;
}

@media (min-width: 769px) {
    body.has-announcement-banner.admin-bar {
        padding-top: 180px;
    }
}

@media (max-width: 991px) {
    body.has-announcement-banner:not(.admin-bar) {
        padding-top: 200px; /* 160px mobile header + ~40px banner */
    }

    body.has-announcement-banner.admin-bar {
        /* WP html margin-top handles admin bar offset — same as non-admin-bar value */
        padding-top: 200px;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .announcement-banner .banner-link-button {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .announcement-banner .banner-link-button:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Mobile-specific header adjustments */
@media (max-width: 991px) {
    /* Increase z-index for mobile */
    .site-header {
        z-index: 9999;
    }

    /* Adjust padding for mobile — header-main (~125px) + header-top-bar (~42px) */
    body:not(.admin-bar) {
        padding-top: 170px;
    }

    body.admin-bar {
        /* WP html margin-top handles admin bar offset — same as non-admin-bar value */
        padding-top: 170px;
    }

    body.admin-bar .site-header {
        top: 46px;
    }

    /* Ensure site-content clears the header properly */
    .site-content {
        position: relative;
        z-index: 1;
    }

    /* Ensure smooth transition for mobile */
    .header-main {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Show gray bar on mobile with condensed layout */
    .header-top-bar {
        display: block;
        padding: 6px 0;
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden !important;
    height: 100vh;
    touch-action: none;
}

  #mega-menu-wrap-primary-menu {
    background: #000;
  }

/* Main Header - Black background with logo, nav, and controls */
.header-main {
    background-color: #000;
    padding: 0;
    position: relative;
    box-shadow: 0px 4px 4px rgba(0,0,0,0.25);
}

[data-theme="dark"] .header-main {
    background-color: #000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 6px 10px rgba(0,0,0,0.6);
}

.header-main .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding-top: 15px;
    padding-bottom: 15px;
}

.site-branding {
    flex-shrink: 0;
    margin: 12px 0;
}

.custom-logo {
    max-width: 200px;
    max-height: 60px;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Primary Navigation - Center */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Hide mobile-only elements on desktop - with high specificity */
.mobile-menu-overlay,
.mobile-menu-header,
.mobile-menu-extras,
.header-main .mobile-menu-overlay,
.header-main .mobile-menu-header,
.main-navigation .mobile-menu-header,
.main-navigation .mobile-menu-extras {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 15px;
    transition: var(--theme-transition);
    text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--theme-primary-color);
}

/* Header Controls - Right side */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.header-controls button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    position: relative;
}

.header-controls button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(60, 179, 113, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.header-controls button:hover {
    color: #3cb371;

}
/* 
.header-controls button:hover::before {
    opacity: 1;
}

.header-controls button:active {
    transform: scale(0.95);
} */

.header-controls button i {
    position: relative;
    z-index: 1;
}

/* Hide mobile menu toggle on desktop */
@media (min-width: 992px) {
    .header-controls .menu-toggle {
        display: none !important;
    }
}

/* Top Bar - Gray background below black bar */
.header-top-bar {
    background-color: #e5e5e5;
    color: #000;
    padding: 8px 0;
}

[data-theme="dark"] .header-top-bar {
    background-color: #1a1a1a;
    color: #fff;
}

.header-top-bar .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left nav.top-nav {
    display: flex;
    gap: 20px;
}

.header-left nav.top-nav a {
    font-size: 12px;
    font-weight: 550;
    text-transform: capitalize;
    color: #000;
    transition: var(--theme-transition);
    text-decoration: none;
}

[data-theme="dark"] .header-left nav.top-nav a {
    color: #fff;
}

.header-left nav.top-nav a:hover {
    color: var(--theme-primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    font-size: 16px;
    color: #000;
    transition: var(--theme-transition);
}

[data-theme="dark"] .social-icons a {
    color: #fff;
}

.social-icons a:hover {
    color: var(--theme-primary-color);
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-signup,
.btn-login {
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.btn-signup {
    background: transparent;
    border: 1px solid #000;
    color: #000;
}

[data-theme="dark"] .btn-signup {
    border-color: #fff;
    color: #fff;
}

.btn-signup:hover {
    background: #000;
    color: #fff;
}

[data-theme="dark"] .btn-signup:hover {
    background: #fff;
    color: #000;
}

.btn-signup:active {
    transform: translateY(0);
}

.btn-login {
    background: var(--theme-primary-color);
    border: 1px solid var(--theme-primary-color);
    color: #fff;
}

.btn-login:hover {
    background: var(--theme-primary-hover-color);
    border-color: var(--theme-primary-hover-color);
    color: #fff;
}

.btn-login:active {
    transform: translateY(0);
}

/* Profile button - same style as signup */
.btn-profile {
    background: transparent;
    border: 1px solid #000;
    color: #000;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .btn-profile {
    border-color: #fff;
    color: #fff;
}

.btn-profile:hover {
    background: #000;
    color: #fff;
}

[data-theme="dark"] .btn-profile:hover {
    background: #fff;
    color: #000;
}

/* Logout button - same style as login */
.btn-logout {
    background: var(--theme-primary-color);
    border: 1px solid var(--theme-primary-color);
    color: #fff;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.btn-logout:hover {
    background: var(--theme-primary-hover-color);
    border-color: var(--theme-primary-hover-color);
    color: #fff;
}

/* Search Panel - Base styles moved to main.css for better organization */
/* Only critical fallback styles here */

/* Mobile Responsive */
@media (max-width: 991px) {
    /* Show gray bar but hide only the navigation links on mobile */
    .header-top-bar .top-nav {
        display: none !important;
    }

    /* Hide header-left on mobile since top-nav is hidden */
    .header-top-bar .header-left {
        display: none !important;
    }

    /* Mobile gray bar: use flexbox with proper positioning */
    .header-top-bar .wrapper {
        display: flex !important;
        justify-content: space-between !important;
        padding: 8px 20px !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    /* Header-right becomes full width flex container */
    .header-top-bar .header-right {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        margin: 0 !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        align-items: center !important;
    }

    /* Social icons on the LEFT - first element, no auto margin */
    .header-top-bar .social-icons {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        margin: 0 !important;
        margin-right: auto !important;
        gap: 12px !important;
        flex-shrink: 0 !important;
    }

    /* Auth buttons on the RIGHT - auto margin pushes to end */
    .header-top-bar .auth-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Fix button heights on mobile - remove min-height */
    .header-top-bar .btn-signup,
    .header-top-bar .btn-login,
    .header-top-bar .btn-profile,
    .header-top-bar .btn-logout {
        min-height: auto !important;
        height: auto !important;
        padding: 6px 14px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    /* Social icons proper sizing and centering */
    .header-top-bar .social-icons a {
        min-height: auto !important;
        min-width: auto !important;
        height: auto !important;
        width: auto !important;
        font-size: 16px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .header-top-bar .social-icons a i {
        line-height: 1;
        width: auto;
        margin: 0;
    }

    /* Show mobile menu toggle */
    .header-controls .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 22px;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .header-controls .menu-toggle:hover {
        transform: scale(1.05);
    }

    .header-controls .menu-toggle i {
        transition: transform 0.3s ease;
    }

    /* Hide desktop navigation - slide in from right */
    .main-navigation {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 320px;
        background: #000;
        padding: 0;
        z-index: 10000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    }

    body.admin-bar .main-navigation {
        top: 46px;
    }

    .main-navigation.active {
        transform: translateX(0);
    }

    /* Mobile menu overlay - show on mobile ONLY when menu is open */
    .mobile-menu-overlay,
    .header-main .mobile-menu-overlay {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 9999 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
    }

    body.mobile-menu-open .mobile-menu-overlay,
    body.mobile-menu-open .header-main .mobile-menu-overlay {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Mobile menu header - show on mobile INSIDE the nav drawer */
    .mobile-menu-header,
    .main-navigation .mobile-menu-header {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 16px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        background: #000 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }

    .mobile-menu-title {
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: rgba(255, 255, 255, 0.7);
    }

    .mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 50%;
        color: #fff;
        font-size: 18px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }

    /* Scrollable content wrapper inside navigation */
    .main-navigation > ul,
    .main-navigation > #mega-menu-primary-menu,
    .main-navigation > .mega-menu-wrap {
        padding-top: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        display: block;
        padding: 16px 24px;
        color: #fff;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        transition: background 0.2s ease, padding-left 0.2s ease;
        border-bottom: none;
    }

    .main-navigation a:hover,
    .main-navigation a:focus {
        background: rgba(255, 255, 255, 0.05);
        /* padding-left: 28px; */
    }

    /* Mobile Menu Extras - Only visible in mobile menu drawer */
    .mobile-menu-extras,
    .main-navigation .mobile-menu-extras {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        padding: 20px 24px 40px !important;
        padding-bottom: max(60px, calc(env(safe-area-inset-bottom, 40px) + 20px)) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-top: auto !important;
    }

    .mobile-menu-divider {
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        margin: 20px 0;
    }

    /* Mobile Search Form */
    .mobile-search-form {
        margin-bottom: 20px;
    }

    .mobile-search-title {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: rgba(255, 255, 255, 0.5);
        margin: 0 0 12px;
    }

    .mobile-search-form .search-form {
        display: flex;
        gap: 0;
    }

    .mobile-search-form .search-field {
        flex: 1;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-right: none;
        border-radius: var(--theme-border-radius) 0 0 var(--theme-border-radius);
        color: #fff;
        font-size: 14px;
    }

    /* .mobile-search-form .search-field::placeholder {
        color: rgba(255, 255, 255, 0.5);
    } */

    .mobile-search-form .search-submit {
        padding: 12px 18px;
        background: var(--theme-primary-color);
        border: none;
        border-radius: 0 var(--theme-border-radius) var(--theme-border-radius) 0;
        color: #fff;
        font-size: 14px;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .mobile-search-form .search-submit:hover {
        background: var(--theme-primary-hover-color);
    }

    .mobile-secondary-links {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .mobile-secondary-links a {
        display: flex;
        align-items: center;
        padding: 14px 0;
        color: rgba(255, 255, 255, 0.85);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        transition: color 0.2s ease, padding-left 0.2s ease;
    }

    .mobile-secondary-links a:last-child {
        border-bottom: none;
    }

    .mobile-secondary-links a:hover {
        color: var(--theme-primary-color);
        padding-left: 8px;
    }

    .mobile-social-icons {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-social-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        border-radius: 50%;
        font-size: 18px;
        transition: all 0.25s ease;
        padding: 0;
        text-align: center;
    }

    .mobile-social-icons a i {
        line-height: 1;
        width: auto;
        margin: 0;
    }

    .mobile-social-icons a:hover {
        background: var(--theme-primary-color);
        color: #fff !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    /* Simplify header layout */
    .header-main .wrapper {
        gap: 15px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    /* Logo margin for tablet/mobile - similar to desktop */
    .site-branding {
        margin: 28px 0;
    }

    .custom-logo {
        max-width: 140px;
        max-height: 45px;
    }

}

@media (max-width: 768px) {
    .header-top-bar {
        padding: 10px 0;
    }

    .header-left nav.top-nav {
        font-size: 11px;
    }

    .auth-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .btn-signup,
    .btn-login,
    .btn-profile,
    .btn-logout {
        font-size: 10px;
        padding: 5px 12px;
    }

    .header-controls button {
        font-size: 18px;
        padding: 6px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link: visible when focused by keyboard (WCAG 2.4.1) */
.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    width: auto;
    height: auto;
    padding: 0.75rem 1.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--theme-primary-color);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 6px 0;
    outline: 3px solid #fff;
    outline-offset: -3px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Border Radius - Applied globally to images and blocks */
.wp-block-image img,
.entry-image img,
.post-thumbnail img,
img {
    border-radius: var(--theme-border-radius);
}

/* Prevent category colors from applying to article containers */
article[class*="category-"],
.post[class*="category-"],
.recommended-post[class*="category-"],
.hero-post-large[class*="category-"],
.hero-post-small[class*="category-"],
.sidebar-post[class*="category-"] {
    background: transparent !important;
}

/* Ensure article containers have proper backgrounds */
article,
.post,
.recommended-post,
.hero-post-large,
.hero-post-small {
    background: var(--theme-light-bg);
}

[data-theme="dark"] article,
[data-theme="dark"] .post,
[data-theme="dark"] .recommended-post,
[data-theme="dark"] .hero-post-large,
[data-theme="dark"] .hero-post-small {
    background: transparent;
}

/* Image Hover Effect */
.image-hover {
    position: relative;
    overflow: hidden;
    border-radius: var(--theme-border-radius);
}

.image-hover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: var(--theme-border-radius);
}

.image-hover:hover::before {
    opacity: 1;
}

.image-hover img {
    transform: scale(1);
    transition: transform 0.45s ease;
}

.image-hover:hover img {
    transform: scale(1.05);
}

/* ============================================
   PAGE TYPE - Hide Featured Images & Headers
   ============================================ */

/* Hide featured images on landing pages and auth pages */
body.hide-featured-image .entry-image,
body.hide-featured-image .post-thumbnail,
body.landing-page .entry-image,
body.auth-page .entry-image {
    display: none !important;
}

/* Hide entry headers on auth pages (they have their own styled headers) */
body.hide-entry-header .entry-header,
body.auth-page .entry-header {
    display: none !important;
}

/* Auth page specific styling - full width split screen */
body.auth-page .site-main {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    padding: 0 !important;
    display: block !important;
}

body.auth-page .auth-split-container {
    display: flex !important;
    width: 100% !important;
    min-height: calc(100vh - 200px) !important;
}

body.auth-page .auth-marketing-side {
    flex: 1 !important;
    min-width: 0 !important;
}

body.auth-page .auth-form-side {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem !important;
}

body.auth-page .auth-page-container {
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 auto !important;
}

/* ============================================
   MOBILE NAV OVERRIDE - HIGHEST PRIORITY
   ============================================ */

/* DESKTOP: Hide ALL mobile menu elements completely */
@media (min-width: 992px) {
    .mobile-menu-overlay,
    .mobile-menu-header,
    .mobile-menu-extras,
    .mobile-menu-close,
    .mobile-menu-title,
    nav.main-navigation .mobile-menu-header,
    nav.main-navigation .mobile-menu-extras,
    .header-main .mobile-menu-overlay,
    #masthead .mobile-menu-overlay,
    #masthead .mobile-menu-header,
    #masthead .mobile-menu-extras,
    .site-header .mobile-menu-overlay,
    .site-header .mobile-menu-header,
    .site-header .mobile-menu-extras {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        pointer-events: none !important;
    }

    /* Desktop nav should be visible and centered */
    .main-navigation,
    nav.main-navigation {
        display: flex !important;
        position: static !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Hide hamburger on desktop */
    .menu-toggle,
    .header-controls .menu-toggle,
    button.menu-toggle {
        display: none !important;
    }
}

/* MOBILE: Proper slide-out nav behavior */
@media (max-width: 991px) {
    /* Show hamburger - transforms to X when menu open */
    .menu-toggle,
    .header-controls .menu-toggle,
    button.menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10001 !important; /* Above the nav drawer */
    }

    /* Transform hamburger icon to X when menu is open */
    body.mobile-menu-open .menu-toggle .fa-bars {
        display: none !important;
    }

    .menu-toggle .fa-times {
        display: none;
    }

    body.mobile-menu-open .menu-toggle .fa-times {
        display: block !important;
    }

    /* Nav drawer - slides in from right, starts BELOW the header */
    .main-navigation,
    nav.main-navigation {
        position: fixed !important;
        top: 90px !important; /* Below header */
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 320px !important;
        background: #000 !important;
        z-index: 10000 !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        padding-top: 0 !important;
    }

    /* Adjust for admin bar */
    body.admin-bar .main-navigation,
    body.admin-bar nav.main-navigation {
        top: 136px !important; /* 90px + 46px admin bar */
    }

    /* Nav drawer - visible when active */
    .main-navigation.active,
    nav.main-navigation.active {
        transform: translateX(0) !important;
    }

    /* HIDE the mobile menu header completely - we use hamburger->X instead */
    .main-navigation .mobile-menu-header,
    nav.main-navigation .mobile-menu-header,
    .mobile-menu-header,
    .mobile-menu-title,
    .mobile-menu-close {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Overlay - hidden by default */
    .mobile-menu-overlay {
        display: block !important;
        position: fixed !important;
        top: 90px !important; /* Below header */
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: auto !important;
        height: auto !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 9999 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
    }

    body.admin-bar .mobile-menu-overlay {
        top: 136px !important;
    }

    /* Overlay - visible when menu open */
    body.mobile-menu-open .mobile-menu-overlay {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Mobile menu extras */
    .main-navigation .mobile-menu-extras,
    nav.main-navigation .mobile-menu-extras {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        position: static !important;
        left: auto !important;
        pointer-events: auto !important;
        overflow: visible !important;
        padding: 20px 24px 40px !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        margin-top: auto !important;
    }

    /* Keep header visible and fixed */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10002 !important; /* Above everything */
    }

    body.admin-bar .site-header {
        top: 46px !important;
    }

    /* Fallback padding — JS syncHeaderPadding() sets the real value dynamically */
    body:not(.admin-bar) {
        padding-top: 170px; /* header-main + header-top-bar */
    }

    body.admin-bar {
        /* WP html margin-top handles admin bar offset — same as non-admin-bar value */
        padding-top: 170px;
    }
}

/* ============================================
   END CRITICAL CSS
   Additional styles loaded in main.css (deferred)
   ============================================ */
