/**
 * Theme Navigation Styles
 * 
 * This file contains the base styles for the theme’s navigation (IMP Menu).
 * It includes structure, layout, and animation logic for the main menu.
 * 
 * If additional navigation types or animation variants are added (e.g., 
 * sliding, fading, overlay), they should be moved into dedicated sub-files
 * (e.g., theme_nav-overlay.css, theme_nav-slide.css).
 * 
 * This ensures the base file remains manageable and the structure modular.
 */



a.impmenu-toggle {
    z-index: 99999;
    background: transparent;
    font-weight: 500;
    left: 0;
    letter-spacing: 0.17em;
    pointer-events: all;
    border-radius: 0 0 2em 0;
    position: absolute;
    transition: all 0.5s cubic-bezier(0.65, 0.05, 0.36, 1) 0s;
}

/**nav icon 4*/

div#nav-icon4 {
    position: relative;
    display: flex;
    width: var(--nav-icon-height);
    height: var(--nav-icon-height);
    justify-content: center;
    align-items: center;
    transition: all 0.8s cubic-bezier(0.91, 0.02, 0.07, 0.98) 0s;
    rotate: 360deg;
    pointer-events: all;
    margin-top: 5px;
}

div#nav-icon4:hover {
    scale: 0.9;
}

div#nav-icon4>span {
    position: absolute;
    width: 20%;
    height: 20%;
    background-color: #fff;
    border-radius: 50%;
}

div#nav-icon4:hover>span {
    position: absolute;
    background-color: var(--wp--preset--color--accent-1);
    animation: nav-icon-color-shift 3s infinite ease-in-out;
}

@keyframes nav-icon-color-shift {

    0%,
    100% {
        background-color: var(--wp--preset--color--accent-1);
    }

    33% {
        background-color: var(--wp--preset--color--accent-2);
    }

    66% {
        background-color: var(--wp--preset--color--accent-3);
    }
}

.impmenu-active #nav-icon4>span {
    background-color: #000 !important;
    transition-delay: 0s;
}

/**Top*/

div#nav-icon4>span:nth-child(1),
div#nav-icon4>span:nth-child(2),
div#nav-icon4>span:nth-child(3) {
    top: 0;
}

div#nav-icon4>span:nth-child(1) {
    left: 0;
}

div#nav-icon4>span:nth-child(3) {
    right: 0;
}

/**Middle*/

div#nav-icon4>span:nth-child(4) {
    left: 0;
}

div#nav-icon4>span:nth-child(6) {
    right: 0;
}

/**Bottom*/

div#nav-icon4>span:nth-child(7),
div#nav-icon4>span:nth-child(8),
div#nav-icon4>span:nth-child(9) {
    bottom: 0;
}

div#nav-icon4>span:nth-child(7) {
    left: 0;
}

div#nav-icon4>span:nth-child(9) {
    right: 0;
}

/**Animation*/

/**Top*/

.impmenu-active div#nav-icon4>span:nth-child(1) {
    top: 50%;
    left: 50%;
    opacity: 0;
    transform: translateY(-50%) translateX(-50%);
}

.impmenu-active div#nav-icon4>span:nth-child(2) {
    top: 50%;
    opacity: 0;
    transform: translateY(-50%);
}

.impmenu-active div#nav-icon4>span:nth-child(3) {
    top: 50%;
    right: 50%;
    opacity: 0;
    transform: translateY(-50%) translateX(-50%);
}

/**Middle*/

.impmenu-active div#nav-icon4>span:nth-child(4) {
    left: 50%;
    transform: translateX(-50%) rotate(-45deg);
    width: 100%;
    border-radius: 13em;
    height: 3px;
    /*top: 50%;*/
}

.impmenu-active div#nav-icon4>span:nth-child(5) {
    opacity: 0;
}

.impmenu-active div#nav-icon4>span:nth-child(6) {
    right: 50%;
    transform: translateX(50%) rotate(45deg);
    width: 100%;
    border-radius: 13em;
    height: 3px;
    /*top: 50%;*/
}

/**Bottom*/

.impmenu-active div#nav-icon4>span:nth-child(7) {
    bottom: 50%;
    left: 50%;
    opacity: 0;
    transform: translateY(50%) translateX(-50%);
}

