/**
 * Шапка и служебная полоска.
 *
 * Правила владельца: всё прямоугольное (border-radius: 0), акцент #176B6B только
 * на действии и текущем разделе, линии вместо теней.
 */

/* -------------------------------------------------------------------------
 * Служебная полоска над шапкой
 * ---------------------------------------------------------------------- */
.msb-topbar {
    background: #FBFAF7;
    border-bottom: 1px solid #DEDBD4;
    font-family: Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 12.5px;
    line-height: 1.35;
    color: #666862;
}

.msb-topbar__inner {
    width: min(100% - 40px, 1230px);
    margin: 0 auto;
    min-height: 36px;
    padding: 6px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.msb-topbar p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
}

.msb-topbar__place strong {
    color: #25282A;
    font-weight: 500;
}

.msb-topbar__note {
    color: #8A8B86;
}

.msb-topbar__right {
    justify-content: flex-end;
}

.msb-topbar__tel {
    color: #25282A;
    font-weight: 600;
    text-decoration: none;
}

.msb-topbar__tel:hover {
    color: #176B6B;
}

.msb-topbar__tel:focus-visible {
    outline: 2px solid #176B6B;
    outline-offset: 2px;
}

/* -------------------------------------------------------------------------
 * Основная шапка: высота, шрифт меню, текущий раздел, кнопка
 * ---------------------------------------------------------------------- */
#header > .ct-container {
    min-height: 72px;
}

/* Blocksy задаёт строке шапки min-height: 120px. Сужаем только ту строку,
   в которой стоит меню — вторая (пустая) строка остаётся как была. */
#header .ct-container:has(.header-menu-1) {
    min-height: 72px;
    height: 72px;
}

#header {
    border-bottom: 1px solid #DEDBD4;
}

#header .header-menu-1 {
    height: auto;
    align-self: center;
}

#header .header-menu-1 > .menu {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#header .header-menu-1 > .menu > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border-radius: 0;
    font-family: Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    color: #666862;
    text-decoration: none;
    box-shadow: inset 0 -2px 0 transparent;
    transition: color 0.12s linear, box-shadow 0.12s linear;
}

#header .header-menu-1 > .menu > li > a:hover,
#header .header-menu-1 > .menu > li.current-menu-item > a,
#header .header-menu-1 > .menu > li.current_page_item > a,
#header .header-menu-1 > .menu > li.current-menu-ancestor > a,
#header .header-menu-1 > .menu > li.current-menu-parent > a {
    color: #25282A;
    box-shadow: inset 0 -2px 0 #176B6B;
}

#header .header-menu-1 > .menu > li > a:focus-visible {
    outline: 2px solid #176B6B;
    outline-offset: 2px;
}

/* Подменю: без скруглений, тонкая линия, белый фон. */
#header .header-menu-1 .sub-menu {
    border: 1px solid #DEDBD4;
    border-radius: 0;
    background: #FFFFFF;
    padding: 6px 0;
    min-width: 220px;
}

#header .header-menu-1 .sub-menu a {
    display: block;
    padding: 10px 16px;
    font-family: Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #25282A;
    text-decoration: none;
    text-transform: none;
}

#header .header-menu-1 .sub-menu a:hover {
    color: #176B6B;
    background: #FBFAF7;
}

/* CTA-кнопки в шапке больше нет: «Подобрать дверь» переименован в «Категории»
   и стоит обычным пунктом меню первым, слева от «Межкомнатные» (2026-11-05). */

/* -------------------------------------------------------------------------
 * Мобильная шапка
 * ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
    #header > .ct-container {
        min-height: 60px;
    }

    .msb-topbar {
        font-size: 11.5px;
    }

    .msb-topbar__inner {
        width: min(100% - 24px, 1230px);
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 2px 10px;
        padding: 5px 0;
    }

    .msb-topbar__note {
        display: none;
    }

    .msb-topbar__right {
        justify-content: flex-start;
    }
}
