.site-header {
  --header-height: 80px;
  --header-side-track: 224px;
  --header-nav-gap: 60px;
  --header-nav-gap-expanded: 74px;
  --header-nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-nav-duration: 450ms;

  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: #ffffff;
}

.site-header__shell {
  position: relative;
}

.site-header__inner {
  display: grid;
  grid-template-columns: var(--header-side-track) minmax(0, 1fr) var(--header-side-track);
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1920px;
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 80px;
}

.site-header__logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  width: var(--header-side-track);
  min-width: 0;
}

.site-header__logo-image {
  width: 180px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 180 / 56;
  object-fit: contain;
}

.site-header__menu {
  justify-self: center;
  min-width: 0;
}

.site-header__nav {
  display: grid;
  grid-template-columns: repeat(7, max-content);
  gap: var(--header-nav-gap);
  transition: gap var(--header-nav-duration) var(--header-nav-ease);
}

.site-header.is-mega-open .site-header__nav,
.site-header.is-mega-open .site-header__mega-grid {
  gap: var(--header-nav-gap-expanded);
}

.site-header__menu-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-header__nav-link {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #111111;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-header__nav-link:hover,
.site-header__nav-link:focus-visible,
.site-header.is-mega-open .site-header__menu-col:is(:hover, :focus-within) .site-header__nav-link {
  color: #005db6;
  outline: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  width: var(--header-side-track);
  flex-shrink: 0;
}

.site-header__lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.site-header__lang-link {
  color: #111111;
}

a.site-header__lang-link {
  text-decoration: none;
}

a.site-header__lang-link:hover {
  opacity: 0.75;
}

.site-header__lang-link.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header__lang-link.is-muted {
  opacity: 0.5;
}

/* Full-width mega dropdown (desktop) */
.site-header__mega {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 20;
  width: 100vw;
  margin-left: -50vw;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 280ms var(--header-nav-ease),
    visibility 280ms var(--header-nav-ease);
}

.site-header.is-mega-open .site-header__mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-header__mega-panel {
  background-color: #ffffff;
  border-top: 1px solid #e8e8e8;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.site-header__mega-inner {
  display: grid;
  grid-template-columns: var(--header-side-track) minmax(0, 1fr) var(--header-side-track);
  align-items: start;
  gap: 16px;
  max-width: 1920px;
  margin: 0 auto;
  padding: 28px 80px 36px;
}

.site-header__mega-side {
  flex-shrink: 0;
  width: var(--header-side-track);
}

.site-header__mega-grid {
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(7, max-content);
  gap: var(--header-nav-gap);
  transition: gap var(--header-nav-duration) var(--header-nav-ease);
}

.site-header__menu-col--mega {
  gap: 4px;
}

.site-header__mega-link {
  display: block;
  padding: 7px 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: #444444;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-header__mega-link:hover,
.site-header__mega-link:focus-visible {
  color: #005db6;
  outline: none;
}

.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 8px;
}

.site-header__toggle:focus-visible {
  outline: 2px solid #005db6;
  outline-offset: 2px;
}

.site-header__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #111111;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header.is-mobile-nav-open .site-header__toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.site-header.is-mobile-nav-open .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-mobile-nav-open .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-header__mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  max-height: 0;
  overflow: hidden;
  padding: 0 24px;
  background-color: #ffffff;
  border-top: 1px solid transparent;
  transition: max-height 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
}

.site-header.is-mobile-nav-open .site-header__mobile-nav {
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px 24px 24px;
  border-top-color: #e8e8e8;
}

.site-header__mobile-group {
  border-bottom: 1px solid #f0f0f0;
}

.site-header__mobile-summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #111111;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
}

.site-header__mobile-summary::-webkit-details-marker {
  display: none;
}

.site-header__mobile-summary::after {
  content: "+";
  margin-left: auto;
  font-size: 18px;
  font-weight: 400;
  color: #444444;
}

.site-header__mobile-group[open] .site-header__mobile-summary::after {
  content: "−";
}

.site-header__mobile-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 12px;
}

.site-header__mobile-sublink {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0 4px 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: #444444;
}

.site-header__mobile-sublink:hover,
.site-header__mobile-sublink:focus-visible {
  color: #005db6;
  outline: none;
}

.site-header__mobile-lang {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.site-header__lang--desktop {
  display: flex;
}

/* Desktop mega menu: 1290px and above */
@media (min-width: 1290px) {
  .site-header__toggle {
    display: none;
  }

  .site-header__mobile-nav {
    display: none !important;
  }
}

@media (min-width: 1290px) and (max-width: 1439px) {
  .site-header__inner,
  .site-header__mega-inner {
    padding-left: 48px;
    padding-right: 48px;
  }
}

/* Tablet / mobile: 1289px and below */
@media (max-width: 1289px) {
  :root {
    --header-height: 72px;
  }

  .site-header {
    --header-height: 72px;
    --header-side-track: auto;
  }

  .site-header__inner {
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
  }

  .site-header__logo {
    width: auto;
  }

  .site-header__menu,
  .site-header__mega {
    display: none;
  }

  .site-header__actions {
    width: auto;
  }

  .site-header__lang--desktop {
    display: flex;
  }

  .site-header__toggle {
    display: inline-flex;
  }

  .site-header__mobile-nav {
    display: flex;
  }

  .site-header__logo-image {
    width: 148px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    --header-height: 64px;
  }

  .site-header__inner {
    padding: 0 20px;
  }

  .site-header__logo-image {
    width: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__nav,
  .site-header__mega-grid,
  .site-header__mega,
  .site-header__toggle-bar,
  .site-header__mobile-nav {
    transition: none;
  }
}
