/**
 * Navigation CSS for TextGenerator.net
 * IMPORTANT: Must override aggressive inline CSS from index.php
 * 
 * Inline CSS issues to overcome:
 * - div { overflow: hidden } - clips dropdowns
 * - * { position: relative } - breaks absolute positioning
 * - a { display: inline-block } - breaks block links
 */

/* Prevent horizontal scroll on body/html */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* ==========================================================================
   RESET PROBLEMATIC INLINE STYLES
   ========================================================================== */

/* Fix overflow:hidden on all divs inside header */
#header,
#header div,
#header .container,
#header .header-inner,
#header .main-nav,
#header .nav-list,
#header .nav-list li,
#header .submenu,
#header .submenu li {
    overflow: visible !important;
}

/* Fix position:relative on everything */
#header .submenu {
    position: absolute !important;
}

#header .has-submenu {
    position: relative !important;
}

/* ==========================================================================
   HEADER CONTAINER
   ========================================================================== */

#header {
    background: #111 !important;
    padding: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    width: 100% !important;
    display: block !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important;
}

/* Header hidden state - controlled by JS */
#header.header-hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Override #header:before pseudo element from inline CSS */
#header:before {
    display: none !important;
}

#header > .container {
    width: 90% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    float: none !important;
    display: block !important;
}

#header .header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 15px 0 !important;
    gap: 20px !important;
    width: 100% !important;
    float: none !important;
}

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

#header .header-logo {
    flex-shrink: 0 !important;
    display: block !important;
    line-height: 0 !important;
    float: none !important;
    width: auto !important;
    padding: 0 !important;
}

#header .header-logo img {
    display: block !important;
    height: 24px !important;
    width: auto !important;
}

/* ==========================================================================
   HAMBURGER (Mobile)
   ========================================================================== */

#header .hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    z-index: 10001;
    gap: 5px;
}

#header .hamburger span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: #fff !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
    position: relative !important;
}

#header .hamburger.is-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
}

#header .hamburger.is-open span:nth-child(2) {
    opacity: 0 !important;
}

#header .hamburger.is-open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px) !important;
}

/* ==========================================================================
   MAIN NAV
   ========================================================================== */

#header .main-nav {
    display: flex !important;
    align-items: center !important;
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    position: static !important;
}

#header .nav-list {
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 5px !important;
    float: none !important;
    width: auto !important;
}

#header .nav-list > li {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
    list-style: none !important;
    display: block !important;
}

/* Top level links */
#header .nav-list > li > a {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 10px 16px !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    float: none !important;
    width: auto !important;
    position: relative !important;
}

#header .nav-list > li > a:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #1B5E20 !important;
}

#header .nav-list > li > a svg {
    width: 10px !important;
    height: 6px !important;
    opacity: 0.7 !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* ==========================================================================
   DROPDOWN / SUBMENU - Desktop
   ========================================================================== */

#header .submenu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    min-width: 220px !important;
    width: auto !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25) !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    z-index: 10002 !important;
    float: none !important;
    
    /* Hidden by default - NO transform gap */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(0) !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

/* Hover bridge for all submenus - invisible connector between nav and dropdown */
#header .submenu::before {
    content: '' !important;
    position: absolute !important;
    top: -15px !important;
    left: 0 !important;
    width: 100% !important;
    height: 15px !important;
    background: transparent !important;
}

/* Show on hover */
#header .has-submenu:hover > .submenu,
#header .nav-list > li.has-submenu:hover > .submenu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Submenu items */
#header .submenu li {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
    list-style: none !important;
    display: block !important;
    position: relative !important;
}

/* Submenu links - CRITICAL: override inline a { display: inline-block } */
#header .submenu li a {
    display: block !important;
    padding: 10px 20px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    float: none !important;
    width: auto !important;
    white-space: nowrap !important;
    position: relative !important;
}

#header .submenu li a:hover {
    background: #f5f5f5 !important;
    color: #2E7D32 !important;
}

/* Divider */
#header .submenu-divider,
#header .submenu li.submenu-divider {
    height: 1px !important;
    background: #ddd !important;
    margin: 10px 12px !important;
    padding: 0 !important;
    display: block !important;
    border: none !important;
}

/* ==========================================================================
   CTA BUTTON
   ========================================================================== */

