/**
 * 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;
  left: var(--nav-icon-padding-X);
  pointer-events: all;
  position: fixed;
  transition: all 0.5s cubic-bezier(0.65, 0.05, 0.36, 1) 0s;
  top: var(--nav-icon-padding-X);
  height: var(--nav-icon-height);
  width: var(--nav-icon-width);
  background-color: var(--ast-global-color-5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  top: var(--nav-icon-padding-Y);
  border: 2px solid var(--ast-global-color-0);
}

#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%);
  background-color: var(--ast-global-color-3);
}

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

nav#main-nav:after {
  content: "";
  display: block;
  position: absolute;
  --my-size: clamp(250px, 22vw, 342px);
  width: var(--my-size);
  height: calc(var(--my-size) / 1.2);
  background: url(../../img/blankgut-patch-2.svg);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  bottom: calc(var(--gap-l) * 1.2);
  right: calc(var(--gap-l) * 1.2);

  pointer-events: none;
}

#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;
  display: flex;
}

ul#menu-hauptmenu {
  display: flex;
  flex-direction: column;
  gap: var(--gap-m);
  justify-content: center;
}

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

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

.menu-item.menu-item-has-children.imp-sub-active {
  margin-bottom: calc(var(--gap-m) / 1.3);
}

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

#menu-hauptmenu > .menu-item > a {
  font-family: var(--headlinefont);
  font-size: var(--h3-font-size);
  font-weight: 500;
  color: var(--ast-global-color-4);
  line-height: 1.1;
  display: flex;
  transition: all 0.3s ease-in-out 0s;
}

/* #menu-hauptmenu > .menu-item.imp-sub-active > .menu-link,
#menu-hauptmenu > .menu-item.current-menu-item:not(.no-current) > a {
  color: var(--ast-global-color-1);
} */

#menu-hauptmenu > .menu-item.imp-sub-active > .menu-link .imp-nav-target-txt,
#menu-hauptmenu > .menu-item.current-menu-item:not(.no-current) > a {
  color: var(--ast-global-color-3);
}

#menu-hauptmenu > .menu-item.imp-sub-active > .menu-link,
#menu-hauptmenu > .menu-item.current-menu-item:not(.no-current) > a {
  background-color: var(--ast-global-color-5);
  padding: calc(var(--gap-s) * 1.67) calc(var(--gap-l) * 2);
  border-radius: 50px;
}

#menu-hauptmenu .menu-item:not(.imp-sub-active) .menu-link:hover,
#menu-hauptmenu .imp-sub-active .menu-item.current_page_item .menu-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

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

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

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

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

#menu-hauptmenu .sub-menu a {
  font-family: var(--mainfont);
  font-size: 20px;
  font-weight: 500;
  line-height: 2.6;
  /* letter-spacing: 0.15em; */
  color: var(--ast-global-color-5);
}

nav#main-nav .sub-menu li.menu-item:first-child {
  padding-top: calc(var(--gap-m) / 1.8);
}

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

span.imp-nav-target-txt {
  position: relative;
}

/* 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;
}

/**animation burger menu*/

#nav-icon3 {
  width: 50%;
  height: 25%;
  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;
  display: flex;
  justify-content: center;
}

#nav-icon3 span {
  display: block;
  position: absolute;
  height: var(--burger-line-height);
  width: 100%;
  background-color: var(--ast-global-color-3);
  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;
}

#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: auto;
  left: auto;
  max-width: 65%;
  background-color: var(--ast-global-color-3);
}

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

.impmenu-active #nav-icon3 span:nth-child(3) {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

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

.header-wrapper:has(#nav-wrapper.impmenu-active) a.impmenu-toggle {
  background-color: var(--ast-global-color-0) !important;
}

/*----------------- HEADER ICONS -------------*/

#header-icons {
  z-index: 100;
  display: flex;
  pointer-events: all;
  position: absolute;
  top: calc((100vh - var(--height-calculus)) / 2);
  right: 2vw;
  gap: clamp(13px, 0.478rem + 1.16vw, 30px);
  top: 1.6vw;
}

#header-icons img {
  height: clamp(18.55px, 0.741rem + 0.68vw, 26px) !important;
  display: block;
  width: auto;
}

.icon {
  height: 62px;
  display: flex;
  align-items: center;
  text-align: center;
  vertical-align: top;
  transition: all 0.3s ease 0s;
  cursor: pointer;
}

.icon a {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/*---------------- GTRANSLATE -------------*/

html:lang(auto) .icon a[title="German"],
html:lang(en) .icon a[title="English"],
html:lang(de-DE) .icon a[title="German"] {
  display: none;
  opacity: 0;
}

.gglobe:hover {
  transform: none !important;
}

.gtranslate_wrapper .gsatelite img {
  box-shadow: none !important;
  border: none !important;
}

span.glink-dsgvo-wrapper {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gglobe {
  background-image: url("/wp-content/themes/astra-impuls-child/img/icon-sprache.svg") !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  background-position: center !important;
  width: clamp(18.55px, 0.741rem + 0.68vw, 26px) !important;
  height: clamp(18.55px, 0.741rem + 0.68vw, 26px) !important;
  display: inline-block !important;
}

.gtranslate_wrapper {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gsatelites {
  align-self: center;
  justify-content: center;
  display: flex;
  margin: 0 auto;
  position: relative;
  left: 50%;
}

#header-icons .gsatelite.gt-current-lang img {
  opacity: 1;
  box-shadow: none;
  transform: scale(1) !important;
}

.nturl.gsatelite {
  left: 0 !important;
  transform: translateX(-50%);
}

.nturl.gsatelite[data-gt-lang="en"] {
  top: 21px !important;
}

.nturl.gsatelite[data-gt-lang="de"] {
  top: 21px !important;
}

.nturl.gsatelite {
  z-index: 999;
}

.gsatelite.gt-current-lang {
  z-index: 9;
}

.popup-inner {
  background-color: var(--ast-global-color-0) !important;
}

@media (max-width: 1024px) {
  .menu-hauptmenu-container {
    transform: translateY(-10%);
  }
}
@media (max-width: 768px) {
  ul#menu-hauptmenu {
    justify-content: flex-start;
    padding-top: calc(
      var(--nav-icon-width) * 2 + var(--nav-icon-padding-Y) + 8vh
    );
  }

  #menu-hauptmenu > .menu-item.imp-sub-active > .menu-link {
    padding: 12px calc(var(--gap-l) * 2);
  }

  #menu-hauptmenu .sub-menu a {
    line-height: 2.13;
    font-size: 1.071rem;
  }
  .menu-item.menu-item-has-children.imp-sub-active {
    margin-bottom: calc(var(--gap-m) / 1.5);
  }

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

  #header:has(#nav-wrapper:not(.impmenu-active)) #nav-icon3 {
    width: 38%;
  }

  .menu-hauptmenu-container {
    transform: translateY(0);
  }
}

@media (max-height: 700px) and (min-width: 1024px) {
  #menu-hauptmenu .sub-menu a {
    line-height: 1.9;
  }
}
