/**
 * Modern Header Styles
 * Extracted from homepage-modern-layout.html
 * 
 * @package Beond_Custom
 */

/* ============================================
   MODERN HEADER STRUCTURE
   ============================================ */

.modern-header {
    background: var(--white);
    padding: 24px 0;
    position: relative;
    border-bottom: 1px solid var(--light-gray);
    transition: all 0.3s ease;
    z-index: 1;
}

/* Sticky Header - Only when enabled */
.modern-header.header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
}

[data-theme="dark"] .modern-header {
    background: var(--navy-deep);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gold-champagne);
}

.header-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================
   MINIMAL HEADER TWO-ROW LAYOUT
   ============================================ */

.header-minimal {
    padding: 0;
}

.header-minimal .header-top-row {
    padding: 20px 0;
    border-bottom: 1px solid var(--light-gray);
}

[data-theme="dark"] .header-minimal .header-top-row {
    border-bottom-color: rgba(212, 175, 55, 0.2);
}

.header-minimal .header-nav-row {
    padding: 0;
    background: var(--white);
}

[data-theme="dark"] .header-minimal .header-nav-row {
    background: var(--navy-deep);
}

.header-minimal .header-nav-row .header-wrapper {
    padding: 0 60px;
    justify-content: center;
    width: 100%;
}

.header-minimal .header-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-minimal .header-nav ul {
    gap: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.header-minimal .header-nav li {
    margin: 0;
    padding: 0;
    position: relative;
}

.header-minimal .header-nav a {
    padding: 18px 0;
    font-size: 14px;
    display: block;
}

/* Dropdown specific styles for minimal header */
.header-minimal .header-nav .menu-item-has-children {
    position: relative;
}

/* Arrows handled by main dropdown styles below */

.header-minimal .header-nav .sub-menu {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-10px) !important;
    min-width: 240px !important;
    width: auto !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 12px 0 !important;
    margin-top: 8px !important;
    max-height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease, max-height 0.4s ease !important;
    z-index: 1000 !important;
    display: block !important;
    flex-direction: column !important;
}

