/* Header / nav / mega / top panels (shared across pages) */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: #666;
}

.topbar-inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar a {
  color: inherit;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.zolix-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  transition: background-color 0.24s ease, border-color 0.24s ease, backdrop-filter 0.24s ease;
}

.zolix-header.header-solid {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
  box-shadow: none;
}

.head-main {
  min-height: 72px;
  display: grid;
  grid-template-columns: 260px minmax(360px, 1fr) auto;
  align-items: center;
  gap: 18px;
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, border-radius 0.22s ease, padding 0.22s ease;
}

.zolix-header.header-solid .head-main {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.zolix-brand .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.zolix-brand span:last-child {
  font-size: 30px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0;
}

.logo-placeholder {
  width: 240px;
  height: 44px;
  display: inline-block;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

/* 与 .logo-placeholder 区域一致：约 240×44，过大则按比例缩小 */
.zolix-brand .site-logo-img {
  max-height: 44px;
  max-width: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.head-search {
  max-width: 560px;
  height: 40px;
  border-radius: 22px;
  background: #fff;
  border: 2px solid var(--brand);
  padding: 3px 6px 3px 16px;
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  position: relative;
  overflow: visible;
}

.head-search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
}

.head-search input::placeholder {
  color: rgba(30, 49, 144, 0.75);
}

.head-search > button {
  border: none;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.head-search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border: 1px solid #d7e4ff;
  border-radius: 8px;
  background: #fff;
  z-index: 35;
  box-shadow: 0 16px 34px rgba(16, 35, 82, 0.14);
  overflow: hidden;
}

.head-search-suggest[hidden] {
  display: none;
}

.head-suggest-item {
  width: 100%;
  border: none;
  background: #fff;
  display: block;
  text-align: left;
  padding: 0 12px;
  min-height: 34px;
  color: #1d1f24;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.head-suggest-item:hover {
  background: #f3f7ff;
  color: #1d1f24;
}

.head-suggest-list {
  max-height: none;
  overflow: visible;
}

.head-suggest-empty {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #8893a9;
  font-size: 13px;
}

.head-top-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 16px;
  justify-content: flex-end;
}

.head-top-nav a,
.head-top-nav button {
  background: transparent;
  border: none;
  color: #1c1c1c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 2px;
  position: relative;
}

.head-top-nav a:hover,
.head-top-nav button:hover {
  color: var(--brand);
}

.head-top-nav a::after,
.head-top-nav button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.head-top-nav a:hover::after,
.head-top-nav button:hover::after {
  transform: scaleX(1);
}

.head-top-nav a[aria-expanded="true"],
.head-top-nav button[aria-expanded="true"] {
  color: var(--brand);
}

.head-top-nav a[aria-expanded="true"]::after,
.head-top-nav button[aria-expanded="true"]::after {
  transform: scaleX(1);
}

.head-top-nav a.is-active {
  color: var(--brand);
}

.head-top-nav a.is-active::after {
  transform: scaleX(1);
}

.head-top-nav .lang {
  color: #6a6a6a;
  font-size: 14px;
}

.head-top-nav .has-app-panel::after {
  content: "";
}

.head-subbar {
  background: #f2f3f6;
  border-top: 1px solid #eceff4;
  border-bottom: 1px solid #eceff4;
}

.head-pathbar {
  background: #f3f4f8;
}

.head-path {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4d5467;
}

.head-path a {
  color: #3a4358;
}

.head-path a:hover {
  color: var(--brand);
}

.head-subnav {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  white-space: nowrap;
}

.head-subnav a {
  font-size: 14px;
  color: #30384d;
}

.head-subnav a:hover {
  color: var(--brand);
}

.subnav-pill {
  background: var(--brand);
  color: #fff !important;
  border-radius: 16px;
  padding: 6px 16px;
  position: relative;
}

.subnav-pill::before {
  content: "◈";
  font-size: 10px;
  margin-right: 6px;
}

.head-breadcrumb {
  display: none;
  margin-top: 8px;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.24s ease, opacity 0.2s ease;
  overflow: hidden;
}

.zolix-header.has-path .head-breadcrumb {
  display: block;
  max-height: 46px;
  opacity: 1;
  background: rgba(242, 243, 246, 0.78);
}

.zolix-header.has-path .head-path {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 14px;
}

header:not(.zolix-header) {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand span:last-child {
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #56d4ff);
}

.menu {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: #222;
}

.menu > a,
.menu > button {
  color: inherit;
  background: transparent;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 18px 12px;
  position: relative;
}

.menu > a::after,
.menu > button::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.menu > a:hover,
.menu > button:hover {
  color: var(--brand);
}

.menu > a:hover::after,
.menu > button:hover::after {
  transform: scaleX(1);
}

.menu > a.is-active {
  color: var(--brand);
  font-weight: 700;
}

.menu > a.is-active::after {
  transform: scaleX(1);
}

.menu > .has-mega::after {
  content: "▾";
  font-size: 12px;
  margin-left: 6px;
  color: #666;
}

.mega {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 10px);
  width: min(1100px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-14px);
  transition: opacity 0.22s ease, transform 0.24s ease, visibility 0.24s ease;
}

.mega.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-large {
  margin-top: 0;
  border-radius: 0 0 10px 10px;
  border: 1px solid #dbe2ef;
  border-top: none;
  width: min(1160px, calc(100vw - 40px));
  left: 50%;
  transform: translateX(-50%) translateY(-14px);
  top: 72px;
  padding: 8px 0 12px;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at right bottom, rgba(30, 49, 144, 0.04), transparent 42%);
  box-shadow: 0 18px 36px rgba(16, 28, 78, 0.14);
  min-height: auto;
  max-height: min(560px, calc(100vh - 96px));
  overflow-y: auto;
}