.impmenu-active div#nav-icon4>span:nth-child(8) {
    bottom: 50%;
    opacity: 0;
    transform: translateY(50%);
}

.impmenu-active div#nav-icon4>span:nth-child(9) {
    bottom: 50%;
    right: 50%;
    opacity: 0;
    transform: translateY(50%) translateX(-50%);
}

.impmenu-active .impmenu-toggle {
    margin-left: 15px;
}

#nav-wrapper {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    pointer-events: none;
    transition:
        all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s,
        pointer-events;
    z-index: 9999;
    /* clip-path: circle(0% at 50% 50%); */
}

#nav-wrapper.impmenu-active {
    transform: translateY(0);
    pointer-events: all;
    /* clip-path: circle(70.7% at 50% 50%); */
    transition:
        all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        pointer-events 0s 0.5s;
}

/* zoom on windows, Greift nur, wenn der User skaliert (mind. 1.5) */

@media (min-resolution: 1.25dppx) and (min-width: 990px) {
    #menu-wrapper {
        zoom: 0.7;
    }
}

@media (min-resolution: 1.7dppx) and (min-width: 990px) {
    #menu-wrapper {
        zoom: 0.65;
    }
}

/*Macbook Pro*/

@media (min-width: 1280px) and (max-width: 1720px) and (min-resolution: 1.25dppx) and (-webkit-min-device-pixel-ratio: 1.25),
(min-width: 1280px) and (max-width: 1720px) and (-webkit-min-device-pixel-ratio: 1.25) {
    #menu-wrapper {
        zoom: 0.85;
    }
}

@media (min-width: 1280px) and (max-width: 1720px) and (min-resolution: 1.7dppx) and (-webkit-min-device-pixel-ratio: 1.7),
(min-width: 1280px) and (max-width: 1720px) and (-webkit-min-device-pixel-ratio: 1.7) {
    #menu-wrapper {
        zoom: 0.6;
    }
}

/* 16.2" MacBook Pro M3 – Viewports im Bereich ~16" (breit) */

/* 1.25 dppx → zoom 0.85 */

@media (min-width: 1600px) and (max-width: 2200px) and (min-resolution: 1.25dppx) {
    #menu-wrapper {
        zoom: 0.85;
    }
}

/* 1.7 dppx → zoom 0.8 */

@media (min-width: 1600px) and (max-width: 2200px) and (min-resolution: 1.7dppx) {
    #menu-wrapper {
        zoom: 0.8;
    }
}

/* 1.25 dppx → zoom 0.85 */

@media (min-width: 2200px) and (min-resolution: 1.25dppx) {
    #menu-wrapper {
        zoom: 1;
    }
}

/* 1.7 dppx → zoom 0.8 */

@media (min-width: 2200px) and (min-resolution: 1.7dppx) {
    #menu-wrapper {
        zoom: 1;
    }
}

/**menu-item animation on open*/

/**text animation on open*/

ul#menu-menu {
    --base: 1.2s;
    --step: 0.3s;
    --current-childs: 5;
}

ul#menu-menu>.menu-item>a.menu-link {
    overflow: hidden;
}

ul#menu-menu>.menu-item>a.menu-link .imp-nav-target-txt {
    transform: translateY(100%);
    transition: all 0.75s cubic-bezier(0, 0.55, 0.45, 1) 0s;
}

ul#menu-menu>.menu-item.menu-animated>a.menu-link .imp-nav-target-txt {
    opacity: 1;
    transform: translateX(0);
    transition-delay: var(--delay);
}

/* submenu */

@media (min-width: 1201px) {
    .sub-menu:not(.not-animated) {
        transform: translateX(100%);
        transition: all 1s ease-in-out;
    }

    .sub-menu.menu-animated {
        transform: translateX(0);
    }
}

#main-nav {
    z-index: 9999;
    transition: all 0.5s ease 0s;
    --menu-items-padding: 70px;
    padding: 0;
    transition: all 0.5s ease 0s !important;
    position: fixed;
    left: 0;
    width: 100%;
    height: 100%;
    top: 0;
    pointer-events: all;
}

#menu-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    padding-left: calc(var(--gap-xl) * 2);
}

#menu-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav#main-nav li.menu-item a {
    text-decoration: none;
    position: relative;
}

