/* ─── 全局重置 ─── */
#ks-header *,
#ks-header *::before,
#ks-header *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── 全站隐藏：预约演示 CTA ─── */
[data-ks-cta="demo"],
.ks-cta-demo {
  display: none !important;
}

/* ─── 顶栏容器 ─── */
#ks-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
  font-family: "Microsoft YaHei", 微软雅黑, sans-serif;
  transition: box-shadow 0.3s;
}
#ks-header-inner {
  max-width: 1300px;
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 0;
}

/* ─── Logo ─── */
#ks-logo {
  flex-shrink: 0;
  margin-right: 40px;
  display: flex;
  align-items: center;
  text-decoration: none;
}
#ks-logo img {
  height: 38px;
  width: auto;
  display: block;
}

/* ─── 桌面导航 ─── */
#ks-nav {
display: flex;
align-items: center;
height: 68px;
flex: 1;
gap: 2rem;
padding-right: 8rem;
list-style: none;
}
.nav-item {
  position: static;
  height: 68px;
  display: flex;
  align-items: center;
}
.nav-item > a,
.nav-item > span {
  display: flex;
  align-items: center;
  height: 68px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  color: #1a2340;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
  gap: 5px;
  position: relative;
}
.nav-item > a::after,
.nav-item > span::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background: #1a6fff;
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-item:hover > a,
.nav-item:hover > span,
.nav-item.is-active > a,
.nav-item.is-active > span {
  color: #1a6fff;
}
.nav-item:hover > a::after,
.nav-item:hover > span::after,
.nav-item.is-active > a::after,
.nav-item.is-active > span::after {
  transform: scaleX(1);
}
/* 下拉箭头 */
.nav-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 1px;
  transition: transform 0.2s;
}
.nav-item:hover .nav-arrow {
  transform: rotate(180deg);
}

/* ─── 下拉面板通用 ─── */
.ks-dropdown {
  display: none;
  position: absolute;
  top: 68px;
  left: 0;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
  border-top: 3px solid #1a6fff;
  z-index: 8999;
  padding: 24px 28px 28px;
  min-width: 280px;
  max-width: 460px;
  border-radius: 10px;
  animation: dropFadeIn 0.18s ease;
}
@keyframes dropFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.nav-item:hover > .ks-dropdown {
  display: block;
}
.ks-dropdown-inner {
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

/* Mega Menu 分列（竖向排列） */
.mega-col {
  width: 100%;
  padding: 8px 0;
  border-right: none;
  border-bottom: 1px solid #f0f2f5;
}

.mega-col-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 第一个和最后一个 mega-item 额外上下间距 */
.mega-col-content .mega-item:first-child {
  padding-top: 6px !important;
}
.mega-col-content .mega-item:last-child {
  padding-bottom: 6px !important;
}
.mega-col:first-child {
  padding-top: 0;
}
.mega-col:last-child {
  border-bottom: none;
}
.mega-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 16px;
  min-height: 36px;
  height: auto;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.18s;
  margin: 4px 0;
}
/* Divider 组件 - 用于下拉菜单视觉分组 */
.divider {
  height: 1px;
  margin: 4px 16px;
  background: #e5e9f0;
  border-radius: 3px;
}
.mega-item:hover {
  /* background: #f5f8ff; */
  background: #EAF4F2;
}
.mega-item:focus-visible,
.mega-item.is-current {
  background: #eef4ff;
  outline: none;
}
.mega-item.is-current .mega-item-title {
  color: #1a6fff;
}
.mega-item-icon {
  display: none;
  font-size: 22px;
  width: 40px;
  height: 40px;
  background: #f0f4ff;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s;
}
.mega-item:hover .mega-item-icon {
  background: #e0eaff;
}
.mega-item-body {
  flex: 1;
  padding: 0 1rem !important;
}
.mega-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #0d1f40;
  margin: 0;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.mega-item-desc {
  display: none;
  font-size: 12px;
  color: #8a9ab5;
  line-height: 1.5;
}
.tag-new {
  font-size: 10px;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 600;
}
.tag-hot {
  font-size: 10px;
  background: #fff3e0;
  color: #e65100;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 600;
}
.tag-api {
  font-size: 10px;
  background: #e3f2fd;
  color: #1565c0;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 600;
}