.mega-large.open {
  transform: translateX(-50%) translateY(0);
}

.mega.mega-large {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
  transition: clip-path 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.mega.mega-large.open {
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
}

/* 向上延伸透明命中区：弥合顶栏「产品」与下拉之间的空白（含面包屑带），避免鼠标路径中断触发收起 */
.mega.mega-large.open::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 96px;
  pointer-events: auto;
}

.app-panel,
.resource-panel,
.service-panel,
.news-panel,
.about-panel {
  position: absolute;
  left: 50%;
  top: 72px;
  width: 100vw;
  transform: translateX(-50%) translateY(-8px);
  border-top: 1px solid #e8ecf3;
  border-bottom: 1px solid #e8ecf3;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.24s ease, visibility 0.24s ease;
  z-index: 6;
}

.app-panel,
.resource-panel,
.news-panel,
.about-panel {
  background: rgba(255, 255, 255, 0.96);
}

.service-panel {
  background: rgba(255, 255, 255, 0.97);
  border-top-color: #e4e8f0;
  border-bottom-color: #e4e8f0;
  box-shadow: 0 8px 18px rgba(22, 35, 80, 0.1);
}

.app-panel.open,
.resource-panel.open,
.service-panel.open,
.news-panel.open,
.about-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.app-panel.open::before,
.resource-panel.open::before,
.service-panel.open::before,
.news-panel.open::before,
.about-panel.open::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 72px;
  pointer-events: auto;
}

.app-panel-inner,
.resource-panel-inner {
  width: min(1060px, calc(100vw - 56px));
  margin: 0 auto;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding-left: 48px;
}

.app-panel-inner a,
.resource-panel-inner a {
  display: inline-flex;
  align-items: center;
  color: #333;
  font-size: 13px;
  padding: 0 16px;
  position: relative;
}

.app-panel-inner a + a::before,
.resource-panel-inner a + a::before {
  content: "|";
  color: #a8afbe;
  position: absolute;
  left: 0;
}

.app-panel-inner a:hover,
.resource-panel-inner a:hover {
  color: var(--brand);
}

.service-panel-inner,
.news-panel-inner,
.about-panel-inner {
  position: relative;
  transform: translateX(-50%);
  min-height: 62px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
}

.service-panel-inner {
  left: var(--service-content-left, 50vw);
  padding: 0 14px;
}

.news-panel-inner {
  left: var(--news-content-left, 50vw);
  justify-content: center;
}

.about-panel-inner {
  left: var(--about-content-left, 50vw);
}

.service-panel-inner a,
.news-panel-inner a,
.about-panel-inner a {
  color: #333;
  display: inline-flex;
  align-items: center;
  position: relative;
}

.service-panel-inner a {
  font-size: 14px;
  line-height: 1;
}

.news-panel-inner a,
.about-panel-inner a {
  font-size: 13px;
  padding: 0 16px;
}

.service-panel-inner a + a {
  margin-left: 4px;
  padding-left: 14px;
}

.service-panel-inner a + a::before,
.news-panel-inner a + a::before,
.about-panel-inner a + a::before {
  content: "|";
  position: absolute;
  left: 0;
  color: #a8afbe;
  font-size: 13px;
}

.service-panel-inner a:hover,
.news-panel-inner a:hover,
.about-panel-inner a:hover {
  color: var(--brand);
}