[data-theme="dark"] .header-minimal .header-nav .sub-menu {
    background: #00274D !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.header-minimal .header-nav .menu-item-has-children.submenu-open > .sub-menu {
    max-height: 1000px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

.header-minimal .header-nav .sub-menu li {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    border-bottom: none !important;
    width: 100% !important;
}

.header-minimal .header-nav .sub-menu a {
    padding: 10px 20px !important;
    font-size: 13px !important;
    color: #374151 !important;
    white-space: nowrap !important;
    display: block !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.header-minimal .header-nav .sub-menu a::after {
    display: none !important;
}

.header-minimal .header-nav .sub-menu a:hover {
    background: #F3F4F6 !important;
    color: #D4AF37 !important;
    padding-left: 24px !important;
}

[data-theme="dark"] .header-minimal .header-nav .sub-menu a {
    color: #E5E7EB !important;
}

[data-theme="dark"] .header-minimal .header-nav .sub-menu a:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    color: #D4AF37 !important;
}

@media (min-width: 993px) {
    .header-minimal .header-nav {
        position: relative !important;
        right: auto !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        background: transparent !important;
        flex-direction: row !important;
        align-items: center !important;
        overflow-y: visible !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ============================================
   MENU POSITION VARIATIONS
   ============================================ */

/* Default: Center-aligned menu */
.menu-position-center .header-wrapper {
    justify-content: space-between;
}

.menu-position-center .header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 700px;
}

/* Left-aligned menu */
.menu-position-left .header-wrapper {
    justify-content: flex-start;
}

.menu-position-left .brand-logo {
    margin-right: 60px;
}

.menu-position-left .header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.menu-position-left .header-actions {
    margin-left: auto;
}

/* Right-aligned menu */
.menu-position-right .header-wrapper {
    justify-content: flex-start;
}

.menu-position-right .brand-logo {
    margin-right: auto;
}

.menu-position-right .header-nav {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 40px;
}

/* Split layout (logo centered, menu split) */
.menu-position-split .header-wrapper {
    justify-content: space-between;
    position: relative;
}

.menu-position-split .brand-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.menu-position-split .header-nav {
    flex: 1;
    max-width: 400px;
}

.menu-position-split .header-actions {
    margin-left: auto;
}

/* ============================================
   BRAND LOGO
   ============================================ */

.brand-logo {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 600;
    color: var(--navy-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

[data-theme="dark"] .brand-logo {
    color: var(--gold-champagne);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--navy-primary), var(--navy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-champagne);
    font-weight: 700;
    font-size: 18px;
}

.logo-image {
    display: block;
    height: auto;
    transition: opacity 0.3s ease;
}

.logo-light,
.logo-dark {
    transition: opacity 0.3s ease, display 0.3s ease;
}

.logo-text-only {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 600;
}

/* ============================================
   HEADER NAVIGATION
   ============================================ */

.header-nav {
    display: flex;
    gap: 40px;
    align-items: center;
}

.header-nav ul {
    display: flex;
    gap: 40px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav li {
    margin: 0;
    padding: 0;
    position: relative;
}

.header-nav a {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 500;
    color: var(--navy-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    display: block;
    padding: 8px 0;
}

.header-nav a:hover {
    color: var(--gold-dark);
}

/* ============================================
   DROPDOWN / SUBMENU STYLES
   ============================================ */

/* ============================================
   DROPDOWN ARROWS - ALL LEVELS
   ============================================ */

/* Level 1: Main menu items with dropdowns - DOWN ARROW */
#primary-menu > li.menu-item-has-children > a::after,
.header-nav > ul > li.menu-item-has-children > a::after {
    content: '▼';
    font-size: 10px;
    margin-left: 6px;
    display: inline-block;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

#primary-menu > li.menu-item-has-children > a:hover::after,
.header-nav > ul > li.menu-item-has-children > a:hover::after {
    opacity: 1;
}

/* Rotate arrow when dropdown is open */
#primary-menu > li.menu-item-has-children.submenu-open > a::after,
.header-nav > ul > li.menu-item-has-children.submenu-open > a::after {
    transform: rotate(180deg);
}

/* Level 2 & 3: Submenu items with children - RIGHT ARROW */
#primary-menu .sub-menu li.menu-item-has-children > a::after,
.header-nav .sub-menu li.menu-item-has-children > a::after {
    content: '▶';
    font-size: 9px;
    margin-left: auto;
    padding-left: 12px;
    opacity: 0.6;
}

#primary-menu .sub-menu li.menu-item-has-children > a:hover::after,
.header-nav .sub-menu li.menu-item-has-children > a:hover::after {
    opacity: 1;
}

[data-theme="dark"] #primary-menu > li.menu-item-has-children > a::after,
[data-theme="dark"] .header-nav > ul > li.menu-item-has-children > a::after {
    color: var(--gold-champagne);
}

[data-theme="dark"] #primary-menu .sub-menu li.menu-item-has-children > a::after,
[data-theme="dark"] .header-nav .sub-menu li.menu-item-has-children > a::after {
    color: var(--gold-champagne);
}

/* Submenu container */
.header-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    max-width: none;
    width: auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-top: 8px;
    max-height: 0;
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Single column for small menus (1-5 items) */
.header-nav .sub-menu.has-few-items {
    grid-template-columns: 1fr;
    min-width: 240px;
}

/* Two columns for medium menus (6-12 items) */
.header-nav .sub-menu.has-medium-items {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    min-width: 420px;
}

/* Three columns for large menus (13+ items) */
.header-nav .sub-menu.has-many-items {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    min-width: 620px;
}

/* Nested submenus stay single column */
.header-nav .sub-menu .sub-menu {
    grid-template-columns: 1fr !important;
    min-width: 240px !important;
    max-width: 280px !important;
}

[data-theme="dark"] .header-nav .sub-menu {
    background: #00274D;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Show submenu on click (when submenu-open class is added) */
.header-nav .menu-item-has-children.submenu-open > .sub-menu {
    max-height: none;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    overflow: visible;
}

/* Nested submenu open state */
#primary-menu .sub-menu .menu-item-has-children.submenu-open > .sub-menu {
    max-height: none;
    opacity: 1;
    visibility: visible;
    overflow: visible;
}

/* Custom scrollbar for dropdowns */
.header-nav .sub-menu::-webkit-scrollbar {
    width: 6px;
}

.header-nav .sub-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.header-nav .sub-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.header-nav .sub-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .header-nav .sub-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .header-nav .sub-menu::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
}

[data-theme="dark"] .header-nav .sub-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* Submenu items */
.header-nav .sub-menu li {
    margin: 0;
    padding: 0;
    display: block;
    border-bottom: none;
}

.header-nav .sub-menu li:last-child {
    border-bottom: none;
}

[data-theme="dark"] .header-nav .sub-menu li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.header-nav .sub-menu a {
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 4px;
}

.header-nav .sub-menu a::before {
    display: none;
}

.header-nav .sub-menu a:hover {
    background: #F9FAFB;
    color: #D4AF37;
    padding-left: 16px;
}

[data-theme="dark"] .header-nav .sub-menu a {
    color: #E5E7EB;
}

[data-theme="dark"] .header-nav .sub-menu a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-champagne);
}

/* Nested submenus (3rd level) */
#primary-menu .sub-menu .sub-menu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 8px;
    margin-top: 0;
}

/* Fix for deeply nested menus not showing */
#primary-menu .menu-item-has-children.submenu-open > .sub-menu {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ensure nested submenus also respect the open state */
#primary-menu .sub-menu .menu-item-has-children.submenu-open > .sub-menu {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--navy-primary);
    transition: color 0.3s ease;
    order: 10;
    margin-left: 8px;
}

[data-theme="dark"] .mobile-menu-toggle {
    color: var(--gold-champagne);
}

.mobile-menu-toggle:hover {
    color: var(--gold-champagne);
}

[data-theme="dark"] .mobile-menu-toggle:hover {
    color: #ffffff;
}

.mobile-menu-toggle svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* Hide hamburger on desktop */
@media (min-width: 993px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Ensure menu is visible on desktop */
    .header-nav {
        position: relative !important;
        right: auto !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        background: transparent !important;
        flex-direction: row !important;
        align-items: center !important;
        overflow-y: visible !important;
    }
}

[data-theme="dark"] .header-nav a,
[data-theme="dark"] .header-nav li a,
[data-theme="dark"] .modern-header .header-nav a {
    color: var(--cream);
}

[data-theme="dark"] .header-nav a:hover,
[data-theme="dark"] .header-nav li a:hover,
[data-theme="dark"] .modern-header .header-nav a:hover {
    color: var(--gold-champagne);
}

.header-nav a.active,
.header-nav .current-menu-item > a,
.header-nav .current_page_item > a {
    color: var(--navy-dark);
    font-weight: 600;
}

[data-theme="dark"] .header-nav a.active,
[data-theme="dark"] .header-nav .current-menu-item > a,
[data-theme="dark"] .header-nav .current_page_item > a {
    color: var(--gold-champagne);
}

/* ============================================
   HEADER ACTIONS
   ============================================ */

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* ============================================
   SUBSCRIBE BUTTON
   ============================================ */

.btn-subscribe {
    padding: 12px 28px;
    background: var(--navy-primary);
    color: var(--white);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 2px solid var(--navy-primary);
    display: inline-block;
}

.btn-subscribe:hover {
    background: var(--white);
    color: var(--navy-primary);
    border-color: var(--navy-primary);
}

[data-theme="dark"] .btn-subscribe {
    background: var(--gold-champagne);
    color: var(--navy-deep);
    border-color: var(--gold-champagne);
}

[data-theme="dark"] .btn-subscribe:hover {
    background: var(--navy-deep);
    color: var(--gold-champagne);
    border-color: var(--gold-champagne);
}

/* ============================================
   SEARCH ICON
   ============================================ */

.search-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-icon button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon:hover,
.search-icon button:hover {
    color: var(--gold-dark);
}

[data-theme="dark"] .search-icon {
    color: var(--cream);
}

[data-theme="dark"] .search-icon:hover,
[data-theme="dark"] .search-icon button:hover {
    color: var(--gold-champagne);
}

.search-icon svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   THEME TOGGLE
   ============================================ */

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(250, 248, 245, 0);
    border-radius: 50%;
    border: 1px solid var(--light-gray);
    position: relative;
}

