﻿/* Shared top navigation dropdowns. */
.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.nav-inner .nav-item > a {
  height: 100%;
}
.nav-toggle {
  display: none;
}
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 232px;
  padding: 10px 0;
  background: #fff;
  border-top: 0;
  box-shadow: 0 10px 24px rgba(18, 58, 112, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.18s,
    transform 0.18s,
    visibility 0.18s;
  max-height: 65vh;
  overflow-y: auto;
  z-index: 30;
}
.nav-item:last-child .nav-dropdown {
  left: auto;
  right: 0;
}
.nav-item.is-open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-inner .nav-dropdown a {
  display: block;
  height: auto;
  padding: 12px 22px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: #394d66;
  white-space: normal;
  transition:
    background 0.2s,
    color 0.2s;
}
.nav-inner .nav-dropdown a:after {
  display: none;
}
.nav-inner .nav-dropdown a:hover,
.nav-inner .nav-dropdown a:focus-visible {
  background: #eff5fd;
  color: var(--blue);
}
.nav-dropdown > div + div {
  border-top: 1px solid #edf1f6;
}
.nav-inner .nav-subgroup {
  padding: 0 0 8px;
}
.nav-inner .nav-subgroup a {
  padding: 8px 22px 8px 34px;
  font-size: 13px;
  color: #7a8ba1;
}
@media (max-width: 760px) {
  .nav-item {
    height: auto;
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
  }
  .nav-inner .nav-item > a {
    height: 45px;
    flex: 1;
    padding: 0 4px;
    font-size: 14px;
    justify-content: center;
  }
  .nav-toggle {
    display: block;
    background: none;
    color: #456d9e;
    width: 25px;
    height: 45px;
    padding: 0;
  }
  .nav-dropdown {
    position: static;
    display: none;
    flex-basis: 100%;
    width: 100%;
    box-shadow: none;
    border-top: 1px solid #e0eaf6;
    max-height: 320px;
    transform: none;
    padding: 5px 0;
  }
  .nav-item.is-open > .nav-dropdown {
    display: block;
  }
  .nav-inner .nav-dropdown a {
    font-size: 13px;
    padding: 10px 8px;
  }
  .nav-inner .nav-subgroup a {
    padding: 8px 8px 8px 16px;
    font-size: 12px;
  }
  .nav-inner {
    align-items: start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-dropdown {
    transition: none;
  }
}

/* Mobile right-hand drawer with search above the single-column navigation. */
.mobile-nav-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  width: min(88vw, 430px);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  background: #f8f9fb;
  color: #283c54;
  overflow: hidden;
  box-shadow: -12px 0 35px #0c28572b;
}
.mobile-nav-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.28s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.mobile-nav-dialog::backdrop {
  background: rgba(12, 31, 60, 0.43);
}
.mobile-nav-dialog.is-closing {
  animation: drawer-out 0.22s ease both;
}
.drawer-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a5dd1;
  color: #fff;
  padding: 22px 18px;
  flex-shrink: 0;
}
.drawer-heading img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.drawer-heading > div {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}
.drawer-heading span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
}
.drawer-close {
  align-self: center;
  flex: 0 0 40px;
  width: 40px;
  height: 44px;
  padding: 0;
  background: none;
  color: #fff;
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
}
.drawer-scroll {
  padding: 24px 22px 35px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
  padding-bottom: max(35px, env(safe-area-inset-bottom));
}
.drawer-search {
  display: flex;
  width: 100%;
  height: 48px;
  margin-bottom: 22px;
  border: 1px solid #83a9e3;
  background: #fff;
}
.drawer-search input {
  flex: 1;
  min-width: 0;
  padding: 0 13px;
  border: 0;
  background: transparent;
  outline-offset: -3px;
  font-size: 16px;
  border-radius: 0;
  color: #34465f;
}
.drawer-search button {
  flex: 0 0 48px;
  width: 48px;
  display: grid;
  place-items: center;
  background: #478ff9;
  color: #fff;
  padding: 0;
}
.drawer-search svg {
  width: 23px;
  height: 23px;
}
.drawer-home,
.drawer-section > summary {
  display: block;
  position: relative;
  padding: 20px 30px 20px 0;
  font-size: 18px;
  line-height: 1.5;
  color: #35465a;
  list-style: none;
  cursor: pointer;
}
.drawer-home,
.drawer-section {
  border-bottom: 1px solid #dce3ec;
}
.drawer-section > summary::-webkit-details-marker {
  display: none;
}
.drawer-section > summary:after {
  content: "?";
  position: absolute;
  right: 5px;
  top: 17px;
  font-size: 27px;
  color: #1a5dd1;
  transition: transform 0.22s;
}
.drawer-section[open] > summary {
  color: #1a5dd1;
}
.drawer-section[open] > summary:after {
  transform: rotate(90deg);
}
.drawer-sublinks {
  padding: 0 0 14px 14px;
}
.drawer-sublinks a {
  display: block;
  padding: 12px 6px;
  color: #627690;
  font-size: 15px;
  line-height: 1.6;
}
.drawer-sublinks a:hover,
.drawer-sublinks a:focus-visible {
  color: #1a5dd1;
  background: #edf3fb;
}
@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes drawer-out {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}
@media (max-width: 760px) {
  body.menu-open > nav[aria-label="主导航"],
  body > nav[aria-label="主导航"] {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-dialog[open],
  .mobile-nav-dialog.is-closing {
    animation: none;
  }
  .drawer-section > summary:after {
    transition: none;
  }
}