.lang-switcher {
    position: relative;
    width: fit-content;
    flex: 0 0 auto;
    z-index: 30;
    margin-left: 4px;
}

.lang-switcher__menu[hidden] {
    display: none;
}

.lang-switcher.is-open .lang-switcher__menu {
    display: block;
}

.lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.85);
    font-family: Roboto, 'Roboto Fallback', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.lang-switcher__toggle:hover,
.lang-switcher.is-open .lang-switcher__toggle {
    border-color: rgba(247, 158, 28, 0.55);
    color: #fff;
    background: rgba(247, 158, 28, 0.12);
}

.lang-switcher__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #F79E1C;
    transition: transform 0.2s ease;
}

.lang-switcher.is-open .lang-switcher__caret {
    transform: rotate(180deg);
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 88px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: rgba(10, 10, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.lang-switcher__item {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-family: Roboto, 'Roboto Fallback', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-switcher__item:hover {
    background: rgba(247, 158, 28, 0.15);
    color: #fff;
}

.lang-switcher__item.is-active {
    background: rgba(247, 158, 28, 0.22);
    color: #F79E1C;
}

@media (min-width: 1101px) {
    header .main-nav {
        display: flex;
        align-items: center;
        gap: 20px;
    }
}

@media (max-width: 1100px) {
    header.box.header #mainNav:not(.active) {
        display: none !important;
    }

    .main-nav .lang-switcher {
        margin-left: 0;
        margin-top: 8px;
        position: relative;
    }

    .main-nav .lang-switcher__toggle {
        padding: 10px 18px;
        font-size: 16px;
    }

    .main-nav .lang-switcher__menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        margin-top: 0;
        width: fit-content;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
        background: rgba(10, 10, 30, 0.98);
    }
}
