.site-header {
    --site-header-height: 80px;
    --site-header-brown: #41342e;
    --site-header-cream: #fff7e6;
    position: relative;
    width: 100%;
    height: 0;
    z-index: 990;
    transform: none;
    transition: none;
    font-family: 'Pragmatica', Arial, sans-serif;
    color: var(--site-header-brown);
    background: none;
}

.site-header,
.site-header * {
    box-sizing: border-box;
}

.site-header a {
    color: inherit;
    text-decoration: none;
}

.site-header button,
.site-header summary {
    font-family: inherit;
    color: inherit;
}

.site-header__bar {
    position: fixed;
    z-index: 990;
    top: var(--site-header-top, 0px);
    right: 0;
    left: 0;
    height: var(--site-header-height);
    background: rgba(255, 247, 230, .98);
    border-bottom: 1px solid rgba(65, 52, 46, .12);
    transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 1230px;
    max-width: 100%;
    height: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

.site-header__logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    width: 84px;
    margin: 0;
}

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

.site-header__nav {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.site-header__item {
    position: relative;
    flex: 0 0 auto;
    margin: 0;
}

.site-header__nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    padding: 11px 6px;
    border-radius: 30px;
    cursor: pointer;
    list-style: none;
    transition: color .1s ease, background-color .1s ease;
}

.site-header summary::-webkit-details-marker {
    display: none;
}

.site-header summary::marker {
    content: "";
}

.site-header__nav-link svg {
    flex-shrink: 0;
    transition: transform .16s ease;
}

.site-header__dropdown[open] > summary {
    color: #aa8f5d;
}

.site-header__dropdown[open] > summary > svg {
    transform: rotate(180deg);
}

.site-header__panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 300px;
    max-height: calc(100dvh - var(--site-header-height) - 24px);
    overflow: auto;
    padding: 12px;
    background: #fff7e6;
    border: 1px solid #ded4c2;
    box-shadow: 0 12px 28px rgba(65, 52, 46, .12);
    border-radius: 8px;
}

.site-header__menu-link {
    display: block;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    padding: 10px 12px;
    border-radius: 4px;
    transition: background-color .1s ease, color .1s ease;
}

.site-header__cities {
    margin-top: 4px;
    border-top: 1px solid #ded4c2;
    padding-top: 4px;
}

.site-header__cities > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    list-style: none;
}

.site-header__cities > div {
    padding-left: 12px;
}

.site-header__panel-wide {
    position: fixed;
    top: calc(var(--site-header-top, 0px) + var(--site-header-height) + 8px);
    left: 50%;
    width: 1060px;
    max-width: calc(100% - 32px);
    transform: translateX(-50%);
    padding: 22px;
}

.site-header__panel-heading {
    margin-bottom: 16px;
}

.site-header__overview-link {
    display: inline-block;
    font-size: 18px;
    line-height: 1.3;
    padding: 4px 8px;
}

.site-header__solution-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.site-header__solution-title {
    margin: 0 0 10px;
    padding: 0 12px;
    font-family: 'Pragmatica', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #8b7758;
}

.site-header__solution-column .site-header__menu-link {
    padding-top: 7px;
    padding-bottom: 7px;
}

/* Панель без групп (много ссылок подряд): распределяем по трём колонкам. */
.site-header__panel-columns {
    column-count: 3;
    column-gap: 20px;
}

.site-header__panel-columns .site-header__menu-link {
    break-inside: avoid;
}

.site-header__contacts {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.site-header__phone {
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.site-header__phone span {
    text-decoration: underline;
}

.site-header__phone-icon {
    display: none;
}

.site-header__messengers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.site-header__messenger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: opacity .1s ease;
}

.site-header__messenger img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* WhatsApp: белая иконка на фирменном зелёном круге. */
.site-header__messenger-wa {
    background: #25d366;
}

.site-header__messenger-wa img {
    width: 21px;
    height: 21px;
    filter: brightness(0) invert(1);
}

.site-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 8px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.site-header__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: transform .16s ease, opacity .16s ease;
}

.site-header--menu-open .site-header__toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
}

.site-header--menu-open .site-header__toggle span:nth-child(2) {
    opacity: 0;
}

.site-header--menu-open .site-header__toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

.site-header--scrolled .site-header__bar {
    background: #fff7e6;
    box-shadow: 0 4px 16px rgba(65, 52, 46, .09);
}

.site-header a:focus-visible,
.site-header summary:focus-visible,
.site-header button:focus-visible {
    outline: 2px solid #41342e;
    outline-offset: 3px;
}

