/* ============================================================
 * mobfix.css — wegov.cn 移动端 375px 横向溢出修复层（R2 / P2）
 * 仅在 @media (max-width:480px) 内做增量覆盖，不改变桌面端任何样式。
 * 原则：只收紧字号/换行/按钮折行/表格横滑/媒体限宽，不改文案与结构。
 * ============================================================ */

@media (max-width: 480px) {

  /* ---- 0. 通用保险：杜绝横向视口溢出 ---- */
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  body {
    width: 100%;
  }

  /* ---- 1. 主要区块 padding 收缩 ---- */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* ---- 2. 媒体限宽 ---- */
  img, video, iframe {
    max-width: 100%;
    height: auto;
  }
  video {
    display: block;
    width: 100%;
  }

  /* ---- 3. hero / 主标题：字号收缩 + 允许换行 ---- */
  /* 首页 brand-hero */
  .brand-hero {
    padding: 44px 0;
  }
  .brand-hero h1 {
    font-size: 1.45rem;          /* ~23px */
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .brand-hero p {
    font-size: 0.95rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
  }

  /* 产品/列表页 .hero（pro.css） */
  .hero {
    padding: 34px 0;
  }
  .hero .container {
    gap: 18px;
  }
  /* 关键修复：原 flex:1 1 400px 在 375px 下撑出右缘 */
  .hero-content,
  .hero-image {
    flex: 1 1 100%;
    min-width: 0;
  }
  .hero-content h1 {
    font-size: 1.6rem;           /* ~25.6px，原 2.5rem/40px */
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .hero-content p {
    font-size: 0.98rem;
    overflow-wrap: anywhere;
  }
  .hero-badge {
    font-size: 0.76rem;
    padding: 6px 12px;
    line-height: 1.5;
  }

  /* 内页 page-hero */
  .page-hero h1 {
    font-size: 1.5rem;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .page-hero p {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }

  /* ---- 4. CTA 按钮 / 按钮行：允许折行 ---- */
  .banner-buttons {
    flex-wrap: wrap;
  }
  .banner-buttons .btn,
  .hero-buttons .btn {
    flex: 0 0 auto;
  }
  .btn {
    padding: 11px 20px;
    font-size: 0.95rem;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* ---- 5. 板块标题 / 正文标题 / 段落：允许换行、限宽 ---- */
  .section-title {
    margin: 34px 0;
  }
  .section-title h2,
  .section-title h3 {
    font-size: 1.3rem;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .section-title p {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }
  .article-body,
  .article-body p,
  .solution-block,
  .solution-block p,
  .cta-text p,
  .factory-closure p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .article-body h2,
  .solution-block h2 {
    font-size: 1.28rem;
    line-height: 1.35;
    padding-left: 10px;
  }
  .article-body h3,
  .solution-block h3 {
    font-size: 1.08rem;
    line-height: 1.4;
  }

  /* ---- 6. article / solution 内普通表格：横向滚动（不动 .param-table/.spec-table，二者已有外层滚动包裹） ---- */
  .article-body table,
  .solution-block table,
  .install-table,
  .kv-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- 7. 面包屑允许换行 ---- */
  .breadcrumb {
    font-size: 0.82rem;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* ---- 8. 固定/底部联系条防止溢出 ---- */
  .top-contact-bar,
  .top-contact-bar .container {
    max-width: 100%;
  }
}
