/* @author GustavoChaconDeveloper - github.com/GustavoChaconDeveloper */
/* ===== NAVIGATION DROPDOWN SYSTEM ===== */

/* Navigation Dropdown Container */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: rgba(10, 20, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-dropdown-menu.active {
    display: block;
}

.nav-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding-left: 20px;
}

/* Mobile Navigation Dropdown */
@media (max-width: 768px) {
    .nav-dropdown {
        width: 100%;
        display: block;
    }
    
    .nav-dropdown .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-dropdown-menu {
        position: static;
        width: calc(100% - 20px);
        margin: 8px 10px;
        margin-left: 10px;
        border-radius: 8px;
        background: rgba(0, 17, 52, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: none;
    }
    
    .nav-dropdown-menu.active {
        display: block !important;
    }
    
    .nav-dropdown-item {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 13px;
    }
    
    .nav-dropdown-item:last-child {
        border-bottom: none;
    }
    
    .nav-dropdown-item:hover,
    .nav-dropdown-item:active {
        padding-left: 25px;
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ===== LANGUAGE SELECTOR SYSTEM ===== */

/* Language Selector Base */
.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.language-selector:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    background: rgba(10, 20, 40, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-top: 8px;
    padding: 8px;
    min-width: 180px;
    max-width: 220px;
    z-index: 4000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateX(0);
}

@media (max-width: 768px) {
    .language-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

.language-dropdown.active {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-option span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

/* Mobile Language Selector */
.language-selector-mobile {
    display: none;
}

@media (max-width: 768px) {
    /* Ocultar seletor de idioma dentro do menu mobile */
    .nav-menu .language-selector {
        display: none !important;
    }
    
    /* Mostrar seletor de idioma mobile fora do menu */
    .language-selector-mobile {
        display: flex !important;
        margin-right: 0;
        margin-left: 15px;
        order: 3;
    }
    
    .mobile-menu-toggle {
        order: 2;
    }
    
    .logo {
        order: 1;
        flex: 1;
    }
    
    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

/* Desktop - ocultar seletor mobile */
@media (min-width: 769px) {
    .language-selector-mobile {
        display: none !important;
    }
}
