/* ==========================================================================
   官网首页 · 移动端视觉与加载增强层（覆盖式）
   - 仅在 ≤767.98px 生效，不修改 banner.css / home.css / home1.css / navbar.css
   - 不改动 DOM 结构、类名与后台 homepage_modules 数据循环
   - 版本：v=20261126b
   ========================================================================== */

@media (max-width: 767.98px) {
  /* ---------- 0. 移动端变量 ---------- */
  :root {
    --nq-m-gutter: 16px;
    --nq-m-radius: 12px;
    --nq-m-line: #e7ecf4;
    --nq-m-bg: #f6f8fb;
    --nq-m-title: #0f172a;
    --nq-m-body: #475467;
    --nq-m-muted: #667085;
    --nq-m-tap: 44px;
  }

  /* ---------- 1. 顶部导航：紧凑吸顶，去掉实时毛玻璃 ---------- */
  .nq-navbar-glass {
    height: 56px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nq-navbar-glass:hover,
  .nq-navbar-glass.nq-navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body {
    padding-top: 56px;
  }

  .nq-navbar-container {
    height: 56px;
    padding: 0 12px;
  }

  .nq-navbar-logo {
    height: 28px;
    padding: 0;
  }

  .nq-navbar-mobile-toggle {
    top: 6px;
    right: 6px;
    width: var(--nq-m-tap);
    height: var(--nq-m-tap);
  }

  /* 展开态本身带 top/right，这里同步，避免开合时按钮跳动 */
  .nq-navbar-glass.nq-navbar-mobile-open .nq-navbar-mobile-toggle {
    top: 6px;
    right: 6px;
  }

  /* 44px 按钮内让三根线水平居中（原为 left:0） */
  .nq-hamburger-line {
    left: 10px;
  }

  /* 按钮由 40px 放大到 44px，三根线整体下移 3px 保持垂直居中 */
  .nq-hamburger-line:nth-child(1) {
    top: 13px;
  }

  .nq-hamburger-line:nth-child(2) {
    top: 21px;
  }

  .nq-hamburger-line:nth-child(3) {
    top: 29px;
  }

  /* 展开态 X 交点与原中线对齐 */
  .nq-mobile-toggle-active .nq-hamburger-line:nth-child(1),
  .nq-mobile-toggle-active .nq-hamburger-line:nth-child(3) {
    top: 21px;
  }

  .nq-mobile-user-menu {
    top: 6px;
    right: 52px;
  }

  .nq-mobile-user-toggle {
    width: var(--nq-m-tap);
    height: var(--nq-m-tap);
  }

  /* ---------- 2. 首屏 Banner：大图 + 底部白场渐变 + 信息下沉 ---------- */
  .nq-banner {
    height: clamp(340px, 104vw, 460px);
    background-color: #e9eef6;
  }

  /* u85：手机端首屏轮播「闪一下」。
     home.css 为修 PC 端白屏，给 .nq-banner-image 铺了深蓝占位色 #0c3380，
     并让 .nq-image-bg 做 0.32s 淡入；手机端在 page-loader 白色遮罩撤下的
     瞬间会先看到整块深蓝，随后照片淡入，观感即「闪一下」。
     这里只在 ≤767.98px：占位色交还给 .nq-banner 的 #e9eef6，并取消淡入，
     照片就绪即直接呈现。桌面端维持 home.css 原有行为不变。 */
  .nq-banner-image {
    background-color: transparent;
  }

  .nq-banner-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 30%,
      rgba(255, 255, 255, 0.5) 58%,
      rgba(255, 255, 255, 0.9) 82%,
      rgba(255, 255, 255, 0.96) 100%
    );
  }

  .nq-image-bg {
    object-position: center top;
    /* u85：取消 home.css 的 0.32s 淡入，避免「深蓝/浅底 → 照片」的明暗跳变 */
    animation: none;
  }

  .nq-banner-content {
    top: auto;
    bottom: 46px;
    left: var(--nq-m-gutter);
    right: var(--nq-m-gutter);
    width: auto;
    max-width: none;
    min-height: 0;
    gap: 8px;
    justify-content: flex-end;
  }

  .nq-banner-title {
    font-size: 26px;
    line-height: 1.28;
    color: #0b1220;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: calc(1.28em * 2);
  }

  .nq-banner-description {
    height: auto;
    font-size: 14px;
    line-height: 1.55;
    color: #3d4a5c;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: calc(1.55em * 2);
  }

  .nq-banner-btn {
    width: 100%;
    max-width: 240px;
    min-width: 0;
    min-height: var(--nq-m-tap);
    margin-top: 4px;
    padding: 10px 18px;
    font-size: 15px;
    border-radius: 8px;
  }

  .nq-banner-pagination {
    bottom: 14px;
    left: var(--nq-m-gutter);
    right: var(--nq-m-gutter);
    width: auto;
    max-width: none;
    gap: 6px;
  }

  .nq-pagination-item {
    height: 3px;
    border-radius: 2px;
    background: rgba(15, 23, 42, 0.16);
    overflow: hidden;
  }

  .nq-pagination-progress {
    border-radius: 2px;
    background: var(--nq-primary, #1b5ce6);
  }

  /* ---------- 3. Banner 下方快捷卡：2×2 紧凑瓷片 ---------- */
  .nq-banner-card-section {
    padding: 10px 0;
    background: var(--nq-m-bg);
    border-bottom: 0;
  }

  .nq-banner-card-container {
    margin: 0 var(--nq-m-gutter);
  }

  .nq-banner-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nq-banner-card {
    background: #ffffff;
    border: 1px solid var(--nq-m-line);
    border-radius: 10px;
  }

  .nq-banner-card-content {
    min-height: 58px;
    padding: 13px 30px 13px 14px;
    align-content: center;
    gap: 0;
  }

  .nq-banner-card-title {
    font-size: 15px;
    line-height: 1.35;
    color: var(--nq-m-title);
  }

  .nq-banner-card-arrow {
    right: 12px;
    font-size: 16px;
  }

  /* ---------- 4. 区块节奏：统一上下留白、边距与标题层级 ---------- */
  .nq-why-choose-section,
  .nq-product-recommendation-section,
  .nq-discount-section,
  .nq-action-cards-section,
  .nq-solutions-section,
  .nq-customer-cases-section,
  .nq-partners-section,
  .nq-immediate-action-section {
    padding: 40px 0;
  }

  .nq-why-choose-container,
  .nq-product-recommendation-container,
  .nq-discount-container,
  .nq-action-cards-container,
  .nq-solutions-container,
  .nq-customer-cases-container,
  .nq-immediate-action-container {
    margin: 0 var(--nq-m-gutter);
  }

  .nq-why-choose-title,
  .nq-product-recommendation-title,
  .nq-discount-title,
  .nq-solutions-title,
  .nq-customer-cases-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--nq-m-title);
  }

  /* ---------- 5. 为何选择：紧凑信息卡（隐藏 4 张外链雪碧图） ---------- */
  .nq-why-choose-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nq-why-choose-card,
  .nq-why-choose-card:nth-child(n) {
    height: auto;
    min-height: 84px;
    padding: 16px;
    border-radius: var(--nq-m-radius);
  }

  .nq-why-choose-card .nq-sprite-animation,
  .nq-why-choose-card .nq-sprite-animation-2,
  .nq-why-choose-card .nq-sprite-animation-3,
  .nq-why-choose-card .nq-sprite-animation-4 {
    display: none;
  }

  .nq-why-choose-card-number {
    font-size: 16px;
    color: var(--nq-m-muted);
  }

  .nq-why-choose-card-subtitle {
    font-size: 17px;
    font-weight: 600;
    color: var(--nq-m-title);
  }

  .nq-why-choose-card-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--nq-m-body);
  }

  .nq-free-trial-card {
    margin-top: 16px;
    border-radius: var(--nq-m-radius);
    overflow: hidden;
  }

  .nq-free-trial-content {
    padding: 16px;
    gap: 12px;
  }

  .nq-free-trial-text {
    font-size: 14px;
    line-height: 1.5;
  }

  .nq-free-trial-button {
    width: 100%;
    min-height: var(--nq-m-tap);
    margin-left: 0;
    font-size: 14px;
    border-radius: 8px;
  }

  /* ---------- 6. 产品推荐：横向胶囊标签 + 单列卡片 ---------- */
  .nq-product-recommendation-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 16px;
  }

  .nq-product-recommendation-link {
    font-size: 13px;
    font-weight: 500;
  }

  .nq-product-recommendation-nav {
    display: flex;
    gap: 8px;
    padding: 2px 0 12px;
    background: transparent;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }

  .nq-product-recommendation-nav::-webkit-scrollbar {
    display: none;
  }

  .nq-nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--nq-m-body);
    background: #f1f4f9;
    border-radius: 999px;
    scroll-snap-align: start;
  }

  .nq-nav-item:hover {
    color: var(--nq-m-title);
    background: #e8edf5;
  }

  .nq-nav-item.nq-nav-active {
    color: #ffffff;
    background: #0f172a;
  }

  .nq-product-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nq-product-card {
    padding: 16px;
    border-radius: var(--nq-m-radius);
  }

  .nq-product-card-content {
    height: auto;
    margin-bottom: 8px;
  }

  .nq-product-card-title {
    margin-bottom: 6px;
    font-size: 16px;
  }

  .nq-product-card-description {
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  /* 原样式把"了解详情"藏在 hover 里，触摸屏等于不存在 */
  .nq-product-card-link {
    position: static;
    align-self: flex-start;
    min-height: 32px;
    opacity: 1;
    transform: none;
    font-size: 13px;
    font-weight: 500;
  }

  /* ---------- 7. 优惠产品 ---------- */
  .nq-discount-title {
    margin-bottom: 20px;
  }

  .nq-discount-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nq-discount-card {
    border-radius: var(--nq-m-radius);
  }

  .nq-discount-card-content {
    padding: 18px 16px;
  }

  .nq-discount-card-name,
  .nq-discount-card-offer {
    font-size: 17px;
  }

  .nq-discount-card-description {
    font-size: 13px;
    line-height: 1.6;
  }

  .nq-discount-button {
    width: 100%;
    min-height: var(--nq-m-tap);
    font-size: 14px;
    border-radius: 8px;
  }

  /* ---------- 8. 双卡行动区 ---------- */
  .nq-action-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .nq-action-card {
    min-height: 180px;
    border-radius: var(--nq-m-radius);
  }

  .nq-action-card-content {
    padding: 22px 18px;
  }

  .nq-action-card-subtitle {
    font-size: 13px;
  }

  .nq-action-card-title {
    margin-top: 8px;
    font-size: 21px;
  }

  .nq-action-card-button {
    width: 100%;
    min-height: var(--nq-m-tap);
    margin-top: 16px;
    font-size: 14px;
    border-radius: 8px;
  }

  /* ---------- 9. 解决方案 ---------- */
  .nq-solutions-grid {
    gap: 12px;
    margin-bottom: 0;
  }

  .nq-solution-card {
    margin-bottom: 0;
    padding: 18px;
    border-radius: var(--nq-m-radius);
  }

  .nq-solution-card-title {
    font-size: 20px;
    line-height: 1.3;
  }

  .nq-solution-slogan {
    font-size: 14px;
    line-height: 1.55;
  }

  .nq-solution-card-recommend-title {
    font-size: 13px;
    opacity: 0.85;
  }

  .nq-solution-product-btn {
    min-height: 36px;
    padding: 9px 14px;
    font-size: 13px;
    border-radius: 999px;
  }

  /* ---------- 10. 客户案例：去掉全子树 will-change，视频固定比例 ---------- */
  .nq-customer-cases-section * {
    will-change: auto;
  }

  .nq-customer-cases-header {
    margin-bottom: 16px;
  }

  .nq-case-header {
    min-height: 52px;
    padding: 15px 0;
  }

  .nq-case-title,
  .nq-case-header:hover .nq-case-title {
    font-size: 15px;
    font-weight: 600;
  }

  .nq-case-content {
    padding: 0 0 15px;
  }

  .nq-case-description {
    font-size: 13px;
    line-height: 1.7;
  }

  .nq-customer-cases-video {
    margin-top: 2px;
  }

  .nq-customer-cases-video .nq-case-video {
    width: 100% !important;
    height: auto !important;
    max-height: 62vh;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--nq-m-radius);
  }

  /* ---------- 11. 合作伙伴 ---------- */
  .nq-partners-section {
    padding: 32px 0;
  }

  .nq-partner-item {
    flex: 0 0 128px;
    height: 48px;
    margin: 0 6px;
  }

  .nq-partner-logo {
    max-width: 112px;
    max-height: 40px;
  }

  .nq-partners-scroll {
    gap: 2px;
    padding: 6px 0;
  }

  /* ---------- 12. 立即行动 ---------- */
  .nq-immediate-action-grid {
    gap: 10px;
  }

  .nq-action-first-card,
  .nq-action-second-card {
    border-radius: var(--nq-m-radius);
    overflow: hidden;
  }

  /* 空装饰块，移动端单列时会变成一截空白图 */
  .nq-action-first-right {
    display: none;
  }

  .nq-action-first-left {
    padding: 22px 18px;
  }

  .nq-action-first-title,
  .nq-action-second-title {
    font-size: 21px;
    line-height: 1.32;
  }

  .nq-action-first-description,
  .nq-action-second-description {
    font-size: 13px;
    line-height: 1.6;
  }

  .nq-action-first-button,
  .nq-action-second-button {
    width: 100%;
    min-height: var(--nq-m-tap);
    font-size: 14px;
    border-radius: 8px;
  }

  .nq-action-second-item {
    padding: 20px 18px;
  }

  /* ---------- 13. 触摸屏：禁用悬停位移，避免点击后样式卡住 ---------- */
  .nq-banner-card:hover,
  .nq-why-choose-card:hover,
  .nq-product-card:hover,
  .nq-discount-card:hover,
  .nq-partner-item:hover {
    transform: none;
  }

  .nq-banner-card:hover {
    box-shadow: none;
  }
}

