﻿.header {
    position: relative;
    scrollbar-width: none;
    z-index: 99;
    transition: all 0.3s;
}
.header-top-wrap {
    background: var(--background);
}
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    cursor: default;
    gap: 24px;
}
.header-top__address {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--second-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 143%;
    color: var(--black);
}
.header-top__address span{
    font-family: var(--font-family);
    font-weight: 600;
}
.header-top__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.header-top__meta li{
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 12px;
    line-height: 150%;
    color: var(--black);
}
.header-top__meta li::after{
    content: '';
    display: block;
    margin: 0 12px;
    width: 1px;
    height: 18px;
    top: 0;
    background-color: var(--stroke);
    position: relative;
}
.header-top__meta li:last-child::after{
    display: none;
}
.header-bottom{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 12px 0;
}
.header-bottom__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    flex: auto;
}
.header__logo {
    text-decoration: none;
    outline: none;
    max-width: 207px;
    width: 100%;
    display: block;
}
.header__logo:hover{
    filter: brightness(1.2);
}
.header__menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.menu-item{
    position: relative;
}
.menu-item a{
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 143%;
    color: var(--black);
    text-decoration: none;
    border-radius: 4px;
    padding: 4px 8px;
}
.menu-item a svg{
    width: 24px;
    height: 24px;
    transition: all 0.3s;
}
.header__menu>li.current-menu-item>a{
    background: var(--blue-accent);
    color: var(--white);
}
.sub-menu{
    position: absolute;
    border: 1px solid var(--background);
    border-radius: 0 0 4px 4px;
    width: 300px;
    top: 100%;
    background: var(--white);
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}
.sub-menu a{
    padding: 14px 16px;
    justify-content: space-between;
    border-bottom: 1px solid var(--background);
}
.sub-menu .sub-menu{
    left: 100%;
    top: 0;
    background: var(--background);
}
.sub-menu .sub-menu a{
    padding: 12px 24px;
}
.connection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.header-bottom-wrap{
    background: var(--white);
    border-bottom: 1px solid var(--stroke);
}
body.menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(30, 29, 35, 0.7);
    z-index: 9;
    pointer-events: none;
}
.connection--mob,
.header-top--mob,
.menu-btn{
    display: none;
}


@media all and (min-width: 1200px){
    .header__menu > li.open > .sub-menu,
    .menu-item-has-children:hover>.sub-menu{
        opacity: 1;
        transform: translateY(0px);
        pointer-events: unset;
    }
    .menu-item a:hover{
        color: var(--blue-accent);
    }
    .menu-item-has-children.open>a svg,
    .menu-item-has-children:hover>a svg{
        transform: rotateX(180deg);
    }
}

@media all and (max-width: 1200px){
    .open-m header{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }
    .open-m{
        padding-top: 123px;
    }
    .menu-btn{
        display: flex;
		border-radius: 4px;
        padding: 4px 16px;
        width: 42px;
        height: 42px;
        background: var(--background);
        border: none;
        outline: none;
        padding: 0;
        cursor: pointer;
        position: relative;
	}
    .menu-btn svg{
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        transition: all 0.3s;
    }
    .open-m .menu-btn__burger,
    .menu-btn .menu-btn__close{
        transform: translate(-50%, -50%) scale(0);
    }
	.open-m .menu-btn__close{
        transform: translate(-50%, -50%) scale(1);
        color: var(--blue-accent);
    }
	.over-bg {
		z-index: 90;
		position: fixed;
		bottom: 0;
		background: rgba(30, 29, 35, 0.7);
		right: 0;
		top: 0;
		display: block;
		left: 0;
	}
    .header-bottom__menu{
        position: fixed;
        top: 123px;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 123px);
        overflow: hidden;
        overflow-y: auto;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s;
        transform: translateY(20px);
        background-color: var(--white);
        border-radius: 0 0 4px 4px;
    }
    .open-m .header-bottom__menu{
        opacity: 1;
        pointer-events: unset;
        transform: translateY(0px);
    }
    body.menu-open::before{
        display: none;
    }
    .header__nav{
        width: 100%;
    }
    .header__menu{
        display: block;
    }
    .header__menu li{
        width: 100%;
    }
    .sub-menu{
        position: relative;
        overflow: hidden;
    }
    .menu-item-has-children .sub-menu{
        display: flex;
        flex-direction: column;
        opacity: 1;
        pointer-events: auto;
        width: 100%;
        top: 0;
        transform: translate(0px);
        background: var(--background);
    }
    .sub-menu .sub-menu{
        left: 0;
    }
    .menu-item a{
        justify-content: space-between;
        padding: 12px 24px;
        border-bottom: 1px solid var(--background);
        border-radius: 0;
    }
    .menu-item-has-children .sub-menu{
        max-height: 0px;
        opacity: 0;
        pointer-events: none;
    }
    .open-m .menu-item-has-children.active > .sub-menu{
        max-height: 2000px;
        opacity: 1;
        pointer-events: auto;
    }
    .menu-item-has-children.active>a svg{
        transform: rotateX(180deg);
    }
    .menu-item .sub-menu a{
        padding: 14px 24px 14px 40px;
    }
    .menu-item .sub-menu .sub-menu a{
        padding: 12px 48px;
    }
    .menu-item a:active{
        background: var(--blue-accent);
        color: white;
    }
    .open-m {
        touch-action: none;
        overscroll-behavior: contain;
        overflow: hidden;
    }
}

@media all and (max-width: 920px){
    .header-top__meta{
        display: none;
    }
    .header-top--mob .header-top__meta{
        display: flex;
        background: var(--background);
        padding: 16px 24px;
        width: 100%;
        justify-content: center;
    }
    .header-top--mob{
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 0;
    }
    .header-top--mob .header-top__address{
        width: 100%;
        padding: 16px 24px;
        display: none;
    }
    .header-top-wrap{
        transition: all 0.3s;
        max-height: 100px;
    }
    .header{
        background: var(--white);
    }
}

@media all and (max-width: 768px){
    .container{
        padding: 0 16px;
    }
    .header-top-wrap .header-top{
        padding: 8px 0;
    }
    .header-top-wrap .header-top__address{
        font-size: 12px;
    }
    .header-top__address{
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .header-top__address span{
        font-size: 14px;
    }
    .connection--pc .max-btn,
    .connection--pc .btn{
        display: none;
    }
    .open-m .header-bottom__menu{
        top: 133px;
        max-height: calc(100vh - 133px);
        max-height: calc(100dvh - 133px);
    }
    .connection--mob{
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        padding: 16px;
    }
    .menu-item a{
        padding: 12px 16px;
    }
    .menu-item .sub-menu a{
        padding: 14px 16px 14px 32px;
    }
    .open-m{
        padding-top: 133px;
    }
}