.theme-toggle:hover {
    color: var(--gold-dark);
    background: rgba(232, 232, 232, 0);
    transform: rotate(180deg);
}

.theme-toggle:hover .theme-icon-light {
    opacity: 1;
}

.theme-toggle:hover .theme-icon-dark {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--navy-light);
    border-color: var(--gold-champagne);
    color: var(--gold-champagne);
    transform: rotate(180deg);
}

[data-theme="dark"] .theme-toggle:hover .theme-icon-light {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle:hover .theme-icon-dark {
    opacity: 1;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: opacity 0.3s ease;
    position: absolute;
}

/* Light theme: Show moon (dark icon) */
.theme-icon-light {
    opacity: 0;
    color: var(--gold-champagne);
}

.theme-icon-dark {
    opacity: 1;
    color: var(--gold-champagne);
}

/* Dark theme: Show sun (light icon) */
[data-theme="dark"] .theme-icon-light {
    opacity: 1;
    color: var(--white);
}

[data-theme="dark"] .theme-icon-dark {
    opacity: 0;
}

[data-theme="dark"] .theme-toggle {
    background: rgba(0, 39, 77, 0);
    border-color: rgba(255, 255, 255, 0.34);
    color: var(--white);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(26, 77, 92, 0);
    border-color: rgba(255, 255, 255, 0.52);
    color: var(--white);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .header-wrapper {
        padding: 0 24px;
    }

    .header-nav {
        display: none;
    }
    
    .brand-logo {
        font-size: 22px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .btn-subscribe {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .search-icon,
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .header-wrapper {
        padding: 0 16px;
    }
    
    .brand-logo span {
        display: none;
    }
    
    .btn-subscribe {
        padding: 8px 16px;
        font-size: 11px;
    }
}

/* ============================================
   HEADER LAYOUT VARIATIONS
   ============================================ */

/* CENTERED HEADER LAYOUT */
.header-centered {
    padding: 0;
}

.header-centered .header-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 20px 60px 16px;
}

.header-centered .centered-logo-wrapper {
    width: 100%;
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--light-gray);
    order: 0;
}

[data-theme="dark"] .header-centered .centered-logo-wrapper {
    border-bottom-color: rgba(201, 169, 97, 0.2);
}

.header-centered .brand-logo {
    font-size: 36px;
}

.header-centered .logo-icon {
    width: 50px;
    height: 50px;
    font-size: 22px;
}

/* Second row: 60/40 split */
.header-centered .header-nav {
    flex: 0 0 60%;
    order: 1;
}

.header-centered .header-actions {
    flex: 0 0 40%;
    order: 2;
    display: flex;
    justify-content: flex-end;
}

/* Menu position variations for centered header */
.header-centered.menu-position-left .header-nav {
    justify-content: flex-start;
}

.header-centered.menu-position-center .header-nav {
    justify-content: center;
}

.header-centered.menu-position-right .header-nav {
    justify-content: flex-end;
}

.header-centered.menu-position-split .header-nav {
    justify-content: space-between;
}

/* MAGAZINE HEADER LAYOUT */
.header-magazine {
    padding: 0;
}

/* Top Row: Logo & Social Icons */
.header-magazine .magazine-top-row {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
}

[data-theme="dark"] .header-magazine .magazine-top-row {
    background: var(--navy-primary);
    border-bottom-color: rgba(201, 169, 97, 0.15);
}

.header-magazine .magazine-top-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-magazine .brand-logo {
    font-size: 32px;
    font-weight: 700;
}

.header-magazine .logo-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
}