/* 小屏微调（iPhone SE 等 ≤374px） */
@media (max-width: 374.98px) {
  .nq-banner-title {
    font-size: 23px;
  }

  .nq-why-choose-title,
  .nq-product-recommendation-title,
  .nq-discount-title,
  .nq-solutions-title,
  .nq-customer-cases-title {
    font-size: 20px;
  }

  .nq-banner-card-title {
    font-size: 14px;
  }

  .nq-product-card,
  .nq-discount-card-content {
    padding: 14px;
  }
}

/* ==========================================================================
   14. 首屏横幅文案：取消 1s 淡入（u89）
   - banner.css 给 .nq-banner-title / -description / -btn 设了 opacity:0 +
     nq-fade-in 1s，移动端首绘后文字/按钮才慢慢显形，微信里表现为「跳一下/闪一下」
   - 这里只改移动端：首屏（首屏 HTML 已带 nq-banner-active）直接完整显示，
     轮播切页时用 0.22s 淡入淡出代替 1s 动画，不出现空白帧
   - 仅覆盖样式，不改 DOM、不改 banner.js、不动 banner.css 基线文件
   ========================================================================== */
@media (max-width: 767.98px) {
  .nq-banner-slide.nq-banner-active .nq-banner-title,
  .nq-banner-slide.nq-banner-active .nq-banner-description,
  .nq-banner-slide.nq-banner-active .nq-banner-btn,
  .nq-banner-slide:not(.nq-banner-active) .nq-banner-title,
  .nq-banner-slide:not(.nq-banner-active) .nq-banner-description,
  .nq-banner-slide:not(.nq-banner-active) .nq-banner-btn {
    animation: none;
    transition: opacity 0.22s ease;
  }

  .nq-banner-slide.nq-banner-active .nq-banner-title,
  .nq-banner-slide.nq-banner-active .nq-banner-description,
  .nq-banner-slide.nq-banner-active .nq-banner-btn {
    opacity: 1;
  }

  .nq-banner-slide:not(.nq-banner-active) .nq-banner-title,
  .nq-banner-slide:not(.nq-banner-active) .nq-banner-description,
  .nq-banner-slide:not(.nq-banner-active) .nq-banner-btn {
    opacity: 0;
  }
}

