/* Language Switcher - Custom Flag Dropdown */
.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-switcher-btn {
    display: flex;
    flex-direction: row;
    /* Changed from column to row */
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Slightly increased gap for horizontal look */
    padding: 8px 12px;
    /* Adjusted padding for a wider button shape */
    background: #111720;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    /* Optional: Makes it a 'pill' shape like the image */
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    color: rgba(255, 255, 255, 0.6);
    min-width: auto;
    /* Let the content define the width */
}

.lang-dropdown {
    color: #111;
}

.lang-option-label {
    color: inherit;
}


.lang-switcher-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.lang-flag-img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.lang-btn-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    font-family: inherit;
    letter-spacing: 0.03em;
    line-height: 1;
}

.lang-chevron {
    display: block;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.lang-switcher-btn[aria-expanded="true"] .lang-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #0d1b2a;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 1000;
    min-width: 120px;
}

.lang-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    transition: background 0.15s ease;
    white-space: nowrap;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lang-option img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.lang-option-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    font-family: inherit;
}

/* Desktop nav integration */
.desktop-nav {
    gap: 24px;
}

.desktop-nav .lang-switcher {
    margin-left: 12px;
}

/* Mobile menu integration */
.mobile-menu-lang-switcher {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.mobile-menu-lang-switcher .lang-switcher-btn {
    padding: 12px 18px;
    border-radius: 16px;
    min-width: 60px;
}

.mobile-menu-lang-switcher .lang-flag-img {
    width: 36px;
    height: 36px;
}

.mobile-menu-lang-switcher .lang-option img {
    width: 36px;
    height: 36px;
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-nav .lang-switcher {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-menu-lang-switcher {
        display: none;
    }
}