.header {
  padding-top: 0.5rem;
  position: fixed;
  top: 0;
  z-index: 9999;
  inset-inline: 0;
}

.header__outer {
  overflow: hidden;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  corner-shape: squircle;
  background: white;
  box-shadow: 0 0 48px rgb(0 0 0 / 8%);
}

body.popup-open .header__outer {
  border-color: transparent !important;
}

.header__inner {
  background-color: transparent;
  padding-block: 0.375rem;
  padding-inline: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 400ms;
}

.header__logo {
  line-height: 1;
}

.header__actions {
  display: flex;
  gap: 0.25rem;
}

.header__actions .menu {
  padding-block: 0;
  background-color: #272727 !important;
}

.header__sections,
.header__nav,
.header__country {
  display: none;
}

.desktop-logo {
  display: none;
}

.menu__text {
  display: none;
}

.desktop-logo {
  background-color: #f6f6f6;
  border-radius: 24px;
  corner-shape: squircle;
  padding-inline: 1.125rem;
}

@media (min-width: 1024px) {
  .header {
    padding-top: 0.75rem;
  }

  .mobile-logo {
    display: none;
  }

  .desktop-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 100%;
    padding-inline: 0;
    border-radius: 16px;
  }

  .menu__text {
    display: inline;
  }

  .header__actions {
    align-items: center;
    gap: clamp(0.5rem, 1.25vw, 1rem);
    flex: 1;
  }

  .header__sections,
  .header__nav,
  .header__country {
    display: flex;
    align-items: center;
  }

  .header__sections {
    order: 2;
    height: 100%;
    background-color: #f6f6f6;
    border-radius: 24px;
    corner-shape: squircle;
  }

  .header__sections a {
    display: flex;
    align-items: center;
    height: 1.5rem;
    padding-inline: clamp(0.5rem, 1.25vw, 1rem);
    font-weight: 600;
    line-height: 1.125;
    white-space: nowrap;
  }

  .header__sections a + a,
  .header__nav a {
    border-left: 1px solid #e6e6e6;
  }

  .header__nav {
    order: 3;
    justify-content: start;
    height: 100%;
    flex: 1;
  }

  .header__nav a {
    display: flex;
    align-items: center;
    height: 1rem;
    padding-inline: clamp(0.5rem, 1.25vw, 1rem);
    line-height: 1;
    white-space: nowrap;
  }

  .header__country {
    order: 4;
    height: 100%;
    gap: 0.75rem;
    border: 0;
    background-color: #f6f6f6;
    color: #272727;
    border-radius: 24px;
    corner-shape: squircle;
    padding: 0.25rem;
    padding-left: clamp(0.25rem, 1vw, 1.25rem);
    font-weight: 600;
    cursor: pointer;
  }

  .header__flag {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background-color: #00a8c6;
    font-size: 30px;
    line-height: 1;
  }

  .header__actions > .button {
    order: 5;
    height: 100%;
    padding-inline: 1.125rem;
  }

  .header__actions .menu {
    order: 1;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    height: 100%;
    background-color: transparent !important;
    color: #272727;
    padding: 0;
    margin-inline: 0.5rem 1rem;
  }

  .header__actions .menu svg path {
    fill: #272727;
  }

  .header__inner {
    min-height: 4.5rem;
    gap: 0;
    padding: 0.5rem;
    align-items: stretch;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .header__outer {
    overflow: hidden;
    border: 1px solid #e6e6e6;
    border-radius: 24px;
    background: white;
    box-shadow: 0 0 48px rgb(0 0 0 / 8%);
  }
}

.header.dark .header__inner {
  background-color: transparent;
}

.header.dark .header__outer {
  border-color: #272727;
  background: #191919;
  box-shadow: 0 0 48px rgba(92, 92, 92, 0.122);
}

.header.dark .mobile-logo svg path[fill="#272727"] {
  fill: white;
}

.header.dark a,
.header.dark .header__country,
.header.dark .header__actions .menu {
  color: white;
}

.header.dark .desktop-logo,
.header.dark .header__sections,
.header.dark .header__country {
  background-color: #272727;
}

.header.dark .header__sections a + a,
.header.dark .header__nav a {
  border-color: #3a3a3a;
}

@media (min-width: 1024px) {
  .header.dark .header__inner {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .header.dark .header__outer {
    border-color: #272727;
    background: #191919;
  }
}

/* Shared navigation geometry on every page. */
.header .layout {
  max-width: 1284px;
}
.header__nav a {
  font-weight: 400;
}
