/* Language Switcher Styles - For White Header Background */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.language-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.language-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.language-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: #666;
}

.language-btn.active i {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Language List Items */
.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-flag {
    font-size: 1.3rem;
    width: 32px;
    text-align: center;
}

.lang-name {
    font-weight: 500;
    font-size: 0.9rem;
    flex: 1;
    color: #333;
}

.lang-native {
    color: #999;
    font-size: 0.8rem;
}

/* Language Group Divider */
.lang-group-divider {
    padding: 8px 16px;
    background: #f8f9fa;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
}

/* Active language highlight */
.lang-option.active {
    background: #e8f0fe;
    color: #2c5f8a;
    font-weight: 500;
}

.lang-option.active .lang-flag {
    transform: scale(1.05);
}

.lang-option.active .lang-name {
    color: #2c5f8a;
}

/* RTL Support for Arabic */
.lang-option[dir="rtl"],
.language-dropdown[dir="rtl"] .lang-option {
    direction: rtl;
    text-align: right;
}

.lang-option[dir="rtl"] .lang-flag {
    margin-left: 12px;
    margin-right: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .language-dropdown {
        right: auto;
        left: 0;
        min-width: 220px;
    }
    
    .lang-option {
        padding: 10px 14px;
    }
    
    .lang-flag {
        font-size: 1.2rem;
        width: 28px;
    }
    
    .lang-name {
        font-size: 0.85rem;
    }
    
    .lang-native {
        font-size: 0.75rem;
    }
}