/* Language Switcher Styles - Enhanced Design */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    flex-shrink: 0;
    order: 4;
    position: relative;
}

.lang-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    color: white !important;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    line-height: 1;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.lang-btn:hover::before {
    left: 100%;
}

.lang-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.lang-btn:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s;
}

/* Enhanced Dropdown/select style for language picker */
.lang-select {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    /* Better native select look */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    min-width: 180px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lang-select:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.lang-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.1),
        0 12px 40px rgba(0, 0, 0, 0.15);
}

.lang-select option { 
    color: #2c3e50; 
    background: white;
    padding: 8px 12px;
}

.lang-flag-emoji {
    font-size: 18px;
    margin-right: 8px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

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

/* Language Switcher Container Enhancement */
.lang-switcher {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 786px) {
    .lang-switcher {
        margin-left: 8px;
        margin-right: 8px;
        order: 3;
        padding: 6px 10px;
    }

    .lang-btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 20px;
    }

    .lang-select {
        min-width: 150px;
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 20px;
        padding-right: 35px;
    }
    
    .lang-flag-emoji {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .lang-switcher {
        margin-left: 5px;
        margin-right: 5px;
        padding: 4px 8px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 18px;
    }

    .lang-select {
        min-width: 130px;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 18px;
        padding-right: 30px;
    }
    
    .lang-flag-emoji {
        font-size: 14px;
    }
}
