/* Language Dropdown with Flags Styling */
.language-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 20px;
    z-index: 1000;
}

.dropdown-button {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.dropdown-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.flag-img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    margin-right: 8px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.lang-text {
    margin: 0 5px;
    font-size: 14px;
}

.dropdown-arrow {
    margin-left: 8px;
    font-size: 12px;
}

.dropdown-content {
    display: none;
    position: absolute;
    min-width: 160px;
    background-color: #333;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.language-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: white;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    position: relative;
}

.dropdown-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #00c3ff;
}

/* RTL support for Arabic */
[dir="rtl"] .language-dropdown {
    margin-left: 0;
    margin-right: 20px;
}

[dir="rtl"] .flag-img {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .dropdown-arrow {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .dropdown-item.active::before {
    left: auto;
    right: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .language-dropdown {
        margin: 10px 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .dropdown-content {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .dropdown-button {
        width: 80%;
        justify-content: center;
    }
}