.header-magazine .magazine-social {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Bottom Row: Navigation & Search */
.header-magazine .magazine-nav-row {
    background: var(--white);
    border-bottom: 3px solid var(--gold-champagne);
}

[data-theme="dark"] .header-magazine .magazine-nav-row {
    background: var(--navy-medium);
    border-bottom-color: var(--gold-dark);
}

.header-magazine .magazine-nav-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-magazine .header-nav {
    flex: 1;
}

.header-magazine .header-nav ul {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-magazine .header-nav a {
    padding: 16px 0;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: block;
}

.header-magazine .header-nav a:hover,
.header-magazine .header-nav .current-menu-item a {
    color: var(--gold-champagne);
    border-bottom-color: var(--gold-champagne);
}

[data-theme="dark"] .header-magazine .header-nav a:hover,
[data-theme="dark"] .header-magazine .header-nav .current-menu-item a {
    color: var(--gold-dark);
    border-bottom-color: var(--gold-dark);
}

.header-magazine .header-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: 24px;
}


/* MINIMAL HEADER LAYOUT */
.header-minimal {
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .header-minimal {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-minimal .header-wrapper {
    padding: 16px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Left column: Logo */
.header-minimal .brand-logo {
    font-size: 24px;
    flex: 0 0 auto;
}

.header-minimal .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

/* Right column: Nav + Actions (no subscribe button) */
.header-minimal .header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 32px;
    margin-right: 32px;
}

.header-minimal .header-nav a {
    font-size: 13px;
}

.header-minimal .header-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 12px;
}

/* Hide subscribe button in minimal header */
.header-minimal .btn-subscribe {
    display: none;
}

/* ============================================
   SEARCH MODAL
   ============================================ */

/* Base Search Modal Styles */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.49);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Full Screen Style (Default) */
.search-modal-fullscreen .search-modal-content {
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: slideDown 0.4s ease;
}

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

/* Popup Style (Centered Modal) */
.search-modal-popup {
    align-items: flex-start;
    padding-top: 0;
    background: transparent;
    backdrop-filter: none;
}

.search-modal-popup .search-modal-content {
    width: 90%;
    max-width: 500px;
    position: absolute;
    top: 105px;
    right: 190px;
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideDownFade 0.3s ease-out;
}

[data-theme="dark"] .search-modal-popup .search-modal-content {
    background: #ffffff;
    box-shadow: none;
}

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

.search-modal-popup .search-close {
    display: none;
}

.search-modal-popup .search-field {
    background: var(--cream);
    color: var(--navy-deep);
    padding: 12px 60px 12px 20px;
    font-size: 16px;
    border: 1px solid rgba(201, 169, 97, 0.2);
}

[data-theme="dark"] .search-modal-popup .search-field {
    background: var(--navy-medium);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.1);
}

