/* ===== MENU DE NAVEGAÇÃO RESPONSIVO MODERNO ===== */

/* Reset e configurações básicas para o menu */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: auto;
    min-height: 80px;
}

/* Efeito de scroll no header */
.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

/* Container da navegação */
.navbar {
    padding: 1rem 0;
    margin-left: 15px;
    transition: padding 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    /* Reduced to match the more centered look of the reference */
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Logo aprimorado */
.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

/* Hover effect removed on logo */

.nav-logo h1 .text {
    background: linear-gradient(135deg, #667eea 0%, #84b6cf 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Menu principal - Desktop */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    /* Balanced gap, not too far apart */
    padding-left: 0;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-item {
    position: relative;
}

/* Links do menu em azul marinho - Estilo Limpo */
.nav-link {
    text-decoration: none !important;
    /* Sem underline */
    color: #000080;
    /* Azul Marinho Clássico */
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.25rem;
    position: relative;
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: none;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Removendo qualquer pseudo-elemento ou efeito extra */
.nav-link::before,
.nav-link::after {
    display: none !important;
}

.nav-link:hover,
.nav-link:focus {
    text-decoration: none !important;
    color: #000080 !important;
    /* Mantém a cor */
    transform: none !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Indicador ativo do link */
.nav-link.active {
    color: #000080 !important;
    opacity: 1;
}

/* Estilo para o link de login no desktop */
#login {
    margin-left: 2rem;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

#login:hover {
    transform: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #2563eb !important;
}

/* ===== MENU MOBILE (HAMBÚRGUER) ===== */

/* Botão hambúrguer moderno */
.hamburger {
    display: none;
    /* Escondido no desktop por padrão */
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    position: relative;
    z-index: 1001;
}

.hamburger:hover {
    background: rgba(102, 126, 234, 0.08);
}

/* Barras do hambúrguer */
.bar {
    width: 25px;
    height: 3px;
    background: #2d3748;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    transform-origin: center;
}

/* Animação do hambúrguer para X */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: #667eea;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: #667eea;
}

/* ===== RESPONSIVIDADE ===== */

/* Tablets e dispositivos médios */
@media screen and (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
        order: 3;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 350px;
        /* Elegant sidebar width */
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        /* Left aligned items in mobile sidebar */
        padding: 100px 2.5rem 2rem;
        gap: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        z-index: 999;
    }

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

    .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .nav-link {
        width: 100%;
        padding: 1rem 0;
        font-size: 1.15rem;
        font-weight: 500;
        text-align: left;
        border-radius: 0;
        margin-bottom: 0;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }

    .nav-link:hover,
    .nav-link:active {
        background: rgba(37, 99, 235, 0.08);
        /* Subtle blue glow */
        transform: translateX(8px);
        /* Elegant slide effect */
        border-bottom-color: #2563eb;
        /* Active accent border */
        color: #2563eb !important;
        /* Visual feedback color */
        padding-left: 10px;
        /* Internal spacing for the slide */
    }

    /* Estilo para o link de login no mobile */
    #login {
        width: 100%;
        margin-left: 0;
        margin-top: 1rem;
        justify-content: center;
        padding: 12px 0;
        border-radius: 8px;
        background: #2563eb !important;
        color: white !important;
        transition: all 0.3s ease;
    }

    #login:hover {
        background: #1d4ed8 !important;
        transform: scale(1.02);
    }

    .nav-link::before {
        display: none;
    }

    /* Overlay para fechar menu */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: -400px;
        width: 400px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* Ajustar container para mobile */
    .nav-container {
        justify-content: space-between;
        align-items: center;
    }

    .nav-logo {
        order: 1;
        flex: 1;
    }
}

/* Mobile pequeno */
@media screen and (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-logo h1 {
        font-size: 1.6rem;
    }

    .nav-menu {
        max-width: 100%;
        padding: 100px 1.5rem 2rem;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
    }
}

/* ===== ANIMAÇÕES E EFEITOS ESPECIAIS ===== */

/* Animação de entrada dos itens do menu mobile */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.nav-menu.active .nav-item {
    animation: slideInFromRight 0.3s ease forwards;
}

.nav-menu.active .nav-item:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-menu.active .nav-item:nth-child(2) {
    animation-delay: 0.15s;
}

.nav-menu.active .nav-item:nth-child(3) {
    animation-delay: 0.2s;
}

.nav-menu.active .nav-item:nth-child(4) {
    animation-delay: 0.25s;
}

.nav-menu.active .nav-item:nth-child(5) {
    animation-delay: 0.3s;
}

.nav-menu.active .nav-item:nth-child(6) {
    animation-delay: 0.35s;
}

.nav-menu.active .nav-item:nth-child(7) {
    animation-delay: 0.4s;
}

.nav-menu.active .nav-item:nth-child(8) {
    animation-delay: 0.45s;
}

.nav-menu.active .nav-item:nth-child(9) {
    animation-delay: 0.5s;
}

/* Efeito de pulso no logo */
@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.nav-logo h1:hover {
    animation: logoPulse 1s ease-in-out;
}

/* Efeito de brilho nos links */
.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::after {
    left: 100%;
}

/* ===== MELHORIAS DE ACESSIBILIDADE ===== */

/* Focus states para navegação por teclado */
.nav-link:focus,
.hamburger:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Redução de movimento para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {

    .nav-link,
    .hamburger,
    .bar,
    .nav-menu {
        transition: none;
    }

    .nav-menu.active .nav-item {
        animation: none;
    }
}

/* ===== TEMA ESCURO (OPCIONAL) ===== */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(26, 32, 44, 0.95);
    }

    .nav-link {
        color: #e2e8f0;
    }

    .nav-link:hover {
        color: #90cdf4;
        background: rgba(144, 205, 244, 0.1);
    }

    .bar {
        background: #e2e8f0;
    }

    .hamburger.active .bar {
        background: #90cdf4;
    }

    .nav-menu {
        background: rgba(26, 32, 44, 0.98);
    }

    .nav-link {
        background: rgba(45, 55, 72, 0.7);
        border-color: rgba(144, 205, 244, 0.1);
    }

    .nav-link:hover {
        background: rgba(144, 205, 244, 0.1);
        border-color: rgba(144, 205, 244, 0.3);
    }
}

/* ===== PERFORMANCE E OTIMIZAÇÕES ===== */

/* Otimização para GPU */
.nav-menu,
.hamburger,
.nav-link {
    will-change: transform;
    transform: translateZ(0);
}

/* Prevenção de layout shift */
.nav-container {
    min-height: 60px;
}

/* Smooth scrolling aprimorado */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}


/* Estilo especial para o link de login */
.nav-link.login-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.nav-link.login-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.nav-link.login-link i {
    margin-right: 5px;
}

/* Responsividade para o link de login */
@media (max-width: 768px) {
    .nav-link.login-link {
        margin-top: 10px;
        display: inline-block;
        text-align: center;
    }
}