#header .nav-cta {
    margin-left: 10px !important;
}

#header .btn-create {
    background: #2E7D32 !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
    float: none !important;
    width: auto !important;
}

#header .btn-create:hover {
    background: #1B5E20 !important;
    transform: translateY(-1px) !important;
    color: #fff !important;
}

/* ==========================================================================
   OVERLAY
   ========================================================================== */

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   HIDE OLD HEADER ELEMENTS
   ========================================================================== */

#header > .row,
#header .row,
#header .col4 {
    display: none !important;
}

/* ==========================================================================
   INTERMEDIATE DESKTOP - Smaller nav items before mobile kicks in
   ========================================================================== */

@media screen and (max-width: 1150px) {
    #header .nav-list > li > a {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    #header .btn-create {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
    
    #header .nav-list {
        gap: 2px !important;
    }
}

@media screen and (max-width: 1024px) {
    #header .nav-list > li > a {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
    
    #header .btn-create {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    #header .nav-list {
        gap: 0 !important;
    }
    
    #header .nav-cta {
        margin-left: 5px !important;
    }
}

/* ==========================================================================
   MOBILE STYLES
   ========================================================================== */

@media screen and (max-width: 900px) {
    
    /* Show hamburger */
    #header .hamburger {
        display: flex !important;
    }
    
    /* Mobile nav - slide from right */
    #header .main-nav {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #111 !important;
        padding: 80px 0 30px 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transition: right 0.3s ease !important;
        z-index: 10000 !important;
        box-shadow: -5px 0 20px rgba(0,0,0,0.3) !important;
        display: block !important;
    }
    
    #header .main-nav.is-open {
        right: 0 !important;
    }
    
    /* Mobile nav list - vertical */
    #header .nav-list {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        width: 100% !important;
    }
    
    #header .nav-list > li {
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        width: 100% !important;
    }
    
    #header .nav-list > li > a {
        padding: 16px 20px !important;
        justify-content: space-between !important;
        border-radius: 0 !important;
        width: 100% !important;
    }
    
    #header .nav-list > li > a:hover {
        background: rgba(255,255,255,0.05) !important;
    }
    
    #header .has-submenu.submenu-open > a svg {
        transform: rotate(180deg) !important;
    }
    
    /* Mobile submenu - accordion */
    #header .submenu {
        position: static !important;
        background: rgba(0,0,0,0.3) !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        
        /* Hidden by default - accordion style */
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        pointer-events: auto !important;
        max-height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
        transition: max-height 0.3s ease, padding 0.3s ease !important;
    }
    
    /* Disable hover on mobile */
    #header .has-submenu:hover > .submenu {
        max-height: 0 !important;
        padding: 0 !important;
    }
    
    /* Open on tap */
    #header .has-submenu.submenu-open > .submenu {
        max-height: 500px !important;
        padding: 10px 0 !important;
    }
    
    #header .submenu li {
        width: 100% !important;
    }
    
    #header .submenu li a {
        color: #ccc !important;
        padding: 12px 40px !important;
        white-space: normal !important;
    }
    
    #header .submenu li a:hover {
        background: rgba(255,255,255,0.05) !important;
        color: #1B5E20 !important;
    }
    
    #header .submenu-divider {
        background: rgba(255,255,255,0.1) !important;
        margin: 8px 20px !important;
    }
    
    /* Mobile CTA */
    #header .nav-cta {
        margin: 20px !important;
        border-bottom: none !important;
    }
    
    #header .btn-create {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    /* Show overlay */
    .nav-overlay {
        display: block !important;
    }
}

/* ==========================================================================
   VERY SMALL SCREENS
   ========================================================================== */

@media screen and (max-width: 480px) {
    #header .header-inner {
        padding: 12px 0 !important;
    }
    
    #header .header-logo img {
        height: 20px !important;
    }
}

/* ======================================================================
   MEGA-MENU LAYOUT - TextGenerator.net Professional Navigation
   Multi-column dropdown panels for content-rich navigation
   ====================================================================== */

/* ==========================================================================
   MEGA-MENU BASE STYLES - Desktop
   These rules use higher specificity to override base .submenu styles
   ========================================================================== */

