/* CSS-only Menu Lateral - No DOM dependencies */
#menu-toggle {
    display: none;
}

.menu-lateral-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-lateral-content {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    max-width: 80vw;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
}

.menu-lateral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #00522d, #28a745);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-lateral-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.2rem;
}

.btn-close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-close-menu:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-lateral-body {
    padding: 0;
}

.menu-lateral-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-lateral-list li {
    border-bottom: 1px solid #f0f0f0;
}

.menu-lateral-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.menu-lateral-item:hover {
    background-color: #f8f9fa;
    color: #00522d;
    text-decoration: none;
    transform: translateX(5px);
}

.menu-lateral-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.menu-lateral-item span {
    font-weight: 500;
}

/* Menu toggle functionality using checkbox hack */
#menu-toggle:checked ~ .menu-lateral-overlay {
    opacity: 1;
    visibility: visible;
}

#menu-toggle:checked ~ .menu-lateral-overlay .menu-lateral-content {
    left: 0;
}

/* Menu trigger button */
.menu-trigger {
    cursor: pointer;
    display: inline-block;
    padding: 8px;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.menu-trigger:hover {
    color: #00522d;
    text-decoration: none;
}

/* Focus management for accessibility */
.menu-trigger:focus,
.menu-lateral-item:focus,
.btn-close-menu:focus {
    outline: 2px solid #00522d;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .menu-lateral-content {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .menu-lateral-content {
        width: 100%;
        max-width: 100%;
        left: -100%;
    }

    #menu-toggle:checked ~ .menu-lateral-overlay .menu-lateral-content {
        left: 0;
    }
}

/* Animation improvements */
@media (prefers-reduced-motion: no-preference) {
    .menu-lateral-overlay {
        transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                   visibility 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .menu-lateral-content {
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .menu-lateral-item {
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .menu-lateral-overlay {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .menu-lateral-content {
        border: 2px solid #000;
    }
    
    .menu-lateral-item {
        border-bottom: 2px solid #000;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .menu-lateral-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .menu-lateral-item {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .menu-lateral-item:hover {
        background-color: #4a5568;
        color: #4ade80;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .menu-lateral-overlay,
    .menu-lateral-content,
    .menu-lateral-item,
    .menu-trigger,
    .btn-close-menu {
        transition: none !important;
        animation: none !important;
    }
}