/* Mobile Menu and Hamburger Animation Styles */

/* 1. Mobile-First Navigation Panel Visibility */
@media screen and (max-width: 768px) {
    .aa-navigation--mobile {
        display: none;
        background: #fff;
        padding: 80px 20px 20px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        z-index: 9999;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    body.js-nav-open .aa-navigation--mobile {
        display: block !important;
        opacity: 1;
        visibility: visible;
    }

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

/* 2. Hamburger Icon and Animation */
.aa-hamburger {
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.aa-hamburger span,
.aa-hamburger span::before,
.aa-hamburger span::after {
    content: '';
    display: block;
    height: 2px;
    width: 24px;
    background: #000;
    position: absolute;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    border-radius: 2px;
}

.aa-hamburger span::before {
    top: -8px;
}

.aa-hamburger span::after {
    top: 8px;
}

/* 3. Hamburger Animation (Active State) */
.js-hamburger-toggle.is-active .aa-hamburger span {
    background: transparent;
}

.js-hamburger-toggle.is-active .aa-hamburger span::before {
    top: 0;
    transform: rotate(45deg);
}

.js-hamburger-toggle.is-active .aa-hamburger span::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Ensure hamburger is always on top when open */
.js-hamburger-toggle.is-active {
    position: relative;
    z-index: 10001;
}

/* Accessibility Focus Visible */
.js-hamburger-toggle:focus-visible,
.aa-navigation--mobile a:focus-visible {
    outline: 2px solid #000;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Hide navigation items initially for better animation */
.aa-navigation--mobile ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.aa-navigation--mobile li {
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body.js-nav-open .aa-navigation--mobile li {
    opacity: 1;
    transform: translateY(0);
}

/* Delay individual list items for a nice cascade effect */
body.js-nav-open .aa-navigation--mobile li:nth-child(1) { transition-delay: 0.1s; }
body.js-nav-open .aa-navigation--mobile li:nth-child(2) { transition-delay: 0.15s; }
body.js-nav-open .aa-navigation--mobile li:nth-child(3) { transition-delay: 0.2s; }
body.js-nav-open .aa-navigation--mobile li:nth-child(4) { transition-delay: 0.25s; }
body.js-nav-open .aa-navigation--mobile li:nth-child(5) { transition-delay: 0.3s; }
body.js-nav-open .aa-navigation--mobile li:nth-child(6) { transition-delay: 0.35s; }
