/* ===== NAVBAR MODERNA - CORES HGRAFICA ===== */

/* Variáveis específicas para navbar HGrafica */
:root {
    --nav-height: 80px;
    --nav-height-scrolled: 70px;
    --nav-bg: rgba(255, 255, 255, 0.98);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
    --nav-backdrop: blur(20px);
    --nav-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    --nav-border: 1px solid rgba(0, 0, 0, 0.08);
    --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-accent: #d32f2f; /* MUDADO: Vermelho HGrafica */
    --nav-text: #2e7d32; /* MUDADO: Verde HGrafica */
    --nav-text-hover: #d32f2f; /* MUDADO: Vermelho HGrafica */
    --nav-mobile-bg: #2e7d32; /* MUDADO: Verde HGrafica */
}

/* ===== NAVBAR PRINCIPAL ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: var(--nav-backdrop);
    -webkit-backdrop-filter: var(--nav-backdrop);
    border-bottom: var(--nav-border);
    box-shadow: var(--nav-shadow);
    transition: var(--nav-transition);
    z-index: 1000;
}

.navbar.scrolled {
    height: var(--nav-height-scrolled);
    background: var(--nav-bg-scrolled);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===== CONTAINER ===== */
.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    position: relative;
}

/* ===== LOGO MAIS À DIREITA (MANTIDO COMO ESTAVA) ===== */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1001;
    transition: var(--nav-transition);
    margin-right: auto; /* MANTIDO */
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    margin-left: 40px; /* MANTIDO - MAIS À DIREITA */
}

.logo:hover .logo-img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ===== NAVEGAÇÃO DESKTOP ===== */
.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
    list-style: none;
}

.nav-link {
    color: var(--nav-text); /* MUDADO: Verde */
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 10px 0;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--nav-text-hover); /* MUDADO: Vermelho */
    transform: scale(1.05);
}

.nav-link.active {
    color: var(--nav-text-hover); /* MUDADO: Vermelho */
    font-weight: 600;
}

/* ===== BOTÃO HAMBURGUER MOBILE - CORREÇÃO DA CAIXA AZUL ===== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--nav-transition);
    position: relative;
    z-index: 1003;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--nav-text); /* MUDADO: Verde */
    transition: var(--nav-transition);
    border-radius: 2px;
    pointer-events: none;
}

.bar:nth-child(2) {
    margin: 4px 0;
}

/* Animação VERMELHA - O X DEVE FICAR VISÍVEL */
.mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: #d32f2f; /* MUDADO: Vermelho HGrafica */
}

.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: #d32f2f; /* MUDADO: Vermelho HGrafica */
}

/* ===== MENU MOBILE ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--nav-mobile-bg); /* MUDADO: Verde HGrafica */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    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 com ícones */
.mobile-nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 30px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    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;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 35px;
}

.mobile-nav-link.active {
    background: rgba(211, 47, 47, 0.2); /* MUDADO: Vermelho transparente */
    color: white;
    border-left: 4px solid var(--nav-accent); /* MUDADO: Vermelho */
    font-weight: 600;
}

/* Ícones */
.mobile-nav-link::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 15px;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.mobile-nav-link[data-page="home"]::before {
    content: '\f015';
}

.mobile-nav-link[data-page="services"]::before {
    content: '\f0d1';
}

.mobile-nav-link[data-page="about"]::before {
    content: '\f059';
}

.mobile-nav-link[data-page="coverage"]::before {
    content: '\f279';
}

.mobile-nav-link[data-page="contact"]::before {
    content: '\f0e0';
}

/* ===== OVERLAY COM BLUR COMPLETO ===== */
.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;
}

/* ===== 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; /* AJUSTADO PARA MOBILE */
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0 20px;
    }
    
    .mobile-menu {
        width: 280px;
        padding-top: 90px;
    }
    
    .logo-img {
        height: 38px;
        margin-left: 10px; /* AJUSTADO PARA MOBILE */
    }
    
    .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;
    }
}

/* ===== RESTANTE DO CÓDIGO PERMANECE IGUAL ===== */
.hero {
    padding-top: var(--nav-height);
}

html {
    scroll-padding-top: var(--nav-height);
}

section {
    scroll-margin-top: var(--nav-height);
}

body.menu-open {
    overflow: hidden;
}

/* ===== ANIMAÇÕES MOBILE ===== */
@media (max-width: 768px) {
    .mobile-nav-link {
        opacity: 0;
        transform: translateX(20px);
        animation: slideInLink 0.5s ease forwards;
    }
    
    .mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
    .mobile-nav-link:nth-child(2) { animation-delay: 0.2s; }
    .mobile-nav-link:nth-child(3) { animation-delay: 0.3s; }
    .mobile-nav-link:nth-child(4) { animation-delay: 0.4s; }
    .mobile-nav-link:nth-child(5) { animation-delay: 0.5s; }
    
    @keyframes slideInLink {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* ===== SCROLLBAR MOBILE ===== */
.mobile-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: var(--nav-accent); /* MUDADO: Vermelho */
    border-radius: 10px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: #b71c1c; /* MUDADO: Vermelho mais escuro */
}

/* ===== GARANTIR Z-INDEX CORRETO ===== */
.navbar {
    z-index: 1000 !important;
}

.mobile-menu-overlay {
    z-index: 1001 !important;
}

.mobile-menu {
    z-index: 1002 !important;
}

.mobile-menu-btn {
    z-index: 1003 !important;
}

/* ===== REMOVER COMPORTAMENTO PADRÃO DO BOTÃO ===== */
.mobile-menu-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* FORÇA O BLUR EM TODOS OS ELEMENTOS QUANDO MENU ABERTO */
body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999;
    pointer-events: none;
}