/* 
 * Menu Mobile Moderno com Hamburger Animado
 * Design responsivo e interativo
 */

/* Container do menu mobile */
.mobile-menu-container {
    display: none;
    position: relative;
}

/* Botão hamburger moderno */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Animação do hamburger para X */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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

/* Overlay do menu mobile */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

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

/* Menu mobile slide */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 0;
}

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

/* Header do menu mobile */
.mobile-menu-header {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.mobile-menu-logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -0.02em;
}

/* Navegação mobile */
.mobile-nav {
    padding: 0 2rem;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    margin-bottom: 0.5rem;
}

.mobile-nav a {
    display: block;
    padding: 1rem 0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav a:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    padding-left: 1rem;
}

.mobile-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

.mobile-nav a:hover::before {
    width: 4px;
}

/* Submenu mobile */
.mobile-nav .sub-menu {
    margin-left: 1rem;
    margin-top: 0.5rem;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
    padding-left: 1rem;
}

.mobile-nav .sub-menu a {
    font-size: 0.9rem;
    color: #6b7280;
    padding: 0.75rem 0;
}

.mobile-nav .sub-menu a:hover {
    color: #6366f1;
    background: none;
    padding-left: 0.5rem;
}

/* Botão de fechar */
.mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.mobile-menu-close::before,
.mobile-menu-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #374151;
    border-radius: 1px;
}

.mobile-menu-close::before {
    transform: rotate(45deg);
}

.mobile-menu-close::after {
    transform: rotate(-45deg);
}

/* Responsividade */
@media (max-width: 1024px) {
    .mobile-menu-container {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu {
        width: 100%;
        right: -100%;
    }
    
    .mobile-menu.active {
        right: 0;
    }
}

/* Animações de entrada para itens do menu */
.mobile-nav li {
    opacity: 0;
    transform: translateX(20px);
    animation: slideInRight 0.3s ease forwards;
}

.mobile-nav li:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav li:nth-child(2) { animation-delay: 0.2s; }
.mobile-nav li:nth-child(3) { animation-delay: 0.3s; }
.mobile-nav li:nth-child(4) { animation-delay: 0.4s; }
.mobile-nav li:nth-child(5) { animation-delay: 0.5s; }
.mobile-nav li:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-menu-toggle span,
    .mobile-nav li {
        transition: none !important;
        animation: none !important;
    }
}

/* Estados de foco para acessibilidade */
.mobile-menu-toggle:focus,
.mobile-menu-close:focus,
.mobile-nav a:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
