.header-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 101;
}

.header-actions .header-back {
    grid-column: unset;
    justify-self: unset;
}

.lang-switcher {
    position: relative;
}

.lang-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.lang-toggle:hover,
.lang-switcher.is-open .lang-toggle {
    color: var(--text-main);
    border-color: var(--border-hover);
}

.lang-toggle:focus-visible {
    outline: 2px solid var(--aura-green);
    outline-offset: 2px;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 108px;
    background: rgba(26, 26, 29, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.lang-switcher.is-open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu button {
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    text-align: left;
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    transition: color 0.2s, background 0.2s;
}

.lang-menu button:hover,
.lang-menu button.is-active {
    color: var(--aura-green);
    background: rgba(62, 189, 94, 0.1);
}

@media (max-width: 768px) {
    .header-actions {
        margin-left: auto;
        margin-right: 10px;
    }
}
