/**----------------------------------- IMP MENU (siehe Rustika)--------------------------------*/
a.impmenu-toggle {
    display: none;
}


@media (min-width: 1025px) {
    .impmenu-toggle {
        display: none;
    }

    #nav-wrapper #header-icons {
        display: none;
    }

    .menu-col.col-menu-1 .color-bar {
        display: none;
    }

    #main-nav,
    #menu-wrapper,
    .menu-col.col-menu-1,
    .menu-hauptmenu-container,
    #menu-hauptmenu {
        height: 100%;
    }

    #menu-hauptmenu,
    #menu-hauptmenu ul {
        padding: 0;
        list-style: none;
        margin: 0;
        display: flex;
        gap: 0;
    }

    #menu-hauptmenu {
        display: flex;
        gap: 4vw;
    }

    #menu-hauptmenu>li {
        display: flex;
    }

    #menu-hauptmenu>li.hidemobile {
        display: none !important;
    }

    #menu-hauptmenu>.menu-item:hover {
        background-color: #fff;
    }

    #menu-hauptmenu>.menu-item {
        transition: all .5s ease 0s;
    }

    #menu-hauptmenu>.menu-item>a {
        font-family: var(--headlinefont);
        font-size: 19px;
        color: var(--color-2);
        margin-top: auto;
        padding: 0 1em 1.5em 1em;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        font-weight: bold;
    }

    .menu-item-has-children>.menu-link {
        pointer-events: none;
    }

    .sub-menu {
        flex-direction: column;
        position: absolute;
        bottom: 0;
        transform: translateY(calc(100% + 15px));
        background-color: #fff;
        max-height: 0;
        overflow: hidden;
        transition: opacity .5s cubic-bezier(.46, .03, .52, .96) 0s, transform .5s cubic-bezier(.46, .03, .52, .96) 0s;
        opacity: 0;
        transition-property: max-height, opacity, transform;
        transition-delay: 0.5s, 0s, 0s;
        pointer-events: none;
        min-width: 346px;
    }

    #menu-hauptmenu>.menu-item:hover .sub-menu {
        max-height: 100vh;
        transform: translateY(99%);
        opacity: 1;
        transition-delay: 0s, 0.4s, 0.4s;
        pointer-events: all;
    }

    .sub-menu .menu-item {
        transition: all .5s ease 0s;
    }

    .sub-menu .menu-item:hover {
        background-color: var(--color-2);
    }

    .sub-menu .menu-item:hover a {
        color: #fff !important;
    }

    .sub-menu .current-menu-item a {
        color: #fff !important;
    }

    .sub-menu .menu-link {
        color: var(--color-1);
        font-family: var(--headlinefont);
        font-size: 16px;
        letter-spacing: 0;
        font-weight: 600;
        padding: 0.7em 1.4em;
        display: flex;
    }



    .imp-nav-target-txt {
        white-space: nowrap;
    }
}

