/**
 * 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;
  font-weight: 500;
  left: var(--nav-icon-padding-X);
  top: var(--nav-icon-padding-Y);
  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;
  width: calc(var(--nav-icon-width) * 2.52);
  height: calc(var(--nav-icon-width) * 2.52);
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  border-radius: 50%;
  transform: translateY(30%);
}

@media (min-width: 1200px) {
  a.impmenu-toggle {
    border-radius: 50%;
    /* transform: translateY(-10%);*/
  }
}

/* #nav-wrapper {
  background-color: var(--color-blue);
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  clip-path: inset(0 50% 0 50%);
  transition: clip-path 1.2s cubic-bezier(0.22, 1, 0.36, 1);
} */

#nav-wrapper {
  background-color: var(--ast-global-color-0);
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  clip-path: inset(0 50% 0 50%);
  transition: clip-path 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

div#nav-wrapper::after {
  content: "";
  width: 52.89%;
  height: 100%;
  background-image:
    linear-gradient(
      to right,
      var(--ast-global-color-0) -5%,
      rgba(213, 17, 48, 0) 100%
    ),
    url("../../img/heuberger-fenster-tueren-salzburg-22.png");
  background-size:
    100% 100%,
    cover;
  background-position: right center;
  background-repeat: no-repeat;
  position: absolute;
  right: 0;
}

#nav-wrapper.impmenu-active {
  transition: clip-path 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  clip-path: inset(0 0 0 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;
}

#main-nav::after {
  content: "";
  display: block;
  width: 62px;
  height: 95vh;
  background-image: url(../../img/claim-nav.svg);
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  right: clamp(15px, -0.219rem + 4.02vw, 66px);
  top: 0;
}

#menu-wrapper {
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  padding-left: clamp(50px, -0.183rem + 11.51vw, 218px);
  padding-top: clamp(100px, 2.554rem + 12.85vw, 240px);
}

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

nav#main-nav li.menu-item a {
  position: relative;
  color: var(--ast-global-color-1);
  font-size: var(--h3-font-size);
  font-weight: 400;
  line-height: 1.25;
  font-family: var(--headlinefont);
  transition: all 0.5s ease-in-out;
}

nav#main-nav li.menu-item.current-menu-item a {
  text-decoration: underline;
  text-decoration-color: var(--ast-global-color-3);
  text-underline-offset: 8px;
  text-decoration-thickness: 1.5px;
}

nav#main-nav .sub-menu li.menu-item.current-menu-item a {
  text-decoration: none;
  text-decoration-color: transparent;
}

#menu-hauptmenu > li.menu-item > a {
  display: inline-block;
}

nav#main-nav
  li.menu-item.current-menu-item
  .sub-menu
  li.menu-item.current-menu-it
  a:hover {
  text-decoration: none !important;
}

.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-hauptmenu {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--gap-m);
  }
}

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

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

#menu-wrapper ul.sub-menu .menu-item a {
  font-size: clamp(16px, 0.955rem + 0.16vw, 18px);
  line-height: 1;
  text-transform: none;
  transition: all 0.5s ease-in-out;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--mainfont);
}

.sub-menu .menu-item a {
  display: inline-flex;
  justify-content: center;
  gap: 7px;
  padding: 7px 0;
}

.sub-menu .menu-item a::after {
  content: "";
  display: block;
  width: 15px;
  height: 19px;
  background-image: url(../../img/pfeil-links-button.svg);
  rotate: -45deg;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.5s ease-in-out;
}

#menu-wrapper .imp-sub-active ul.sub-menu .menu-item a:hover {
  background-color: var(--color-beige);
  border: 1px solid var(--color-beige);
  color: white;
  text-decoration: none;
}

.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;
}
 */
#menu-wrapper ul.sub-menu {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: var(--gap-m);
  z-index: 9;
}

/*
.current-menu-item a {
  border-bottom: 1.5px solid var(--ast-global-color-3);
}
*/

.sub-menu a {
  position: relative;
  display: inline-block;
}

.sub-menu a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.2em;
  width: 0;
  transition: all 0.5s ease-in-out;
  height: 1.5px;
  background-color: currentColor;
}

.sub-menu a:hover::before,
.current-menu-item a::before {
  width: 100%;
}

@media (min-width: 1024px) {
  .sub-menu .menu-item a:hover::after {
    transform: rotate(45deg);
  }
}

/**animation burger menu*/

#nav-icon3 {
  border-radius: 100px;
  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;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

body:has(#special-hero) .impmenu-toggle,
body.home .impmenu-toggle {
  background-color: var(--ast-global-color-0) !important;
}

body.impmenu-active #header .impmenu-toggle {
  background-color: white !important;
}

body:not(:has(#special-hero)) .impmenu-toggle {
  background-color: var(--ast-global-color-3);
}

body:not(:has(#special-hero)) #nav-icon3 span {
  background-color: var(--ast-global-color-0) !important;
}
body.home:not(.impmenu-active) #header #nav-icon3 span {
  background-color: var(--ast-global-color-3) !important;
}
/*
#nav-wrapper.impmenu-active + .impmenu-toggle #nav-icon3 {
  background-color: var(--ast-global-color-3);

  & span:nth-child(1) {
    background-color: var(--ast-global-color-0) !important;
  }
}
  */

#nav-icon3 span {
  display: block;
  position: absolute;
  background-color: var(--ast-global-color-0);
  height: 2px;
  width: 100%;
  opacity: 1;
  left: unset;

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

#nav-icon3 span:nth-child(2),
#nav-icon3 span:nth-child(3) {
  top: calc(50% - 2px / 2);
  background-color: var(--ast-global-color-3) !important;
  width: 80%;
}

