/* ─── SITE HEADER ─────────────────────────────────────────────────────────────
 * Desktop: 1440×78px, bg=#FFFFFF, px=40px, py=20px
 * Mobile:  362×62px,  px=20px,   py=15px
 * ─────────────────────────────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 200; /* выше backdrop (140) и nav-menu (150) */
    background-color: var(--color-white);
    height: 78px;
    border-bottom: solid 1px rgba(245, 245, 245, 1);
}

/* Inner container — flex row, fills 78px height */
.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-md);
}

/* ─── LOGO ────────────────────────────────────────────────────────────────── */

.site-header__logo {
    display: block;
    flex-shrink: 0;
    width: 177px;
    height: 38px;
}

.site-header__logo img {
    display: block;
    width: 100%;
    height: auto;
}

/* ─── NAV ─────────────────────────────────────────────────────────────────── */

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-header__nav-link {
    font-family: var(--font-body);
    font-weight: var(--fw-medium);
    font-size: var(--fs-body-3);
    line-height: var(--lh-normal);
    color: var(--color-sapphire-deep);
    text-decoration: none;
    white-space: nowrap;
}

.site-header__nav-link:hover {
    color: var(--color-accent);
}

.site-header__search {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--color-sapphire-deep);
    background: none;
    border: none;
    padding: 0;
}

.site-header__search svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ─── RIGHT SIDE ──────────────────────────────────────────────────────────── */

.site-header__right {
    display: flex;
    align-items: center;
    gap: 40px;
}

.site-header__contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-header__lang {
    font-family: var(--font-body);
    font-weight: var(--fw-medium);
    font-size: var(--fs-body-3);
    color: rgba(10, 27, 45, 0.4);
    cursor: pointer;
    white-space: nowrap;
}

.site-header__lang-active {
    font-weight: var(--fw-bold);
    color: var(--color-sapphire-deep);
}

.site-header__phone {
    font-family: var(--font-body);
    font-weight: var(--fw-medium);
    font-size: var(--fs-body-3);
    color: var(--color-sapphire-deep);
    text-decoration: none;
    white-space: nowrap;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* CTA button: 116×32px — smaller than standard .btn (45px), header-specific */
.site-header__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 116px;
    height: 32px;
    padding: 0 15px;
    background-color: var(--color-sapphire-deep);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: var(--fw-semibold);
    font-size: 13px;
    color: var(--color-white);
    white-space: nowrap;
    text-decoration: none;
}

.site-header__cta:hover {
    background-color: var(--color-solar-gold);
    color: var(--color-sapphire-deep);
}

/* Burger: 32×32px — 3 полосы → крест при открытом меню */
.site-header__burger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3.5px;
    width: 32px;
    height: 32px;
    background-color: var(--color-solar-gold);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background-color 0.3s ease;
}

/* Смена цвета при открытом меню */
.site-header__burger[aria-expanded='true'] {
    background-color: var(--color-sapphire-deep);
}

/* Полосы */
.site-header__burger-bar {
    display: block;
    width: 18px;
    height: 1.5px;
    background-color: var(--color-white);
    border-radius: 1px;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
    transform-origin: center;
}

/* Верхняя полоса → правая диагональ */
.site-header__burger[aria-expanded='true'] .site-header__burger-bar:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

/* Средняя полоса → исчезает */
.site-header__burger[aria-expanded='true'] .site-header__burger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

/* Нижняя полоса → левая диагональ */
.site-header__burger[aria-expanded='true'] .site-header__burger-bar:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* ─── MOBILE ──────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .site-header {
        height: 62px;
    }

    .site-header__logo {
        width: 103px;
        height: 22px;
    }

    .site-header__nav,
    .site-header__contacts {
        display: none;
    }

    .site-header__right {
        gap: 10px;
    }
}

/* ─── TABLET ──────────────────────────────────────────────────────────────── */
/* Figma header_mobile 768×75: logo(160×35) + CTA + burger, NO nav, NO contacts */

@media (min-width: 768px) and (max-width: 1439px) {
    .site-header {
        height: 75px;
    }

    .site-header__logo {
        width: clamp(6.4375rem, 20.833vw, 11.0625rem); /* 103px → 177px fluid */
        height: auto;
    }

    .site-header__nav,
    .site-header__contacts {
        display: none;
    }

    .site-header__right {
        gap: 10px;
    }
}
