/* =====================================================
   qing-hero  —  首屏 Hero（背景图 + 眉标/标题/描述/按钮组）
   前缀: qh-
   结构与「关于页首屏 Banner」(.qah-*) 完全一致，只多一个按钮组。

   宽度模型（三层，各管一件事）：
     .qh-wrap   高度 + 定位 + flex 垂直居中。不声明宽度。
     .qh-scene  absolute 背景图 + 渐变遮罩。
     .qh-inner  max-width + margin:0 auto + padding + border-box。

   通栏由外层 Elementor 容器负责（把容器「内容宽度」设为全宽），
   小部件本身不做任何突破容器的操作。
   ===================================================== */
.qh-wrap {
  position: relative;
  height: 520px;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #0b214a;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 背景图层 ---------- */
.qh-scene {
  position: absolute;
  inset: 0;
  background-color: #0b214a;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  background-image: var(--qh-bg, none);
  z-index: 1;
}

.qh-picture,
.qh-background-image {
  display: block;
  width: 100%;
}

.qh-background-image {
  height: auto;
}

/* 完整显示：真实图片参与布局，因此版块高度会跟随图片比例。 */
.qh-wrap.qh-full {
  display: grid;
  height: auto !important;
  min-height: 0 !important;
  align-items: stretch;
}

.qh-full .qh-scene,
.qh-full .qh-inner {
  grid-area: 1 / 1;
}

.qh-full .qh-scene {
  position: relative;
  inset: auto;
}

.qh-full .qh-inner {
  align-self: center;
}

/* 左侧压暗渐变，保证白色文字可读 */
.qh-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11, 33, 74, 0.82) 0%,
    rgba(11, 33, 74, 0.55) 45%,
    rgba(11, 33, 74, 0.15) 100%
  );
}

.qh-no-overlay .qh-scene::after {
  display: none;
}

/* ---------- 内容层 ----------
   border-box 让左右 padding 算在 max-width 之内：
   视口宽于 max-width 时 margin:0 auto 居中；窄于时 padding 仍在，文案不贴边。 */
.qh-inner {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 50px;
  box-sizing: border-box;
}

.qh-left {
  max-width: 640px;
}

/* ---------- 眉标 ---------- */
.qh-eyebrow {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 24px;
}

/* ---------- 标题 ---------- */
.qh-title {
  font-size: 56px;
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  margin: 0 0 26px;
}

/* ---------- 描述 ---------- */
.qh-desc {
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  margin: 0 0 36px;
}

/* ---------- 按钮组 ---------- */
.qh-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
}

.qh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.78);
  box-shadow: none;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease,
    transform 0.24s cubic-bezier(.22,1,.36,1);
  transition-delay: 0s;
}

.qh-btn-primary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.qh-btn-primary:hover,
.qh-btn-primary:focus-visible {
  background: linear-gradient(135deg, #0a367f 0%, #1b62d1 55%, #3a82f5 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
  transform: translate3d(0, -3px, 0);
}

.qh-btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.78);
}

.qh-btn-outline:hover,
.qh-btn-outline:focus-visible {
  background: linear-gradient(135deg, #0a367f 0%, #1b62d1 55%, #3a82f5 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
  transform: translate3d(0, -3px, 0);
}

/* =====================================================
   首屏轮播
   ===================================================== */
.qh-carousel {
  display: block;
  height: var(--qh-height, 520px);
  min-height: var(--qh-min-height, 480px);
}

.qh-slides,
.qh-slide,
.qh-slide-scene {
  position: absolute;
  inset: 0;
}

.qh-slide {
  z-index: 1;
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity var(--qh-slide-speed, 900ms) cubic-bezier(.22,1,.36,1),
              transform var(--qh-slide-speed, 900ms) cubic-bezier(.22,1,.36,1),
              visibility 0s linear var(--qh-slide-speed, 900ms);
  pointer-events: none;
}

.qh-slide.is-active {
  z-index: 2;
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  transition-delay: 0s;
  pointer-events: auto;
}

.qh-slide-scene {
  z-index: 0;
  background-color: #0b214a;
  background-image: var(--qh-slide-bg, none);
  background-position: center right;
  background-repeat: no-repeat;
  background-size: cover;
}

.qh-carousel-contain .qh-slide-scene {
  background-position: center;
  background-size: contain;
}

.qh-slide-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,33,74,.82), rgba(11,33,74,.55) 45%, rgba(11,33,74,.15));
}