nav#main-nav li.menu-item .special-menu-btn.menu-link:hover,
nav#main-nav li.menu-item .special-menu-btn.menu-link:active {
    background-color: var(--ast-global-color-0);
}

nav#main-nav li.menu-item .special-menu-btn.menu-link:hover .imp-nav-target-txt {
    color: var(--ast-global-color-4);
}

.menu-col.col-menu-1 {
    width: 100%;
    display: flex;
    height: 100%;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
    position: relative;
}

.menu-hauptmenu-container {
    height: 100%;
}

@media (min-width: 1025px) {
    #menu-menu {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: var(--gap-m);
        max-width: 510px;
    }
}

#menu-menu>.menu-item>a {
    font-family: var(--headlinefont);
    font-size: 3.333rem;
    font-weight: 800;
    color: var(--wp--preset--color--accent-2);
    letter-spacing: -0.015em;
    display: flex;
    line-height: 1.1;
    padding: 0;
}

/*
#menu-menu>.menu-item.current-menu-item .menu-link {
  background-color: var(--ast-global-color-0) !important;
}

#menu-menu>.menu-item.current-menu-item .menu-link .imp-nav-target-txt {
  background-color: var(--ast-global-color-4) !important;
}
*/

#menu-menu>.menu-item.imp-sub-active>.menu-link {
    color: var(--ast-global-color-0) !important;
}

.imp-nav-target {
    display: flex;
    justify-content: space-between;
    width: 100%;
    z-index: 9;
    align-items: center;
    position: relative;
}

.sub-menu .menu-link:hover {
    background-color: var(--ast-global-color-0) !important;
}

.sub-menu .menu-link:hover .imp-nav-target-txt {
    color: var(--ast-global-color-4) !important;
}

.dropdown-menu-toggle.ast-header-navigation-arrow {
    display: none;
}

#menu-wrapper ul.sub-menu {
    overflow: hidden;
    color: var(--ast-global-color-0);
    display: flex;
    align-items: center;
}

.ast-icon.icon-arrow {
    display: none;
}

#menu-menu .sub-menu a {
    font-weight: 400;
    color: var(--ast-global-color-0);
    letter-spacing: 0.08em;
    line-height: 2.5;
    font-size: 1.15rem;
}

nav#main-nav .special-format .sub-menu li.menu-item.current-menu-item>a {
    background-color: var(--ast-global-color-0);
    color: var(--ast-global-color-4) !important;
    z-index: 9;
}

nav#main-nav ul.sub-menu:not(.special-submenu) li.menu-item.current-menu-item>a {
    background-color: var(--ast-global-color-0);
}

nav#main-nav ul.sub-menu:not(.special-submenu) li.menu-item.current-menu-item .imp-nav-target-txt {
    color: var(--ast-global-color-4);
}

nav#main-nav .sub-menu li.menu-item.current-menu-item>a::after,
.menu-link-about .sub-menu .current-menu-item .imp-nav-target-txt::after,
.menu-link-about .sub-menu .menu-link:hover .imp-nav-target-txt::after {
    background-image: url(../../img/button-arrow-green.svg) !important;
}

#menu-wrapper ul.sub-menu {
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    z-index: 9;
    gap: var(--gap-m);
}

.menu-item.sub-back-btn {
    margin-top: 4.2vh;
}

.menu-item.sub-back-btn span {
    display: flex;
    align-items: center;
}

.menu-item.sub-back-btn span::before {
    content: "";
    display: block;
    height: 1.1em;
    width: calc(1.1em / 2);
    background-image: url(/wp-content/themes/astra-impuls-child/img/nav-arrow.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    margin-right: 0.6em;
    margin-top: 0em;
    transition: all 0.5s ease 0s;
    rotate: 180deg;
}

#menu-menu .menu-link-about .sub-menu {
    gap: var(--gap-s) !important;
    margin-top: var(--gap-s) !important;
}

#menu-menu .menu-link-about .sub-menu li a.menu-link {
    font-family: var(--mainfont) !important;
    font-size: var(--btn-font-size) !important;
    font-style: normal;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: 0.01em;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--ast-global-color-3);
    border-radius: 500px;
    padding: 1.05em 1.8em !important;
}

#menu-menu .menu-link-about .sub-menu .imp-nav-target-txt {
    display: flex;
    align-items: center;
    gap: 10px;
}

/**NAV FOOTER*/

