/* 26.10.2026: новая шапка по макету Figma (Home • Desktop / Home • Mobile).
   Размеры в rem: на ширине 1440 и 375 1rem = 10px, как и у остальной вёрстки сайта.
   ПК: верхний ряд с контактами уезжает при прокрутке, ряд меню остаётся вверху экрана.
   Мобильная: шапка закреплена целиком, меню открывается на весь экран под ней. */

.header__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header__top a,
.header__mobile-menu a {
    text-decoration: none;
}

/* адрес и график */
.header__address {
    display: flex;
    align-items: flex-start;
    column-gap: .4rem;
}

.header__address-icon {
    flex: none;
    width: 2rem;
    height: 2rem;
    margin-top: -.2rem;
}

.header__address-info {
    display: grid;
    row-gap: .4rem;
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: -.01em;
}

.header__address-text {
    color: var(--color-green);
    font-weight: 500;
}

.header__address-time {
    color: #000;
    font-weight: 400;
}

.header__address-time::first-letter {
    text-transform: uppercase;
}

/* телефон и email */
.header__contacts {
    display: grid;
    row-gap: .6rem;
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: -.01em;
}

.header__phone {
    color: var(--color-green);
    font-weight: 500;
    white-space: nowrap;
}

.header__email {
    color: #000;
    font-weight: 400;
}

/* мессенджеры */
.header__messengers-icons {
    display: flex;
    flex: none;
}

.header__messengers-icons img {
    display: block;
    width: 3.2rem;
    height: 3.2rem;
}

@media (min-width: 1100.1px) {
    :root {
        --header-height: 13.6rem;
    }

    .header {
        position: sticky;
        top: -7.2rem;
        height: auto;
    }

    .main {
        padding-top: 0;
    }

    /* липкие блоки страниц: под шапкой остаётся только ряд меню (6.4rem) */
    .faq__heading > div {
        top: calc(6.4rem + 3.2rem);
    }

    .header__top {
        display: flex;
        align-items: center;
        height: 7.2rem;
    }

    .header__logo {
        flex: none;
        width: 7.2rem;
        height: 7.2rem;
        margin-right: 4.5rem;
    }

    .header__top > .header__address {
        flex: 0 1 auto;
        min-width: 0;
        margin-right: auto;
    }

    .header__reviews {
        display: flex;
        flex: none;
        align-items: center;
        padding-left: 2.4rem;
        color: #000;
    }

    .header__reviews-logos {
        display: flex;
        column-gap: .4rem;
    }

    .header__reviews-logos img {
        display: block;
        width: 3.2rem;
        height: 3.2rem;
    }

    .header__reviews-info {
        display: grid;
        row-gap: .4rem;
        margin-left: 1.2rem;
    }

    .header__reviews-stars {
        display: flex;
    }

    /* star.svg 14×13 внутри рамки 16×16 */
    .header__reviews-stars img {
        display: block;
        width: 1.6rem;
        height: 1.6rem;
        padding: .1rem;
    }

    .header__reviews-count {
        font-size: 1.6rem;
        font-weight: 400;
        line-height: 1;
        letter-spacing: -.01em;
    }

    .header__messengers {
        display: flex;
        flex: none;
        align-items: center;
        margin-left: 4.5rem;
    }

    .header__messengers-text {
        font-size: 1.6rem;
        font-weight: 400;
        line-height: 1.15;
        letter-spacing: -.01em;
        text-align: right;
    }

    .header__messengers .header__messengers-icons {
        column-gap: .8rem;
        margin-left: 1.2rem;
    }

    .header__top > .header__contacts {
        flex: none;
        margin-left: 4.5rem;
    }

    .header__callback.button {
        flex: none;
        width: 17rem;
        min-width: 17rem;
        height: 4rem;
        margin-left: 4.5rem;
        padding: .8rem 2rem;
        border-radius: 2rem;
        font-size: 1.6rem;
        line-height: 1.5;
    }

    .header__nav {
        padding: 2rem 0;
    }

    .header__mobile-phone,
    .header__burger,
    .header__close,
    .header__mobile-menu {
        display: none;
    }
}

@media (max-width: 1100px) {
    .header__top {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .header__logo {
        flex: none;
        width: 6.5rem;
        height: 6.4rem;
        margin-right: auto;
    }

    .header__top > .header__address,
    .header__reviews,
    .header__messengers,
    .header__top > .header__contacts,
    .header__callback,
    .header__nav {
        display: none;
    }

    /* телефон: кнопка с номером (вариант с круглой иконкой — модификатор --icon) */
    .header__mobile-phone {
        display: inline-flex;
        flex: none;
        align-items: center;
        justify-content: center;
        height: 3.2rem;
        margin-right: 2.4rem;
        padding: 0 1.2rem;
        border-radius: 1.6rem;
        background-color: var(--color-green);
        color: #fff;
        font-size: 1.4rem;
        line-height: 1;
        white-space: nowrap;
    }

    .header__mobile-phone--icon {
        width: 3.2rem;
        padding: 0;
    }

    .header__mobile-phone--icon svg {
        width: 1.6rem;
        height: 1.6rem;
    }

    /* бургер: 2 полосы по 2px, между ними 8px; справа 12px до края */
    .header__burger,
    .header__close {
        position: relative;
        flex: none;
        width: 3.2rem;
        height: 3.2rem;
        margin-right: -.8rem;
        padding: 0;
        border: 0;
        background: none;
        color: #000;
        cursor: pointer;
    }

    .header__burger::before,
    .header__burger::after {
        content: "";
        position: absolute;
        left: .4rem;
        width: 2.4rem;
        height: 2px;
        background-color: currentColor;
    }

    .header__burger::before {
        top: calc(50% - .4rem - 2px);
    }

    .header__burger::after {
        top: calc(50% + .4rem);
    }

    .header__close {
        display: none;
    }

    .header__close svg {
        display: block;
        width: 2.4rem;
        height: 2.4rem;
        margin: auto;
    }

    body.menu-open .header__burger,
    body.menu-open .header__mobile-phone {
        display: none;
    }

    body.menu-open .header__close {
        display: block;
    }

    /* панель меню на весь экран под шапкой */
    .header__mobile-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        z-index: 97;
        width: 100%;
        height: calc(100dvh - var(--header-height));
        overflow-y: auto;
        background-color: #fff;
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s, visibility .25s;
    }

    body.menu-open .header__mobile-menu {
        opacity: 1;
        visibility: visible;
    }

    .header__mobile-menu-inner {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        padding-top: 1.6rem;
        padding-bottom: 1.6rem;
    }

    .header__mobile-contacts {
        display: grid;
        row-gap: 2.4rem;
        margin-top: auto;
        padding-top: 2.4rem;
    }

    .header__mobile-row {
        display: flex;
        align-items: center;
        column-gap: 2rem;
    }

    .header__mobile-row .header__phone {
        font-weight: 400;
    }

    .header__mobile-row .header__messengers-icons {
        column-gap: 1.2rem;
    }

    .header__mobile-callback.button {
        width: 100%;
        height: 4.8rem;
        padding: .8rem 2rem;
        border-radius: 2.5rem;
        font-size: 1.6rem;
        line-height: 1.5;
    }
}
