:root {
    --menuFontColor: #000a20;
    --menuFontColorWhite: #ffffff;
    --menuHoverFontColor: #ad1e1b;
    --subMenuBg: #f5f6f8;
}

@media (min-width: 1420px) {
    ul.main_menu {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
        justify-content: flex-end;
        align-items: center;
    }

    /*
    1st level
     */
    ul.main_menu > li {
        position: relative;
        margin: 0 40px 0 0;
    }

    ul.main_menu > li.current-menu-item {
        padding-left: 23px;
    }

    ul.main_menu > li.current-menu-item::before {
        content: " ";
        position: absolute;
        background: url("../img/bullet.svg") no-repeat center center;
        width: 13px;
        height: 13px;
        display: block;
        left: 0;
        top: 7px;
    }

    ul.main_menu > li:last-child {
        margin: 0;
    }

    ul.main_menu > li > a {
        color: var(--menuFontColor);
        font-size: 18px;
        font-weight: bold;
        position: relative;
        padding: 0 28px 0 0;
        width: 100%;
        display: inline-block;
    }

    ul.overlay.main_menu > li > a {
        color: var(--menuFontColorWhite);
    }
    .sticky ul.overlay.main_menu > li > a {
        color: var(--menuFontColor);
    }


    ul.main_menu > li.menu-item-has-children > a::after {
        content: " ";
        display: block;
        background: url("../img/arrow-down.svg") no-repeat center center;
        width: 20px;
        height: 13px;
        position: absolute;
        right: 0;
        top: 6px;
    }

    ul.main_menu.overlay > li.menu-item-has-children > a::after {
        background-image: url("../img/arrow-down-white.svg");
    }

    .sticky ul.main_menu.overlay > li.menu-item-has-children > a::after {
        background-image: url("../img/arrow-down.svg");
    }

    .sticky ul.main_menu.overlay > li.menu-item-has-children:hover > a::after,
    ul.main_menu > li.menu-item-has-children:hover > a::after {
        background-image: url("../img/arrow-up.svg");
    }

    ul.main_menu.overlay > li.menu-item-has-children:hover > a::after {
        background-image: url("../img/arrow-up-white.svg");
    }


    /*
     second level
     */
    .main_menu ul.sub-menu {
        visibility: hidden;
        transition-property: visibility;
        transition-duration: .1s;
        position: absolute;
        border-radius: 10px;
        background-color: var(--subMenuBg);
        padding: 30px 30px 20px 30px;
        list-style: none;
        display: flex;
        flex-direction: column;
        box-shadow: 7px 7px 7px #8b8b8b;
        top: 25px;
        left: -30px;
        white-space: nowrap;
    }

    .main_menu li.menu-item-has-children:hover > ul {
        visibility: visible;
    }

    .main_menu ul.sub-menu > li {
        position: relative;
        padding-left: 18px;
    }

    .main_menu ul.sub-menu > li:before {
        content: " ";
        position: absolute;
        background: url("../img/bullet.svg") no-repeat center center;
        width: 13px;
        height: 13px;
        display: block;
        left: 0;
        top: 7px;
    }

    .main_menu ul.sub-menu > li:last-child {
        margin-bottom: 0;
    }

    .main_menu ul.sub-menu > li > a {
        font-size: 13px;
        font-weight: bold;
        color: var(--menuFontColor);
        padding: 6px 10px 8px 10px;
    }

    .main_menu ul.sub-menu > li > a:hover,
    .main_menu ul.sub-menu > li.current-post-ancestor > a,
    .main_menu ul.sub-menu > li.current-menu-item > a {
        color: var(--menuHoverFontColor);
        background: #fff;
    }
}

/**Burger Menu **/

.burger-menu{
    display: none;
}

#menu__toggle {
    opacity: 0;
}
#menu__toggle:checked + .menu__btn > span {
    transform: rotate(45deg);
    background-color: var(--menuFontColor);
}
#menu__toggle:checked + .menu__btn > span::before {
    top: 0;
    transform: rotate(0deg);
    background-color: var(--menuFontColor);
}
#menu__toggle:checked + .menu__btn > span::after {
    top: 0;
    transform: rotate(90deg);
    background-color: var(--menuFontColor);
}

.menu__btn {
    position: absolute;
    top: 38px;
    right: 20px;
    width: 28px;
    height: 26px;
    cursor: pointer;
    z-index: 9999;
}
.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--menuFontColor);
    transition-duration: .25s;
}
.menu__btn > span::before {
    content: '';
    top: -8px;
    left: 10px;
    width: 18px;
}
.menu__btn > span::after {
    content: '';
    top: 8px;
}

.home .menu__btn > span,
.home .menu__btn > span::before,
.home .menu__btn > span::after{
    background: #fff;
}

.sticky.home .menu__btn > span,
.sticky.home .menu__btn > span::before,
.sticky.home .menu__btn > span::after{
    background: var(--menuFontColor);
}

@media (max-width: 1420px) {
    .header{
        position: fixed;
        z-index: 999;
        top: 0;
        left: 0;
        background: var(--bodybgColor);
        padding: 10px 20px;
        width: 100%;
        margin: 0;
    }
    .pageHome .header{
        position: fixed;
        z-index: 999;
        top: 0;
        left: 0;
        padding: 10px 20px;
    }
    body{
        padding-top: 70px;
    }
    body.home{
        padding-top: 0;
    }
    .headerLogo{
        z-index: 999;
    }
    .burger-menu{
        display: block;
    }
    .menu-wrap{
        display: flex;
        position: fixed;
        z-index: 100;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--subMenuBg);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        flex-direction: column;
        padding: 90px 20px 20px 60px;
        transition: 0.45s;
    }

    nav.menu{
        width: 100%;
    }
    ul.main_menu,
    ul.sub-menu{
      list-style: none;
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0;
    }
    ul.main_menu > li{
        padding: 12px 0;
        border-bottom: 1px solid #eeeeee;
    }
    ul.main_menu > li:last-child{
        border-bottom: none;
    }
    ul.main_menu a{
        color: var(--menuFontColor);
        font-size: 18px;
        font-weight: bold;
    }
    ul.main_menu > li.menu-item-has-children a{
        position: relative;
    }
    ul.main_menu > li.menu-item-has-children > a::after {
        content: " ";
        display: block;
        background: url("../img/arrow-down.svg") no-repeat center center;
        width: 13px;
        height: 20px;
        position: absolute;
        right: -23px;
        top: 2px;
    }
    ul.main_menu > li.menu-item-has-children.opened > a::after {
        background-image: url("../img/arrow-up.svg");
    }
    ul.sub-menu{
        display: none;
    }

    ul.sub-menu > li{
        margin: 8px 0;
    }
    ul.sub-menu > li > a{
        font-size: 13px;
        font-weight: bold;
        position: relative;
        padding-left: 0;
    }
    ul.sub-menu > li a:before {
        content: " ";
        position: absolute;
        background: url("../img/bullet.svg") no-repeat center center;
        width: 13px;
        height: 13px;
        display: block;
        left: -28px;
        top: 3px;
    }
    ul.sub-menu > li.current-menu-item > a{
        color: var(--menuHoverFontColor);
    }
}
