/* Шапка сайта: адрес | логотип | телефон, под ними главное меню с панелью «Услуги» */

.site-header {
    position: relative;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--price-color-border);
    font-family: var(--price-font-serif);
    color: var(--price-color-text);
}

.site-header a {
    color: inherit;
}

.site-header__top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 14px 0 6px;
}

.site-header__addr {
    font-size: 17px;
    line-height: 1.2;
}

.site-header__addr small,
.site-header__cnt small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--price-color-muted);
}

.site-header__addr small a {
    color: var(--price-color-muted);
}

.site-header__logo {
    display: block;
}

.site-header__logo img {
    display: block;
    width: auto;
    height: 78px;
}

.site-header__cnt {
    text-align: right;
    font-size: 17px;
    line-height: 1.2;
    white-space: nowrap;
}

.site-header__cnt a {
    text-decoration: none;
}

.site-header__burger {
    display: none;
    justify-self: start;
    padding: 8px;
    border: 0;
    background: none;
    cursor: pointer;
}

.site-header__burger span {
    display: block;
    width: 26px;
    height: 2px;
    margin: 6px 0;
    background: #000;
    transition: transform .2s, opacity .2s;
}

.site-header.is-open .site-header__burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.site-header.is-open .site-header__burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Меню ---------- */

.site-nav {
    display: flex;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    padding: 6px 0 0;
}

.site-nav__item {
    position: relative;
}

.site-nav__link {
    display: block;
    padding: 10px 4px 14px;
    border-bottom: 2px solid transparent;
    font-size: 19px;
    line-height: 1.2;
    text-decoration: none;
}

.site-nav__link:hover,
.site-nav__item.is-current > .site-nav__link,
.site-nav__item--drop.is-open > .site-nav__link {
    border-bottom-color: var(--price-color-active);
}

/* пункт с панелью: панель растягивается на ширину всей шапки */
.site-nav__item--drop {
    position: static;
    display: flex;
    align-items: flex-start;
}

.site-nav__toggle {
    display: grid;
    place-items: center;
    padding: 15px 4px 14px 6px;
    border: 0;
    background: none;
    color: var(--price-color-text);
    cursor: pointer;
}

.site-nav__toggle svg {
    width: 11px;
    height: 8px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    transition: transform .2s;
}

.site-nav__item--drop.is-open .site-nav__toggle svg {
    transform: rotate(180deg);
}

.site-drop {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid var(--price-color-border);
    border-bottom: 1px solid var(--price-color-border);
    box-shadow: 0 24px 40px rgba(39, 48, 88, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility 0s .18s;
}

.site-nav__item--drop.is-open .site-drop {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .18s, transform .18s;
}

.site-drop__in {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1fr) 300px;
    gap: 48px;
    padding-top: 40px;
    padding-bottom: 44px;
}

.site-drop__col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.site-drop__h {
    margin: 0 0 18px;
    border-bottom: 1px solid transparent;
    font-size: 24px;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color .15s;
}

.site-drop__h:hover {
    border-bottom-color: var(--price-color-accent);
}

.site-drop__list {
    display: grid;
    gap: 4px;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-drop__list--2 {
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
}

.site-header .site-drop__list a {
    display: block;
    padding: 6px 0;
    font-size: 18px;
    color: var(--price-color-text-secondary);
    text-decoration: none;
    transition: color .15s, padding .15s;
}

.site-header .site-drop__list a:hover,
.site-header .site-drop__list a[aria-current] {
    color: var(--price-color-active);
}

.site-header .site-drop__list a:hover {
    padding-left: 6px;
}

.site-header .site-drop__all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    font-size: 18px;
    color: var(--price-color-active);
    text-decoration: none;
}

.site-drop__all svg {
    width: 9px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.site-header .site-drop__promo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 24px;
    background: var(--price-color-active);
    color: #fff;
    text-decoration: none;
}

.site-drop__promo-k {
    font-family: var(--price-font-sans);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--price-color-accent);
}

.site-drop__promo-t {
    margin: 12px 0 6px;
    font-size: 28px;
    line-height: 1.1;
}

.site-drop__promo-d {
    margin-bottom: 22px;
    font-size: 16px;
    color: rgba(255, 255, 255, .7);
}