div#nav-footer * {
    color: var(--ast-global-color-0);
}

div#nav-footer,
div#nav-footer .textwidget {
    display: flex;
}

div#nav-footer {
    gap: var(--gap-m);
    margin-bottom: var(--gap-l);
    align-self: start;
    width: 70vw;
    justify-content: space-between;
    overflow: hidden;
    padding: 5px 0;
}

div#nav-footer .textwidget {
    transition: all 0.75s ease-out 0s;
    transform: translateY(calc(101% + 5px));
}

#nav-wrapper.impmenu-active div#nav-footer .textwidget {
    transition-delay: calc(var(--max-delay) + 0.5s);
    transform: translateY(0);
}

div#nav-footer .textwidget:nth-child(2) p {
    display: flex;
    line-height: 1;
    align-items: center;
    font-size: var(--listing-font-size);
}

div#nav-footer .textwidget:nth-child(2) p:not(:last-child):after {
    content: "";
    display: block;
    height: 1.1em;
    width: 1px;
    background-color: var(--ast-global-color-0);
    margin: 0 var(--gap-s);
}

div#nav-footer .textwidget:first-child {
    gap: var(--gap-m);
}

div#nav-footer .textwidget:first-child a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mainfont) !important;
    font-size: var(--btn-font-size) !important;
    font-weight: 500 !important;
    padding: 1.05em 1.8em !important;
    line-height: 1 !important;
    height: auto;
    transition: all 0.5s ease 0s;
    border-radius: 20em;
}

@media (min-width: 1024px) {
    div#nav-footer .textwidget:first-child a {
        font-size: calc(var(--btn-font-size) * 1.3) !important;
    }
}

div#nav-footer .textwidget:first-child p:first-child a {
    border: 1px solid var(--ast-global-color-3);
    background-color: var(--ast-global-color-3) !important;
    color: var(--ast-global-color-1) !important;
}

div#nav-footer .textwidget:first-child p:first-child a::after {
    content: "";
    display: inline-block;
    --my-size: 0.7em;
    width: calc(var(--my-size) / 1.6955);
    height: var(--my-size);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.5s ease 0s;
    background-image: url(../../img/button-arrow-white.svg);
}

div#nav-footer .textwidget:first-child p:first-child a:hover {
    background: none !important;
    color: var(--ast-global-color-3) !important;
}

div#nav-footer .textwidget:first-child p:first-child a:hover::after {
    background-image: url(../../img/button-arrow.svg);
}

div#nav-footer .textwidget:first-child p:last-child a {
    background-color: transparent;
    padding-right: calc(var(--btn-font-size) + (1.05em * 2) + 10px) !important;
}

div#nav-footer .textwidget:first-child p:last-child a::after {
    content: "";
    --my-size: calc(var(--btn-font-size) + (1.05em * 2));
    position: absolute;
    right: 0;
    width: var(--my-size);
    height: var(--my-size);
    border: 1px solid var(--ast-global-color-3);
    width: var(--my-size);
    border-radius: 50%;
    background-image: url(../../img/button-arrow.svg);
    background-size: 0.45em;
    background-repeat: no-repeat;
    background-position: center;
    border-left: none !important;
    border-top: 0;
    border-bottom: 0;
}

div#nav-footer .textwidget:first-child p:last-child a::before {
    content: "";
    --my-size: calc(var(--btn-font-size) + (1.05em * 2));
    position: absolute;
    right: 0;
    width: var(--my-size);
    height: var(--my-size);
    border: 1px solid var(--ast-global-color-3);
    border-radius: 3rem;
    transition: all 0.5s ease 0s;
}

@media (max-width: 576px) {
    div#nav-footer .textwidget:first-child p:last-child a::after {
        border-left: 1px solid black !important;
        border: 1px solid black;
    }
}

div#nav-footer .textwidget:first-child p:last-child a:hover::before {
    width: 100%;
}

@media (max-width: 1500px) {
    #menu-wrapper {
        padding-left: var(--gap-xl);
    }

    div#nav-footer {
        width: calc(100vw - var(--gap-xl) - 5vw);
    }
}

