/* Language switcher — dropdown (RU/EN/ES active), styled like a native select */
.menus li.pll-parent-menu-item {
    position: relative;
}

.menus li.pll-parent-menu-item > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0.7rem;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.menus li.pll-parent-menu-item > a:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background-color: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.menus li.pll-parent-menu-item.is-open > a {
    border-color: #f19264;
    background-color: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

/* Flag swatch (crisp local SVGs, not Polylang's blurry 16x11 PNGs) */
.menus .lang-item-ru > a::before,
.menus .lang-item-en > a::before,
.menus .lang-item-es > a::before {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.menus .lang-item-ru > a::before {
    background-image: url("img/flags/ru.svg");
}

.menus .lang-item-en > a::before {
    background-image: url("img/flags/gb.svg");
}

.menus .lang-item-es > a::before {
    background-image: url("img/flags/es.svg");
}

/* Chevron */
.menus li.pll-parent-menu-item > a::after {
    content: "";
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    display: block;
    margin-left: 0.1rem;
    background-color: rgba(255, 255, 255, 0.65);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27white%27 stroke-width=%272.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27white%27 stroke-width=%272.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%276 9 12 15 18 9%27/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.menus li.pll-parent-menu-item.is-open > a::after {
    transform: rotate(180deg);
    background-color: #f19264;
}

.menus li.pll-parent-menu-item > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    background: #282828;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    padding: 0.3rem;
    margin-top: 0.4rem;
    z-index: 999;
    min-width: 100%;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.menus li.pll-parent-menu-item.is-open > ul {
    display: flex;
}

.menus li.pll-parent-menu-item > ul li {
    padding: 0 !important;
}

.menus li.pll-parent-menu-item > ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    border-radius: 0.35rem;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.menus li.pll-parent-menu-item > ul li a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

@media (max-width: 1023px) {
    .menus li.pll-parent-menu-item > a {
        background-color: transparent;
        border-color: rgba(255, 255, 255, 0.2);
    }

    .menus li.pll-parent-menu-item > ul {
        position: static;
        background: rgba(255, 255, 255, 0.04);
        border: none;
        box-shadow: none;
        margin-top: 0.4rem;
        min-width: 140px;
    }
}
