/* Futuristic Hamburger Menu Enhancement */

/* Mobile menu overlay backdrop */
body {
    position: relative;
}

#menu-toggle {
    position: fixed;
}

.menu-backdrop {
    display: none;
}

#menu-toggle:checked ~ .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 9;
    cursor: default;
}

#menu-toggle:checked ~ .hamburger {
    z-index: 11;
}

#menu-toggle:checked ~ .menu {
    z-index: 10;
}

/* Overlay backdrop when menu is open */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 8;
    pointer-events: none;
}



/* Enhanced menu styling */
@media (max-width: 768px) {
    /* Close button visual feedback */
    #menu-toggle:checked ~ .hamburger {
        position: fixed;
        right: 1rem;
        top: 0.2rem;
    }
    
    .menu a {
        position: relative;
        display: block;
        padding: 1rem 1.5rem;
        margin: 0.5rem 0;
        border-radius: 0.75rem;
        background: rgba(0, 101, 98, 0.05);
        border: 1px solid rgba(0, 101, 98, 0.1);
        transition: all 0.3s ease;
        overflow: hidden;
    }
    
    .menu a::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(0, 101, 98, 0.2), transparent);
        transition: left 0.5s ease;
    }
    
    .menu a:hover {
        background: rgba(0, 101, 98, 0.15);
        border-color: var(--teal);
        box-shadow: 0 0 15px rgba(0, 101, 98, 0.2);
        transform: translateX(8px);
    }
    
    .menu a:hover::after {
        left: 100%;
    }
    
    .menu a::before {
        content: '▶';
        position: absolute;
        left: -2rem;
        color: var(--teal);
        font-size: 0.8rem;
        transition: all 0.3s ease;
    }
    
    .menu a:hover::before {
        left: 0.5rem;
    }
    
    /* Stagger animation for menu items */
    .menu a:nth-child(1) {
        animation: slideInItem 0.4s ease 0.1s backwards;
    }
    
    .menu a:nth-child(2) {
        animation: slideInItem 0.4s ease 0.2s backwards;
    }
    
    .menu a:nth-child(3) {
        animation: slideInItem 0.4s ease 0.3s backwards;
    }
    
    .menu a:nth-child(4) {
        animation: slideInItem 0.4s ease 0.4s backwards;
    }
    
    .menu a:nth-child(5) {
        animation: slideInItem 0.4s ease 0.5s backwards;
    }
    
    @keyframes slideInItem {
        from {
            opacity: 0;
            transform: translateX(20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Small mobile optimization */
@media (max-width: 500px) {
    .menu {
        max-width: 65% !important;
        padding: 1.5rem 1rem !important;
    }
    
    .menu a {
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
    }
}