@media (max-width: 1190px) {
    #menu-wrapper {
        padding-left: var(--gap-l);
    }

    div#nav-footer {
        width: calc(100vw - var(--gap-l) - 5vw);
    }

    div#nav-footer .textwidget:first-child p:last-child a::before {
        display: none;
    }

    div#nav-footer .textwidget:first-child p:last-child a::after {
        border: 1px solid var(--ast-global-color-3) !important;
    }
}

@media (min-width: 750px) {
    div#menu-wrapper {
        justify-content: space-between !important;
    }
}

@media (max-width: 1200px) {
    #main-nav {
        height: 100vh;
        overflow-y: scroll;
    }

    div#menu-wrapper {
        overflow-y: auto;
        gap: 70px;
        height: fit-content;
        min-height: 100%;
        justify-content: flex-start;
    }

    ul.special-submenu-depth-1 {
        flex-wrap: wrap;
        justify-content: center;
    }

    div#nav-footer {
        flex-direction: column;
        align-items: center;
        width: 90vw;
        margin-left: auto;
        margin-right: auto;
        margin-top: 0;
        gap: 70px;
    }

    #menu-wrapper ul.sub-menu {
        align-items: center;
    }

    #menu-menu>.menu-item>a {
        line-height: 1.5;
    }

    ul.sub-menu>li.menu-item:first-child {
        margin-top: var(--gap-m);
    }

    ul.sub-menu>li.menu-item:last-child {
        margin-bottom: var(--gap-m);
    }

    #menu-menu .menu-link-about .sub-menu {
        gap: var(--gap-s) !important;
        margin-top: 0;
    }

    div#nav-footer .textwidget {
        transform: translateY(calc(250% + 5px));
    }
}

@media (max-width: 990px) {
    #menu-menu>.menu-item>a {
        font-size: 2.633rem;
    }

    div#nav-footer .textwidget {
        transform: translateY(calc(300% + 5px));
    }
}

@media (max-width: 576px) {
    #menu-menu>.menu-item>a {
        font-size: 34px;
        line-height: 1.6;
    }

    div#nav-footer .textwidget:nth-child(2) p {
        line-height: 1.6;
    }

    div#nav-footer .textwidget:nth-child(2) p:nth-last-child(2):after {
        display: none;
    }

    #menu-menu .menu-link-about .sub-menu {
        margin-top: 0 !important;
    }

    #menu-menu .menu-link-about .sub-menu li a.menu-link {
        padding: 1.05em 1.2em !important;
        font-size: 11px !important;
    }

    ul.sub-menu>li.menu-item:first-child {
        margin-top: var(--gap-s);
    }
}

@media (max-width: 390px) {

    div#nav-footer,
    div#menu-wrapper {
        gap: 50px;
    }
}

/*
@media (min-width: 1024px) {
  #nav-wrapper #menu-menu:not(:has(.menu-item.imp-sub-active)) {
    opacity: 0;
    transform: translateY(100%);

    transition: transform 1.5s cubic-bezier(0, 0.35, 0.85, 1) 0s,
      opacity 0s linear 1.5s;
  }

  #nav-wrapper.impmenu-active #menu-menu li:nth-child(1) .menu-link {
    transition-delay: 0.8s;
  }
  #nav-wrapper.impmenu-active #menu-menu li:nth-child(2) .menu-link {
    transition-delay: 0.9s;
  }
  #nav-wrapper.impmenu-active #menu-menu li:nth-child(3) .menu-link {
    transition-delay: 1s;
  }
  #nav-wrapper.impmenu-active #menu-menu li:nth-child(4) .menu-link {
    transition-delay: 1.1s;
  }

  #nav-wrapper.impmenu-active #menu-menu li:nth-child(5) .menu-link {
    transition-delay: 1.2s;
  }

  #nav-wrapper.impmenu-active #nav-footer {
    transition-delay: 1.6s;
  }

  #nav-wrapper #nav-footer {
    transition-duration: 1s;
  }

  #nav-wrapper.impmenu-active li.menu-item .menu-link,
  #nav-wrapper.impmenu-active #nav-footer {
    opacity: 1;
    transform: none;
    transition-delay: 0.6s;
  }
}

#menu-menu>li.menu-item.current-menu-item a {
    text-decoration: underline;
}

*/

/* Entfernt den Fokus-Rahmen global für alle Links und Buttons */
a:focus,
button:focus,
div:focus,
input:focus {
    outline: none !important;
    box-shadow: none !important;
}