/* ULTRA-STRONG Navigation CSS - Guaranteed Desktop Menu */

/* ========================================
   FORCE DESKTOP - HIGHEST PRIORITY
   ======================================== */

html body .container nav.main-navigation .nav-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: center !important;
    background-color: #006633 !important;
}

html body .container nav.main-navigation .mobile-toggle {
    display: none !important;
    visibility: hidden !important;
}

/* ========================================
   BASE STYLES
   ======================================== */

.main-navigation {
    background-color: #006633;
    border-top: 2px solid #004422;
    border-bottom: 2px solid #004422;
    position: relative;
    z-index: 1000;
}

.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;
}

/* Desktop menu items */
.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li > a:focus {
    background-color: #004d26;
    text-decoration: none;
}

/* Dropdown indicator */
.has-dropdown > a::after,
.has-mega-menu > a::after {
    content: ' ▾';
    font-size: 11px;
    margin-left: 4px;
}

/* Standard Dropdown */
.dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #005929;
    min-width: 220px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    z-index: 1000;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-mega-menu:hover .dropdown,
.has-mega-menu:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.dropdown a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s;
}

.dropdown a:hover,
.dropdown a:focus {
    background-color: #004422;
    text-decoration: none;
}

/* Mega Menu for RESOURCES */
.mega-menu {
    min-width: 750px;
    max-width: 850px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.has-mega-menu:hover .mega-menu,
.has-mega-menu:focus-within .mega-menu {
    transform: translateX(-50%) translateY(0);
}

.menu-section {
    border: 0;
}

.section-title {
    display: block;
    color: #FFD700;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.section-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.section-items li {
    border: 0;
}

.section-items a {
    padding: 6px 0;
    font-size: 12px;
}

/* Active/Current Page */
.nav-menu .current > a {
    background-color: #004422;
    font-weight: bold;
}

/* Keyboard Navigation */
.nav-menu a:focus {
    outline: 2px solid #FFD700;
    outline-offset: -2px;
}

/* ========================================
   MOBILE ONLY - UNDER 768PX
   ======================================== */

@media only screen and (max-width: 768px) {
    /* Override the ultra-strong rules above for mobile */
    html body .container nav.main-navigation .mobile-toggle {
        display: block !important;
        visibility: visible !important;
        width: 100%;
        text-align: left;
        background-color: #006633;
        color: white;
        padding: 15px 20px;
        cursor: pointer;
        border: none;
        font-size: 0;
    }
    
    .hamburger {
        display: block;
        width: 25px;
        height: 2px;
        background-color: white;
        position: relative;
        font-size: 16px;
    }
    
    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 25px;
        height: 2px;
        background-color: white;
        left: 0;
        transition: transform 0.3s;
    }
    
    .hamburger::before { top: -8px; }
    .hamburger::after { bottom: -8px; }
    
    .mobile-toggle[aria-expanded="true"] .hamburger {
        background-color: transparent;
    }
    
    .mobile-toggle[aria-expanded="true"] .hamburger::before {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-toggle[aria-expanded="true"] .hamburger::after {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    html body .container nav.main-navigation .nav-menu {
        display: none !important;
        flex-direction: column !important;
        width: 100%;
    }
    
    html body .container nav.main-navigation .nav-menu.active {
        display: flex !important;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu > li > a {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .dropdown,
    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: #004d26;
        display: none;
        min-width: auto;
        max-width: none;
        padding: 0;
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .has-dropdown.active .dropdown {
        display: block;
    }
    
    .has-mega-menu.active .mega-menu {
        display: grid;
    }
    
    .dropdown a,
    .section-items a {
        padding: 12px 20px 12px 40px;
    }
    
    .section-title {
        padding: 12px 20px;
        margin: 0;
        background-color: #003d1f;
    }
    
    .menu-section {
        background-color: #003d1f;
    }
    
    .section-items {
        background-color: #002d14;
    }
}

/* Print Styles */
@media print {
    .main-navigation {
        display: none;
    }
}