.qh-no-overlay .qh-slide-scene::after { display: none; }
.qh-slide .qh-inner { z-index: 2; }

/* 每次换页时，当前页文案重新分层进入。 */
.qing-motion-js .qh-wrap.qh-carousel .qh-slide .qh-eyebrow,
.qing-motion-js .qh-wrap.qh-carousel .qh-slide .qh-title,
.qing-motion-js .qh-wrap.qh-carousel .qh-slide .qh-desc,
.qing-motion-js .qh-wrap.qh-carousel .qh-slide .qh-btn {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity .85s cubic-bezier(.16,1,.3,1), transform .85s cubic-bezier(.16,1,.3,1);
}
.qing-motion-js .qh-wrap.qh-carousel .qh-slide .qh-btn { transition-delay: 0s; }
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-eyebrow,
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-title,
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-desc,
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-btn { opacity: 1; transform: none; }
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-eyebrow { transition-delay: .18s; }
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-title { transition-delay: .30s; }
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-desc { transition-delay: .44s; }
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-btn {
  transition-delay: 0s;
  animation: qh-enter-up .85s cubic-bezier(.16,1,.3,1) .56s backwards;
}
.qing-motion-js .qh-wrap.qh-carousel .qh-slide.is-active .qh-btn:nth-child(2) {
  animation-delay: .66s;
}

