/* 4. Header and navigation
   ========================================================================== */

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: var(--header-height);
  padding: 15px var(--page-gutter);
  background: var(--header-gradient);
  transition: height var(--transition-default);
}

.site-header.scrolled {
  height: var(--header-height-scrolled);
}

.header-brands {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 1.8rem);
  min-width: 0;
}

.brand {
  flex: 0 0 auto;
  width: 156px;
}

.brand img {
  width: 100%;
}

.header-sap-logo {
  display: block;
  flex: 0 0 auto;
  width: clamp(56.64px, 4.8vw, 72px);
  height: auto;
  transform: translateY(clamp(6px, 1.1vw, 15px));
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.3vw, 2.5rem);
}

.main-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transition:
    width 250ms ease,
    left 250ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  left: 0;
  width: 100%;
}

.menu-toggle {
  display: none;
  padding: 6px;
  border: 0;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px;
  background: var(--color-white);
}

@media (max-width: 1320px) {
  .site-header {
    height: 90px;
  }

  .brand {
    width: 130px;
  }

  .header-brands {
    gap: 14px;
  }

  .header-sap-logo {
    width: 51.84px;
  }

  .menu-toggle {
    z-index: 2;
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    width: min(320px, 82vw);
    height: 100vh;
    padding: 110px 35px 35px;
    background: rgb(60 0 0 / 96%);
    transform: translateX(100%);
    transition: transform var(--transition-default);
  }

  .site-header.menu-open .main-nav {
    transform: translateX(0);
  }
}

@media (max-width: 430px) {
  .brand {
    width: 110px;
  }

  .header-brands {
    gap: 8px;
  }

  .header-sap-logo {
    width: 40.32px;
  }
}
