.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  z-index: 99;
}

.header__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  width: 100%;
  background-color: #ffffff;
  padding-block: 1.6rem;
  z-index: 99;
  transition: padding-block 300ms ease;
}

.header__logo-svg {
  width: 11.857rem;
}

.header__logo-svg--scrolled {
  display: none;
}

.header__actions {
  display: flex;
  gap: clamp(
    0.6rem,
    calc(0.8rem + (2.286rem - 0.8rem) * (100vw - 320px) / (400px - 320px)),
    2.286rem
  );
  align-items: center;
}

.header__main-actions {
  display: flex;
  gap: clamp(
    0.6rem,
    calc(0.6rem + (1.143rem - 0.6rem) * (100vw - 320px) / (400px - 320px)),
    1.143rem
  );
  align-items: center;
}

.header__searchbar {
  display: none;
}

.header__newsletter-button,
.header__subscription-button {
  font-family: "Bebas Neue";
  font-size: 1.429rem;
  padding: 0.571rem 1.429rem;
  border-width: 3px;
  border-style: solid;
}

.header__newsletter-button {
  color: #444444;
  border-color: #444444;
  transition:
    color 300ms ease,
    border-color 300ms ease;

  &:hover {
    color: #fcb900;
    border-color: #fcb900;
  }
}

.header__subscription-button {
  color: #ffffff;
  background: #fcb900;
  border-color: #fcb900;
  transition:
    color 300ms ease,
    background-color 300ms ease,
    border-color 300ms ease;

  &:hover {
    color: #fcb900;
    background-color: transparent;
  }
}

.header__account-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  aspect-ratio: 1/1;
  background-color: #444444;
  padding: 12px;
  border-radius: 50%;
  transition: background-color 200ms ease;

  &:hover {
    background-color: #fcb900;
  }

  img {
    width: 100%;
    aspect-ratio: 1/1;
  }
}

.header__nav {
  position: relative;
  width: 100%;
  font-family: "Bebas Neue";
  font-size: 20px;
  background-color: #f8f8f8;
  padding-block: 16px;
  z-index: 98;
}

.header--scrolled .header__nav {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.075);
}

.header__nav-list {
  display: flex;
  justify-content: center;
  gap: 32px;
  gap: clamp(
    16px,
    calc(16px + (32px - 16px) * (100vw - 320px) / (400px - 320px)),
    32px
  );
}

.header__nav-list .menu-item a {
  color: #444444;
  transition: color 200ms ease;
}

.header__nav-list .menu-item.current-menu-item a,
.header__nav-list .menu-item a:hover {
  color: var(--item-color, #fcb900);
}

/* Hide navigation for subscription and account pages */
.abonnements,
.account {
  .header--scrolled .header__content {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.075);
  }

  .header__nav {
    display: none;
  }
}

/* Header scrolled (small devices) */
@media (max-width: 669px) {
  .header--scrolled .header__content {
    flex-direction: row;
    justify-content: center;
    gap: clamp(
      0.6rem,
      calc(0.6rem + (7rem - 0.6rem) * (100vw - 320px) / (480px - 320px)),
      7rem
    );
  }

  .header__logo-svg--scrolled {
    width: 7.714rem;
  }

  .header--scrolled .header__logo-svg {
    display: none;
  }

  .header--scrolled .header__logo-svg--scrolled {
    display: block;
  }

  .header--scrolled .header__actions {
    gap: clamp(
      0.6rem,
      calc(0.6rem + (1rem - 0.6rem) * (100vw - 320px) / (400px - 320px)),
      1rem
    );
  }

  .header--scrolled .header__subscription-button {
    display: none;
  }

  /* Smartphones */
  @media (min-width: 480px) {
    .header--scrolled .header__content {
      justify-content: space-between;
      padding: 1.6rem
        clamp(
          16px,
          calc(16px + (36px - 16px) * (100vw - 500px) / (600px - 500px)),
          36px
        );
      gap: 0.6rem;
    }

    .header--scrolled .header__main-actions {
      gap: 0.6rem;
    }

    .header--scrolled .header__subscription-button {
      display: block;
    }
  }
}

/* Header for large devices */
@media (min-width: 670px) {
  .header__content {
    flex-direction: row;
    justify-content: space-between;
    padding: 1.6rem 48px;
  }

  .header--scrolled .header__content {
    padding: 16px 48px;
  }

  .header__nav {
    font-size: 22px;
  }
}

/* Tablets */
@media (min-width: 768px) {
  .header__content {
    padding: 24px 64px;
  }

  .header--scrolled .header__content {
    padding: 16px 64px;
  }

  .header--scrolled .header__nav {
    padding-block: 20px;
  }

  .header__actions {
    gap: 32px;
  }

  .header__main-actions {
    gap: 16px;
  }

  .header__logo-svg {
    width: 187px;
  }

  .header__newsletter-button,
  .header__subscription-button {
    font-size: 24px;
    padding: 0.571rem 24px;
  }

  .header__account-button {
    height: 52.969px;
    padding: 13px;
  }

  .header__nav {
    font-size: 24px;
    padding-block: 24px;
  }

  .header--scrolled .header__nav {
    padding-block: 20px;
  }

  .header__nav-list {
    gap: 40px;
  }
}

/* Laptops */
@media (min-width: 1025px) {
  .header__searchbar {
    display: block;
  }

  .header__searchbar .search {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  .header__searchbar input {
    border: none;
    border-bottom: 2px solid black;
    width: 150px;
    outline: none !important;
    padding: 0.5rem 1em 0.75rem 0.25rem;
    font-size: 16px;
  }

  .header__searchbar input::placeholder {
    color: #c4c4c4;
    font-family: "Bebas Neue";
    font-size: 17px;
    letter-spacing: 1.5px;
  }

  .header__searchbar .search-submit {
    background: none;
    border: none;
    padding: 0;
  }
  .header__searchbar .search-submit .icon-search {
    color: #000;
    font-size: 1.4rem;
  }
}

/* Desktops */
@media (min-width: 1440px) {
  .header__content {
    padding: 32px 128px;
  }

  .header--scrolled .header__content {
    padding: 16px 128px;
  }

  .header__logo-svg {
    width: 208px;
  }

  .header__actions {
    gap: 48px;
  }

  .header__searchbar input {
    width: 170px;
    font-size: 17px;
  }

  .header__searchbar input::placeholder {
    font-size: 18px;
    letter-spacing: 1.75px;
  }

  .header__searchbar .search-submit .icon-search {
    font-size: 1.5rem;
  }

  .header__nav {
    font-size: 26px;
    padding-block: 32px;
  }

  .header--scrolled .header__nav {
    padding-block: 24px;
  }

  .header__nav-list {
    gap: 64px;
  }
}
