/* site_extra: добавлено при правках */

/* ===== Шапка: цельный блок поверх первого экрана ===== */
@media(min-width: 1300px){
    .header-top{
        position: relative;
        z-index: 50;
        background: linear-gradient(180deg, rgba(8,12,20,.90) 0%, rgba(8,12,20,.70) 100%);
        -webkit-backdrop-filter: blur(12px) saturate(130%);
        backdrop-filter: blur(12px) saturate(130%);
        box-shadow: 0 14px 40px rgba(0,0,0,.22);
    }
}

/* Строка 1: логотип, контакты филиалов, соцсети, звонок */
.hdr-bar{
    position: relative;
    z-index: 20;
}
.hdr-bar-inner{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    min-height: 92px;
    padding: 12px 0;
}

/* Логотип с подписью */
.hdr-bar .header-logo{
    height: auto;
    margin-right: 0;
    flex: 0 0 auto;
}
.hdr-bar .header-logo > a,
.hdr-bar .header-logo > span{
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    height: auto;
}
.hdr-bar .header-logo img{
    display: block;
    width: auto;
    max-height: 46px;
}
.hdr-bar .header-logo .hdr-logo-cap{
    display: block;
    height: auto;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.72);
    white-space: nowrap;
}
.hdr-bar .header-logo > a:hover .hdr-logo-cap{
    color: #7fd0ff;
}

