/* ==========================================================================
   九彩云官网 — 公共页眉 / 页脚（由 common/header.html、common/footer.html 注入）
   所有页面共用，修改此处即全站生效
   ========================================================================== */

:root {
  --ai-red: #d6222a;
  --ai-red-dark: #b81b22;
  --ai-ink: #26262a;
  --ai-ink-2: #3a3b40;
  --ai-muted: #7d818c;
  --ai-muted-2: #9b9fa9;
  --ai-line: #ececf0;
  --ai-card: #f9f9fa;
  --ai-dark: #24262d;
  --ai-radius: 16px;
  --ai-container: 1736px;
  --ai-shadow: 0 18px 50px rgba(36, 38, 45, 0.08);
  --ai-shadow-sm: 0 10px 26px rgba(36, 38, 45, 0.07);
}

/* 注入前的占位高度，避免页眉加载完成后页面跳动 */
#aiHeaderHost {
  height: 103px;
}

/* 旧页面公共样式中 html/body 固定为 100% 高，会限制 sticky 页眉的吸附范围 */
body.ai-chrome-page {
  height: auto;
  min-height: 100%;
}

.ai-container {
  width: 100%;
  max-width: var(--ai-container);
  margin: 0 auto;
  padding: 0 48px;
}

/* --------------------------------------------------------------------------
   在旧页面中隔离页眉 / 页脚的样式，避免被 bootstrap、common.css 等影响
   -------------------------------------------------------------------------- */
.ai-header,
.ai-footer,
.ai-side,
.ai-consult,
.ai-top {
  color: var(--ai-ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.ai-header *,
.ai-footer *,
.ai-side *,
.ai-consult *,
.ai-top *,
.ai-header *::before,
.ai-footer *::before,
.ai-side *::before,
.ai-consult *::before,
.ai-top *::before,
.ai-header *::after,
.ai-footer *::after,
.ai-side *::after,
.ai-consult *::after,
.ai-top *::after {
  box-sizing: border-box;
}

.ai-header img,
.ai-footer img,
.ai-consult img {
  display: block;
  max-width: 100%;
  height: auto;
}

.ai-header a,
.ai-footer a,
.ai-side a,
.ai-consult {
  color: inherit;
  text-decoration: none;
}

.ai-header ul,
.ai-footer ul,
.ai-header ol,
.ai-footer ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-header h1,
.ai-header h2,
.ai-header h3,
.ai-header h4,
.ai-header p,
.ai-footer h1,
.ai-footer h2,
.ai-footer h3,
.ai-footer h4,
.ai-footer p,
.ai-footer figure {
  margin: 0;
}

.ai-header button,
.ai-header input,
.ai-footer button,
.ai-top {
  font: inherit;
}


/* --------------------------------------------------------------------------
   通用按钮
   -------------------------------------------------------------------------- */
.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 56px;
  padding: 0 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ai-btn:hover {
  transform: translateY(-1px);
}

.ai-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #e0333a 0%, var(--ai-red) 55%, #c41d25 100%);
  box-shadow: 0 12px 26px rgba(214, 34, 42, 0.26);
}

.ai-btn--primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #d22a32 0%, var(--ai-red-dark) 100%);
  box-shadow: 0 16px 30px rgba(214, 34, 42, 0.3);
}

.ai-btn--ghost {
  color: var(--ai-red);
  background: #fff;
  border-color: rgba(214, 34, 42, 0.45);
  box-shadow: 0 8px 22px rgba(36, 38, 45, 0.05);
}

.ai-btn--ghost:hover {
  color: var(--ai-red-dark);
  border-color: var(--ai-red);
}

.ai-btn--sm {
  min-width: 118px;
  height: 44px;
  padding: 0 28px;
  font-size: 15px;
}

.ai-header a.ai-btn--primary {
  color: #fff;
}

/* --------------------------------------------------------------------------
   顶部导航
   -------------------------------------------------------------------------- */
.ai-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(38, 38, 42, 0.05);
  transition: box-shadow 0.25s ease;
}