.qh-nav {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  background: rgba(5,23,52,.28);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.qh-nav:hover { background: #1677ff; border-color: #1677ff; transform: translateY(-50%) scale(1.06); }
.qh-prev { left: max(18px, calc((100% - 1340px) / 2)); }
.qh-next { right: max(18px, calc((100% - 1340px) / 2)); }

.qh-dots {
  position: absolute;
  z-index: 5;
  bottom: 25px;
  left: 50%;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}
.qh-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: rgba(255,255,255,.52);
  cursor: pointer;
  transition: width .3s ease, background .3s ease;
}
.qh-dot.is-active { width: 30px; background: #fff; }

.elementor-editor-active .qh-carousel[data-qh-carousel] .qh-nav,
.elementor-editor-active .qh-carousel[data-qh-carousel] .qh-dots { pointer-events: auto; }

/* ---------- 进入动效 ---------- */
/* 背景板块先进行大幅度揭幕，文案随后分层进入。场景与文案分别动画，
   避免父子元素共用 transform 后产生叠加位移。 */
.qing-motion-js .qh-wrap .qh-scene {
  overflow: hidden;
  transform-origin: 50% 50%;
  transition: opacity 1.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.45s cubic-bezier(0.16, 1, 0.3, 1),
              clip-path 1.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, clip-path;
}

.qing-motion-js .qh-wrap .qh-background-image {
  transform-origin: 50% 50%;
  transition: transform 1.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.qing-motion-js .qh-wrap:not(.is-motion-visible) .qh-scene {
  opacity: 0;
  transform: translate3d(0, 72px, 0) scale(1.035);
  clip-path: inset(18% 0 0 0);
}

.qing-motion-js .qh-wrap:not(.is-motion-visible) .qh-background-image {
  transform: scale(1.09);
}

.qing-motion-js .qh-wrap.is-motion-visible .qh-scene {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  clip-path: inset(0 0 0 0);
}

.qing-motion-js .qh-wrap.is-motion-visible .qh-background-image {
  transform: scale(1);
}

@keyframes qh-enter-up {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.qing-motion-js .qh-wrap .qh-eyebrow,
.qing-motion-js .qh-wrap .qh-title,
.qing-motion-js .qh-wrap .qh-desc,
.qing-motion-js .qh-wrap .qh-actions .qh-btn {
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.qing-motion-js .qh-wrap:not(.is-motion-visible) .qh-eyebrow,
.qing-motion-js .qh-wrap:not(.is-motion-visible) .qh-title,
.qing-motion-js .qh-wrap:not(.is-motion-visible) .qh-desc,
.qing-motion-js .qh-wrap:not(.is-motion-visible) .qh-actions .qh-btn {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}

.qing-motion-js .qh-wrap.is-motion-visible .qh-eyebrow,
.qing-motion-js .qh-wrap.is-motion-visible .qh-title,
.qing-motion-js .qh-wrap.is-motion-visible .qh-desc,
.qing-motion-js .qh-wrap.is-motion-visible .qh-actions .qh-btn {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.qing-motion-js .qh-wrap.is-motion-visible .qh-actions .qh-btn:hover {
  transform: translate3d(0, -3px, 0);
}

.qing-motion-js .qh-wrap .qh-eyebrow { transition-delay: 0.08s; }
.qing-motion-js .qh-wrap .qh-title { transition-delay: 0.18s; }
.qing-motion-js .qh-wrap .qh-desc { transition-delay: 0.30s; }
.qing-motion-js .qh-wrap .qh-actions .qh-btn { transition-delay: 0s; }

/* 进入时的错峰延迟只交给一次性 animation，不能留在 transition 上，
   否则进入完成后 hover / mouseleave 也会继续等待。 */
.qing-motion-js .qh-wrap:not(.qh-carousel).is-motion-visible .qh-actions .qh-btn {
  animation: qh-enter-up .82s cubic-bezier(.22,1,.36,1) .42s backwards;
}
.qing-motion-js .qh-wrap:not(.qh-carousel).is-motion-visible .qh-actions .qh-btn:nth-child(2) {
  animation-delay: .52s;
}
.qing-motion-js .qh-wrap:not(.qh-carousel).is-motion-visible .qh-actions .qh-btn:nth-child(3) {
  animation-delay: .62s;
}

@media (prefers-reduced-motion: reduce) {
  .qing-motion-js .qh-wrap .qh-scene,
  .qing-motion-js .qh-wrap .qh-background-image,
  .qing-motion-js .qh-wrap .qh-eyebrow,
  .qing-motion-js .qh-wrap .qh-title,
  .qing-motion-js .qh-wrap .qh-desc,
  .qing-motion-js .qh-wrap .qh-actions .qh-btn {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
    clip-path: none;
  }
}

/* =====================================================
   响应式
   高度 / 内边距 / 内容区宽度等已由 Elementor 响应式控件按断点输出，
   此处仅保留字号与文案铺满。
   ===================================================== */
@media (max-width: 900px) {
  .qh-cover .qh-scene {
    background-image: var(--qh-bg-mobile, var(--qh-bg, none));
  }

  /* 手机端填满：保持首屏控件设置的高度，图片等比放大并裁切。 */
  .qh-wrap.qh-full.qh-full-mobile-fill {
    display: flex;
    height: var(--qh-height, 420px) !important;
    min-height: var(--qh-min-height, 380px) !important;
    align-items: center;
  }

  .qh-full-mobile-fill .qh-scene {
    position: absolute;
    inset: 0;
  }

  .qh-full-mobile-fill .qh-picture,
  .qh-full-mobile-fill .qh-background-image {
    width: 100%;
    height: 100%;
  }

  .qh-full-mobile-fill .qh-background-image {
    object-fit: cover;
  }

  .qh-title {
    font-size: 36px;
  }
  .qh-left,
  .qh-desc {
    max-width: none;
  }
  .qh-slide-scene { background-image: var(--qh-slide-bg-mobile, var(--qh-slide-bg, none)); background-position: center; }
  .qh-nav { width: 40px; height: 40px; }
  .qh-prev { left: 12px; }
  .qh-next { right: 12px; }
}

@media (max-width: 480px) {
  .qh-nav { display: none; }
  .qh-dots { bottom: 16px; }
  .qh-title {
    font-size: 28px;
  }
  .qh-eyebrow {
    font-size: 13px;
  }
  .qh-desc {
    font-size: 15px;
  }
  .qh-btn {
    padding: 12px 22px;
    font-size: 14px;
  }
}
