.nav ul {
    flex-wrap: nowrap;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.lang-dropdown {
    position: relative;
    list-style: none;
    flex-shrink: 0;
}

.lang-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.lang-dropdown__trigger:hover,
.lang-dropdown.is-open .lang-dropdown__trigger {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.55);
}

.lang-dropdown__icon {
    font-size: 15px;
    line-height: 1;
    opacity: 0.95;
}

.lang-dropdown__arrow {
    font-size: 10px;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.lang-dropdown.is-open .lang-dropdown__arrow {
    transform: rotate(180deg);
}

.lang-dropdown__panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    min-width: 220px;
    max-width: 280px;
    max-height: min(360px, 60vh);
    overflow-y: auto;
    border-radius: 10px;
    background: #fff;
    color: #333;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    padding: 6px 0;
}

.lang-dropdown.is-open .lang-dropdown__panel {
    display: block;
}

.lang-dropdown__group-label {
    padding: 8px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #888;
}

.lang-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #222;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.lang-dropdown__item:hover:not(.is-disabled) {
    background: #f3edf8;
}

.lang-dropdown__item.is-active {
    background: #ede7f6;
    color: #4a148c;
    font-weight: 600;
}

.lang-dropdown__item.is-disabled {
    color: #aaa;
    cursor: not-allowed;
}

.lang-dropdown__badge {
    flex-shrink: 0;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #999;
}

@media screen and (max-width: 768px) {
    .nav-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .lang-dropdown__panel {
        right: 50%;
        transform: translateX(50%);
        min-width: min(280px, 90vw);
    }
}