@media (hover: hover) {
    .site-header__nav-link:hover,
    .site-header__menu-link:hover,
    .site-header__cities > summary:hover {
        color: #aa8f5d;
    }

    .site-header__overview-link:hover,
    .site-header__phone:hover {
        color: #aa8f5d;
    }

    .site-header__messenger:hover {
        opacity: .75;
    }

    .site-header__toggle:hover {
        color: #aa8f5d;
    }
}

@media (max-width: 1199px) {
    .site-header__inner {
        gap: 12px;
    }

    .site-header__contacts {
        margin-left: auto;
    }

    .site-header__toggle {
        display: flex;
    }

    .site-header__nav {
        display: none;
        position: fixed;
        top: calc(var(--site-header-top, 0px) + var(--site-header-height));
        right: 0;
        left: 0;
        bottom: 0;
        overflow: auto;
        overscroll-behavior: contain;
        background: #fff7e6;
        padding: 18px max(20px, calc((100% - 740px) / 2));
    }

    .site-header--menu-open .site-header__nav {
        display: block;
    }

    .site-header__item {
        border-bottom: 1px solid #ded4c2;
    }

    .site-header__nav-link {
        display: flex;
        width: 100%;
        justify-content: space-between;
        padding: 17px 8px;
        font-size: 18px;
        border-radius: 0;
    }

    .site-header__panel,
    .site-header__panel-wide {
        position: static;
        transform: none;
        width: 100%;
        max-width: none;
        max-height: none;
        overflow: visible;
        padding: 8px 0 18px;
        border: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .site-header__menu-link {
        font-size: 16px;
        padding: 11px 12px;
    }

    .site-header__cities > summary {
        font-size: 16px;
    }

    .site-header__panel-wide {
        padding-top: 16px;
    }

    .site-header__solution-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .site-header__panel-columns {
        column-count: 1;
    }
}

@media (max-width: 640px) {
    .site-header__inner {
        padding: 0 15px;
        gap: 6px;
    }

    .site-header__logo {
        width: 72px;
    }

    .site-header__contacts {
        gap: 3px;
    }

    .site-header__phone {
        font-size: 16px;
    }

    .site-header__messengers {
        gap: 5px;
    }

    .site-header__messenger {
        width: 28px;
        height: 28px;
    }

    .site-header__messenger img {
        width: 28px;
        height: 28px;
    }

    .site-header__messenger-wa img {
        width: 21px;
        height: 21px;
    }

    .site-header__nav {
        padding: 12px 16px 24px;
    }

    .site-header__solution-columns {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 601px) and (max-width: 1199px) {
    .site-header__contacts {
        flex-direction: row;
        gap: 12px;
    }

    .site-header__phone {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .site-header__contacts,
    .site-header--scrolled .site-header__contacts {
        flex-direction: row;
        gap: 5px;
    }

    /* На телефоне номер сворачивается в круглую кнопку звонка. */
    .site-header a.site-header__phone {
        justify-content: center;
        width: 28px;
        height: 28px;
        border: 1px solid #aa8f5d;
        border-radius: 50%;
        background: #aa8f5d;
        color: #fff;
        transition: color .1s ease, background-color .1s ease, border-color .1s ease;
    }

    .site-header__phone-icon {
        display: block;
        width: 18px;
        height: 18px;
    }

    .site-header__phone span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media (max-width: 600px) and (hover: hover) {
    .site-header a.site-header__phone:hover {
        color: #101010;
        background: #fef774;
        border-color: #fef774;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header__bar,
    .site-header__nav-link,
    .site-header__nav-link svg,
    .site-header__toggle span,
    .site-header__messenger {
        transition: none;
    }
}

/* Фиксированный бар: якорные переходы не должны прятать заголовок под шапкой. */
html {
    scroll-padding-top: calc(var(--site-header-height, 80px) + var(--site-header-top, 0px) + 16px);
}

/* На главной шапка прозрачная поверх видео, пока страница не прокручена. */
.site-header--overlay {
    height: 0;
    color: #fff7e6;
}

.site-header--overlay:not(.site-header--scrolled):not(.site-header--menu-open) .site-header__bar {
    background: transparent;
    border-bottom-color: rgba(255, 247, 230, .16);
}

.site-header--overlay:not(.site-header--scrolled):not(.site-header--menu-open) .site-header__logo img {
    filter: brightness(0) invert(1);
}

.site-header--overlay .site-header__panel {
    color: #41342e;
}

.site-header--overlay.site-header--scrolled,
.site-header--overlay.site-header--menu-open {
    color: #41342e;
}

.site-header--overlay:not(.site-header--scrolled):not(.site-header--menu-open) :is(.site-header__logo, .site-header__phone, .site-header__messenger, .site-header__nav-link, .site-header__toggle):focus-visible {
    outline-color: #fff7e6;
}
