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

/* Hide mobile elements by default */
.mobile-menu-toggle,
.mobile-nav-overlay {
    display: none;
}

/* Mobile styles for screens 768px and below */
@media (max-width: 768px) {
    /* Show hamburger button */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1002;
        position: relative;
    }
    
    /* Hamburger icon lines */
    .mobile-menu-toggle span {
        display: block;
        width: 28px;
        height: 3px;
        background: var(--primary-green);
        margin: 5px 0;
        transition: all 0.3s ease;
        border-radius: 3px;
    }
    
    /* Active state - transform to X */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Hide desktop navigation */
    .nav-links {
        display: none !important;
    }
    
    /* Mobile overlay */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, 
            rgba(107, 142, 35, 0.98) 0%, 
            rgba(74, 93, 35, 0.98) 100%);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow-y: auto;
        padding-top: 80px;
    }
    
    /* Active overlay */
    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile menu items */
    .mobile-nav-overlay ul {
        list-style: none;
        padding: 2rem;
        margin: 0;
    }
    
    .mobile-nav-overlay ul li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-nav-overlay ul li:last-child {
        border-bottom: none;
    }
    
    /* Main menu links */
    .mobile-nav-overlay > ul > li > a {
        display: block;
        color: white;
        text-decoration: none;
        padding: 1rem 0;
        font-size: 1.2rem;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .mobile-nav-overlay > ul > li > a:hover {
        color: var(--primary-gold);
        padding-left: 1rem;
    }
    
    /* Submenu toggle */
    .mobile-nav-overlay .has-dropdown {
        position: relative;
    }
    
    .mobile-nav-overlay .has-dropdown > a::after {
        content: '▼';
        float: right;
        transition: transform 0.3s ease;
        font-size: 0.8rem;
    }
    
    .mobile-nav-overlay .has-dropdown.open > a::after {
        transform: rotate(180deg);
    }
    
    /* Submenu styles */
    .mobile-nav-overlay .dropdown {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        display: block !important; /* Override any display: none */
        position: relative !important; /* Not absolute! */
    }
    
    .mobile-nav-overlay .has-dropdown.open .dropdown {
        max-height: 600px; /* Increased for more items */
        margin-bottom: 1rem;
    }
    
    .mobile-nav-overlay .dropdown a {
        display: block;
        color: rgba(255, 255, 255, 0.9);
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        text-decoration: none;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-nav-overlay .dropdown a:last-child {
        border-bottom: none;
    }
    
    .mobile-nav-overlay .dropdown a:hover {
        background: rgba(212, 175, 55, 0.2);
        color: var(--primary-gold);
        padding-left: 2rem;
    }
    
    /* Logo adjustments */
    .logo {
        font-size: 1rem !important;
    }
    
    /* Nav container spacing */
    .nav-container {
        padding: 0 1rem;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .logo {
        font-size: 0.9rem !important;
        max-width: 60%;
    }
    
    .mobile-nav-overlay > ul > li > a {
        font-size: 1.1rem;
    }
}
