/* Единая шапка. Только меню; слайдер и остальные компоненты не изменяются. */
header.site-header {
    --asd-blue: #102bc9;
    --asd-orange: #d13b11;
    --asd-hover: #ff7847;
    position: relative;
    width: 100%;
    min-width: 0;
}
header.site-header > .container.top,
header.site-header > .container.top * {
    box-sizing: border-box;
}
header.site-header > .container.top {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    z-index: 100;
    background: #fff;
}
header.site-header .header-block.flex {
    width: 100%;
    min-width: 0;
    align-items: center;
}
header.site-header .top .logo {
    display: flex;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    margin: 0 !important;
    gap: 8px;
    align-items: center;
}
header.site-header .top .logo img {
    width: clamp(60px, 5vw, 105px);
    height: auto;
    margin: 0;
    flex-shrink: 0;
}
header.site-header .top .logo .logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    gap: 3px;
}
header.site-header .top .logo .logo-text > span.white_text {
    font-size: clamp(11px, .935vw, 17.6px) !important;
    font-weight: 700;
    color: #222;
    line-height: 1.1;
    white-space: nowrap;
}
header.site-header .top .logo .logo-text > span:not(.white_text) {
    font-size: clamp(8.8px, .605vw, 12.1px) !important;
    color: var(--asd-orange);
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}
header.site-header .header-block .search { display: none !important; }
header.site-header .header-block .top-btn {
    display: flex !important;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
}
header.site-header .header-block .top-btn > a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto !important;
    min-width: 0;
    height: clamp(28px, 2.4vw, 35px);
    padding: 0 clamp(8px, .7vw, 14px);
    margin: 0 !important;
    border-radius: 10px;
    font-size: clamp(10px, .8vw, 16px);
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    text-align: center;
    color: #fff;
    background: var(--asd-orange);
    transition: background-color .25s ease;
}
header.site-header .header-block .top-btn > a:hover { background: #b22d08; }
header.site-header .header-contacts.flex {
    display: flex !important;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 0 !important;
    margin: 0;
}
header.site-header .header-contacts > a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 !important;
}
header.site-header .header-contacts > a.rutube { order: 1; padding: 0; }
header.site-header .header-contacts > a:nth-child(3) { order: 2; }
header.site-header .header-contacts > a:nth-child(1) { order: 3; }
header.site-header .header-contacts > a:nth-child(2) { order: 4; }
header.site-header .header-contacts-link {
    color: #222;
    font-size: clamp(10px, .75vw, 14px);
    font-weight: 700;
    white-space: nowrap;
}
header.site-header .header-contacts-link:hover { color: var(--asd-orange); }
header.site-header .header-contacts > a > picture { display: flex; align-items: center; justify-content: center;  min-width: 0 !important;  flex-shrink: 0;}
header.site-header .header-contacts > a img {
    display: block;
    height: clamp(18px, 1.4vw, 26px) !important;
    width: auto !important;
    max-width: none;
    margin: 0 !important;
    object-fit: contain;
}
/* Rutube: компенсация прозрачных отступов (28 / 22) */
header.site-header .header-contacts > a.rutube img {
    height: clamp(22.91px, 1.782vw, 33.09px) !important;
}