.ai-header.is-stuck {
  box-shadow: 0 10px 30px rgba(36, 38, 45, 0.08);
}

.ai-header__inner {
  display: flex;
  align-items: center;
  height: 102px;
  transition: height 0.25s ease;
}

.ai-header.is-stuck .ai-header__inner {
  height: 80px;
}

.ai-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.ai-logo img {
  width: auto;
  height: 54px;
}

.ai-nav {
  display: flex;
  align-items: center;
  gap: 38px;
  margin-left: 84px;
}

.ai-nav a {
  position: relative;
  padding: 8px 0;
  color: #4a4b50;
  font-size: 16px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.ai-nav a:hover {
  color: var(--ai-red);
}

/* Bootstrap 的 a:focus 会画出蓝色方框，鼠标点击后要去掉，仅键盘聚焦时保留 */
.ai-header a:focus,
.ai-footer a:focus,
.ai-side a:focus,
.ai-consult:focus {
  outline: none;
}

.ai-header a:focus-visible,
.ai-footer a:focus-visible,
.ai-side a:focus-visible,
.ai-consult:focus-visible {
  outline: 2px solid var(--ai-red);
  outline-offset: 3px;
  border-radius: 4px;
}

.ai-nav a.active {
  color: var(--ai-ink);
  font-weight: 600;
}

.ai-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 32px;
  height: 2px;
  margin-left: -16px;
  background: var(--ai-red);
}

.ai-header.is-stuck .ai-nav a.active::after {
  bottom: -9px;
}

/* 二级菜单 */
.ai-nav__item {
  position: relative;
  display: flex;
  align-items: center;
}

.ai-nav__caret {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.ai-nav__item:hover .ai-nav__caret,
.ai-nav__item:focus-within .ai-nav__caret {
  transform: translateY(1px) rotate(-135deg);
  color: var(--ai-red);
}

.ai-nav__panel {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 20;
  padding-top: 33px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.ai-header.is-stuck .ai-nav__panel {
  padding-top: 22px;
}

.ai-nav__item:hover > .ai-nav__panel,
.ai-nav__item:focus-within > .ai-nav__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.ai-nav__panel-body {
  display: flex;
  padding: 26px 32px;
  background: #fff;
  border: 1px solid rgba(38, 38, 42, 0.06);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(20, 34, 67, 0.14);
}

.ai-nav__panel--product .ai-nav__panel-body {
  width: 700px;
}

.ai-nav__panel--solution .ai-nav__panel-body {
  width: 600px;
}

.ai-nav__panel h3 {
  margin-bottom: 14px;
  color: #9a9ba2;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ai-nav__feature {
  width: 55%;
  padding-right: 32px;
  border-right: 1px solid #eef0f4;
}

.ai-nav__feature img {
  width: 150px;
  height: auto;
  margin-bottom: 12px;
}

.ai-nav__feature strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ai-ink);
  font-size: 15px;
  font-weight: 600;
}

.ai-nav__feature p {
  margin-bottom: 14px;
  color: #8b8c93;
  font-size: 13px;
  line-height: 1.6;
}

.ai-nav__col {
  flex: 1 1 0;
}

.ai-nav__feature + .ai-nav__col {
  flex: 0 0 45%;
  padding-left: 32px;
}

.ai-nav__panel--solution .ai-nav__col:first-child {
  flex: 0 0 42%;
}

.ai-nav__col--divided {
  padding-left: 32px;
  border-left: 1px solid #eef0f4;
}

.ai-nav__panel ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-nav .ai-nav__panel li {
  list-style: none;
}

.ai-nav .ai-nav__panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: #55565c;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  transition: background 0.18s ease, color 0.18s ease;
}

.ai-nav .ai-nav__panel a:hover {
  background: #fdf2f2;
  color: var(--ai-red);
}

.ai-nav .ai-nav__panel a.ai-nav__cta {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ai-red);
  color: #fff;
  font-size: 14px;
}

.ai-nav .ai-nav__panel a.ai-nav__cta:hover {
  background: var(--ai-red-dark);
  color: #fff;
}

