/* =========================================
   Responsive Media Queries
   ========================================= */

@media (max-width: 992px) {
    :root {
        --font-size-4xl: 2.5rem;
        --font-size-3xl: 2rem;
    }
}

@media (max-width: 768px) {

    /* Mobile Menu Button - White Icon */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0 1rem;
        z-index: 1001;
    }

    .mobile-menu-btn .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background-color: #ffffff !important;
        /* Force White Icon */
    }

    /* Active Animation for Hamburger */
    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Mobile Navigation Container */
    .main-nav {
        display: none;
        /* Hidden by default */
        position: absolute;
        top: 100%;
        /* Below nav bar */
        left: 0;
        width: 100%;
        /* Fix Height Issue */
        height: auto !important;
        min-height: 50vh;
        max-height: 90vh;
        overflow-y: auto;

        background-color: var(--color-primary);
        /* Navy BG */
        padding: 0 0 20px 0;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 9999;
    }

    .main-nav.active {
        display: block;
        /* Show when toggled */
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        height: auto;
        /* Reset desktop 100% */
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        color: #ffffff !important;
        /* White Text */
        padding: 15px 20px;
        display: block;
        width: 100%;
        font-size: 1rem;
    }

    /* Mobile Dropdown (Stacked) */
    .main-nav .dropdown {
        position: static !important;
        /* Stacked naturally */
        float: none !important;
        display: none;
        /* Hidden until clicked */
        width: 100% !important;
        min-width: 100%;
        box-shadow: none !important;
        /* No shadow inside menu */
        border: none !important;
        border-radius: 0 !important;
        background-color: rgba(0, 0, 0, 0.2) !important;
        /* Slightly darker navy */
        padding: 0;
    }

    .main-nav .dropdown.open {
        display: block !important;
        /* Show via JS class */
    }

    .main-nav .dropdown li a {
        padding-left: 40px !important;
        /* Indent sub-items */
        color: #ddd !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .main-nav .dropdown li a:hover {
        background-color: rgba(255, 255, 255, 0.05) !important;
        color: #fff !important;
    }
}