/* ПК */
@media (width > 950px) {
    header.site-header--home > .container.top { position: absolute; background: transparent; }
    header.site-header--home .top .logo .logo-text > span.white_text { color: #fff; }
    header.site-header .header-block #menu-main-1 {
        display: flex !important;
        position: static;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        width: auto;
        min-width: 0;
        padding: 0;
        margin: 0;
        gap: clamp(4px, .5vw, 12px);
        background: transparent;
        list-style: none;
        overflow: visible;
    }
    header.site-header .header-block #menu-main-1 > li {
        position: relative;
        flex: 0 0 auto;
        margin: 0 !important;
        padding: 0;
        white-space: nowrap;
    }
    header.site-header .header-block #menu-main-1 > li > a {
        display: block;
        padding: 10px 0;
        color: var(--asd-blue);
        font-size: clamp(9px, .65vw, 13px);
        font-weight: 700;
        text-transform: uppercase;
        white-space: nowrap;
        line-height: 1.3;
    }
    header.site-header .header-block #menu-main-1 > li > a:hover,
    header.site-header .header-block #menu-main-1 > li > a:focus-visible { color: var(--asd-orange); }
    header.site-header .header-block #menu-main-1 > li > ul.submenu {
        position: absolute;
        display: block;
        top: calc(100% + 8px) !important;
        left: 0;
        width: max-content;
        min-width: 240px;
        max-width: 340px;
        margin: 0;
        padding: 14px 16px;
        border-radius: 16px;
        background: var(--asd-blue);
        text-align: left;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 110;
        transition: opacity .2s ease, visibility .2s ease;
    }
    header.site-header .header-block #menu-main-1 > li > ul.submenu::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 0;
        right: 0;
        height: 20px;
        background: transparent;
    }
    header.site-header .header-block #menu-main-1 > li:hover > ul.submenu,
    header.site-header .header-block #menu-main-1 > li:focus-within > ul.submenu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    header.site-header .header-block #menu-main-1 > li:last-child > ul.submenu { left: auto; right: 0; }
    header.site-header .header-block #menu-main-1 ul.submenu ul.submenu { display: contents; }
    header.site-header .header-block #menu-main-1 ul.submenu li {
        display: block;
        float: none;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        white-space: normal;
    }
    header.site-header .header-block #menu-main-1 ul.submenu li + li { margin-top: 8px !important; }
    header.site-header .header-block #menu-main-1 ul.submenu li > a {
        display: block;
        color: #fff !important;
        font-size: clamp(11px, .75vw, 14px);
        font-weight: 700;
        line-height: 1.3;
        text-align: left;
        white-space: normal;
        overflow-wrap: break-word;
    }
    header.site-header .header-block #menu-main-1 ul.submenu li > a:hover,
    header.site-header .header-block #menu-main-1 ul.submenu li > a:focus-visible { color: var(--asd-hover) !important; }
    header.site-header .header-block .m-menu,
    header.site-header .header-block #menu-main-1 .menu-close-item { display: none !important; }
}
/* Большие ПК */
@media (min-width: 1351px) {
    header.site-header > .container.top { display: block; padding: 15px 10% 12px; }
    header.site-header .header-block.flex { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: space-between; gap: 10px; }
    header.site-header .header-block #menu-main-1 { flex: 1 1 auto; }
    header.site-header > .container.top > .header-contacts.flex { justify-content: flex-end !important; flex-wrap: nowrap; width: 100%; margin: 8px 0 0 !important; gap: 15px; }
}
/* Небольшие ПК */
@media (950px < width < 1351px) {
    header.site-header > .container.top {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "logo contacts actions" "menu menu menu";
        align-items: center;
        padding: 10px 6% 12px;
        gap: 6px 8px;
    }
    header.site-header .header-block.flex { display: contents; }
    header.site-header .top .logo { grid-area: logo; }
    header.site-header > .container.top > .header-contacts.flex { grid-area: contacts; justify-content: center !important; flex-wrap: wrap; min-width: 0; gap: 8px; margin: 0 !important; }
    header.site-header .header-block .top-btn { grid-area: actions; }
    header.site-header .header-block #menu-main-1 { grid-area: menu; width: 100%; gap: 6px; }
    header.site-header .header-block #menu-main-1 > li > a { padding: 8px 0; font-size: clamp(9px, .85vw, 12px); }
}
/* Планшеты и телефоны */
@media (max-width: 950px) {
    header.site-header > .container.top { position: relative; display: block; padding: 12px; }
    header.site-header .header-block.flex {
        position: static;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-areas: "logo burger" "actions actions";
        gap: 10px 8px;
    }
    header.site-header .top .logo { grid-area: logo; max-width: 100%; gap: 5px; }
    header.site-header .top .logo img { width: clamp(45px, 16vw, 90px); }
    header.site-header .top .logo .logo-text > span { text-align: center; white-space: normal; overflow-wrap: anywhere; }
    header.site-header .top .logo .logo-text > span.white_text { font-size: clamp(12px, 3.5vw, 17.6px) !important; white-space: normal; }
    header.site-header .top .logo .logo-text > span:not(.white_text) { font-size: clamp(8px, 2.5vw, 12.1px) !important; white-space: normal; }
    header.site-header .header-block .m-menu.main-menu {
        grid-area: burger;
        display: flex !important;
        position: relative;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        justify-self: end;
        width: 44px;
        min-width: 44px;
        height: 44px;
        margin: 0 !important;
        padding: 10px;
        background: var(--asd-blue);
        border-radius: 8px;
        cursor: pointer;
    }
    header.site-header .m-menu.main-menu > span { display: block; width: 100%; height: 3px; flex-shrink: 0; margin: 2px 0; background: #fff; border-radius: 2px; }
    header.site-header .header-block .top-btn { grid-area: actions; width: 100%; justify-content: center; }
    header.site-header .header-block .top-btn > a { flex: 1 1 0; height: auto; min-height: 35px; padding: 8px 5px; font-size: clamp(10px, 3vw, 13px); white-space: normal; }
    header.site-header > .container.top > .header-contacts.flex { justify-content: center !important; flex-wrap: wrap; width: 100%; min-width: 0; margin: 10px 0 0 !important; gap: 8px 10px; }
    header.site-header .header-contacts-link { font-size: clamp(10px, 2.8vw, 13px); max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
    header.site-header .header-contacts > a img { height: 22px !important; }
    header.site-header .header-contacts > a.rutube img { height: 28px !important; }
    header.site-header .header-block #menu-main-1 {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: min(380px, 100vw) !important;
        max-width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0 !important;
        padding: 15px 18px 25px;
        overflow-y: auto;
        overflow-x: hidden;
        background: var(--asd-blue);
        box-shadow: -12px 0 35px rgba(0,0,0,.24);
        text-align: left;
        z-index: 1000;
    }
    header.site-header .header-block #menu-main-1.is-open { display: flex !important; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 10px; }
    header.site-header .header-block #menu-main-1 > li { display: block; position: relative; flex-shrink: 0; width: 100%; padding: 0; margin: 0 !important; text-align: left; white-space: normal; }
    header.site-header .header-block #menu-main-1 > li > a { display: block; padding: 10px 5px; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; border-bottom: 1px solid rgba(255,255,255,.2); }
    header.site-header .header-block #menu-main-1 ul.submenu { display: block; position: static !important; width: 100%; min-width: 0; max-width: 100%; margin: 0; padding: 8px 10px 10px 15px; background: rgba(0,0,0,.1); border-radius: 8px; opacity: 1; visibility: visible; }
    header.site-header .header-block #menu-main-1 ul.submenu li { float: none; width: 100%; margin: 0 !important; padding: 0; }
    header.site-header .header-block #menu-main-1 ul.submenu li + li { margin-top: 8px !important; }
    header.site-header .header-block #menu-main-1 ul.submenu a { display: block; padding: 4px; color: #fff !important; font-size: 13px; line-height: 1.4; text-align: left; white-space: normal; overflow-wrap: anywhere; }
    header.site-header .header-block #menu-main-1 li a:hover { color: var(--asd-hover) !important; }
    header.site-header .header-block #menu-main-1 .menu-close-item { display: flex !important; position: static; justify-content: flex-end; }
    header.site-header .header-block #menu-main-1 .menu-close-btn { display: flex; justify-content: center; align-items: center; width: 44px; height: 44px; font-size: 32px; line-height: 1; color: #fff; cursor: pointer; }
    body.asd-menu-open { overflow: hidden !important; }
}
@media (max-width: 360px) {
    header.site-header > .container.top { padding: 8px; }
    header.site-header .header-block.flex { gap: 8px 5px; }
    header.site-header .top .logo { gap: 4px; }
    header.site-header .top .logo img { width: 50px; }
    header.site-header .top .logo .logo-text > span.white_text { font-size: 11px !important; }
    header.site-header .top .logo .logo-text > span:not(.white_text) { font-size: 8px !important; }
    header.site-header .header-block .top-btn > a { font-size: 10px; }
    header.site-header .header-contacts.flex { gap: 6px 8px; }
}