.ai-header__actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.ai-header__phone {
  color: var(--ai-red);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.ai-header a.ai-header__phone,
.ai-header a.ai-header__phone:hover {
  color: var(--ai-red);
}

.ai-header a.ai-header__phone:hover {
  color: var(--ai-red-dark);
}

.ai-burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ai-burger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--ai-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.ai-mobile-nav {
  display: none;
  padding: 8px 24px 24px;
  border-top: 1px solid var(--ai-line);
  background: #fff;
}

.ai-mobile-nav a {
  display: block;
  padding: 13px 4px;
  border-bottom: 1px solid #f3f3f6;
  color: #45464b;
  font-size: 16px;
}

.ai-mobile-nav a.active {
  color: var(--ai-red);
  font-weight: 600;
}

.ai-mobile-nav .ai-mobile-nav__phone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 0;
  border: 0;
  color: var(--ai-red);
  font-size: 18px;
  font-weight: 600;
}

.ai-mobile-nav__row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f3f3f6;
}

.ai-mobile-nav__row > a {
  flex: 1 1 auto;
  border-bottom: 0;
}

.ai-mobile-nav__toggle {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ai-mobile-nav__toggle span {
  position: relative;
  display: block;
  width: 14px;
  height: 2px;
  margin: 0 auto;
  background: #6b6c73;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.ai-mobile-nav__toggle span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: -6px;
  width: 2px;
  height: 14px;
  background: #6b6c73;
  border-radius: 2px;
}

.ai-mobile-nav__group.is-open .ai-mobile-nav__toggle span {
  transform: rotate(45deg);
}

.ai-mobile-nav__sub {
  display: none;
  padding: 2px 4px 12px 16px;
}

.ai-mobile-nav__group.is-open .ai-mobile-nav__sub {
  display: block;
}

.ai-mobile-nav__sub a {
  padding: 10px 4px;
  border-bottom: 0;
  color: #6a6b72;
  font-size: 15px;
}

body.ai-nav-open .ai-mobile-nav {
  display: block;
  max-height: calc(100vh - 102px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.ai-nav-open .ai-side,
body.ai-nav-open .ai-consult,
body.ai-nav-open .ai-top {
  display: none;
}

/* 移除百度商桥自动挂件（在线咨询统一走右下角入口）；SDK 会注入同 id 的 !important 样式，需提高优先级 */
body #aff-im-root {
  display: none !important;
}

body.ai-nav-open .ai-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.ai-nav-open .ai-burger span:nth-child(2) {
  opacity: 0;
}

body.ai-nav-open .ai-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.ai-footer {
  color: #b8bbc4;
  background: var(--ai-dark);
}

.ai-footer__main {
  display: grid;
  min-width: 0;
  grid-template-columns: 1.8fr 0.95fr 1fr 0.8fr 1.25fr;
  gap: 48px;
  padding-top: 76px;
  padding-bottom: 56px;
}

.ai-footer__label {
  color: #e9eaee;
  font-size: 17px;
  font-weight: 600;
}

.ai-footer__hotline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.ai-footer__hotline svg {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.ai-footer__main > * {
  min-width: 0;
}

.ai-footer__brand p {
  margin-top: 14px;
  color: #9ea2ad;
  font-size: 14px;
  line-height: 1.8;
}

.ai-footer__brand a:hover {
  color: #fff;
}

.ai-footer__col h3 {
  margin: 6px 0 20px;
  color: #f2f3f5;
  font-size: 16px;
  font-weight: 600;
}

.ai-footer__col li + li {
  margin-top: 12px;
}

.ai-footer__col a {
  color: #b0b4be;
  font-size: 14px;
  transition: color 0.2s ease;
}

.ai-footer__col a:hover {
  color: #fff;
}

.ai-footer__qrs {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: flex-end;
  align-items: flex-start;
}

.ai-footer__qr {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
}

.ai-footer__qr img {
  width: 132px;
  height: 132px;
  max-width: none;
  padding: 5px;
  background: #fff;
  border-radius: 4px;
}

.ai-footer__qr figcaption {
  margin-top: 12px;
  color: #b0b4be;
  font-size: 13px;
  white-space: nowrap;
}

.ai-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 22px 0;
  color: #8d919b;
  font-size: 13px;
  text-align: center;
}

.ai-footer__bottom .ai-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.ai-footer__bottom .sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.ai-footer__bottom a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-footer__bottom a:hover {
  color: #fff;
}

.ai-footer__bottom .ai-beian-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 20px;
}

/* --------------------------------------------------------------------------
   右侧浮层
   -------------------------------------------------------------------------- */
.ai-side {
  position: fixed;
  top: 42%;
  right: 22px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(36, 38, 45, 0.16);
}

.ai-side a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 74px;
  padding: 13px 6px;
  color: #6f7380;
  font-size: 12px;
  line-height: 1.3;
  border-radius: 11px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.ai-side a + a {
  margin-top: 2px;
}

.ai-side a:hover {
  color: var(--ai-red);
  background: #faf6f6;
}

.ai-side svg {
  width: 22px;
  height: 22px;
}

.ai-consult {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 108px;
  transition: transform 0.2s ease;
}

.ai-consult:hover {
  transform: translateY(-3px);
}

.ai-consult img {
  width: 94px;
  height: auto;
}

.ai-top {
  position: fixed;
  right: 30px;
  bottom: 168px;
  z-index: 899;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: #8c909b;
  background: #fff;
  border: 1px solid #ececf0;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(36, 38, 45, 0.12);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,
    color 0.2s ease;
}

.ai-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ai-top:hover {
  color: var(--ai-red);
}

.ai-top svg {
  width: 20px;
  height: 20px;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1600px) {
  .ai-container {
    padding: 0 40px;
  }

  .ai-nav {
    margin-left: 56px;
    gap: 30px;
  }

  .ai-footer__main {
    gap: 36px;
  }

  .ai-footer__hotline {
    font-size: 36px;
  }
}

@media (max-width: 1360px) {
  .ai-nav {
    margin-left: 40px;
    gap: 24px;
  }

  .ai-nav a {
    font-size: 15px;
  }

  .ai-header__actions {
    gap: 20px;
  }

  .ai-header__phone {
    font-size: 16px;
  }

  .ai-logo img {
    height: 48px;
  }
}

@media (max-width: 1180px) {
  .ai-nav,
  .ai-header__actions .ai-header__phone {
    display: none;
  }

  .ai-burger {
    display: block;
  }

  .ai-header__actions {
    gap: 14px;
  }

  .ai-footer__main {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .ai-footer__qrs {
    justify-content: flex-start;
  }
}

@media (max-width: 1024px) {
  #aiHeaderHost {
    height: 81px;
  }

  .ai-container {
    padding: 0 28px;
  }

  .ai-header__inner {
    height: 80px;
  }

  body.ai-nav-open .ai-mobile-nav {
    max-height: calc(100vh - 80px);
  }

  .ai-logo img {
    height: 44px;
  }

  .ai-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .ai-footer__brand,
  .ai-footer__qrs {
    grid-column: span 2;
  }

  .ai-side {
    display: none;
  }

  .ai-consult {
    right: 14px;
    bottom: 16px;
    width: 88px;
  }

  .ai-consult img {
    width: 80px;
  }

  .ai-top {
    right: 22px;
    bottom: 130px;
  }
}

@media (max-width: 768px) {
  .ai-container {
    padding: 0 20px;
  }

  .ai-header__actions .ai-btn--sm {
    min-width: 96px;
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
  }

  .ai-btn {
    min-width: 128px;
    height: 50px;
    padding: 0 28px;
    font-size: 15px;
  }

  .ai-footer__main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 50px;
    padding-bottom: 36px;
  }

  .ai-footer__brand,
  .ai-footer__qrs {
    grid-column: auto;
  }

  .ai-footer__hotline {
    font-size: 30px;
  }

  .ai-footer__col h3 {
    margin-bottom: 14px;
  }

  .ai-footer__qrs {
    gap: 26px;
  }

  .ai-footer__bottom .ai-container {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .ai-header__actions .ai-btn--sm {
    display: none;
  }
}