/* ==========================================================================
   15. 首屏观感与视觉层次强化（u92）
   - 只在 ≤767.98px 生效；纯覆盖，不改 DOM/类名，不动 banner.css 基线
   - 目标：首屏标题一眼可读、按钮更有质感、区块标题有清晰分层
   ========================================================================== */
@media (max-width: 767.98px) {
  /* 标题更醒目：字号 26→28，字距收紧，长标题两行更均衡 */
  .nq-banner-title {
    font-size: 28px;
    line-height: 1.24;
    letter-spacing: -0.02em;
    text-wrap: balance;
    max-height: calc(1.24em * 2);
  }

  /* 描述颜色加深半档、行高略松，亮底上更易读 */
  .nq-banner-description {
    color: #33415c;
    line-height: 1.6;
    max-height: calc(1.6em * 2);
  }

  /* 标题/描述/按钮之间留一点呼吸，不再挤成一块 */
  .nq-banner-content {
    gap: 10px;
  }

  /* 主按钮：圆角 10 + 双层阴影，按下时收光并回弹 1px */
  .nq-banner-btn {
    border-radius: 10px;
    box-shadow: 0 6px 16px -8px rgba(27, 92, 230, 0.55),
      0 1px 2px rgba(16, 24, 40, 0.12);
  }

  .nq-banner-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px -4px rgba(27, 92, 230, 0.5);
  }

  /* 当前分页项加粗，进度条保持品牌色 */
  .nq-pagination-item.nq-pagination-active .nq-pagination-text {
    font-weight: 600;
    color: #0b1220;
  }

  /* 快捷卡圆角并入 12px 体系，加极轻投影，成组更精致 */
  .nq-banner-card {
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  /* 区块标题左侧 3px 品牌色短竖线，滚动时层次一眼分明 */
  .nq-why-choose-title,
  .nq-product-recommendation-title,
  .nq-discount-title,
  .nq-solutions-title,
  .nq-customer-cases-title {
    position: relative;
    padding-left: 11px;
  }

  .nq-why-choose-title::before,
  .nq-product-recommendation-title::before,
  .nq-discount-title::before,
  .nq-solutions-title::before,
  .nq-customer-cases-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0.9em;
    margin-top: -0.45em;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--nq-primary, #1b5ce6), #4f8cff);
  }
}

/* 小屏（iPhone SE 等 ≤374px）同步：竖线版标题字号收一档 */
@media (max-width: 374.98px) {
  .nq-banner-title {
    font-size: 25px;
  }
}