body.impmenu-active #nav-icon3 span:nth-child(2),
body.impmenu-active #nav-icon3 span:nth-child(3) {
  width: 100%;
}

#nav-icon3 span:nth-child(4) {
  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%;
  transition: none !important;
}

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

#nav-wrapper.impmenu-active + .impmenu-toggle #nav-icon3 span:nth-child(2) {
  background-color: var(--ast-global-color-0) !important;
}

.menu-image-container {
  position: absolute;
  right: 0;
  top: 0;
  height: 100vh;
  width: 60%;
  opacity: 0.15;
  pointer-events: none;
}

.menu-image-container img {
  height: 100vh;
  width: 60vw;
  object-fit: cover;
  object-position: bottom;
  zoom: 1.06;
}

.menu-image-container::before {
  position: absolute;
  content: "";
  left: 0;
  top: 0;
  height: 100vh;
  width: 20vw;
  background: linear-gradient(
    to left,
    rgba(5, 46, 84, 0),
    rgba(5, 46, 84, 0.6) 30%,
    rgba(5, 46, 84, 1) 65%
  );
}

@media (min-width: 1728px) {
  #menu-wrapper {
    padding-left: 12.62%;
  }
}

@media (max-width: 1024px) {
  nav#main-nav li.menu-item a {
    line-height: 1.7 !important;
    font-size: 2rem;
  }

  #menu-wrapper {
    padding: 30vw 0 0 16.77vw;
  }

  .menu-image-container {
    display: none;
  }
  div#nav-wrapper::after {
    display: none;
  }

  #menu-wrapper ul.sub-menu {
    gap: 0;
  }

  #menu-wrapper .imp-sub-active ul.sub-menu {
    margin-bottom: calc(var(--gap-l) * 0.5);
  }
}

@media (max-width: 768px) {
  #nav-icon3 span {
    height: 2px;
  }

  nav#main-nav li.menu-item a {
    font-size: 1.25rem;
    line-height: 2.1 !important;
  }

  #menu-wrapper ul.sub-menu .menu-item a {
    line-height: 1 !important;
  }

  nav#main-nav li.menu-item.current-menu-item a {
    text-underline-offset: 5px;
  }

  a.impmenu-toggle {
    width: calc(var(--nav-icon-width) * 1.65);
    height: calc(var(--nav-icon-width) * 1.65);
  }

  #nav-icon3 {
    width: calc(var(--nav-icon-width) * 0.7);
    height: calc(var(--nav-icon-width) * 0.45);
  }

  #main-nav::after {
    height: 82vh;
  }
}

/* image container in navi */
.menu-img-container {
  position: absolute;
  right: 13.77vw;
  top: 0;
  aspect-ratio: 450/610;
  width: 26vw;
  height: 35vw;
  transform: translateY(-8%);
  pointer-events: none;
}

.menu-img-container img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
  animation: menuImgFade 0.9s ease-in-out;
}

@keyframes menuImgFade {
  from {
    opacity: 0;
    width: 0;
  }

  to {
    opacity: 1;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  #mobile-nav-contact {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .menu-col.col-menu-1 {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap-l);
  }

  .menu-hauptmenu-container {
    height: unset !important;
  }
}

#mobile-nav-contact {
  display: flex;
  gap: var(--gap-m);
}

#mobile-nav-contact a {
  display: flex;
  align-items: center;
  font-size: 0;
}

#mobile-nav-contact a::after {
  content: "";
  display: block;
  height: 28px;
  width: 30px;
  background-image: url(../../img/icon-facebook.svg);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

#mobile-nav-contact a.icon-phone::after {
  background-image: url(../../img/icon-phone.svg);
  width: 24px;
}

#mobile-nav-contact a.icon-mail::after {
  background-image: url(../../img/icon-mail.svg);
}

#mobile-nav-contact a.icon-ig::after {
  background-image: url(../../img/icon-instagram.svg);
}

#mobile-nav-contact a.icon-yt::after {
  background-image: url(../../img/icon-youtube.svg);
}

@media (max-width: 768px) {
  #mobile-nav-contact a::after {
    height: 18px;
    width: 20px;
  }

  #mobile-nav-contact a.icon-phone::after {
    width: 16px;
    height: 16px;
  }

  #menu-wrapper {
    padding: 30vw 0 0 13.33vw;
  }
}

@media (max-height: 950px) and (min-width: 1024px) {
  #menu-wrapper {
    padding-top: var(--gap-xl);
  }

  #menu-wrapper ul.sub-menu {
    gap: var(--gap-s);
  }

  .menu-img-container {
    height: 30vw;
  }
}

@media (max-height: 800px) and (min-width: 1024px) {
  #nav-wrapper #header-icons {
    bottom: 2vw;
  }

  #menu-wrapper {
    padding-top: calc(var(--gap-l) * 1.5);
  }
}

@media (max-height: 700px) and (min-width: 1024px) {
  .menu-img-container {
    display: none;
  }
  #menu-hauptmenu {
    gap: var(--gap-s);
  }

  #menu-wrapper {
    padding-top: calc(var(--gap-l) * 1.1);
  }
  #menu-wrapper ul.sub-menu {
    gap: 0;
  }
  #nav-wrapper #header-icons {
    bottom: 10px;
  }
}
