.header-navigation,
.header-navigation .primary-menu,
.nav-right-item {
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.lang-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 14px 0 14px;
    margin-right: 10px;
    border-radius: 999px;
    border: 1px solid #d7dee9;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.lang-switch:hover {
    border-color: #9bbcad;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    transform: translateY(-1px);
}

.lang-switch:focus-within {
    border-color: #0c5b3a;
    box-shadow: 0 0 0 3px rgba(12, 91, 58, 0.18), 0 12px 28px rgba(15, 23, 42, 0.12);
}

.lang-switch select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    background: transparent;
    padding: 0 24px 0 0;
    height: 100%;
    min-width: 64px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1c1b35;
    cursor: pointer;
    line-height: 1;
    outline: none;
}

.lang-switch::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #1c1b35;
    border-bottom: 2px solid #1c1b35;
    transform: translateY(-55%) rotate(45deg);
    opacity: 0.6;
    pointer-events: none;
}

.lang-switch::before {
    content: "";
    width: 18px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    background-size: cover;
    background-position: center;
    flex: 0 0 18px;
}

.lang-switch.lang-az::before {
    background-image: url("../images/flags/az.svg");
}

.lang-switch.lang-en::before {
    background-image: url("../images/flags/en.svg");
}

.lang-switch.lang-ru::before {
    background-image: url("../images/flags/ru.svg");
}

.lang-switch.has-nice-select select {
    display: none;
}

.lang-switch .nice-select {
    float: none;
    height: 100%;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0 24px 0 0;
    min-width: 64px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1c1b35;
    line-height: 38px;
}

.lang-switch .nice-select:after {
    display: none;
}

.lang-switch .nice-select .list {
    min-width: 140px;
    padding: 6px;
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid #e3e9f2;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
    left: auto;
    right: 0;
    z-index: 2000;
}

.lang-switch .nice-select .option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 36px;
    min-height: 32px;
    line-height: 1.2;
    font-size: 13px;
    font-weight: 600;
    color: #1c1b35;
    border-radius: 8px;
}

.lang-switch .nice-select .option::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 11px;
    border-radius: 3px;
    transform: translateY(-50%);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    background-size: cover;
    background-position: center;
}

.lang-switch .nice-select .option[data-value="az"]::before {
    background-image: url("../images/flags/az.svg");
}

.lang-switch .nice-select .option[data-value="en"]::before {
    background-image: url("../images/flags/en.svg");
}

.lang-switch .nice-select .option[data-value="ru"]::before {
    background-image: url("../images/flags/ru.svg");
}

.lang-switch .nice-select .option.selected {
    background: #f1f5f0;
    font-weight: 700;
}

.lang-switch .nice-select .option:hover,
.lang-switch .nice-select .option.focus,
.lang-switch .nice-select .option.selected.focus {
    background: #eef3f2;
}

.nav-right-item {
    display: flex;
    align-items: center;
    gap: 18px;
}
