/* Scroll up to reveal both rows; scroll down to tuck away the utility row. */
:root {
  --site-header-height: 118px;
  --site-utility-height: 34px;
}

html {
  scroll-padding-top: calc(var(--site-header-height) + 16px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  transition: top 220ms ease;
}

.site-header.is-collapsed {
  top: calc(-1 * var(--site-utility-height));
}

.site-header.menu-open,
.site-header.has-utility-focus {
  top: 0;
}

.site-header.has-utility-focus {
  transition: none;
}

/* Larger navigation labels and clear, softly rounded selection states. */
.utility-bar {
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .015em;
}

.utility-bar > .container {
  min-height: 34px;
}

.utility-bar > .container > span {
  font-size: 13px;
  color: #b8c9de;
}

.utility-bar > .container > div {
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.utility-bar > .container > div::-webkit-scrollbar {
  display: none;
}

.utility-bar a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease;
}

.utility-bar a:hover,
.utility-bar a:focus-visible,
.utility-bar a:active {
  color: #fff;
  background: #233e65;
}

.utility-bar a:focus-visible {
  outline-offset: -2px;
}

.header-inner,
html[lang=en] .header-inner {
  min-height: 84px;
  gap: 24px;
}

.site-header .brand {
  width: 168px;
}

.site-header .brand img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.site-header nav,
html[lang=en] .site-header nav {
  gap: 8px;
}

.site-header nav a,
html[lang=en] .site-header nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 6px;
  color: #f0f5ff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .015em;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.site-header nav a::after,
.site-header nav a:hover::after,
.site-header nav a:focus-visible::after,
.site-header nav a[aria-current]::after {
  display: none;
  content: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible,
.site-header nav a[aria-current] {
  color: #fff;
  background: #2b5cba;
  text-decoration: none;
}

.site-header nav a:active {
  color: #fff;
  background: #3970cf;
}

.site-header nav a:focus-visible {
  outline: 2px solid #b9d4ff;
  outline-offset: 2px;
}

.header-actions {
  gap: 18px;
  flex-shrink: 0;
}

.language {
  font-size: 14px;
}

.header-contact,
html[lang=en] .header-contact {
  gap: 18px;
  padding-inline: 15px;
  font-size: 14px;
}

@media (min-width: 1180px) and (max-width: 1439px) {
  .header-inner,
  html[lang=en] .header-inner {
    gap: 20px;
  }

  .site-header nav,
  html[lang=en] .site-header nav {
    gap: 6px;
  }

  .site-header nav a,
  html[lang=en] .site-header nav a {
    padding-inline: 12px;
    font-size: 17px;
  }
}

/* Keep the existing JS menu breakpoint at 961px while fitting English labels. */
@media (min-width: 961px) and (max-width: 1179px) {
  .header-inner,
  html[lang=en] .header-inner {
    width: calc(100% - 64px);
    gap: 14px;
  }

  .site-header .brand {
    width: 138px;
  }

  .site-header nav,
  html[lang=en] .site-header nav {
    gap: 4px;
  }

  .site-header nav a,
  html[lang=en] .site-header nav a {
    padding-inline: 9px;
    font-size: 16px;
    letter-spacing: 0;
  }

  .header-actions {
    gap: 12px;
  }

  .language {
    font-size: 13px;
  }

  .header-contact,
  html[lang=en] .header-contact {
    padding-inline: 12px;
    gap: 10px;
    letter-spacing: 0;
    font-size: 12px;
  }
}

@media (max-width: 960px) {
  :root {
    --site-header-height: 108px;
    --site-utility-height: 34px;
  }

  .header-inner,
  html[lang=en] .header-inner {
    min-height: 74px;
    gap: 20px;
  }

  .site-header .brand {
    width: 150px;
  }

  .utility-bar > .container > div {
    gap: 10px;
  }

  .site-header nav,
  html[lang=en] .site-header nav {
    top: 100%;
    gap: 8px;
    padding: 14px 30px 20px;
    max-height: calc(100svh - var(--site-header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-header nav a,
  html[lang=en] .site-header nav a {
    justify-content: flex-start;
    min-height: 52px;
    padding: 13px 16px;
    font-size: 17px;
  }

  .header-actions {
    gap: 20px;
  }
}

@media (max-width: 700px) {
  :root {
    --site-header-height: 102px;
    --site-utility-height: 34px;
  }

  .header-inner,
  html[lang=en] .header-inner {
    min-height: 68px;
    gap: 14px;
  }

  .site-header .brand {
    width: 138px;
  }

  .site-header nav,
  html[lang=en] .site-header nav {
    padding-inline: 20px;
  }

  .header-actions {
    gap: 18px;
  }

  .language {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}