.search-modal-popup .search-submit {
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 24px;
}

.search-modal-popup .search-submit svg {
    width: 24px;
    height: 24px;
}

/* Close Button */
.search-close {
    display: none;
}

/* Search Form */
.search-modal .search-form {
    position: relative;
}

.search-modal .search-field {
    width: 100%;
    padding: 15px 90px 15px 36px;
    font-family: var(--font-ui);
    font-size: 26px;
    font-weight: 300;
    border: 2px solid rgba(201, 169, 97, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--navy-deep);
    outline: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-modal .search-field:focus {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    background: var(--white);
}

.search-modal .search-field::placeholder {
    color: var(--medium-gray);
    opacity: 0.6;
    font-weight: 300;
}

.search-modal .search-submit {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #000;
    border: none;
    padding: 0;
    width: 64px;
    height: 64px;
    font-size: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.search-modal .search-submit:hover {
    opacity: 1;
}

.search-modal .search-submit svg {
    width: 34px;
    height: 34px;
}

.search-modal .search-submit svg path,
.search-modal .search-submit svg circle,
.search-modal .search-submit svg line {
    stroke: #000;
    stroke-width: 1.5;
    fill: none;
}

@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        padding: 0 20px;
    }
    
    .search-modal-popup .search-modal-content {
        width: calc(100% - 20px);
        max-width: none;
        right: 10px;
        left: 10px;
        top: 60px;
        padding: 15px;
    }
    
    .search-modal-popup .search-modal-content {
        padding: 30px 20px;
    }
    
    .search-modal .search-field {
        font-size: 18px;
        padding: 20px 80px 20px 24px;
    }
    
    .search-modal .search-submit {
        font-size: 42px;
        width: 56px;
        height: 56px;
    }
    
    .search-modal .search-submit svg {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    
    .search-close {
        font-size: 36px;
        width: 40px;
        height: 40px;
        top: -45px;
    }
    
    .search-modal-popup .search-close {
        font-size: 28px;
        top: 8px;
        right: 8px;
    }
}

/* Responsive for layout variations */
@media (max-width: 768px) {
    .header-centered .header-wrapper {
        padding: 24px;
    }
    
    .header-magazine .header-top-wrapper,
    .header-magazine .header-wrapper {
        padding: 12px 24px;
    }
    
    .header-minimal .header-wrapper {
        padding: 12px;
    }
}

/* ============================================
   MOBILE RESPONSIVE MENU
   ============================================ */

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* ============================================
   MOBILE MENU OVERLAY STRUCTURE
   ============================================ */

.mobile-menu-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .mobile-menu-overlay-container {
    background: var(--navy-deep);
}

.mobile-menu-overlay-container.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay-header {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid var(--light-gray);
}

[data-theme="dark"] .mobile-menu-overlay-header {
    border-bottom-color: rgba(212, 175, 55, 0.2);
}

.mobile-menu-overlay-header .mobile-menu-close {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid var(--navy-deep);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-theme="dark"] .mobile-menu-overlay-header .mobile-menu-close {
    border-color: var(--gold-champagne);
}

.mobile-menu-overlay-header .mobile-menu-close:hover {
    background: var(--navy-deep);
    transform: rotate(90deg);
}

[data-theme="dark"] .mobile-menu-overlay-header .mobile-menu-close:hover {
    background: var(--gold-champagne);
}

.mobile-menu-overlay-header .mobile-menu-close svg {
    width: 24px;
    height: 24px;
    stroke: var(--navy-deep);
}

[data-theme="dark"] .mobile-menu-overlay-header .mobile-menu-close svg {
    stroke: var(--gold-champagne);
}

.mobile-menu-overlay-header .mobile-menu-close:hover svg {
    stroke: #ffffff;
}

.mobile-menu-overlay-content {
    padding: 30px 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* Mobile Menu List */
.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid var(--light-gray);
}

[data-theme="dark"] .mobile-menu-item {
    border-bottom-color: rgba(212, 175, 55, 0.2);
}

.mobile-menu-item:last-child {
    border-bottom: none;
}

.mobile-menu-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.mobile-menu-link {
    flex: 1;
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 500;
    color: var(--navy-deep);
    text-decoration: none;
    transition: color 0.3s ease;
}

[data-theme="dark"] .mobile-menu-link {
    color: var(--white);
}

.mobile-menu-link:hover {
    color: var(--gold-champagne);
}

.mobile-submenu-toggle {
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.mobile-submenu-toggle svg {
    stroke: var(--navy-deep);
}

[data-theme="dark"] .mobile-submenu-toggle svg {
    stroke: var(--gold-champagne);
}

.mobile-menu-item.submenu-active .mobile-submenu-toggle {
    transform: rotate(180deg);
}

/* Mobile Submenu */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0, 0, 0, 0.02);
    margin: 0 -20px;
    padding: 0 20px;
}

