/* =================================
   MENU DROPDOWN ELEGANTE PARA MOBILE
   ================================= */

/* Header sempre visível */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(12, 21, 39, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    border-top: none !important; /* Remover border-top */
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 0.3rem 0; /* Reduzido de 0.75rem para 0.3rem */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 0 !important; /* Garantir que não há margin */
}

/* Remover elementos azuis indesejados */
.header::before,
.header::after {
    display: none !important;
}

/* Container do nav */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.2rem; /* Reduzido de 1.5rem para 1.2rem */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Logo */
.logo h2 {
    font-size: 1rem; /* Reduzido de 1.2rem para 1rem */
    font-weight: 600;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Desktop menu - padrão */
@media (min-width: 769px) {
    .nav-menu {
        display: flex;
        list-style: none;
        gap: 1.5rem; /* Reduzido de 2rem para 1.5rem */
        align-items: center;
        margin: 0;
        padding: 0;
        position: static !important;
        background: none !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        max-height: none !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .nav-link {
        color: var(--white) !important;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.8rem; /* Reduzido de 0.9rem para 0.8rem */
        transition: all 0.3s ease;
        position: relative;
        padding: 0.4rem 0.8rem; /* Reduzido de 0.5rem 1rem para 0.4rem 0.8rem */
        border-radius: 6px;
        background: none !important;
        border: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: inline-block;
        text-align: center;
    }

    .nav-link:hover {
        color: #22d3ee !important;
        text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
        background: rgba(255, 255, 255, 0.05) !important;
        transform: none !important;
    }

    .nav-link.active {
        color: #22d3ee !important;
        background: rgba(34, 211, 238, 0.1) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .hamburger {
        display: none;
    }

    /* Garantir que o CTA button funcione corretamente */
    .cta-button {
        background: linear-gradient(135deg, #4285f4 0%, #34a853 100%) !important;
        padding: 0.5rem 1rem !important; /* Reduzido de 0.6rem 1.2rem */
        border-radius: 6px !important; /* Reduzido de 8px */
        font-weight: 600 !important;
        border: none !important;
        font-size: 0.75rem !important; /* Reduzido de 0.85rem */
        box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3) !important;
        color: var(--white) !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-left: 0.3rem !important; /* Reduzido de 0.5rem */
        text-shadow: none !important;
    }

    .cta-button:hover {
        background: linear-gradient(135deg, #3367d6 0%, #2d8f47 100%) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4) !important;
        color: var(--white) !important;
        text-shadow: none !important;
    }

    .cta-button::after {
        display: none !important;
    }
}

/* Mobile menu - dropdown */
@media (max-width: 768px) {
    /* Garantir que não há elementos azuis acima do menu */
    .header {
        top: 0 !important;
        margin-top: 0 !important;
        border-top: none !important;
        background: rgba(12, 21, 39, 0.95) !important;
    }
    
    /* Remover qualquer decoração azul */
    .nav-container::before,
    .nav-container::after {
        display: none !important;
    }
    
    /* HAMBURGER - GARANTIR VISIBILIDADE */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        gap: 4px;
        z-index: 1001;
        background: none;
        border: none;
        padding: 8px;
        transition: all 0.3s ease;
        border-radius: 6px;
        position: relative;
        width: 32px;
        height: 32px;
    }

    .hamburger:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .hamburger span {
        width: 24px;
        height: 3px;
        background: var(--white) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 2px;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
        background: #22d3ee !important;
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
        background: #22d3ee !important;
    }

    /* Menu dropdown - CORRIGIDO */
    .nav-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: linear-gradient(135deg, 
            rgba(12, 21, 39, 0.98) 0%, 
            rgba(23, 34, 57, 0.98) 100%) !important;
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid rgba(59, 130, 246, 0.2);
        border-top: none;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        display: none !important;
        flex-direction: column;
        list-style: none;
        margin: 0;
        padding: 1.5rem 2rem 2rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        z-index: 999;
        width: 100% !important;
        transform: translateY(-10px);
    }

    .nav-menu.active {
        display: block !important;
        max-height: 400px !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    /* Links do menu - CORRIGIDOS */
    .nav-link {
        color: var(--white) !important;
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 500;
        padding: 1rem 1.5rem;
        border-radius: 12px;
        transition: all 0.3s ease;
        text-align: left;
        display: block !important;
        margin-bottom: 0.5rem;
        position: relative;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-link:hover,
    .nav-link:focus {
        background: rgba(59, 130, 246, 0.12) !important;
        border-color: rgba(59, 130, 246, 0.3);
        color: #22d3ee !important;
        transform: translateX(8px);
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    }

    /* Botão CTA especial no mobile */
    .cta-button {
        background: linear-gradient(135deg, 
            #1e40af 0%, 
            #3b82f6 25%, 
            #0891b2 60%, 
            #059669 100%) !important;
        color: var(--white) !important;
        font-weight: 600 !important;
        border: none !important;
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
        margin-top: 1rem;
        position: relative;
        overflow: hidden;
    }

    .cta-button:hover {
        transform: translateX(8px) scale(1.02) !important;
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5) !important;
        background: linear-gradient(135deg, 
            #1e40af 0%, 
            #3b82f6 25%, 
            #06b6d4 60%, 
            #10b981 100%) !important;
    }

    /* Overlay escuro */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 998;
        opacity: 0;
        animation: fadeInOverlay 0.3s ease forwards;
    }

    @keyframes fadeInOverlay {
        to { opacity: 1; }
    }

    /* Animação de entrada dos links */
    .nav-menu.active .nav-link {
        animation: slideInDown 0.4s ease forwards;
        opacity: 0;
        transform: translateY(-20px);
    }

    .nav-menu.active .nav-link:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu.active .nav-link:nth-child(2) { animation-delay: 0.15s; }
    .nav-menu.active .nav-link:nth-child(3) { animation-delay: 0.2s; }
    .nav-menu.active .nav-link:nth-child(4) { animation-delay: 0.25s; }

    @keyframes slideInDown {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Ajustar o header quando menu está aberto */
    .header:has(.nav-menu.active) {
        border-radius: 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        padding: 1rem 1.5rem 1.5rem;
        border-radius: 0 0 16px 16px;
    }

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

    .logo h2 {
        font-size: 1rem;
    }
}

/* =================================
   MELHORIAS GERAIS
   ================================= */

/* Smooth transitions para todos os elementos */
* {
    box-sizing: border-box;
}

/* Prevenir seleção de texto no hamburger */
.hamburger {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Melhorar acessibilidade */
.nav-link:focus {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
}

/* Suporte para motion reduced */
@media (prefers-reduced-motion: reduce) {
    .nav-menu,
    .nav-link,
    .hamburger span,
    .menu-overlay {
        transition: none !important;
        animation: none !important;
    }
}
    .nav-menu {
        padding: 1rem 1.5rem 1.5rem;
        border-radius: 0 0 16px 16px;
    }

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

    .logo h2 {
        font-size: 1rem;
    }

/* =================================
   MELHORIAS GERAIS
   ================================= */

/* Smooth transitions para todos os elementos */
* {
    box-sizing: border-box;
}

/* Prevenir seleção de texto no hamburger */
.hamburger {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Melhorar acessibilidade */
.nav-link:focus {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
}

/* Suporte para motion reduced */
@media (prefers-reduced-motion: reduce) {
    .nav-menu,
    .nav-link,
    .hamburger span,
    .menu-overlay {
        transition: none !important;
        animation: none !important;
    }
}
