
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  background: linear-gradient(
    0deg,
    rgba(40, 19, 82, 0) 10%,
    #281352
  );
}

.header-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 40px clamp(16px, 3vw, 64px) 16px;
}

.menu-toggle {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  background: none;
  border: none;
  color: var(--yellow);
  cursor: pointer;
}

.menu-toggle svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.header-nav {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(70px, 6vw, 110px) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 36px);
  align-items: center;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 24px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.header-left {
  grid-column: 1;
  justify-content: flex-end;
  margin-left: 0;
}

.header-logo {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: none;
}

.header-logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.header-right {
  grid-column: 3;
  justify-content: flex-start;
}

.header-nav a {
  font-family: 'MohaveVariable', sans-serif;
  font-size: clamp(10px, 1.1vw, 20px);
  font-weight: 600;
  letter-spacing: -0.05ch;
  color: #e7eaff;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-left a,
.header-right a {
  display: inline-block;
  border: 0.1em solid currentColor;
  border-radius: 3em;
  padding: 0.5em 1em 0.45em;
  line-height: 1.1;
}

.header-left > li > a {
  padding-left: 0.8em;
  padding-right: 0.8em;
}

@media (max-width: 900px) {
  .header-layout {
    padding: 32px 16px 16px;
  }

  .header-left,
  .header-right {
    display: none;
  }

  .header-nav {
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
  }
}


/* Aufklappbares Hauptmenü */

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  grid-template-columns: 38% 62%;
  height: 100vh;
  overflow: hidden;
}

.mobile-menu.is-open {
  display: grid;
}

/* Violetter Bereich mit eigenem Scrollbalken */

.mobile-menu-panel {
  position: relative;
  z-index: 2;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #281352;
  padding: 64px 128px;
}

/* Menü schließen */

.menu-close {
  display: block;
  padding: 0;
  margin: 0 0 32px;
  background: transparent;
  border: none;
  color: #ecff67;
  cursor: pointer;
}

.menu-close svg {
  display: block;
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Menüeinträge */

.mobile-menu-links {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.mobile-menu-links > li {
  width: 100%;
  border-bottom: 2px solid #9182f0;
}

.mobile-menu-links a,
.mobile-menu-gruppentitel {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  color: #9182f0;
  font-family: 'MohaveVariable', sans-serif;
  font-size: 3vw;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
}

.mobile-menu-unterlinks {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 20px;
}

.mobile-menu-unterlinks a {
  font-size: 2.25vw;
  overflow-wrap: anywhere;
}

.mobile-menu-links a span {
  color: #ecff67;
  font-family: Arial, sans-serif;
  font-size: 1.2em;
  font-weight: bold;
  margin-left: auto;
}

/* Schwarze Abdunklung rechts */

.mobile-menu-overlay {
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

@media (max-width: 900px) {
  .mobile-menu {
    grid-template-columns: 1fr;
  }

  .mobile-menu-panel {
    padding: 32px;
  }

  .mobile-menu-overlay {
    display: none;
  }

  .mobile-menu-links a,
  .mobile-menu-gruppentitel {
    font-size: 36px;
  }

  .mobile-menu-unterlinks a {
    font-size: 27px;
  }
}

/* Social Media im Hamburger-Menü */

.mobile-menu-social {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding: 0;
  color: #9182f0;
}

.mobile-menu-social a {
  display: block;
  color: inherit;
}

.mobile-menu-social img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) saturate(100%) invert(58%)
          sepia(24%) saturate(1394%) hue-rotate(209deg)
          brightness(101%) contrast(89%);
}

/* Hamburger-Menü auf Desktop ausblenden */
@media (min-width: 901px) {
  .menu-toggle {
    display: none;
  }
}

/* Desktop-Dropdowns der Hauptnavigation */
@media (min-width: 901px) {

  .header-left > li {
    position: relative;
  }

  .header-dropdown,
  .header-submenu {
    display: none;
    position: absolute;
    z-index: 200;
    min-width: max-content;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: rgba(40, 19, 82, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
  }

  /* Erste Menüebene unter dem Hauptmenü */
  .header-dropdown {
    top: 100%;
    left: 0;
  }

  .header-left > li:hover > .header-dropdown,
  .header-left > li:focus-within > .header-dropdown {
    display: block;
  }

  /* Untermenüs rechts daneben */
  .header-dropdown > .has-submenu {
    position: relative;
  }

  .header-submenu {
    top: 0;
    left: 100%;
    max-height: 80vh;
    overflow-y: auto;
  }

  .header-dropdown > .has-submenu:hover > .header-submenu,
  .header-dropdown > .has-submenu:focus-within > .header-submenu {
    display: block;
  }

  /* Einheitliche Links */
  .header-left .header-dropdown a,
  .header-left .header-submenu a {
    display: block;
    border: none;
    border-radius: 0;
    padding: 8px 16px;
    font-size: 22px;
    line-height: 1.2;
  }

  .header-left .header-dropdown a:hover,
  .header-left .header-dropdown a:focus-visible,
  .header-left .header-submenu a:hover,
  .header-left .header-submenu a:focus-visible {
    background: rgba(145, 130, 240, 0.25);
  }

  /* Pfeil für Menüpunkte mit Untermenü */
  .header-dropdown > .has-submenu > a::after {
    content: "›";
    display: inline-block;
    margin-left: 20px;
    float: right;
  }

}
