/**
 * Dropdown Improved - Estilos elegantes para dropdowns do menu
 * Harmonia com o design futurista do site
 */

/* === DROPDOWN NAVIGATION === */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cyan-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.8rem 0.2rem;
}

.nav-dropdown-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-dropdown.active .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.nav-dropdown-toggle:hover {
    color: var(--neon-green);
}

/* === DROPDOWN MENU === */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(159, 239, 174, 0.3);
    border-radius: 12px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* === DROPDOWN ITEMS === */
.nav-dropdown-menu a,
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--cyan-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(159, 239, 174, 0.1);
    position: relative;
    overflow: hidden;
}

.nav-dropdown-menu a:last-child,
.dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a::before,
.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--neon-green);
    transition: width 0.3s ease;
    z-index: -1;
}

.nav-dropdown-menu a:hover,
.dropdown-item:hover {
    color: #ffffff !important; /* Branco no hover */
    padding-left: 1.5rem;
    transform: translateX(5px);
    background: rgba(159, 239, 174, 0.9) !important;
    border-radius: 6px;
}

.nav-dropdown-menu a:hover::before,
.dropdown-item:hover::before {
    width: 100%;
}

/* === ÍCONES NOS DROPDOWNS === */
.nav-dropdown-menu a i,
.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.8;
    color: inherit;
    transition: all 0.3s ease;
}

.nav-dropdown-menu a:hover i,
.dropdown-item:hover i {
    color: #ffffff !important;
    opacity: 1;
    transform: scale(1.1);
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: static;
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(159, 239, 174, 0.2);
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        min-width: auto;
        margin: 1rem 0 0 1rem;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        display: flex;
    }
    
    .nav-dropdown-menu a,
    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 6px;
        border-bottom: none;
        background: rgba(159, 239, 174, 0.05);
        margin-bottom: 0.25rem;
    }
    
    .nav-dropdown-menu a:hover,
    .dropdown-item:hover {
        background: var(--neon-green) !important;
        color: #000000 !important; /* Preto no mobile para contraste */
        transform: none;
        padding-left: 1rem;
    }
    
    .nav-dropdown-menu a:hover i,
    .dropdown-item:hover i {
        color: #000000 !important; /* Ícones pretos no mobile */
    }
}

/* === EFEITOS ESPECIAIS === */
.nav-dropdown-menu {
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* === HOVER STATES MELHORADOS === */
.nav-dropdown:hover .nav-dropdown-toggle {
    color: var(--neon-green);
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
    border-top-color: var(--neon-green);
}

/* === INDICADORES VISUAIS === */
.nav-dropdown-toggle.has-submenu::after {
    content: '';
    /* Seta já definida acima */
}

/* === CORES HARMÔNICAS === */
.nav-dropdown-menu {
    border-color: rgba(0, 255, 255, 0.3);
}

.nav-dropdown-menu a:hover,
.dropdown-item:hover {
    box-shadow: 0 2px 8px rgba(159, 239, 174, 0.3);
}

/* === GARANTIR VISIBILIDADE DO TEXTO === */
.nav-dropdown-menu a,
.dropdown-item {
    color: var(--cyan-blue) !important;
    background: transparent !important;
}

.nav-dropdown-menu a:hover,
.dropdown-item:hover {
    color: #ffffff !important;
    background: rgba(159, 239, 174, 0.9) !important;
    text-shadow: none !important;
}

.nav-dropdown-menu a:hover i,
.dropdown-item:hover i {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* === ACESSIBILIDADE === */
.nav-dropdown-toggle:focus {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}

.nav-dropdown-menu a:focus,
.dropdown-item:focus {
    outline: 2px solid var(--neon-green);
    outline-offset: -2px;
    background: var(--neon-green);
    color: var(--black-solid);
}

/* === PERFORMANCE === */
.nav-dropdown-menu {
    will-change: transform, opacity;
    contain: layout style paint;
}

.nav-dropdown-menu a,
.dropdown-item {
    will-change: transform, background-color;
}
