/* Menu Mobile Styles - Versão Limpa e Robusta */

/* ===== HEADER E BOTÃO DE MENU ===== */
.header {
    background: var(--bg-elevated);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-700);
    text-decoration: none;
    transition: var(--transition);
    line-height: 1.2;
}

.logo:hover {
    color: var(--primary-900);
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Botão de Menu */
.menu-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.menu-toggle:hover {
    background: var(--primary-500);
    color: var(--text-inverse);
    border-color: var(--primary-500);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.menu-toggle:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* Ícone do botão */
.menu-toggle i {
    transition: transform 0.3s ease;
}

.menu-toggle[aria-expanded="true"] i {
    transform: rotate(90deg);
}

/* ===== NAVEGAÇÃO ===== */
.nav {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-link {
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    position: relative;
    line-height: 1.4;
}

.nav-link:hover {
    background: var(--primary-100);
    color: var(--primary-600);
}

.nav-link.active {
    background: var(--primary-600);
    color: var(--text-inverse);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-700);
}

/* Ícones da navegação */
.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ===== ESTILOS MOBILE ===== */
@media (max-width: 768px) {
    /* Navegação mobile */
    .nav {
        position: fixed;
        top: 60px; /* Altura do header */
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--bg-elevated);
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        overflow-y: auto;
    }

    /* Menu aberto */
    .nav.mobile-open {
        left: 0;
    }

    /* Lista de navegação mobile */
    .nav-list {
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }

    /* Links de navegação mobile */
    .nav-link {
        padding: 15px;
        border-radius: 8px;
        font-size: 16px;
        margin-bottom: 5px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-light);
    }

    .nav-link:hover {
        background: var(--primary-200);
        color: var(--primary-700);
        transform: translateX(5px);
    }

    .nav-link.active {
        background: var(--primary-600);
        color: var(--text-inverse);
        border-color: var(--primary-600);
        transform: translateX(5px);
    }

    .nav-link.active::before {
        display: none;
    }

    /* Overlay do menu */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.2);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Animações de entrada dos itens */
    .nav-link {
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInLeft 0.3s ease forwards;
    }

    .nav-link:nth-child(1) { animation-delay: 0.1s; }
    .nav-link:nth-child(2) { animation-delay: 0.2s; }
    .nav-link:nth-child(3) { animation-delay: 0.3s; }
    .nav-link:nth-child(4) { animation-delay: 0.4s; }
    .nav-link:nth-child(5) { animation-delay: 0.5s; }

    @keyframes slideInLeft {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    /* Scrollbar personalizada para o menu */
    .nav::-webkit-scrollbar {
        width: 6px;
    }

    .nav::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .nav::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

    .nav::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
}

/* ===== ESTILOS DESKTOP ===== */
@media (min-width: 769px) {
    .nav {
        overflow-x: auto;
    }

    .nav-list {
        min-width: max-content;
    }

    .nav-link {
        white-space: nowrap;
    }

    /* Esconder botão de menu em desktop */
    .menu-toggle {
        display: none;
    }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    .nav,
    .nav-link,
    .menu-toggle,
    .nav-overlay {
        transition: none;
        animation: none;
    }
}

/* ===== ALTO CONTRASTE ===== */
@media (prefers-contrast: high) {
    .nav-link {
        border: 1px solid #000;
    }

    .nav-link.active {
        border: 2px solid #000;
    }

    .menu-toggle {
        border: 2px solid #000;
    }
}

/* ===== ESTADOS DE FOCUS ===== */
.nav-link:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.menu-toggle:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* ===== UTILITÁRIOS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== ANIMAÇÕES DE CARREGAMENTO ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-list {
    animation: fadeIn 0.3s ease;
} 