/**
 * 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;
  margin-left: var(--nav-icon-padding-X);
  background: transparent;
  font-weight: 500;
  top: auto;
  /* left: 0; */
  letter-spacing: 0.17em;
  pointer-events: all;
  border-radius: 0 0 2em 0;
  position: fixed;
  transition: all 0.5s cubic-bezier(0.65, 0.05, 0.36, 1) 0s;
  /* top: var(--nav-icon-padding-X); */
}

.impmenu-active .impmenu-toggle {
  margin-left: var(--gap-l);
}

a.impmenu-toggle {
  /*top: var(--header-spacing-home);*/
}

#nav-wrapper {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  transform: scale(0);
  pointer-events: none;
  transition: all 0.7s cubic-bezier(0.46, 0.03, 0.52, 0.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 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;
}

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

#menu-wrapper ul li:hover a {
  cursor: pointer;
}

.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);
  justify-content: center;
}

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

#menu-hauptmenu {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#menu-hauptmenu > .menu-item > a {
  font-family: var(--mainfont);
  font-size: clamp(17px, 1.7rem, 32px) !important;
  font-weight: 500;
  color: var(--ast-global-color-6) !important;
  display: flex;
  line-height: 1.31;
}

#menu-wrapper ul li:not(:last-child) {
  padding-bottom: var(--gap-m);
}

@media screen and (max-width: 390px) {
  #menu-hauptmenu > .menu-item > a {
    font-size: 1.2rem !important;
  }
  #menu-wrapper ul li:not(:last-child) {
    padding-bottom: var(--gap-s);
  }

  .sub-menu li a {
    font-size: 1.2rem !important;
  }
}

#menu-hauptmenu > .menu-item.imp-sub-active > .menu-link,
#menu-hauptmenu > .menu-item.current-menu-item > .menu-link {
  color: var(--ast-global-color-5) !important;
  border: 1px var(--ast-global-color-5) solid;
  padding-block: var(--gap-s);
  border-radius: 100px;
}

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

@media screen and (max-width: 480px) {
  #menu-hauptmenu > li > a > .imp-nav-target {
    font-size: 1.2rem;
  }
}

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

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

.sub-menu > li {
  padding-bottom: 0 !important;
  color: var(--ast-global-color-5) !important;
  text-transform: uppercase;
}

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

@media screen and (max-width: 480px) {
  #menu-wrapper .imp-sub-active ul.sub-menu {
    margin-top: var(--gap-s) !important;
  }
  #menu-wrapper .imp-sub-active ul.sub-menu .menu-item {
    max-height: 2rem;
  }
  #menu-wrapper .imp-sub-active ul.sub-menu .menu-item a {
    font-size: 0.8rem !important;
  }
}

#ast-scroll-top {
  background-color: var(--ast-global-color-4) !important;
}

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

#menu-hauptmenu .sub-menu a {
  font-weight: 300;
  color: var(--ast-global-color-5);
  letter-spacing: 0.08em;
  line-height: 2.21;
  font-size: clamp(13px, 1.05rem, 19px) !important;
}

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

nav#main-nav
  .sub-menu
  li.menu-item.current-menu-item
  > a
  .imp-nav-target-txt::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: #fff;
  position: absolute;
  bottom: 0.6em;
}

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

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

.ast-icon svg {
  display: none !important;
}

/**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: 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 span {
  display: block;
  position: absolute;
  height: var(--burger-line-height);
  width: 100%;
  background: #fff;
  border-radius: 13em;
  opacity: 1;
  left: 0;
  -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: 0.25s ease-in-out;
}

.home #nav-icon3 span:nth-child(1) {
  background-color: #fff;
}

#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: 55%;
}

.home #nav-icon3 span:nth-child(4) {
  background-color: #fff;
}

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

.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%;
}

#nav-wrapper::after {
  content: "";
  position: absolute;
  background-image: url(/wp-content/themes/astra-impuls-child/img/icon-w-footer.svg);
  width: clamp(250px, 16.5vw, 336px);
  aspect-ratio: 1/1;
  background-repeat: no-repeat;
  background-size: contain;
  bottom: 0;
  right: 0;
  transform: translate(-16%, 19%);
  z-index: 9999;
}

@media (min-width: 1920px) {
  /*----------------- ELEMENT -------------*/

  /*----------------- END ELEMENT ---------*/
}

@media (min-width: 1024px) and (max-width: 1600px) {
  /*----------------- ELEMENT -------------*/

  /*----------------- END ELEMENT ---------*/
}

@media (max-width: 1500px) {
  /*----------------- ELEMENT -------------*/

  /*----------------- END ELEMENT ---------*/
}

@media (max-width: 1200px) {
  /*----------------- ELEMENT -------------*/

  /*----------------- END ELEMENT ---------*/
}

@media (max-width: 990px) {
  a.impmenu-toggle {
    left: 0;
  }
}

@media (max-width: 768px) {
  #menu-hauptmenu {
    justify-content: flex-start;
    padding-top: calc(
      var(--header-spacing-home) + var(--height-icons) + 8vh
    ) !important;
    gap: var(--gap-s);
  }

  #nav-wrapper::after {
    display: none;
  }
}

@media (max-width: 576px) {
  .impmenu-active .impmenu-toggle {
    margin-left: 5vw;
  }

  #menu-hauptmenu > .menu-item.imp-sub-active > .menu-link,
  #menu-hauptmenu > .menu-item.current-menu-item > .menu-link {
    color: var(--ast-global-color-5) !important;
    border: 1px var(--ast-global-color-5) solid;
    padding-block: 5px;
    border-radius: 100px;
  }
}

@media (max-width: 435px) {
  /*----------------- ELEMENT -------------*/

  /*----------------- END ELEMENT ---------*/
}

@media (max-width: 320px) {
  /*----------------- ELEMENT -------------*/

  /*----------------- END ELEMENT ---------*/
}