.hdr-branches{
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    gap: 16px 0;
    min-width: 0;
}
.hdr-branch{
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 0 28px;
    font-size: 14px;
    line-height: 1.35;
    color: rgba(255,255,255,.78);
}
.hdr-branch + .hdr-branch{
    border-left: 1px solid rgba(255,255,255,.18);
}
.hdr-branch-head{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
}
.hdr-branch-name{
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(0,166,251,.2);
    color: #7fd0ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.hdr-branch-time{
    font-size: 12px;
    color: rgba(255,255,255,.6);
}
.hdr-branch-addr{
    white-space: nowrap;
    color: rgba(255,255,255,.85);
}
.hdr-branch-phones{
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
}
.hdr-branch-phone{
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.hdr-branch-phone:hover{
    color: #7fd0ff;
}
.hdr-actions{
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}
.hdr-actions .btn-item{
    padding-top: 0;
}
.hdr-actions .menu-button{
    margin-left: 0;
}

/* Соцсети: иконки из файлов сайта, цвет берут от текста */
.hdr-socials{
    display: flex;
    align-items: center;
    gap: 8px;
}
.hdr-soc{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.08);
    color: #fff;
    transition: background-color 200ms ease-out, border-color 200ms ease-out, transform 200ms ease-out;
}
.hdr-soc:hover{
    background: #00A6FB;
    border-color: #00A6FB;
    color: #fff;
    transform: translateY(-2px);
}
.hdr-soc-ico{
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.hdr-soc-ico--vk{
    width: 22px;
    -webkit-mask-image: url(../images/9034990-logo-vk-icon.svg);
    mask-image: url(../images/9034990-logo-vk-icon.svg);
}
.hdr-soc-ico--tg{
    width: 22px;
    height: 22px;
    -webkit-mask-image: url(../images/telegram-icon.svg);
    mask-image: url(../images/telegram-icon.svg);
}
.hdr-soc-txt{
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
}
.hdr-soc:focus-visible,
.hdr-branch-phone:focus-visible,
.hdr-nav a:focus-visible{
    outline: 2px solid #00A6FB;
    outline-offset: 2px;
}

/* Строка 2: меню */
.hdr-nav{
    position: relative;
    z-index: 30;
    border-top: 1px solid rgba(255,255,255,.14);
}
.hdr-nav .top-nav > ul{
    flex-wrap: wrap;
    gap: 0;
    margin-left: -22px;
}
.hdr-nav .top-nav > ul > li{
    margin-right: 0;
    font-size: 13.5px;
}
.hdr-nav .top-nav > ul > li > a{
    position: relative;
    display: flex;
    align-items: center;
    padding: 17px 22px;
    border-radius: 0;
    color: rgba(255,255,255,.88);
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    line-height: 1.2;
    transition: color 200ms ease-out;
}
.hdr-nav .top-nav > ul > li > a:before{
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    top: -1px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: #00A6FB;
    transform: scaleX(0);
    transform-origin: 50% 0;
    transition: transform 220ms ease-out;
}
.hdr-nav .top-nav > ul > li:hover > a,
.hdr-nav .top-nav > ul > li:focus-within > a,
.hdr-nav .top-nav > ul > li.active > a{
    color: #fff;
}
.hdr-nav .top-nav > ul > li:hover > a:before,
.hdr-nav .top-nav > ul > li:focus-within > a:before,
.hdr-nav .top-nav > ul > li.active > a:before{
    transform: scaleX(1);
}
.hdr-nav .top-nav li.down > a:after{
    width: 6px;
    height: 6px;
    margin: -3px 0 0 10px;
    border-width: 0 2px 2px 0;
    border-style: solid;
    border-color: currentColor;
    opacity: .7;
}
.hdr-nav .top-nav li.down.active > a:after,
.hdr-nav .top-nav li.down:hover > a:after{
    border-color: currentColor;
    opacity: 1;
}
.hdr-nav .top-nav li.down:hover > a:after{
    transform: rotate(225deg);
    margin-top: 3px;
}
/* Выпадающее меню: тёмное стекло */
.hdr-nav .top-nav ul ul{
    top: 100%;
    left: 0;
    width: 300px;
    padding: 10px;
    border-radius: 0 0 14px 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-top: 0;
    background: rgba(10,14,22,.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 48px rgba(0,0,0,.45);
}
.hdr-nav .top-nav ul ul:before{
    display: none;
}
.hdr-nav .top-nav ul li:hover > ul,
.hdr-nav .top-nav ul li:focus-within > ul{
    display: block;
    animation: hdrDrop 180ms ease-out;
}
.hdr-nav .top-nav ul ul li{
    margin-bottom: 2px;
}
.hdr-nav .top-nav ul ul li:last-child{
    margin-bottom: 0;
}
.hdr-nav .top-nav ul ul a{
    padding: 11px 14px;
    border-radius: 9px;
    background: transparent;
    color: rgba(255,255,255,.9);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
.hdr-nav .top-nav ul ul li:hover > a,
.hdr-nav .top-nav ul ul li.active > a{
    background: rgba(0,166,251,.2);
    color: #fff;
}
.hdr-nav .top-nav ul ul li.active > a{
    box-shadow: inset 3px 0 0 #00A6FB;
}
@keyframes hdrDrop{
    from{ opacity: 0; transform: translateY(6px); }
    to{ opacity: 1; transform: translateY(0); }
}

/* ===== Контакты в мобильном меню ===== */
.mm-contacts{
    margin: 18px 10px 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.15);
    color: #fff;
}
.mm-branch{
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 3px solid #00A6FB;
    font-size: 14px;
    line-height: 1.4;
}
.mm-branch-name{
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7fd0ff;
}
.mm-branch-addr,
.mm-branch-time{
    color: rgba(255,255,255,.8);
}
.mm-branch-phone{
    display: block;
    padding: 10px 0;
    min-height: 44px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.mm-contacts .hdr-socials{
    gap: 10px;
}
.mm-contacts .hdr-soc{
    width: 46px;
    height: 46px;
}

/* ===== Адаптив ===== */
@media(max-width: 1489px){
    .hdr-bar-inner{
        gap: 12px 20px;
    }
    .hdr-branch{
        padding: 0 20px;
        font-size: 13px;
    }
    .hdr-branch-phone{
        font-size: 15px;
    }
}
@media(min-width: 1300px) and (max-width: 1489px){
    .hdr-nav .top-nav > ul > li > a{
        padding: 17px 16px;
    }
    .hdr-nav .top-nav > ul > li > a:before{
        left: 16px;
        right: 16px;
    }
    .hdr-nav .top-nav > ul{
        margin-left: -16px;
    }
}
@media(max-width: 1299px){
    .hdr-nav,
    .hdr-actions .hdr-socials{
        display: none;
    }
    .hdr-bar-inner{
        height: 80px;
        min-height: 80px;
        padding: 10px 0;
    }
    .hdr-bar .header-logo img{
        max-height: 38px;
    }
    .hdr-bar .header-logo .hdr-logo-cap{
        font-size: 10px;
        letter-spacing: .14em;
    }
    .hdr-branch-addr,
    .hdr-branch-time{
        display: none;
    }
    .hdr-branches{
        justify-content: flex-end;
    }
}
@media(max-width: 991px){
    .hdr-branches{
        display: none;
    }
    .hdr-bar-inner{
        justify-content: space-between;
    }
}
@media(max-width: 479px){
    .hdr-bar .header-logo .hdr-logo-cap{
        font-size: 9px;
        letter-spacing: .1em;
    }
}
@media(prefers-reduced-motion: reduce){
    .hdr-soc,
    .hdr-nav .top-nav > ul > li > a,
    .hdr-nav .top-nav > ul > li > a:before,
    .hdr-nav .top-nav ul li:hover > ul,
    .hdr-nav .top-nav ul li:focus-within > ul{
        transition: none;
        animation: none;
    }
    .hdr-soc:hover{
        transform: none;
    }
}
