/**
 * 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.
 */

html:has(.impmenu-active),
body:has(.impmenu-active) {
  overflow: hidden;
}

a.impmenu-toggle {
  z-index: 99999;
  background: transparent;
  font-weight: 500;
  right: var(--nav-icon-padding-X);
  top: calc(var(--header-height) / 2);
  transform: translateY(-50%);
  letter-spacing: 0.17em;
  pointer-events: all !important;
  border-radius: 0 0 2em 0;
  position: fixed;
  transition: all 0.5s cubic-bezier(0.65, 0.05, 0.36, 1) 0s;
}

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

#nav-wrapper {
  background-color: var(--ast-global-color-1);
  z-index: 99999 !important;
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;

  pointer-events: none;
  z-index: 9999;
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  transition: clip-path 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

#nav-wrapper.impmenu-active {
  transition: clip-path 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

#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;
}

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

#menu-wrapper::after {
  content: "";
  display: block;
  --my-size: clamp(250px, 40vw, 687px);
  height: var(--my-size);
  width: var(--my-size);
  bottom: -2%;
  right: -1%;
  background-image: url(/wp-content/themes/astra-impuls-child/img/footer-icon.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom right;
  position: absolute;
  opacity: 0.2;
  pointer-events: none;
}

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

.menu-col.col-menu-1 {
  width: 100%;
  display: flex;
  height: 100%;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
  position: relative;
  background-color: var(--ast-global-color-1);
}

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

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

/* Hauptmenü Items */
#menu-hauptmenu > .menu-item > a {
  font-family: var(--mainfont);
  color: var(--ast-global-color-4);
  font-size: 2.111rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  display: flex;
  line-height: 2.11;
  text-transform: uppercase;
}

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

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

#menu-wrapper ul.sub-menu {
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: center;
}

#menu-wrapper ul.sub-menu .menu-item {
  z-index: 99;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
}

#menu-wrapper .imp-sub-active ul.sub-menu .menu-item {
  max-height: 4rem;
  transition-delay: 0.85s;
}

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

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

.sub-menu .current_page_item {
  text-decoration: underline;
}

nav#main-nav .sub-menu li.menu-item.current-menu-item > a {
  color: #fff !important;
  z-index: 9;
}

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

/**animation burger menu*/

#nav-icon3 {
  background-color: var(--ast-global-color-2) !important;
  border: 1px solid var(--ast-global-color-2) !important;
  border-radius: 55px;
  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: 0.5s ease-in-out;
  -moz-transition: 0.5s ease-in-out;
  -o-transition: 0.5s ease-in-out;
  transition: 0.5s ease-in-out;
  cursor: pointer;
}

#nav-icon3:hover {
  background-color: var(--ast-global-color-1);
  border: 1px solid var(--ast-global-color-0);
}

#nav-icon3 span {
  display: block;
  position: absolute;
  background-color: white;
  height: var(--burger-line-height);
  width: 100%;
  background: var(--ast-global-color-1);
  border-radius: 13em;
  opacity: 1;
  left: unset;
  right: 30%;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: 0.25s ease-in-out;
  -moz-transition: 0.25s ease-in-out;
  -o-transition: 0.25s ease-in-out;
  transition: rotate 0.5s ease-in-out;
}

#nav-icon3 span:nth-child(1) {
  top: 37% !important;
  background-color: white;
  width: 42%;
}

#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));
  left: unset;
  max-width: 36%;
  background-color: var(--ast-global-color-4);
}

#nav-icon3 span:nth-child(4) {
  background-color: #fff;
  width: 42%;
}

#nav-icon3 span:nth-child(4) {
  bottom: 37%;
}

.impmenu-active #nav-icon3 span:nth-child(1) {
  top: 50%;
  width: 0%;
  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: var(--ast-global-color-0) !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: var(--ast-global-color-0) !important;
}

.impmenu-active #nav-icon3 span:nth-child(4) {
  bottom: 50%;
  transform: translateY(-50%);
  width: 0%;
  left: 50%;
}

/* Icons und Buttons in Nav */
#nav-contact {
  position: absolute;
  top: calc(var(--header-height) / 2);
  transform: translateY(-50%);
  display: flex;
  gap: var(--gap-l);
  right: calc(var(--nav-icon-padding-X) + var(--nav-icon-width) + 5vw);
}

#nav-contact a {
  color: var(--ast-global-color-2);
  font-size: var(--btn-font-size);
  font-weight: 500;
  line-height: 1.36;
  letter-spacing: 0.02em;
  transition: all 0.5s ease-in-out;
  display: flex;
  align-items: center;
  gap: var(--gap-s);
}

#nav-contact a::before {
  content: "";
  display: block;
  width: 1.286em;
  height: 1.286em;
  background-image: url(/wp-content/themes/astra-impuls-child/img/icon-phone);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 9;
  transition: all 0.5s ease-in-out;
}

#nav-contact a.mail::before {
  background-image: url(/wp-content/themes/astra-impuls-child/img/icon-mail);
}

#nav-contact a.icon-fb::before {
  background-image: url(/wp-content/themes/astra-impuls-child/img/icon-facebook);
}

#nav-contact a.icon-ig::before {
  background-image: url(/wp-content/themes/astra-impuls-child/img/icon-instagram);
}

#nav-contact a:hover {
  color: var(--ast-global-color-4);
}

#nav-contact a:hover::before {
  filter: brightness(0) invert(1);
}

@media (max-width: 1024px) {
  #nav-contact {
    position: relative;
    transform: translateY(0);
    right: unset;
    padding-left: 13.14vw;
    align-self: flex-start;
    gap: 15px;
  }

  #nav-contact a::before {
    width: 30px;
    height: 30px;
  }

  #nav-buttons {
    display: none;
  }

  #nav-contact span {
    font-size: 0;
    width: 0;
    display: none;
  }

  #menu-wrapper::after {
    /*bottom: 13.18%;*/
    bottom: 1%;
    right: -2%;
  }

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

@media (max-width: 768px) {
  #nav-contact {
    padding-left: 32px;
  }
  #nav-contact a::before {
    width: 21px;
    height: 21px;
  }
}

/* buttons */

#nav-buttons {
  position: absolute;
  left: 13.14vw;
  bottom: 22.22vh;
}

#nav-buttons .textwidget {
  display: flex;
  gap: var(--gap-s);
}

#nav-buttons .btn-buchen:hover {
  background-color: var(--ast-global-color-3) !important;
  color: white !important;
}

@media (max-height: 900px) and (min-width: 1024px) {
  #nav-buttons {
    bottom: 10vh;
    left: 10vw !important;
  }

  .menu-hauptmenu-container {
    height: 100%;
    width: 100vw;
    margin: 0;
    padding: 8vw 0 0 10vw !important;
  }
}

@media (max-height: 750px) and (min-width: 1024px) {
  #menu-hauptmenu > .menu-item > a {
    font-size: 1.8rem;
  }
}