@media screen and (min-width: 901px) {
    
    /* -------------------------------------------------------------------------
       MEGA-MENU CONTAINER - Override base submenu to create wide panel
       -------------------------------------------------------------------------
       IMPORTANT: Position is set per-menu based on its location in the navbar.
       Menus on the right side of the nav align to the right edge to prevent overflow.
       ------------------------------------------------------------------------- */
    #header .nav-list > li.has-submenu > ul.submenu.mega-menu {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(150px, 200px)) !important;
        grid-template-rows: auto auto !important;
        gap: 0 !important;
        width: max-content !important;
        max-width: min(700px, calc(100vw - 40px)) !important;
        padding: 0 !important;
        margin-top: 0 !important;
        top: 100% !important;
        transform: translateY(0) !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        box-shadow: 0 25px 80px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.08) !important;
        overflow: hidden !important; /* Prevent any overflow from children */
    }
    
    /* Hover bridge - invisible element that connects nav item to dropdown */
    #header .nav-list > li.has-submenu > ul.submenu.mega-menu::before {
        content: '' !important;
        position: absolute !important;
        top: -15px !important;
        left: 0 !important;
        width: 100% !important; /* Use width instead of right to prevent overflow */
        height: 15px !important;
        background: transparent !important;
        display: block !important;
    }
    
    /* Show mega-menu on hover */
    #header .nav-list > li.has-submenu:hover > ul.submenu.mega-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
    
    /* -------------------------------------------------------------------------
       INDIVIDUAL MENU POSITIONING
       Text Generators (2nd item) - align to LEFT (it's on the left side of nav)
       Font Library (3rd item) - align to LEFT with slight offset
       Symbols & Decorations (4th item) - align to RIGHT (it's on the right side)
       Resources (5th item) - already handled by submenu--simple
       ------------------------------------------------------------------------- */
    
    /* Text Generators - left aligned */
    #header .nav-list > li:nth-child(2) > ul.mega-menu {
        left: 0 !important;
        right: auto !important;
    }
    
    /* Font Library - left aligned */
    #header .nav-list > li:nth-child(3) > ul.mega-menu {
        left: 0 !important;
        right: auto !important;
    }
    
    /* Symbols & Decorations - RIGHT aligned to prevent overflow */
    #header .nav-list > li:nth-child(4) > ul.mega-menu {
        left: auto !important;
        right: 0 !important;
    }
    
    /* Simple submenu hover bridge */
    #header .nav-list > li.has-submenu > ul.submenu.submenu--simple::before {
        content: '' !important;
        position: absolute !important;
        top: -15px !important;
        left: 0 !important;
        width: 100% !important;
        height: 15px !important;
        background: transparent !important;
        display: block !important;
    }
    
    /* -------------------------------------------------------------------------
       RESPONSIVE - Smaller desktop screens
       ------------------------------------------------------------------------- */
    @media screen and (max-width: 1100px) {
        #header .nav-list > li.has-submenu > ul.submenu.mega-menu {
            grid-template-columns: repeat(3, minmax(130px, 180px)) !important;
        }
        
        #header .mega-menu > li.submenu-group {
            padding: 18px 16px !important;
        }
        
        #header .mega-menu ul.submenu-links > li > a {
            font-size: 13px !important;
            padding: 7px 8px !important;
            margin: 2px -8px !important;
        }
        
        #header .mega-menu .submenu-group-title {
            font-size: 10px !important;
        }
        
        #header .mega-menu .submenu-group-desc {
            font-size: 11px !important;
            margin-bottom: 12px !important;
            padding-bottom: 10px !important;
        }
        
        #header .mega-menu a.submenu-highlight {
            padding: 10px 12px !important;
            font-size: 12px !important;
            gap: 8px !important;
        }
        
        #header .mega-menu .submenu-highlight-icon {
            width: 22px !important;
            height: 22px !important;
            min-width: 22px !important;
            font-size: 14px !important;
        }
    }
    
    @media screen and (max-width: 950px) {
        #header .nav-list > li.has-submenu > ul.submenu.mega-menu {
            grid-template-columns: repeat(3, minmax(110px, 160px)) !important;
            max-width: min(550px, calc(100vw - 20px)) !important;
        }
        
        #header .mega-menu > li.submenu-group {
            padding: 14px 12px !important;
        }
        
        #header .mega-menu ul.submenu-links > li > a {
            font-size: 12px !important;
            padding: 6px 6px !important;
            white-space: normal !important; /* Allow wrapping on small screens */
        }
        
        #header .mega-menu a.submenu-highlight {
            padding: 8px 10px !important;
            font-size: 11px !important;
            gap: 6px !important;
        }
        
        #header .mega-menu .submenu-highlight-icon {
            width: 20px !important;
            height: 20px !important;
            min-width: 20px !important;
            font-size: 12px !important;
        }
        
        /* All menus align right on smaller screens to stay in viewport */
        #header .nav-list > li:nth-child(2) > ul.mega-menu,
        #header .nav-list > li:nth-child(3) > ul.mega-menu,
        #header .nav-list > li:nth-child(4) > ul.mega-menu {
            left: auto !important;
            right: 0 !important;
        }
    }
    
    /* -------------------------------------------------------------------------
       SIMPLE SUBMENU (Resources) - Keep narrow dropdown style
       ------------------------------------------------------------------------- */
    #header .nav-list > li.has-submenu > ul.submenu.submenu--simple {
        display: block !important;
        min-width: 200px !important;
        width: auto !important;
        max-width: 240px !important;
        left: auto !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
        padding: 8px 0 !important;
        top: 100% !important;
        transform: translateY(0) !important;
    }
    
    #header .nav-list > li.has-submenu:hover > ul.submenu.submenu--simple {
        transform: translateY(0) !important;
    }
    
    /* -------------------------------------------------------------------------
       SUBMENU GROUP - Each column in the mega-menu
       ------------------------------------------------------------------------- */
    #header .mega-menu > li.submenu-group {
        display: block !important;
        padding: 24px 20px !important;
        margin: 0 !important;
        border-right: 1px solid #f0f0f0 !important;
        background: transparent !important;
        width: auto !important;
        float: none !important;
        list-style: none !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    #header .mega-menu > li.submenu-group:nth-child(3) {
        border-right: none !important;
    }
    
    /* Group title */
    #header .mega-menu .submenu-group-title {
        display: block !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important;
        color: #1B5E20 !important;
        margin: 0 0 6px 0 !important;
        padding: 0 !important;
        line-height: 1.3 !important;
    }
    
    /* Group description */
    #header .mega-menu .submenu-group-desc {
        display: block !important;
        font-size: 12px !important;
        color: #888 !important;
        margin: 0 0 16px 0 !important;
        padding: 0 0 14px 0 !important;
        line-height: 1.4 !important;
        border-bottom: 1px solid #eee !important;
    }
    
    /* Group divider (used inside groups) */
    #header .mega-menu .submenu-group-divider {
        height: 1px !important;
        background: #eee !important;
        margin: 16px 0 !important;
        display: block !important;
        width: 100% !important;
    }
    
    /* -------------------------------------------------------------------------
       SUBMENU LINKS LIST - Links inside each column
       ------------------------------------------------------------------------- */
    #header .mega-menu ul.submenu-links {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
    
    #header .mega-menu ul.submenu-links > li {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        display: block !important;
        list-style: none !important;
        border: none !important;
    }
    
    #header .mega-menu ul.submenu-links > li > a {
        display: block !important;
        padding: 9px 12px !important;
        margin: 2px -12px !important;
        color: #333 !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        text-decoration: none !important;
        border-radius: 6px !important;
        transition: background 0.15s ease, color 0.15s ease !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.4 !important;
    }
    
    #header .mega-menu ul.submenu-links > li > a:hover {
        background: #f0f7f0 !important;
        color: #1B5E20 !important;
    }
    
    /* Compact links variant */
    #header .mega-menu ul.submenu-links.submenu-links--compact > li > a {
        padding: 7px 12px !important;
        font-size: 13px !important;
    }
    
    /* -------------------------------------------------------------------------
       FOOTER CTA - Spans all columns at bottom of mega-menu
       ------------------------------------------------------------------------- */
    #header .mega-menu > li.submenu-footer {
        grid-column: 1 / -1 !important;
        display: block !important;
        border-top: 1px solid #eee !important;
        border-right: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fafafa !important;
        border-radius: 0 0 12px 12px !important;
        width: 100% !important;
    }
    
    #header .mega-menu .submenu-cta {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 16px 24px !important;
        color: #2E7D32 !important;
        font-weight: 600 !important;
        font-size: 14px !important;
        text-decoration: none !important;
        transition: background 0.2s ease, color 0.2s ease !important;
        width: 100% !important;
        border-radius: 0 0 12px 12px !important;
    }
    
    #header .mega-menu .submenu-cta:hover {
        background: #e8f5e9 !important;
        color: #1B5E20 !important;
    }
    
    #header .mega-menu .submenu-cta svg {
        width: 16px !important;
        height: 16px !important;
        transition: transform 0.2s ease !important;
    }
    
    #header .mega-menu .submenu-cta:hover svg {
        transform: translateX(4px) !important;
    }
    
    /* -------------------------------------------------------------------------
       HIGHLIGHT BUTTON (Create Your Own Font)
       ------------------------------------------------------------------------- */
    #header .mega-menu a.submenu-highlight {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 12px 14px !important;
        margin-top: 4px !important;
        background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
        border-radius: 8px !important;
        text-decoration: none !important;
        color: #1B5E20 !important;
        font-weight: 600 !important;
        font-size: 13px !important;
        transition: all 0.2s ease !important;
        border: 1px solid #a5d6a7 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    #header .mega-menu a.submenu-highlight span {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    #header .mega-menu a.submenu-highlight:hover {
        background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(46, 125, 50, 0.25) !important;
    }
    
    #header .mega-menu .submenu-highlight-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        background: #2E7D32 !important;
        color: #fff !important;
        border-radius: 6px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        flex-shrink: 0 !important;
    }
}