/* 普通下拉（非Mega） */
.simple-dropdown {
  display: none;
  position: absolute;
  top: 68px;
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid #eef0f5;
  border-top: 3px solid #1a6fff;
  min-width: 180px;
  padding: 8px 0;
  z-index: 8999;
  animation: dropFadeIn 0.18s ease;
}
.nav-item {
  position: relative;
}
.nav-item:hover > .simple-dropdown {
  display: block;
}
.simple-dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: #1a2340;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
  font-weight: 500;
}
.simple-dropdown a + a {
  margin-top: 6px;
}
.simple-dropdown a:hover {
  background: #f5f8ff;
  color: #1a6fff;
}
.simple-dropdown a:focus-visible,
.simple-dropdown a.is-current {
  background: #eef4ff;
  color: #1a6fff;
  outline: none;
}

/* ─── 右侧区域 ─── */
#ks-header-right {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
  flex-shrink: 0;
}
.ks-header-contacts {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.25;
  color: #3a4661;
  padding: 0 !important;
  min-height: 34px;
}
.ks-header-contacts a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: color 0.2s;
}
.ks-header-contacts a:hover {
  color: #1a6fff;
}
.ks-header-contact-prefix {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3f7ff;
  font-size: 14px;
  /* font-weight: 700; */
  color: #1a2340;
  line-height: 1;
  flex-shrink: 0;
}
.ks-header-contact-prefix .phone-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}
.ks-header-contact-numbers {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  min-height: 36px;
}
.ks-header-contact-number {
  min-height: 0;
  padding: 4px 10px;
  border: none;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  line-height: 1;
  color: #4b587c;
  font-variant-numeric: tabular-nums;
}
.ks-btn-trial {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #1a6fff, #0050dd);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 8px;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(26, 111, 255, 0.35);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.ks-btn-trial:hover {
  box-shadow: 0 6px 24px rgba(26, 111, 255, 0.5);
  transform: translateY(-1px);
}

/* ─── 汉堡按钮 ─── */
#ks-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
}
#ks-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a2340;
  border-radius: 2px;
  transition: all 0.25s;
}
#ks-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#ks-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#ks-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── 移动端遮罩 ─── */
#ks-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 8990;
}
#ks-overlay.is-open {
  display: block;
}

/* ─── 移动端抽屉菜单 ─── */
#ks-mobile-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background: #fff;
  z-index: 8995;
  overflow-y: auto;
  transition: right 0.3s ease;
  padding-bottom: 32px;
}
#ks-mobile-menu.is-open {
  right: 0;
}
.mob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef0f5;
}
.mob-header img {
  height: 32px;
}
#ks-menu-close {
  font-size: 22px;
  color: #666;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}
.mob-nav {
  padding: 8px 0;
}
.mob-nav-item > a,
.mob-nav-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #1a2340;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid #f5f7fa;
}
.mob-nav-label .mob-arrow {
  font-size: 12px;
  transition: transform 0.2s;
  color: #9aa5c0;
}
.mob-nav-parent.is-open .mob-arrow {
  transform: rotate(90deg);
}
.mob-sub {
  display: none;
  background: #f8faff;
  padding: 4px 0;
}
.mob-nav-parent.is-open .mob-sub {
  display: block;
}
.mob-sub a {
  display: block;
  padding: 10px 32px;
  font-size: 14px;
  color: #4a5568;
  text-decoration: none;
  border-bottom: 1px solid #eef0f5;
}
.mob-sub a:hover {
  color: #1a6fff;
}
.mob-cta {
  margin: 20px 20px 0;
}
.mob-cta a {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #1a6fff, #0050dd);
  color: #fff;
  padding: 13px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 10px;
}

/* ─── 响应式 ─── */
@media (max-width: 1024px) {
  #ks-nav {
    display: none;
  }
  .ks-header-contacts {
    display: none;
  }
  #ks-hamburger {
    display: flex;
  }
  #ks-header-right .ks-btn-trial {
    font-size: 13px;
    padding: 8px 16px;
  }
}
@media (max-width: 480px) {
  #ks-header-inner {
    padding: 0 16px;
  }
}

/* ─── 为固定页头腾出页面顶部空间 ─── */
body {
  padding-top: 68px !important;
}