/* Modern Language Switcher Styles */
.language-switcher-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.current-language {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #002147 0%, #004080 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 33, 71, 0.25);
    user-select: none;
}

.current-language:hover {
    background: linear-gradient(135deg, #003366 0%, #0059b3 100%);
    box-shadow: 0 6px 25px rgba(0, 33, 71, 0.45);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}

.current-language:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 33, 71, 0.3);
}

.current-language .flag-icon {
    font-size: 16px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.current-language .language-text {
    font-size: 12px;
    letter-spacing: 0.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.current-language .dropdown-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.current-language.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.language-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.language-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #002147 0%, #004080 100%);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.language-option:hover::before {
    transform: translateX(0);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: linear-gradient(90deg, #f8fbff 0%, #f0f7ff 100%);
    padding-left: 24px;
    color: #002147;
}

.language-option.current-lang {
    background: linear-gradient(90deg, #e6f2ff 0%, #d9edff 100%);
    pointer-events: none;
    font-weight: 600;
}

.language-option.current-lang::after {
    content: '✓';
    position: absolute;
    right: 18px;
    color: #002147;
    font-weight: bold;
    font-size: 18px;
}

.language-option .flag-icon {
    font-size: 20px;
    line-height: 1;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.language-option:hover .flag-icon {
    transform: scale(1.15) rotate(5deg);
}

.language-option .language-name {
    font-size: 13px;
    font-weight: 600;
    color: #002147;
    flex: 1;
}

.language-option .language-native {
    font-size: 10px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 33, 71, 0.08);
    padding: 2px 6px;
    border-radius: 8px;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    #navbar .language-switcher-container {
        margin: 10px 0;
        width: 100%;
    }
    
    #navbar .current-language {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    #navbar .language-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-15px) scale(0.95);
        width: calc(100% - 40px);
        max-width: 300px;
    }
    
    #navbar .language-dropdown.active {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    #navbar .language-dropdown::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 992px) {
    #navbar ul li.language-switcher-li {
        padding: 0;
        margin-left: auto;
        padding-left: 30px;
    }
    
    .language-switcher-container {
        display: flex;
        align-items: center;
        height: 100%;
    }
}

/* Animation for flag icons */
@keyframes flagWave {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.language-option:hover .flag-icon {
    animation: flagWave 0.6s ease-in-out;
}

/* Smooth entrance animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-option {
    animation: slideIn 0.3s ease forwards;
}

.language-option:nth-child(1) { animation-delay: 0.05s; }
.language-option:nth-child(2) { animation-delay: 0.1s; }
.language-option:nth-child(3) { animation-delay: 0.15s; }