@media (max-width: 1024px) {
    a.impmenu-toggle {
        z-index: 99999;
        margin-right: var(--nav-icon-padding-Y);
        background: transparent;
        font-weight: 500;
        /* top: auto; */
        right: 0;
        letter-spacing: 0.17em;
        pointer-events: all;
        border-radius: 0 0 2em 0;
        position: fixed;
        transition: all .5s cubic-bezier(.65, .05, .36, 1) 0s;
        top: 10.5vw;
    }

    .impmenu-active .impmenu-toggle {
        margin-left: 15px;
        top: 30px;
    }

    #nav-wrapper {
        width: 100vw;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        transform: scale(0);
        pointer-events: none;
        transition: all .7s cubic-bezier(.46, .03, .52, .96) 0s;
        z-index: 9999;
        clip-path: circle(0% at 50% 50%);
    }

    #nav-wrapper.impmenu-active {
        transform: scale(1);
        clip-path: circle(70.7% at 50% 50%);
    }

    #main-nav {
        z-index: 9999;
        transition: all .5s ease 0s;
        --menu-items-padding: 70px;
        padding: 0;
        transition: all .5s ease 0s !important;
        position: fixed;
        left: 0;
        width: 100%;
        height: 100%;
        top: 0;
        pointer-events: all;
        background-color: var(--color-1);
    }

    #menu-wrapper {
        height: 100%;
        display: flex;
        align-items: center;
        position: relative;
        justify-content: center;
        flex-direction: column;
        width: 100%;
        overflow: hidden;
    }

    #menu-wrapper ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    nav#main-nav li.menu-item a {
        text-decoration: none;
        position: relative;
    }

    .menu-col.col-menu-1 {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #nav-wrapper #header-icons {
        position: absolute;
        top: 20px;
        display: flex;
        gap: 20px;
        left: 30px;
    }

    #nav-wrapper #header-icons a:not(.glink)>img {
        filter: brightness(20);
    }

    .menu-hauptmenu-container {
        width: 80%;
    }

    #nav-wrapper .menu-item>.menu-link {
        color: #fff;
        font-family: var(--headlinefont);
        display: flex;
    }

    #menu-hauptmenu>.menu-item>.menu-link {
        font-size: 22px;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #fff;
        padding: 0.7em 0;
    }

    #menu-hauptmenu>.menu-item.menu-item-has-children>.menu-link:after {
        content: '';
        display: block;
        height: 1em;
        width: calc(1em / 1.973591549295775);
        background-image: url(/wp-content/themes/astra-impuls-child/img/pfeil-nav.svg);
        background-size: contain;
        background-repeat: no-repeat;
        transition: all .5s ease 0s;
    }

    #menu-hauptmenu>.menu-item.imp-sub-active>.menu-link::after {
        rotate: 90deg;
    }

    #menu-hauptmenu .current_page_item>.menu-link {
        color: var(--color-3);
    }

    .sub-menu {
        --submenu-padding: 1.7em;
    }

    #nav-wrapper .sub-menu .menu-item:first-child>.menu-link {
        padding-top: var(--submenu-padding);
    }

    #nav-wrapper .sub-menu .menu-item:last-child>.menu-link {
        padding-bottom: var(--submenu-padding);
    }

    #nav-wrapper .sub-menu .menu-item>.menu-link {
        color: var(--color-3);
        padding: 0.4em 0;
    }

    #nav-wrapper .sub-menu .current-menu-item>.menu-link {
        color: #fff;
    }

    /**animation*/
    /*
    #menu-hauptmenu>.menu-item {
        transition: all .5s cubic-bezier(.45, .05, .55, .95) 0s;
        transition-property: max-height, transform;
        transition-delay: 0s, 0.5s;
        transform: translateX(0);
    }

    #menu-hauptmenu.menu-child-sub-active>.menu-item:not(.imp-sub-active) {
        transform: translateX(-100%);
        max-height: 0;
        pointer-events: none;
        transition-delay: 0s, 0s;
    }
*/
    .sub-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height .5s cubic-bezier(.46, .03, .52, .96) 0s;
        border-bottom-width: 0;
        transition-property: max-height, border-bottom;
        transition-delay: 0s, 0.3s;
        border-bottom: 1px solid transparent;
    }

    .imp-sub-active .sub-menu {
        max-height: 100vh;
        border-bottom: 1px solid #fff;
        transition-delay: 1s, 0s;
    }
}



.menu-col.col-menu-1 .color-bar {
    position: absolute;
    width: 100%;
    bottom: 0;
    height: 8px;
}

.menu-col.col-menu-1 .color-bar * {
    font-size: 0;
}

#menu-wrapper .dropdown-menu-toggle.ast-header-navigation-arrow,
#menu-wrapper .ast-icon.icon-arrow {
    display: none;
}

/**animation burger menu*/

#nav-icon3 {
    width: var(--nav-icon-width);
    height: var(--nav-icon-height);
    position: relative;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .5s ease-in-out;
    -moz-transition: .5s ease-in-out;
    -o-transition: .5s ease-in-out;
    transition: .5s ease-in-out;
    cursor: pointer;
}

#nav-icon3 span {
    display: block;
    position: absolute;
    height: var(--burger-line-height);
    width: 100%;
    background: var(--color-1);
    border-radius: 13em;
    opacity: 1;
    left: 0;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
    -webkit-transition: .25s ease-in-out;
    -moz-transition: .25s ease-in-out;
    -o-transition: .25s ease-in-out;
    transition: .25s ease-in-out;
}

#nav-icon3 span:nth-child(1) {
    top: 0;
}

#nav-icon3 span:nth-child(2),
#nav-icon3 span:nth-child(3) {
    top: calc(50% - (var(--burger-line-height) / 2));
    right: 0;
    left: unset;
    max-width: 78%;
}

#nav-icon3 span:nth-child(4) {
    bottom: 0;
    background-color: var(--color-1);
}

.impmenu-active #nav-icon3 span:nth-child(1) {
    top: 50%;
    width: 0%;
    left: 50%;
    transform: translateY(50%);
}

.impmenu-active #nav-icon3 span:nth-child(2) {
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
    background-color: #fff !important;
}

.impmenu-active #nav-icon3 span:nth-child(3) {
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    transform: rotate(-45deg);
    background-color: #fff !important;
}

.impmenu-active #nav-icon3 span:nth-child(4) {
    bottom: 50%;
    transform: translateY(-50%);
    width: 0%;
    left: 50%;
}