#common-header {
  min-height: 84px;
  background: #033f97;
}

.site-header {
  position: relative;
  z-index: 30;
  background: linear-gradient(90deg, #033f97 62%, #002665 100%);
  color: #fff;
}

body.has-header-wave .site-header {
  background: url("../images/header-wave.png") center bottom / 100% auto no-repeat,
    linear-gradient(90deg, #033f97 62%, #002665 100%);
}

.site-header__inner {
  width: 100%;
  min-height: 84px;
  margin: 0;
  padding: 0 4.6vw 0 7.4vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.logo img {
  display: block;
  width: auto;
  height: 48px;
}

.site-header__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
  justify-content: center;
  padding: 0;
}

/* Non-home: stay bottom-aligned like home, but lift slightly off the flat edge. */
.site-header--plain .site-header__right {
  padding-bottom: 5px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 200px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  color: #9aa3ad;
}

.search__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: #333;
  font-size: 13px;
}

.search input:focus {
  outline: none;
}

.search input::placeholder {
  color: #b0b6be;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav__item {
  position: relative;
}

.nav__link {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2px 6px 6px;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav__link::before {
  content: attr(data-text);
  height: 0;
  overflow: hidden;
  font-weight: 700;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 6px;
  background-image: url("../images/nav-tab-liane.svg");
  background-repeat: repeat-x;
  background-position: left center;
  background-size: 1px 6px;
  opacity: 0;
  pointer-events: none;
}

.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__item:hover > .nav__link::after,
.nav__item:focus-within > .nav__link::after,
.nav__link[aria-current="page"]::after {
  opacity: 1;
}

.nav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 5;
  min-width: 188px;
  margin: 0;
  padding: calc(var(--sub-shift, calc(6px + 100vw * 40 / 1920)) + var(--sub-pad, 6px)) 0 6px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
}

.nav__sub::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--sub-shift, calc(6px + 100vw * 40 / 1920));
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.nav__sub a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 14px 8px 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.nav__sub a::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #fff;
  opacity: 0;
  flex: 0 0 auto;
}

.nav__item--sub:nth-last-child(-n + 2) .nav__sub {
  left: auto;
  right: 0;
}

.nav__sub a:hover,
.nav__sub a:focus-visible {
  color: #fff;
}

.nav__sub a:hover::after,
.nav__sub a:focus-visible::after {
  opacity: 1;
}

.nav__item--sub:hover > .nav__sub,
.nav__item--sub:focus-within > .nav__sub,
.nav__item--sub.is-open > .nav__sub {
  opacity: 1;
  visibility: visible;
}

.site-header__wave {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 8;
  height: calc(100vw * 56 / 1920);
  background: url("../images/header-wave-line.png") center bottom / 100% 100% no-repeat;
  pointer-events: none;
}

body:not(.has-header-wave) .site-header__wave {
  display: none;
}

@media (min-width: 981px) {
  body:not(.has-header-wave) .nav__sub {
    padding: 8px 0 6px;
  }

  body:not(.has-header-wave) .nav__sub::before {
    top: 0;
  }
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
}

@media (max-width: 1399px) {
  .nav__link {
    font-size: 15px;
  }

  .nav__sub a {
    font-size: 14px;
  }
}

@media (max-width: 1180px) {
  .nav__list {
    gap: 14px;
  }

  .logo img {
    height: 40px;
  }
}

@media (max-width: 980px) {
  #common-header {
    min-height: 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header__inner {
    min-height: 72px;
    padding: 0 16px;
    align-items: center;
    gap: 16px;
  }

  .logo img {
    height: 40px;
  }

  .site-header__right {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 6;
    align-items: stretch;
    padding: 8px 16px 20px;
    background: #033f97;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.18);
  }

  .site-header.is-open .site-header__right {
    display: flex;
  }

  .site-header.is-open .site-header__wave {
    display: none;
  }

  .search {
    width: 100%;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__link {
    display: flex;
    align-self: flex-start;
    padding: 12px 8px;
    font-size: 16px;
  }

  .nav__sub {
    position: static;
    top: auto;
    display: none;
    min-width: 0;
    padding: 0 0 8px 8px;
    opacity: 1;
    visibility: visible;
    background: transparent;
  }

  .nav__sub a {
    font-size: 15px;
  }

  .nav__sub::before {
    display: none;
  }

  .nav__item--sub.is-open > .nav__sub {
    display: block;
  }

  .nav__item--sub:hover > .nav__sub,
  .nav__item--sub:focus-within > .nav__sub {
    opacity: 1;
  }
}