/* ==========================================================================
   MEGA-MENU MOBILE STYLES
   ========================================================================== */

@media screen and (max-width: 900px) {
    
    /* Reset mega-menu to vertical stacked layout on mobile */
    #header .mega-menu {
        display: block !important;
        min-width: 0 !important;
        max-width: none !important;
        width: 100% !important;
        position: static !important;
        transform: none !important;
        background: rgba(0,0,0,0.3) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-left: 0 !important;
        left: 0 !important;
    }
    
    /* Stack groups vertically */
    #header .mega-menu > li.submenu-group {
        display: block !important;
        padding: 16px 20px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    #header .mega-menu > li.submenu-group:nth-child(3) {
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    }
    
    #header .mega-menu > li.submenu-group:last-of-type {
        border-bottom: none !important;
    }
    
    /* Mobile group title */
    #header .mega-menu .submenu-group-title {
        font-size: 10px !important;
        color: #4CAF50 !important;
        margin-bottom: 4px !important;
        border-bottom: none !important;
    }
    
    /* Mobile group description */
    #header .mega-menu .submenu-group-desc {
        font-size: 11px !important;
        color: #888 !important;
        margin-bottom: 10px !important;
        padding-bottom: 0 !important;
        border-bottom: none !important;
    }
    
    /* Mobile submenu links */
    #header .mega-menu ul.submenu-links > li > a {
        color: #ccc !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        white-space: normal !important;
    }
    
    #header .mega-menu ul.submenu-links > li > a:hover {
        background: transparent !important;
        color: #4CAF50 !important;
    }
    
    /* Mobile footer CTA */
    #header .mega-menu > li.submenu-footer {
        background: rgba(0,0,0,0.2) !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
    }
    
    #header .mega-menu .submenu-cta {
        padding: 16px 20px !important;
        color: #4CAF50 !important;
        justify-content: flex-start !important;
    }
    
    #header .mega-menu .submenu-cta:hover {
        background: rgba(255,255,255,0.05) !important;
    }
    
    /* Mobile highlight button */
    #header .mega-menu a.submenu-highlight {
        margin-top: 10px !important;
        background: rgba(46, 125, 50, 0.2) !important;
        border-color: rgba(46, 125, 50, 0.3) !important;
    }
    
    #header .mega-menu a.submenu-highlight:hover {
        background: rgba(46, 125, 50, 0.3) !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Group divider mobile */
    #header .mega-menu .submenu-group-divider {
        background: rgba(255,255,255,0.1) !important;
        margin: 12px 0 !important;
    }
    
    /* Increase max-height for mega-menus with more content */
    #header .has-submenu.submenu-open > .mega-menu {
        max-height: 2000px !important;
    }
}