.mega-inner {
  width: min(1060px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 0 10px;
}

.mega-large-grid {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.mega-large-grid.active {
  display: grid;
}

.mega-top-tabs-wrap {
  width: 100%;
  min-height: 54px;
  background: #eceff4;
  border-top: 1px solid #e1e6ef;
  border-bottom: 1px solid #e1e6ef;
  margin-bottom: 4px;
}

.mega-top-tabs-inner {
  width: min(1060px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 0 10px;
}

.mega-top-tabs {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 8px 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.mega-top-tabs a {
  font-size: 15px;
  color: #2f384b;
  padding: 6px 4px;
  transition: transform 0.14s ease, color 0.14s ease, background-color 0.14s ease;
  transform-origin: center;
}

.mega-top-tabs a:hover {
  color: var(--brand);
  transform: scale(1.07);
}

.mega-top-tabs a.active {
  color: #fff;
  background: var(--brand);
  border-radius: 16px;
  padding: 7px 16px;
  transform: scale(1.08);
}

.mega-large-col {
  border-right: 1px solid #e8ecf3;
  border-bottom: 1px solid #e8ecf3;
  padding: 7px 12px 8px;
  min-height: 158px;
}

.mega-large-col:nth-child(3n) {
  border-right: none;
}

.mega-large-col:nth-child(n + 4) {
  border-bottom: none;
}

.mega-large-col h4 {
  font-size: 20px;
  margin-bottom: 4px;
  color: #111;
  position: relative;
  padding-left: 16px;
  display: flex;
  align-items: center;
  min-height: 24px;
}

.mega-large-col h4.is-sub-active {
  color: var(--brand);
}

.mega-large-col h4.is-sub-active::before {
  background: var(--brand);
}

.mega-large-col h4::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--brand);
  border-radius: 3px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.mega-large-col h4 a {
  color: inherit;
  text-decoration: none;
}

.mega-large-col h4 a:hover {
  color: var(--brand);
}

.mega-large-col a {
  display: block;
  font-size: 15px;
  color: #333333;
  line-height: 1.55;
  margin: 5px 0;
  padding-left: 14px;
}

.mega-large-col a:hover {
  color: var(--brand);
}

.mega-large-col a:last-child {
  color: var(--brand);
  font-weight: 700;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mega-col {
  border-right: 1px solid var(--border);
  padding-right: 12px;
}

.mega-col:last-child {
  border-right: none;
  padding-right: 0;
}

.mega-title {
  font-weight: 700;
  color: var(--brand-deep);
  margin-bottom: 8px;
  font-size: 13px;
}

.mega-links {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: #444;
}

.mega-links a:hover {
  color: var(--brand);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.36);
  display: none;
  z-index: 120;
}

.drawer-backdrop.open {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 130;
  padding: 16px;
  overflow: auto;
}

.drawer.open {
  transform: translateX(0);
}

.drawer h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.drawer a {
  display: block;
  padding: 10px 8px;
  border-radius: 10px;
}

.drawer a:hover {
  background: var(--bg-soft);
  color: var(--brand);
}

@media (max-width: 960px) {
  .head-main {
    grid-template-columns: 1fr;
    padding: 8px 0;
  }

  .head-search {
    max-width: none;
  }

  .head-top-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 14px;
  }

  .head-subnav {
    min-height: 38px;
    gap: 12px;
  }

  .mega-large {
    top: 108px;
    width: calc(100vw - 20px);
    left: 50%;
    transform: translateX(-50%) translateY(-14px);
    max-height: calc(100vh - 120px);
  }

  .mega-large.open {
    transform: translateX(-50%) translateY(0);
  }

  .mega-inner {
    width: calc(100vw - 20px);
    padding: 0 4px;
  }

  .mega-top-tabs-inner {
    width: calc(100vw - 20px);
    padding: 0 4px;
  }

  .mega-top-tabs {
    justify-content: flex-start;
  }

  .app-panel,
  .resource-panel,
  .service-panel,
  .news-panel,
  .about-panel {
    top: 108px;
  }

  .app-panel-inner,
  .resource-panel-inner {
    width: calc(100vw - 20px);
    justify-content: flex-start;
    padding-left: 8px;
  }

  .service-panel-inner a {
    font-size: 13px;
  }

  .news-panel-inner,
  .about-panel-inner {
    left: 50vw;
  }

  .mega-large-grid {
    grid-template-columns: 1fr;
  }

  .mega-large-col {
    border-right: none;
    border-bottom: 1px solid #e8ecf3;
    min-height: auto;
  }

  .mega-large-col:last-child {
    border-bottom: none;
  }

  .menu {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
  }
}