.site-drop__promo .ltr-btn {
    min-height: 44px;
    padding: 8px 26px;
    font-size: 18px;
}

.site-drop__promo:hover .ltr-btn {
    background: #a8956f;
}

@media (max-width: 1240px) {
    .site-drop__in {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 1fr);
    }

    .site-header .site-drop__promo {
        display: none;
    }
}

@media (max-width: 1100px) and (min-width: 992px) {
    .site-nav__link {
        font-size: 17px;
    }
}

/* ---------- Меню при прокрутке вверх (js/site-header.js, класс StickyNav) ----------
   На десктопе закрепляется строка меню, на мобильных — вся шапка */

.site-header__nav.is-sticky,
.site-header.is-sticky {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--ltr-adminbar, 0px);
    z-index: 60;
    background: #fff;
    border-bottom: 1px solid var(--price-color-border);
    box-shadow: 0 8px 24px rgba(39, 48, 88, .08);
    transform: translateY(calc(-100% - var(--ltr-adminbar, 0px)));
    transition: transform .25s ease;
}

.site-header__nav.is-sticky.is-shown,
.site-header.is-sticky.is-shown {
    transform: none;
}

/* ---------- Мобильная шапка: бургер | логотип | телефон ---------- */

@media (max-width: 991px) {
    .site-header__top {
        column-gap: 8px;
        padding: 10px 0;
    }

    .site-header__addr {
        display: none;
    }

    .site-header__burger {
        display: block;
    }

    .site-header__logo img {
        height: 56px;
    }

    .site-header__cnt {
        font-size: 15px;
    }

    .site-header__cnt small {
        display: none;
    }

    /* меню — панель поверх страницы до низа экрана со своей прокруткой: страница под ней не сдвигается.
       --site-menu-top (низ шапки) ставит js/site-header.js при открытии */
    .site-header__nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        display: none;
        /* +1px: панель начинается над нижней границей шапки (top: 100% считается без рамки) */
        height: calc(100vh - var(--site-menu-top, 78px) + 1px);
        height: calc(100dvh - var(--site-menu-top, 78px) + 1px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        background: #fff;
        border-top: 1px solid var(--price-color-border);
    }

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

    .site-nav {
        flex-direction: column;
        padding: 0 0 32px;
    }

    .site-nav__item:first-child {
        border-top: 0;
    }

    .site-nav__item {
        border-top: 1px solid var(--price-color-border);
    }

    .site-nav__link {
        padding: 13px 0;
        border: 0;
        font-size: 20px;
    }

    .site-nav__item.is-current > .site-nav__link {
        color: var(--price-color-active);
    }

    .site-nav__item--drop {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: stretch;
    }

    /* стрелка во всю высоту строки — по центру текста «Услуги», большая зона нажатия */
    .site-nav__toggle {
        width: 48px;
        margin-right: -12px;
        padding: 0;
    }

    .site-nav__toggle svg {
        width: 14px;
        height: 10px;
    }

    .site-drop {
        position: static;
        display: none;
        flex: 0 0 100%;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .site-nav__item--drop.is-open .site-drop {
        display: block;
    }

    /* панель вложена в мобильное меню: поля .ps-container уже есть снаружи */
    .site-drop .site-drop__in {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: none;
        padding: 4px 0 18px 14px;
        border-left: 1px solid var(--price-color-accent);
    }

    .site-drop__h {
        margin-bottom: 6px;
        font-size: 19px;
    }

    .site-drop__list--2 {
        column-gap: 16px;
    }

    .site-drop__list {
        gap: 0;
    }

    .site-header .site-drop__list a {
        padding: 5px 0;
        font-size: 16px;
    }

    .site-header .site-drop__all {
        margin-top: 0;
    }
}

@media (max-width: 479px) {
    .site-drop__list--2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .site-header__cnt {
        font-size: 13px;
    }

    .site-header__logo img {
        height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header__nav.is-sticky,
    .site-header.is-sticky,
    .site-drop,
    .site-nav__toggle svg,
    .site-header__burger span {
        transition: none;
    }
}

/* пока открыто мобильное меню, страница под ним не прокручивается */
html.site-menu-open,
html.site-menu-open body {
    overflow: hidden;
}

/* плавающие кнопки мессенджеров не перекрывают пункты открытого меню */
html.site-menu-open .socfixeds {
    display: none;
}