[data-theme="dark"] .mobile-submenu {
    background: rgba(212, 175, 55, 0.05);
}

.mobile-menu-item.submenu-active > .mobile-submenu {
    max-height: 2000px;
}

.mobile-submenu .mobile-menu-item {
    border-bottom: none;
}

.mobile-submenu .mobile-menu-item-header {
    padding: 12px 0 12px 20px;
}

.mobile-submenu .mobile-menu-link {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
}

.mobile-submenu .mobile-menu-link:hover {
    opacity: 1;
}

/* Nested Submenus */
.mobile-submenu .mobile-submenu .mobile-menu-item-header {
    padding-left: 40px;
}

@media (max-width: 1200px) {
    .header-wrapper {
        padding: 0 30px;
    }
    
    .header-nav ul {
        gap: 24px;
    }
    
    .header-nav a {
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 1001;
    }
    
    /* Full overlay mobile navigation */
    .modern-header .header-nav,
    .header-centered .header-nav,
    .header-magazine .header-nav,
    .header-minimal .header-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        background: #ffffff !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 80px 30px 30px !important;
        gap: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
        z-index: 10000 !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    [data-theme="dark"] .modern-header .header-nav,
    [data-theme="dark"] .header-centered .header-nav,
    [data-theme="dark"] .header-magazine .header-nav,
    [data-theme="dark"] .header-minimal .header-nav {
        background: #0A1628 !important;
    }
    
    /* Show mobile menu when active */
    .modern-header .header-nav.mobile-menu-active,
    .header-centered .header-nav.mobile-menu-active,
    .header-magazine .header-nav.mobile-menu-active,
    .header-minimal .header-nav.mobile-menu-active {
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Mobile menu close button */
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        background: transparent;
        border: 2px solid var(--navy-deep);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 10001;
    }
    
    [data-theme="dark"] .mobile-menu-close {
        border-color: var(--gold-champagne);
    }
    
    .mobile-menu-close:hover {
        background: var(--navy-deep);
        transform: rotate(90deg);
    }
    
    [data-theme="dark"] .mobile-menu-close:hover {
        background: var(--gold-champagne);
    }
    
    .mobile-menu-close svg {
        width: 24px;
        height: 24px;
        stroke: var(--navy-deep);
    }
    
    [data-theme="dark"] .mobile-menu-close svg {
        stroke: var(--gold-champagne);
    }
    
    .mobile-menu-close:hover svg {
        stroke: #ffffff;
    }
    
    /* Mobile overlay - not needed for full screen menu */
    .mobile-menu-overlay {
        display: none;
    }
    
    /* Mobile menu structure */
    .modern-header .header-nav ul,
    .header-centered .header-nav ul,
    .header-magazine .header-nav ul,
    .header-minimal .header-nav ul {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0 !important;
        width: 100% !important;
        max-width: 500px !important;
    }
    
    .modern-header .header-nav li,
    .header-centered .header-nav li,
    .header-magazine .header-nav li,
    .header-minimal .header-nav li {
        width: 100% !important;
        border-bottom: 1px solid #E5E7EB !important;
        text-align: center !important;
    }
    
    [data-theme="dark"] .modern-header .header-nav li,
    [data-theme="dark"] .header-centered .header-nav li,
    [data-theme="dark"] .header-magazine .header-nav li,
    [data-theme="dark"] .header-minimal .header-nav li {
        border-bottom-color: rgba(212, 175, 55, 0.2) !important;
    }
    
    .modern-header .header-nav a,
    .header-centered .header-nav a,
    .header-magazine .header-nav a,
    .header-minimal .header-nav a {
        padding: 18px 20px !important;
        font-size: 16px !important;
        width: 100% !important;
        display: block !important;
        text-align: center !important;
    }
    
    /* Mobile submenu styles */
    .header-nav .menu-item-has-children > a {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    
    /* Mobile arrows hidden - handled by mobile menu overlay */
    
    /* Mobile submenu container */
    .header-nav .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: transparent !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.4s ease !important;
    }
    
    .header-nav .menu-item-has-children.submenu-open > .sub-menu {
        max-height: 2000px !important;
        overflow: visible !important;
    }
    
    [data-theme="dark"] .header-nav .sub-menu {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .header-nav .sub-menu li {
        border-bottom: none !important;
        background: transparent !important;
    }
    
    [data-theme="dark"] .header-nav .sub-menu li {
        background: transparent !important;
    }
    
    .header-nav .sub-menu li:last-child {
        border-bottom: none !important;
    }
    
    .header-nav .sub-menu a {
        padding: 14px 20px !important;
        padding-left: 40px !important;
        font-size: 14px !important;
        text-align: left !important;
        opacity: 0.8 !important;
    }
    
    .header-nav .sub-menu a:hover {
        background: transparent !important;
        padding-left: 40px !important;
        color: #D4AF37 !important;
        opacity: 1 !important;
    }
    
    /* Nested mobile submenus */
    .header-nav .sub-menu .sub-menu {
        left: auto !important;
        margin-left: 0 !important;
        padding-left: 20px !important;
    }
    
    /* Mobile header actions */
    .header-actions {
        gap: 12px;
    }
    
    .btn-subscribe {
        padding: 10px 20px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .header-wrapper {
        padding: 0 20px;
    }
    
    .brand-logo {
        font-size: 18px;
        max-width: 180px;
    }
    
    .brand-logo span {
        font-size: 18px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .logo-image {
        max-width: 120px !important;
        height: auto;
    }
    
    /* Full width menu on small screens */
    .modern-header .header-nav,
    .header-centered .header-nav,
    .header-magazine .header-nav,
    .header-minimal .header-nav {
        width: 100% !important;
        max-width: 100% !important;
        left: auto !important;
        right: -100% !important;
        padding: 60px 24px 30px !important;
    }
    
    .modern-header .header-nav.mobile-menu-active,
    .header-centered .header-nav.mobile-menu-active,
    .header-magazine .header-nav.mobile-menu-active,
    .header-minimal .header-nav.mobile-menu-active {
        right: 0 !important;
        left: 0 !important;
    }
    
    .btn-subscribe {
        padding: 8px 16px !important;
        font-size: 11px !important;
    }
    
    .search-icon {
        width: 36px;
        height: 36px;
    }
    
    .mobile-menu-toggle {
        order: 999;
        margin-left: auto;
        padding: 6px;
    }
    
    .mobile-menu-toggle svg {
        width: 24px;
        height: 24px;
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .modern-header {
        padding: 12px 0;
    }
    
    .header-wrapper {
        padding: 0 16px;
    }
    
    .brand-logo {
        font-size: 16px;
        max-width: 150px;
    }
    
    .brand-logo span {
        font-size: 16px;
    }
    
    .logo-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .logo-image {
        max-width: 100px !important;
    }
    
    /* Ensure full width and scrollability */
    .modern-header .header-nav,
    .header-centered .header-nav,
    .header-magazine .header-nav,
    .header-minimal .header-nav {
        width: 100% !important;
        max-width: 100% !important;
        left: auto !important;
        right: -100% !important;
        padding: 50px 20px 30px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    .modern-header .header-nav.mobile-menu-active,
    .header-centered .header-nav.mobile-menu-active,
    .header-magazine .header-nav.mobile-menu-active,
    .header-minimal .header-nav.mobile-menu-active {
        right: 0 !important;
        left: 0 !important;
    }
    
    .btn-subscribe {
        display: none;
    }
    
    .search-icon {
        width: 32px;
        height: 32px;
    }
    
    .search-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
    }
    
    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .mobile-menu-toggle svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 425px) {
    .modern-header .header-nav,
    .header-centered .header-nav,
    .header-magazine .header-nav,
    .header-minimal .header-nav {
        padding: 50px 16px 30px !important;
    }
}

@media (max-width: 375px) {
    .header-wrapper {
        padding: 0 12px;
    }
    
    .brand-logo {
        font-size: 15px;
        max-width: 130px;
    }
    
    .brand-logo span {
        font-size: 15px;
    }
    
    .modern-header .header-nav,
    .header-centered .header-nav,
    .header-magazine .header-nav,
    .header-minimal .header-nav {
        padding: 45px 16px 30px !important;
    }
}

@media (max-width: 320px) {
    .header-wrapper {
        padding: 0 10px;
    }
    
    .brand-logo {
        font-size: 14px;
        max-width: 110px;
    }
    
    .brand-logo span {
        font-size: 14px;
    }
    
    .logo-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    
    .modern-header .header-nav,
    .header-centered .header-nav,
    .header-magazine .header-nav,
    .header-minimal .header-nav {
        padding: 45px 12px 30px !important;
    }
    
    .mobile-menu-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .search-icon,
    .theme-toggle {
        width: 28px;
        height: 28px;
    }
}
