/* Der Selector wird nur benötigt um die Spezifität an die von global.css und webform.css anzupassen.
  Da der Header im Backend ohnehin nicht angezeigt wird, muss hier auch kein :not:has eingebaut werden. */
div.layout-container {
  header,
  header > div {
    min-height: 95px;
  }

  header > div {
    max-width: var(--wide-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    align-content: center;
    column-gap: 140px;
    position: relative;
  }

  header nav {
    font-weight: var(--font-weight-bold);
    font-size: clamp(30px, 7rem, 100px);
    line-height: 1.2;

    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    z-index: 1000;

    display: none;
  }

  header nav[data-is-open] {
    display: block;
  }

  header nav > ul {
    list-style-type: none;
    width: var(--wide-width);
    margin: 80px var(--content-margin);
    padding: 0;
    display: flex;
    flex-direction: column;
    row-gap: .6em;
  }

  header li > a[href] {
    color: inherit;
    text-decoration: none;
    text-transform: uppercase;
  }

  header li > a[href] + .underline {
    display: none;
    border: var(--color-yellow) 2px solid;
    border-radius: 20px;
  }

  header li > a[href].is-active + .underline,
  header li > a[href]:hover + .underline {
    display: block;
  }

  #menu-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: transparent;
    border: none;
    z-index: 1001;
  }

  #menu-toggle > div {
    height: 8px;
    border-radius: 4px;
    transition: transform 500ms, opacity 500ms;
  }

  #menu-toggle > div:nth-child(1) {
    background-color: var(--color-text-primary);
    width: 40px;
  }

  #menu-toggle > div:nth-child(2) {
    background-color: var(--color-text-primary);
    width: 40px;
    margin: 6px 0;
    opacity: 1;
  }

  #menu-toggle > div:nth-child(3) {
    background-color: var(--color-text-primary);
    width: 40px;
  }

  #menu-toggle[data-is-open] > div:nth-child(1) {
    transform: translateY(14px) rotateZ(45deg);
  }

  #menu-toggle[data-is-open] > div:nth-child(2) {
    opacity: 0;
  }

  #menu-toggle[data-is-open] > div:nth-child(3) {
    transform: translateY(-14px) rotateZ(-45deg);
  }

  @media (min-width: 769px) {
    header nav {
      font-weight: var(--font-weight-bold);
      font-size: 16px;
      line-height: 1.2;

      position: unset;
      width: unset;
      height: unset;
      background-color: unset;
      z-index: unset;

      display: block;
    }

    header nav > ul {
      width: unset;
      margin: 0;
      padding: 0;
      flex-direction: row;
      column-gap: 80px;
    }

    #menu-toggle {
      display: none;
    }
  }
}
