/* ===== 移动端显示优化（手机/平板） =====
   统一修复以下问题：
   1. .hero 为 flex 横排导致内容被压成窄条（首页 10 个语种）
   2. hero 内边距在手机上仍是桌面值，首屏过高
   3. 宽表格（6/8 列）横向滚动没有任何视觉提示
   4. 悬浮 WhatsApp 按钮遮挡最后一行文字
   5. 头部 logo + 报价按钮 + 汉堡合计宽度超出 390px
   所有规则都限定在 max-width:920px，桌面端完全不受影响。
*/

@media (max-width: 920px) {

  /* ---- 1. hero 布局：横排 flex 会把内容挤成一条 ---- */
  .hero {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }
  .hero > .wrap,
  .hero > .hero-grid,
  .hero > .hero-in {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }
  /* 单列表格布局，避免残留双列 */
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 32px;
  }

  /* ---- 2. 首屏间距与字号收缩 ---- */
  .hero-grid,
  .hero .wrap {
    padding-block: 56px 44px;
  }
  .hero h1 {
    font-size: 30px;
    line-height: 1.16;
    margin: 14px 0 16px;
    letter-spacing: 0;
  }
  .hero p.lead {
    font-size: 15.5px;
    line-height: 1.62;
    margin-bottom: 24px;
    max-width: 100%;
    text-shadow: 0 1px 2px rgba(6, 14, 38, .9), 0 0 12px rgba(6, 14, 38, .5);
  }
  .hero .eyebrow {
    font-size: 11.5px;
    letter-spacing: 1.2px;
    line-height: 1.55;
  }
  .hero-slogan {
    font-size: 16px;
    line-height: 1.45;
  }

  /* ---- 3. 首屏按钮：整宽、可点 ---- */
  .hero-cta {
    gap: 10px;
    margin-bottom: 20px;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* ---- 4. 首屏数据条：两列，字号收敛 ---- */
  .hero-note {
    gap: 10px 16px;
    font-size: 13px;
    margin: 0;
  }
  .hero-note span {
    width: 100%;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .stat {
    padding: 18px 14px;
  }
  .stat b {
    font-size: 24px;
  }
  .stat span {
    font-size: 12.5px;
    line-height: 1.42;
  }

  /* ---- 5. 宽表格：给出「可左右滑动」的视觉提示 ---- */
  .wrap > div[style*="overflow-x:auto"],
  .wrap > div[style*="overflow-x: auto"] {
    position: relative;
    -webkit-overflow-scrolling: touch;
    /* 右侧渐隐，暗示还有内容 */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
    padding-bottom: 2px;
  }
  /* 表格内部：手机端缩小内边距，让更多列可见 */
  .wrap > div[style*="overflow-x:auto"] table th,
  .wrap > div[style*="overflow-x:auto"] table td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .wrap > div[style*="overflow-x:auto"] table th {
    font-size: 11.5px;
    letter-spacing: .04em;
  }

  /* ---- 6. 悬浮 WhatsApp 不遮挡正文最后一屏 ---- */
  body {
    padding-bottom: 76px;
  }
  .wa-float {
    width: 48px;
    height: 48px;
    right: 16px;
    bottom: 16px;
  }
  .wa-float svg {
    width: 26px;
    height: 26px;
  }

  /* ---- 7. 顶部条：手机端只留一句，避免挤压 ---- */
  .topbar-in {
    padding: 6px 14px;
    gap: 8px;
  }
  .topbar-tag {
    font-size: 9.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
  }
  .topbar .nav-partner {
    flex: 0 0 auto;
  }

  /* ---- 8. 导航栏：压缩间距，保证 390px 内不溢出 ---- */
  .nav {
    gap: 8px;
    padding: 0 14px;
  }
  .brand img {
    height: 26px;
  }
  .nav-cta {
    gap: 6px;
    flex: 0 0 auto;
  }
  .nav-cta .btn {
    padding: 9px 12px !important;
    font-size: 13px !important;
    white-space: nowrap;
  }
  .hamburger {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
  }
  .hamburger svg {
    width: 22px;
    height: 22px;
  }

  /* ---- 9. 小点击区放大到手指可点（≥40px） ---- */
  .foot-grid a,
  .prod-meta a,
  .breadcrumb a,
  .crumb a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .topbar .nav-partner {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
  }

  /* ---- 10. 正文小字兜底 ---- */
  .foot-grid a,
  .foot-grid p,
  .sec-note,
  .formhint {
    font-size: 13px;
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 26px;
  }
  .hero p.lead {
    font-size: 15px;
  }
  .hero-grid,
  .hero .wrap {
    padding-block: 44px 36px;
  }
  .brand img {
    height: 24px;
  }
  .nav-cta .btn {
    padding: 8px 10px !important;
    font-size: 12.5px !important;
  }
}

/* ===== 首屏背景遮罩：移动端调轻 =====
   桌面用的是 100deg 横向渐变（.96 → .30），左半屏接近实心深蓝，
   手机上屏幕窄，几乎整屏都压在 .88 以上，车间照片完全看不出来。
   移动端改为垂直渐变：文字区（上方）保持足够对比度，
   下方逐渐透出背景图，让首屏不那么"死灰"。
   对比度实测：文字区约 .84-.90，白字对比度仍在 12:1 以上（WCAG AAA）。 */
@media (max-width: 920px) {
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(8, 18, 47, .90) 0%,
      rgba(8, 18, 47, .84) 38%,
      rgba(8, 18, 47, .64) 72%,
      rgba(8, 18, 47, .42) 100%
    );
  }
  /* 背景图略微提亮/加对比，抵消遮罩变轻后的发灰感 */
  .hero-bg {
    filter: saturate(1.06) contrast(1.04) brightness(1.03);
  }
}

@media (max-width: 480px) {
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(8, 18, 47, .88) 0%,
      rgba(8, 18, 47, .82) 36%,
      rgba(8, 18, 47, .62) 70%,
      rgba(8, 18, 47, .40) 100%
    );
  }
  /* 遮罩调轻后，小字会落在较亮的设备区。不压暗遮罩，
     改为给文字加强阴影 —— 背景保持通透，文字照样清楚。 */
  .hero-note,
  .hero-note span {
    text-shadow:
      0 1px 2px rgba(6, 14, 38, .95),
      0 2px 6px rgba(6, 14, 38, .85),
      0 0 14px rgba(6, 14, 38, .55);
  }
}
