/* Header + Hero ------------------------------------------------------------- */


/* Header -------------------------------------------------------------------- */

.headerWrapper {
  width: 100%;
  background-color: var(--color-primary);
}

.headerInner {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;
  max-width: 1200px;
  height: 60px;

  margin-inline: auto;
  padding: 10px 24px;
}


/* Mobile Navigation --------------------------------------------------------- */

.menuToggle {
  position: fixed;
  top: 65%;
  right: 0;
  z-index: 1001;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;

  width: 56px;
  height: 52px;

  padding: 0 14px;

  border: 0;
  border-left: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px 0 0 8px;

  background-color:
    color-mix(
      in srgb,
      var(--color-primary) 86%,
      black
    );

  box-shadow:
    -4px 0 12px rgb(0 0 0 / 24%);

  cursor: pointer;
}

.menuToggleLine {
  display: block;

  width: 100%;
  height: 2px;

  background-color: white;

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}


/* Hamburger wird bei geöffnetem Menü zum X */

.menuToggle[aria-expanded="true"] .menuToggleLine:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menuToggle[aria-expanded="true"] .menuToggleLine:nth-child(2) {
  opacity: 0;
}

.menuToggle[aria-expanded="true"] .menuToggleLine:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* Off-Canvas Navigation ----------------------------------------------------- */

.headerNavigation {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;

  width: min(320px, 85vw);
  height: 100dvh;

  padding: 80px 24px 24px;

  background-color: var(--color-primary);

  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.headerNavigation.is-open {
  transform: translateX(0);
}


/* Hauptmenü ---------------------------------------------------------------- */

.headerNavigation > ul {
  display: flex;
  flex-direction: column;
  gap: 0;

  margin: 0;
  padding: 0;

  list-style: none;
}

.headerNavigation > ul > li {
  position: relative;
}


/*
 * Trennlinie bewusst kürzer:
 * rechts bleibt Platz für den Hamburger.
 */
.headerNavigation > ul > li::after {
  content: "";

  position: absolute;
  left: 0;
  right: 56px;
  bottom: 0;

  height: 1px;

  background-color: rgb(255 255 255 / 20%);
}

.headerNavigation > ul > li > a {
  display: block;

  padding: 16px 56px 16px 0;

  color: white;
  text-decoration: none;

  font-size: 1.1rem;
  font-weight: 600;
}


/* Mobile Untermenüs --------------------------------------------------------- */

.headerNavigation .sub-menu {
  display: none;

  margin: 0;
  padding: 0 56px 8px 16px;

  list-style: none;
}

.headerNavigation .sub-menu.is-open {
  display: block;
}

.headerNavigation .sub-menu li {
  border-bottom: 0;
}

.headerNavigation .sub-menu a {
  display: block;

  padding: 11px 0;

  color: rgb(255 255 255 / 85%);
  text-decoration: none;

  font-size: 1rem;
  font-weight: 400;
}

.headerNavigation .sub-menu a:hover,
.headerNavigation .sub-menu a:focus-visible {
  color: white;
}


/* Mobile Indikator für aufklappbare Menüpunkte ----------------------------- */

.headerNavigation > ul > .menu-item-has-children > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.headerNavigation > ul > .menu-item-has-children > a::after {
  content: "";

  width: 8px;
  height: 8px;

  flex-shrink: 0;

  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;

  transform: rotate(45deg);

  transition: transform 0.2s ease;
}

.headerNavigation
  > ul
  > .menu-item-has-children
  > a[aria-expanded="true"]::after {
  transform: rotate(225deg);
}


/* Overlay ------------------------------------------------------------------- */

.menuOverlay {
  position: fixed;
  inset: 0;
  z-index: 999;

  background-color: rgb(0 0 0 / 45%);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.menuOverlay.is-open {
  opacity: 1;
  visibility: visible;
}


/* Branding ------------------------------------------------------------------ */

.headerLogo .custom-logo-link {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 1;

  width: 100px;

  transform: translate(-50%, 50%);
}

.headerLogo .custom-logo-link .custom-logo {
  width: 100px;
  height: auto;
}

.headerBranding {
  margin-left: 20px;
}

.headerTitle,
.headerSubtitle {
  display: none;
}

.headerTitle a {
  color: inherit;
  text-decoration: none;
}

.headerTitle a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}


/* Hero ---------------------------------------------------------------------- */

#heroWrapperImg {
  position: relative;

  height: 450px;
}

