/* Keep the mirrored header in viewport pixels while legacy page content stays scaled. */
.aboutpg #brief-values {
  scroll-margin-top: 120px;
}

.head {
  right: auto;
  width: 100vw;
  height: 78px;
  margin: 0;
  border-bottom: 0;
  transition: background-color 0.5s ease-in-out, opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.head::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  height: 2px;
  background: #0e1d49;
  content: "";
  opacity: 0;
}

.head.active::after,
.head.local-menu-open::after {
  opacity: 1;
}

.head > .wrapperKn {
  width: 100%;
  max-width: 1396px;
  height: 100%;
  padding-inline: clamp(20px, 4vw, 48px);
}

.head .head-container-flex {
  align-items: center;
}

.head .logo {
  flex: 0 0 150px;
}

.head .logo h1,
.head .logo h1 a {
  display: flex;
  align-items: center;
}

.head .logo img[src*="haipai-logo-"] {
  max-width: 100%;
}

.head .head-right {
  flex: 0 0 135px;
}

.head .head-right .urOptionSelected span {
  border-width: 1.33333px;
  color: #fff;
  font-weight: 300;
}

.head.active .head-right .urOptionSelected span {
  color: #2c2321;
}

.head .local-nav-toggle,
.head .local-nav-backdrop {
  display: none;
}

/* Match the homepage navigation typography instead of the captured legacy weights. */
.head .nav li .cnh {
  font-weight: 300;
  line-height: 16px;
}

.head.active .nav li .cnh,
.head.local-menu-open .nav li .cnh {
  font-weight: 500;
}

.head .nav li .sub a {
  color: #485369;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 1px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.head .nav li .sub {
  position: fixed;
  top: 78px;
  right: max(24px, calc((100vw - 1300px) / 2));
  left: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  box-sizing: border-box;
  width: 860px;
  max-width: calc(100vw - 48px);
  margin: 0;
  padding: 8px;
  border: 1px solid #e2e7ef;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgb(14 29 73 / 12%);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.head .nav li .sub[data-columns="1"] {
  width: 360px;
  grid-template-columns: minmax(0, 1fr);
}

.head .nav li .sub dl {
  min-width: 0;
  margin: 0;
  padding: 30px 32px 24px;
}

.head .nav li .sub dl:nth-child(2) {
  border-radius: 4px;
  background: #0e1d49;
}

.head .nav li .sub dt {
  display: block;
  height: auto;
  margin: 0 0 20px;
  border: 0;
}

.head .nav li .sub dt span {
  display: block;
  margin: 0;
  padding: 0;
  white-space: normal;
}

.head .nav li .sub dt span a {
  display: block;
  color: #0e1d49;
  font-size: 22px;
  font-weight: 500;
  line-height: 32px;
}

.head .nav li .sub dd {
  margin: 0;
}

.head .nav li .sub dd a {
  display: flex;
  min-height: 50px;
  padding-block: 12px;
  align-items: center;
  border-top: 1px solid rgb(14 29 73 / 12%);
}

.head .nav li .sub dl:nth-child(2) a {
  color: #e3e8f3;
}

.head .nav li .sub dl:nth-child(2) dt span a {
  color: #fff;
}

.head .nav li .sub dl:nth-child(2) dd a {
  border-color: rgb(255 255 255 / 17%);
}

.head .nav li .sub a:hover {
  color: #ed7422;
  padding-left: 4px;
}

.head .nav li .sub dl:nth-child(2) a:hover {
  color: #ffb57f;
}

.head .nav .cnh:focus-visible,
.head .nav .sub a:focus-visible,
.head .local-nav-toggle:focus-visible {
  outline: 2px solid #ed7422;
  outline-offset: 4px;
}

@media (min-width: 1100px) {
  body.no-touch .head.active .nav li:hover .sub,
  body .head.active .nav li.on .sub {
    top: 78px;
    margin-top: 0;
  }

  .head .nav li .sub[data-columns="1"] {
    position: absolute;
    top: 100%;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  body.no-touch .head.active .nav li:hover .sub[data-columns="1"],
  body .head.active .nav li.on .sub[data-columns="1"] {
    top: 100%;
  }
}

@media (max-width: 1099px) {
  .head {
    height: 72px;
  }

  .head > .wrapperKn {
    max-width: none;
  }

  .head .logo {
    position: relative;
    z-index: 7;
    flex-basis: 118px;
    width: 118px;
    margin-right: 0;
    justify-content: flex-start;
  }

  .head .logo img[src*="haipai-logo-"] {
    height: 54px;
    transform: translateY(2px);
  }

  .head .head-right {
    display: none;
  }

  .head .local-nav-toggle {
    position: relative;
    z-index: 7;
    display: flex;
    width: 48px;
    height: 48px;
    padding: 12px 10px;
    flex-direction: column;
    justify-content: space-around;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }

  .head.active .local-nav-toggle,
  .head.local-menu-open .local-nav-toggle {
    color: #261c19;
  }

  .head .local-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentcolor;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .head.local-menu-open .local-nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .head.local-menu-open .local-nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .head.local-menu-open .local-nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .head .local-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100vw;
    height: 100dvh;
    background: rgb(4 13 39 / 56%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .head .nav-box .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 5;
    display: block;
    width: min(88vw, 420px);
    height: 100dvh;
    padding: 88px 24px 40px;
    overflow-y: auto;
    background: #fff;
    box-shadow: -18px 0 44px rgb(14 29 73 / 18%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }

  .head.local-menu-open {
    background: #fff;
    opacity: 1;
    visibility: visible;
  }

  .head.local-menu-open .local-nav-backdrop,
  .head.local-menu-open .nav-box .nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .head .nav ul {
    height: auto;
  }

  .head .nav li {
    display: block;
    float: none;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    border-bottom: 1px solid #ececec;
  }

  .head .nav li .cnh {
    min-height: 56px;
    height: auto;
    color: #261c19;
    font-size: 18px;
    font-weight: 500;
    text-align: left;
  }

  body .head .nav li::after {
    display: none;
  }

  .head .nav li .sub {
    position: static;
    display: none;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 4px 0 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .head .nav li .sub[data-columns="1"] {
    width: 100%;
  }

  body .head .nav li.on .sub {
    display: block;
    margin-top: 0;
    opacity: 1;
    visibility: visible;
  }

  .head .nav li .sub dl {
    margin: 0;
    padding: 18px 16px 16px;
  }

  .head .nav li .sub dt {
    height: auto;
    margin-bottom: 12px;
    align-items: center;
    justify-content: space-between;
    border: 0;
  }

  .head .nav li .sub dt span {
    margin: 0;
    padding: 0;
  }

  .head .nav li .sub dt span a {
    display: block;
    font-size: 17px;
    line-height: 28px;
  }

  .head .nav li .sub dd {
    margin: 0;
  }

  .head .nav li .sub dd a {
    display: flex;
    min-height: 44px;
    padding-block: 10px;
    align-items: center;
    font-size: 14px;
    line-height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .head .local-nav-toggle span,
  .head .nav-box .nav,
  .head .nav li .sub,
  .head .nav li .sub a {
    transition-duration: 0.01ms;
  }
}
