/* EnviroNest Mobile Menu Styles - CSP Compliant */

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 101;
    transition: all 0.3s;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #0a754f;
    margin: 3px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    z-index: 100;
    padding: 80px 0 0;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-nav-links a {
    display: block;
    padding: 20px 30px;
    color: #333 !important;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.mobile-nav-links a:hover {
    background: #f8fcf8;
    color: #0a754f !important;
    padding-left: 40px;
}

/* Mobile responsive breakpoint */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
}

/* Prevent scrolling when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Additional mobile menu enhancements */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

/* Mobile menu animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.mobile-menu.active {
    animation: slideInRight 0.3s ease-out;
}

/* Accessibility improvements */
.hamburger:focus {
    outline: 2px solid #0a754f;
    outline-offset: 2px;
}

.mobile-nav-links a:focus {
    outline: 2px solid #0a754f;
    outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hamburger span {
        background: #000;
    }
    
    .mobile-menu {
        border: 2px solid #000;
    }
    
    .mobile-nav-links a {
        border-bottom: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hamburger,
    .hamburger span,
    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-nav-links a {
        transition: none;
    }
    
    .mobile-menu.active {
        animation: none;
    }
}