.heroImage {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: 65% 50%;
}

.heroImgSlogan {
  position: absolute;
  top: 30%;
  left: 50%;

  font-family: "Bangers", system-ui;
  font-size: 36px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.08em;

  transform: translate(-50%, -50%) rotate(-6deg);
}

.heroCta {
  position: absolute;
  top: 62%;
  left: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 24px;

  border-radius: 999px;

  background-color: var(--color-primary);

  color: white;
  text-decoration: none;
  font-weight: 600;

  transform: translateX(-50%);
}

.heroNext {
  display: none;
}


/* Social Media -------------------------------------------------------------- */

.heroSocial {
  position: absolute;
  top: 55%;
  right: 0;
  z-index: 2;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.heroSocialLink {
  display: flex;
  align-items: center;

  width: 56px;
  height: 52px;

  padding-left: 16px;

  overflow: hidden;

  border-radius: 8px 0 0 8px;

  color: white;
  text-decoration: none;

  box-shadow: 0 3px 12px rgb(0 0 0 / 25%);

  transition: width 0.25s ease;
}

.heroSocialLink--facebook {
  background-color: #0866ff;
}

.heroSocialLink--instagram {
  background:
    linear-gradient(
      135deg,
      #833ab4,
      #c13584 55%,
      #e1306c
    );
}

.heroSocialIcon {
  flex: 0 0 24px;

  width: 24px;
  height: 24px;
}

.heroSocialLabel {
  margin-left: 14px;

  white-space: nowrap;

  font-size: 14px;
  font-weight: 600;

  opacity: 0;

  transition: opacity 0.2s ease;
}

.heroSocialLink:focus-visible {
  width: 160px;

  outline: 3px solid white;
  outline-offset: 3px;
}

.heroSocialLink:focus-visible .heroSocialLabel {
  opacity: 1;
}


/* Geräte mit Hover ---------------------------------------------------------- */

@media (hover: hover) {

  .heroSocialLink:hover {
    width: 160px;
  }

  .heroSocialLink:hover .heroSocialLabel {
    opacity: 1;
  }

  .heroCta:hover {
    filter: brightness(0.92);
  }
}


/* Reduzierte Animationen ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  .menuToggleLine,
  .headerNavigation,
  .headerNavigation > ul > .menu-item-has-children > a::after,
  .menuOverlay,
  .heroSocialLink,
  .heroSocialLabel {
    transition: none;
  }
}


/* Desktop ------------------------------------------------------------------- */

@media (min-width: 992px) {

  /* Header */

  .headerInner {
    flex-direction: row;

    height: 120px;

    padding-inline: 24px;
  }


  /* Branding */

  .headerLogo .custom-logo-link {
    position: relative;

    left: auto;

    width: 100px;

    transform: none;
  }

  .headerTitle {
    display: block;

    font-size: 2.5rem;
    font-weight: 700;
  }

  .headerSubtitle {
    display: block;

    color: white;

    font-size: 0.9rem;
    font-weight: 500;
  }


  /* Mobile Elemente ausblenden */

  .menuToggle,
  .menuOverlay {
    display: none;
  }


  /* Desktop Navigation */

  .headerNavigation {
    position: static;

    display: block;

    width: auto;
    height: auto;

    margin-left: auto;
    padding: 0;

    background-color: transparent;

    transform: none;
    transition: none;
  }

  .headerNavigation > ul {
    flex-direction: row;
    gap: 32px;
  }

  .headerNavigation > ul > li {
    border-bottom: 0;
  }


  /* Mobile-Trennlinie auf Desktop deaktivieren */

  .headerNavigation > ul > li::after {
    display: none;
  }

  .headerNavigation > ul > li > a {
    position: relative;

    display: block;

    padding: 8px 0;

    color: white;
    text-decoration: none;

    font-size: inherit;
    font-weight: 600;
    letter-spacing: 0.01em;

    background-image:
      linear-gradient(white, white);

    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 0 2px;

    transition: background-size 0.25s ease;
  }

  .headerNavigation > ul > li:hover > a,
  .headerNavigation > ul > li:focus-within > a {
    background-size: 100% 2px;
  }

  .headerNavigation > ul > li > a.active,
  .headerNavigation > ul > :is(.current-menu-item, .current-menu-parent, .current-menu-ancestor) > a {
    background-size: 100% 2px;
  }

  .headerNavigation > ul:hover > li:not(:hover):not(:focus-within) > a.active,
  .headerNavigation > ul:hover > :is(.current-menu-item, .current-menu-parent, .current-menu-ancestor):not(:hover):not(:focus-within) > a {
    background-size: 0 2px;
  }


  /* Mobilen Pfeil auf Desktop deaktivieren */

  .headerNavigation > ul > .menu-item-has-children > a::after {
    display: none;
  }


  /* Hauptpunkte mit Untermenü */

  .headerNavigation > ul > .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }


  /* Desktop Dropdown-Pfeil */

  .headerNavigation > ul > .menu-item-has-children > a::before {
    content: "";

    order: 2;

    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;

    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
  }

  .headerNavigation > ul > .menu-item-has-children:hover > a::before,
  .headerNavigation > ul > .menu-item-has-children:focus-within > a::before {
    transform: translateY(2px) rotate(225deg);
  }


  /* Desktop Untermenü */

  .headerNavigation .sub-menu {
    position: absolute;
    top: 100%;
    left: -16px;
    z-index: 10;

    display: none;

    min-width: 190px;

    margin: 0;
    padding: 8px 0;

    background-color: var(--color-primary);

    box-shadow: 0 6px 12px rgb(0 0 0 / 18%);
  }

  .headerNavigation .menu-item-has-children:hover > .sub-menu,
  .headerNavigation .menu-item-has-children:focus-within > .sub-menu {
    display: block;
  }

  .headerNavigation .sub-menu li {
    width: 100%;
  }

  .headerNavigation .sub-menu a {
    display: block;

    padding: 8px 16px;

    color: white;

    white-space: nowrap;

    font-size: inherit;
    font-weight: 600;
  }

  .headerNavigation .sub-menu a:hover,
  .headerNavigation .sub-menu a:focus-visible {
    background-color: rgb(0 0 0 / 12%);
  }


  /* Hero */

  #heroWrapperImg {
    height: 700px;
  }

  .heroImgSlogan {
    font-size: 56px;
  }

  .heroContent {
    position: absolute;

    inset: 0;

    width: 100%;
    max-width: 1200px;

    margin-inline: auto;
    padding-inline: 24px;
  }

  .heroCta {
    top: 62%;

    padding: 14px 30px;

    font-size: 1rem;
  }

  .heroSocial {
    top: 50%;
  }


  /* Als-Nächstes-Element */

  .heroNext {
    position: absolute;
    right: 40px;
    bottom: 30px;

    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 14px 18px;

    border-radius: 10px;

    background-color: rgb(0 0 0 / 18%);

    color: white;
    text-align: right;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    box-shadow: 0 4px 18px rgb(0 0 0 / 15%);
  }

  .heroNextLabel {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
  }

  .heroNextTitle {
    font-size: 1.1rem;
  }

  .heroNextEvent,
  .heroNextDate {
    font-size: 0.9rem;
  }
}

@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
  .headerNavigation > ul > li > a,
  .headerNavigation > ul > .menu-item-has-children > a::before {
    transition: none;
  }
}
