/* ========================================================================== */
/* NAVBAR HGRAFICA - VERSÃO UNIFICADA E CORRIGIDA */
/* ========================================================================== */

:root {
    /* Cores do Navbar - PADRONIZADAS para todas as páginas */
    --navbar-green: #2e7d32;        /* Verde principal */
    --navbar-red: #d32f2f;          /* Vermelho principal */
    --navbar-red-hover: #c62828;    /* Vermelho hover */
    --navbar-bg: rgba(255, 255, 255, 0.98);
    --navbar-height: 80px;
    --navbar-height-scrolled: 70px;
}

/* ===== NAVBAR CONTAINER ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.navbar.scrolled {
    height: var(--navbar-height-scrolled);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
}

.navbar.scrolled .nav-content {
    height: var(--navbar-height-scrolled);
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    margin-left: 40px;
}

.logo:hover .logo-img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ========================================================================== */
/* NAVEGAÇÃO DESKTOP */
/* ========================================================================== */

.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
}

/* ===== LINK NORMAL (VERDE) ===== */
.nav-link {
    color: var(--navbar-green);
    text-decoration: none;
    font-weight: 500;  /* PESO NORMAL */
    font-size: 15px;
    padding: 10px 0;
    transition: all 0.2s ease;
    position: relative;
}

/* ===== HOVER (FICA VERMELHO, PESO 600) ===== */
.nav-link:hover {
    color: var(--navbar-red);
    font-weight: 600;  /* UM POUCO MAIS FORTE */
    transform: scale(1.05);
}

/* ===== ATIVO (VERMELHO, NEGRITO 700) ===== */
.nav-link.active {
    color: var(--navbar-red);
    font-weight: 700;  /* NEGRITO FORTE - DIFERENTE DOS OUTROS */
}

/* ===== LINHA INDICADORA DO ATIVO ===== */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--navbar-red);
    border-radius: 2px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 100%; }
}

/* ===== GARANTIR QUE O ATIVO MANTENHA O NEGRITO NO HOVER ===== */
.nav-link.active:hover {
    font-weight: 700;  /* MANTÉM NEGRITO FORTE */
    transform: none;   /* Remove escala */
}

/* ========================================================================== */
/* MENU MOBILE */
/* ========================================================================== */

/* ===== BOTÃO HAMBURGUER ===== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1003;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
}

/* Barras do hamburguer */
.bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--navbar-green);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.bar:nth-child(2) {
    margin: 4px 0;
}

/* Animação do X (fica vermelho) */
.mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--navbar-red);
}

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

.mobile-menu-btn.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--navbar-red);
}

/* ===== MENU SLIDE (VERDE) ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--navbar-green);  /* FUNDO VERDE */
    display: flex;
    flex-direction: column;
    padding: 100px 0 40px 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    overflow-y: auto;
}

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

/* ===== LINKS MOBILE (BRANCOS NO FUNDO VERDE) ===== */
.mobile-nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 30px;
    color: white;
    text-decoration: none;
    font-weight: 500;  /* PESO NORMAL */
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Hover mobile */
.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 35px;
    font-weight: 600;  /* UM POUCO MAIS FORTE */
}

/* Ativo mobile (destaque vermelho, negrito) */
.mobile-nav-link.active {
    background: rgba(211, 47, 47, 0.2);  /* VERMELHO TRANSPARENTE */
    border-left: 4px solid var(--navbar-red);
    font-weight: 700;  /* NEGRITO FORTE */
}

/* Ativo hover - mantém negrito */
.mobile-nav-link.active:hover {
    font-weight: 700;  /* MANTÉM NEGRITO */
}

/* ===== OVERLAY COM BLUR ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    cursor: pointer;
}

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

/* ===== BLOQUEAR SCROLL QUANDO MENU ABERTO ===== */
body.menu-open {
    overflow: hidden;
}

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

@media (max-width: 768px) {
    .navbar .container {
        padding: 0 25px;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .logo-img {
        height: 40px;
        margin-left: 20px;
    }
    
    /* Remove linha indicadora no mobile */
    .nav-link.active::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0 20px;
    }
    
    .mobile-menu {
        width: 280px;
        padding-top: 90px;
    }
    
    .logo-img {
        height: 38px;
        margin-left: 10px;
    }
    
    .mobile-menu-btn {
        width: 45px;
        height: 45px;
    }
    
    .bar {
        width: 22px;
    }
    
    .mobile-nav-link {
        padding: 16px 25px;
        font-size: 1rem;
    }
    
    .mobile-nav-link:hover {
        padding-left: 30px;
    }
}

/* ========================================================================== */
/* GARANTIAS DE ESPECIFICIDADE - ÚLTIMO RECURSO */
/* ========================================================================== */

/* Força verde para links não ativos */
.navbar .nav-links .nav-link:not(.active):not(:hover) {
    color: var(--navbar-green) !important;
    font-weight: 500 !important;
}

/* Força vermelho para links ativos e hover */
.navbar .nav-links .nav-link.active,
.navbar .nav-links .nav-link:hover {
    color: var(--navbar-red) !important;
}

/* Mantém negrito no ativo */
.navbar .nav-links .nav-link.active {
    font-weight: 700 !important;
}

/* Mobile - branco para todos */
.navbar .mobile-menu .mobile-nav-link {
    color: white !important;
}

.navbar .mobile-menu .mobile-nav-link:not(.active) {
    font-weight: 500 !important;
}

.navbar .mobile-menu .mobile-nav-link.active {
    font-weight: 700 !important;
}
