/**
 * MENU DROPDOWN - DESIGN PROFISSIONAL
 * Sistema completo de menu com dropdown hover automático
 */

/* ===== MENU PRINCIPAL ===== */
.nav-menu {
    display: flex !important;
    list-style: none;
    gap: 0;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu .menu-item {
    list-style: none;
    position: relative;
    margin: 0;
}

/* Links do menu - Clean e profissional */
.nav-menu > .menu-item > a {
    display: inline-flex !important;
    align-items: center;
    padding: 0.75rem 1.25rem !important;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    border-radius: 8px;
}

/* Hover elegante */
.nav-menu > .menu-item > a:hover {
    color: #f8e874 !important;
    background: rgba(248, 232, 116, 0.1);
    transform: translateY(-1px);
}

/* Underline animado */
.nav-menu > .menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f8e874, transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu > .menu-item > a:hover::after {
    transform: scaleX(1);
}

/* ===== DROPDOWN (Desktop) ===== */
@media (min-width: 993px) {
    .nav-menu .menu-item-has-children {
        position: relative;
    }
    
    /* Link com dropdown - espaço para ícone */
    .nav-menu .menu-item-has-children > a {
        padding-right: 2.5rem !important;
    }
    
    /* Ícone chevron - SEMPRE VISÍVEL */
    .nav-menu .menu-item-has-children > a::before {
        content: '▼';
        position: absolute;
        right: 0.9rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.65rem;
        color: rgba(255, 255, 255, 0.7);
        transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        pointer-events: none;
    }
    
    /* Animação do chevron */
    .nav-menu .menu-item-has-children:hover > a::before,
    .nav-menu .menu-item-has-children.hover > a::before {
        color: #f8e874;
        transform: translateY(-50%) rotate(180deg);
    }
    
    /* Área de conexão suave */
    .nav-menu .menu-item-has-children::after {
        content: '';
        position: absolute;
        bottom: -12px;
        left: 0;
        right: 0;
        height: 12px;
        background: transparent;
        z-index: 9998;
    }
    
    /* Dropdown - Design limpo */
    .nav-menu .sub-menu {
        position: absolute;
        top: calc(100% + 12px);
        left: 50%;
        transform: translateX(-50%) translateY(-8px);
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 
            0 8px 32px rgba(2, 36, 61, 0.12),
            0 2px 8px rgba(2, 36, 61, 0.08),
            0 0 0 1px rgba(2, 36, 61, 0.04);
        min-width: 240px;
        width: max-content;
        max-width: 320px;
        padding: 8px;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        list-style: none;
    }
    
    /* Seta superior */
    .nav-menu .sub-menu::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 50%;
        transform: translateX(-50%);
        width: 12px;
        height: 12px;
        background: #ffffff;
        border-top: 1px solid rgba(2, 36, 61, 0.04);
        border-left: 1px solid rgba(2, 36, 61, 0.04);
        transform: translateX(-50%) rotate(45deg);
        z-index: -1;
    }
    
    /* Mostrar dropdown no hover */
    .nav-menu .menu-item-has-children:hover > .sub-menu,
    .nav-menu .menu-item-has-children.hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
    
    /* Itens do submenu */
    .nav-menu .sub-menu .menu-item {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    /* Links do submenu */
    .nav-menu .sub-menu .menu-item a {
        display: flex !important;
        align-items: center;
        padding: 0.65rem 1rem !important;
        color: #02243d !important;
        text-decoration: none !important;
        font-size: 0.95rem;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        white-space: nowrap;
    }
    
    /* Hover no submenu */
    .nav-menu .sub-menu .menu-item a:hover {
        background: linear-gradient(135deg, 
            rgba(248, 232, 116, 0.12) 0%, 
            rgba(248, 232, 116, 0.08) 100%);
        color: #02243d !important;
        transform: translateX(4px);
        padding-left: 1.25rem !important;
    }
    
    /* Indicador lateral */
    .nav-menu .sub-menu .menu-item a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: #f8e874;
        border-radius: 0 2px 2px 0;
        transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-menu .sub-menu .menu-item a:hover::before {
        height: 70%;
    }
    
    /* Espaçamento entre itens */
    .nav-menu .sub-menu .menu-item + .menu-item {
        margin-top: 2px;
    }
    
    /* Animação de entrada */
    .nav-menu .menu-item-has-children:hover > .sub-menu .menu-item {
        animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    }
    
    .nav-menu .sub-menu .menu-item:nth-child(1) { animation-delay: 0.05s; }
    .nav-menu .sub-menu .menu-item:nth-child(2) { animation-delay: 0.1s; }
    .nav-menu .sub-menu .menu-item:nth-child(3) { animation-delay: 0.15s; }
    .nav-menu .sub-menu .menu-item:nth-child(4) { animation-delay: 0.2s; }
    .nav-menu .sub-menu .menu-item:nth-child(5) { animation-delay: 0.25s; }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ===== RESPONSIVO ===== */
@media (max-width: 992px) {
    .nav-menu {
        display: none !important;
    }
}
