/* Hauptheader */
.main-header {
  background: linear-gradient(to bottom, 
    hsla(var(--foreground-01-values), 0.7), 
    hsla(var(--foreground-01-values), 0.4) 30%, 
    hsla(var(--foreground-01-values), 0.1) 80%,
    transparent);
  width: 100%;
  margin: 0 auto;
  z-index: 1000;
  transition: all 0.3s ease;
  padding-bottom: 2rem;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  color: var(--accent-contrast);
}

.mta-theme-1 .main-header {
  background: var(--background-05);
  color: var(--foreground);
  position: sticky;
  top: 0;
  padding-bottom: 0;
}

.admin-bar .main-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .main-header {
    top: 46px;
  }
}

.logo-wrap {
  /* padding: 0 0 1.25rem 0; */
  position: relative;
}

.logo-wrap a {
  display: block;
  position: relative;
  z-index: 25;
}

.logo-wrap img {
  transition: all 0.3s ease;
  display: block;
}

.logo-wrap .logo-contrast {
  display: none;
}

.header-inner-wrap {
  width: 100%;
  max-width: var(--inner-header-width);
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  margin: 0 auto;
  padding: 1.25rem;
  gap: 1rem;
}

.menu-wrap {
  position: relative;
  margin-left: auto;
  padding-left: 1rem;
}

.main-menu {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  z-index: 10;
}


/* Logo-Größen */
.main-header .logo-wrap.logo-small img {
  /* width: 100px; */
  max-width: 140px;
  max-height: 60px;
}

.main-header .logo-wrap.logo-medium img {
  /* width: 120px; */
  max-width: 200px;
  max-height: 80px;
}

.main-header .logo-wrap.logo-large img {
  /* width: 140px; */
  max-width: 260px;
  max-height: 100px;
}

/* Navigation im Header */

.main-header nav a:not(.btn) {
  color: currentColor;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: transparent;
  text-underline-offset: 0.6rem;
}

.main-header a.brand-name {
  /* text-transform: uppercase; */
  color: currentColor;
  text-decoration: none;
  font-size: var(--headline-xs);
  font-weight: var(--font-weight-heading);
}

.main-header a.brand-name:hover {
  color: var(--foreground-01);


}

.mta-theme-1 .main-header nav a:not(.btn), .mta-theme-1 .main-header a.brand-name {
  color: var(--foreground-01);
}


.main-header nav.main-menu .menu-item.current-menu-item a,
.main-header nav a:not(.btn):hover,
.main-header nav a:not(.btn):focus {
  /* color: var(--accent-01); */

  text-decoration-color: var(--accent-01);
}

/* MOBILES MENU */

.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2.3333rem;
  height: 1.3333rem;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: auto;
  color: currentColor;
}

.hamburger-icon {
  width: 100%;
  height: 0.25rem;
  background-color: currentColor;
  border-radius: 0.2222rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-items {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}

.menu-wrap.active .menu-items .menu-item:not(.btn) {
  color: var(--foreground-01);
}

.menu-wrap .mobile-legal-container {
  display: none;
}

/* Mobile Ansicht */
@media (max-width: 1120px) {
  /* Logos für mittlere Bildschirme */
  .main-header .logo-wrap.logo-small img {
    /* width: 60px; */
    max-width: 120px;
    max-height: 60px;
  }
  
  .main-header .logo-wrap.logo-medium img {
    /* width: 70px; */
    max-width: 160px;
    max-height: 70px;
  }
  
  .main-header .logo-wrap.logo-large img {
    /* width: 80px; */
    max-width: 200px;
    max-height: 80px;
  }
}

@media (max-width: 992px) {

  .main-header {
    background: var(--background-05);
    position: sticky;
    top: 0;
    padding-bottom: 0;
  }

  .main-header a.brand-name {
    color: currentColor;
  }

  .header-inner-wrap {
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    flex-wrap: nowrap;
  }

  .logo-wrap {
    padding: 0;
    /* position: absolute; */
  }

  /* Logos für mittlere Bildschirme */
  .main-header .logo-wrap.logo-small img {
    /* width: 50px; */
    max-height: 50px;
  }
  
  .main-header .logo-wrap.logo-medium img {
    /* width: 60px; */
    max-height: 60px;
  }
  
  .main-header .logo-wrap.logo-large img {
    /* width: 70px; */
    max-height: 70px;
  }

  .menu-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: absolute;
    right: 0;
    top:0;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    z-index: -1;
    padding: 1.25rem 0;
    padding-top: var(--headerHeight, 4rem);
    opacity: 0;
    width: 50vw;
    /* background-color: hsla(var(--background-05-values), 0.3);
    backdrop-filter: blur(10px); */
  }
  .menu-wrap.active {
    opacity: 1;
  }
  
  .menu-wrap .main-menu-inner-wrap {
    width: 100%;
    padding: 2rem;
    background: var(--background-05);
    border-radius: var(--border-radius-m);
  }
  .mta-theme-1 .main-menu-inner-wrap {
    border: 1px solid hsla(var(--foreground-01-values), 0.25);
  }
  .menu-wrap .mobile-legal-container {
    display: block;
  }
  
  .menu-wrap .mobile-legal-container .mobile-legal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
  }
  .menu-wrap .mobile-legal-container .mobile-legal a {
    color: hsla(var(--foreground-01-values), 0.5);
  }

  .main-menu,
  .head-menu {
    position: relative;
  }

  #menu-main-menu {
    margin-bottom: 1rem;
  }

  .main-menu {
    flex-direction: column;
    align-items: flex-start;
    right: 1rem;
  }
  .hamburger-menu {
    display: flex;
  }

  .menu-wrap.active {
    transform: translateY(0);
    margin-top: 2rem;
  }

  .menu-items {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .main-header nav ul li,
  .main-header nav.head-menu ul li {
    margin: 0.375rem 1.5rem;
  }

  .hamburger-menu.active .hamburger-icon:nth-child(1) {
    transform: rotate(45deg);
    position: relative;
    top: 0.6rem;
  }

  .hamburger-menu.active .hamburger-icon:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .hamburger-icon:nth-child(3) {
    transform: rotate(-45deg);
    position: relative;
    top: -0.2rem;
  }
}

@media (max-width: 768px) {
  .main-menu {
    right: 0;
  }
  .menu-wrap {
    width: 100%;
    padding: 1.25rem;
    padding-top: var(--headerHeight, 2.5rem);

  }
  .menu-wrap.active {
    margin-top: 2.5rem;
    margin-top: 0;
    right: 0;
    left: 0;
    height: 100vh;
    overflow-y: hidden;
  }
  .menu-wrap.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: hsla(var(--background-05-values), 0.3);
    backdrop-filter: blur(6px);
  }
}