.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--spacing-sitepadding-block) var(--spacing-sitepadding-inline);

  ul {
    list-style: none;
  }

  a {
    text-decoration: none;
  }

  &[data-show=true] {
    .mainMenu {
      animation: slideOutRight .3s ease-out forwards;
    }

    .fullMenu {
      transform: translateX(0);
    }

    .toggleMenu {
      position: fixed;
      right: var(--spacing-sitepadding-inline);
    }

    .menuIcon {
      color: var(--color-betongGray);
    }

    .overlay {
      position: fixed;
      left: 0;
      top: 0;
      height: 100%;
      width: 100%;
      z-index: 999;

      animation: fadeOverlay .6s ease forwards;
    }

    &[data-small=true] {
      .toggleMenu {
        top: 1rem;
      }
    }
  }

  &[data-small=true] {
    .headerBar {
      transform: translateY(0);
      transition: transform .6s ease;
    }
  }

  &[data-animate=false] {
    .mainMenu {
      animation: none;
    }
  }
}

.overlay {
  position: fixed;
  background: rgba(0, 0, 0, 0);
}

.headerBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: var(--color-chateauBlue);
  color: var(--color-white);
  padding: .5rem var(--spacing-sitepadding-inline);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transform: translateY(-100%);
  transition: transform .4s ease;
}

.logo {
  font-size: 3rem;
  text-transform: uppercase;
  font-weight: 700;
}

.siteMenu {
  display: flex;
  gap: var(--spacing-gap-column);
  align-items: center;
  height: 3rem;

  a {
    font-weight: 600;
  }
}

.mainMenu {
  list-style: none;
  display: flex;
  gap: var(--spacing-gap-column);
  padding-right: 4.2rem;
  animation: slideInFromRight .3s ease-out forwards;

  a {
    font-weight: 600;
  }
}

.toggleMenu {
  position: absolute;
  right: var(--spacing-sitepadding-inline);
  z-index: 1001;
  background: none;
  margin-top: .2rem;
  width: var(--size-icon-circle);
  height: var(--size-icon-circle);
  padding: 0;
  margin: 0;
}

.menuIcon {
  display: block;
  width: var(--size-icon-circle);
  height: var(--size-icon-circle);

  svg {
    width: 100%;
    height: 100%;
  }
}

.fullMenu {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  width: 50%;
  overflow-y: auto;
  transform: translateX(100%);

  background: var(--color-menu-background);
  color: var(--color-menu-text);
  padding: var(--spacing-sitepadding-block);

  transition: transform var(--transition-easing);

  a {
    --size-icon: var(--font-size-caption);
    display: inline-block;
    padding: 0 calc(var(--size-icon) + .75rem);
    transform: translateX(calc((var(--size-icon) + .75rem) * -1));
    position: relative;
    transition: transform .3s ease;

    &:before {
      content: "";
      display: inline-block;
      vertical-align: middle;
      width: var(--size-icon);
      height: var(--size-icon);
      margin-bottom: .16rem;
      margin-right: var(--spacing-xs);
      border-radius: var(--size-icon);
      background: var(--color-goldenOrange);
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      opacity: 0;
      transition: transform .4s ease, opacity .2s ease;;
    }

    &:hover {
      transform: translateX(0);
      opacity: 1;
      &:before {
        opacity: 1;
      }
    }
  }

  ul {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.2rem;
    padding: var(--spacing-sitepadding-block) 0;
  }
}

.menuItemLarge {
  font-size: 1.6rem;
}

.divider {
  margin-top: var(--spacing-m);
}

.search {
  margin-top: var(--spacing-l);
  width: 100%;
  max-width: 16rem;
  font-size: var(--font-size-body);
  font-weight: 500;
  color: var(--color-deepBrick);
  position: relative;

  input {
    width: 100%;
    padding-right: 2rem;
  }
}

.searchIcon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 1200px) {
  .mainMenu {
    display: none;
  }
}

@media (max-width: 800px) {
  .fullMenu {
    width: 100%;
  }
}

@keyframes slideDown {
  to {
    transform: translateY(0);
  }
}

@keyframes slideUp {
  to {
    transform: translateY(-100%);
  }
}

@keyframes slideOutRight {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }

  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOverlay {
  to {
    background: rgba(0, 0, 0, 0.3);
  }
}

// observer to trigger small menu
.observer {
  position: absolute;
  top: 8rem;
}

@media (max-width: 800px) {
  .logo {
    font-size: 1rem;
  }
}
