/* 全站移动端基础适配（2026-11-17）
   ----------------------------------------------------------------
   这套模板是桌面版按 750 设计稿等比缩放的产物，在 390px 屏上会出现三类问题：
   1) 正文用 calc(24/750*100vw) 算出来只有 11.44~12.48px，中文笔画糊在一起
   2) .page-content 的百分比内边距叠加，正文区只剩 348px，两侧各留 21px
   3) 内容里的固定像素宽高（Word 粘贴残留、CMS 输出的 width 属性）撑破视口

   本文件只做这三件事，不改变任何页面的信息结构。
   引用范围：web/site 下全部 HTML（含 en/）
   改内容请同步提升引用处 ?v= 版本号，否则 7 天缓存内看不到
   ---------------------------------------------------------------- */

@media (max-width: 767px) {

  /* ---------- 1. 容器留白 ---------- */
  /* 左右 20px（原为 26+20.8 两层叠加共 47px）。
     16px 是常见下限，但在 390 屏上文字会贴到屏幕边缘；20px 时
     一行仍有 21.9 个汉字（350/16），字数代价不到半个字，
     呼吸感明显好于 16px。 */
  article .page-content {
    padding-left: 20px;
    padding-right: 20px;
  }
  /* 模板在横幅和内容之间留了一个 <p><!-- mv --></p> 的空占位，
     正文统一设成 16px/1.85 之后它被撑到 30px 高，白白吃掉一条间距。
     另外编辑器常留下 <p><br/></p> 这种「只有一个换行」的空段，
     在招聘页里连排三个，把白卡片撑出 90px 空洞。 */
  article > p:empty {
    display: none;
  }
  article .page-content p:has(> br:only-child) {
    display: none;
  }

  /* ---------- 2. 正文字号 ---------- */
  /* 11.44px 是本模板在 390px 屏上的正文实际值（22/750*100vw）。
     原规则是 #sec01 .text 这种带 ID 的选择器，特异性 (1,1,0) 高于本文件，
     所以必须 !important 才能覆盖；详情页内联的 font-size:14px 同理。 */
  article .page-content p,
  article .page-content .text {
    font-size: 16px !important;
    line-height: 1.85;
  }
  /* 详情页正文里的内联 font-size:14px 也要跟着统一 */
  article #sec02 .field p {
    font-size: 16px !important;
    line-height: 1.9 !important;
    /* 内联写的是 24px（1.5 个汉字），中文正文标准是缩进 2 字符 */
    text-indent: 2em !important;
  }
  /* 段落间距：原模板段落 margin 为 0，全靠首行缩进区分，小屏上太挤 */
  article .page-content p + p {
    margin-top: 0.6em;
  }

  /* ---------- 3. 图片不得撑破视口 ---------- */
  /* width 属性与内联 width 会优先于百分比；只给上限，比例交给浏览器 */
  article .page-content img {
    max-width: 100%;
  }
  /* Word 粘贴会留下超大左边距（28.html 有 margin-left:684.792px），直接裁掉 */
  article .page-content p[style*="684.792px"],
  article .page-content div[style*="684.792px"] {
    margin-left: 0 !important;
    text-align: right;
  }

  /* ---------- 4. 顶部横幅 ---------- */
  /* 186px 的横幅吃掉了首屏四分之一，收到 150px */
  article #mv .mv-inner {
    height: 150px !important;
  }

  /* ---------- 5. 横向溢出兜底 ---------- */
  article {
    overflow-x: hidden;
  }
  .navbar,
  .navbar .container,
  .navbar .navbar-header {
    max-width: 100vw;
  }

  /* ---------- 6. 图片网格 ---------- */
  /* .hcontent .img-cat 是通用图片/证书网格（16 个页面在用），
     每格固定 33.33%；390 屏上每格只有 110px，证书上的字和图都糊成一片。 */
  article .hcontent .img-cat > .plane {
    width: 50%;
    padding: 6px;
  }
  article .hcontent .img-cat .img-title {
    font-size: 12px;
    line-height: 1.45;
    margin-top: 4px;
  }
  /* 模块标题是内联 font-size:30px */
  article .hcontent p[style*="font-size: 30px"] {
    font-size: 20px !important;
    margin-bottom: 8px !important;
  }

  /* ---------- 7. 重复的页面标题 ---------- */
  /* 频道页顶部横幅已经用大字写了页面名，.about-content 里又重复一次
     （同一个词相隔约 100px），移动端首屏本就紧张，这里收掉。
     .about-content 只包含这一个标题块，正文在 .page-content 里，不受影响。 */
  article .about-content > section {
    display: none;
  }

  /* ================================================================
     8. 视觉统一（只调视觉属性，不动任何内容与顺序）

     依据：
     - 单一强调色。客户是主机厂采购与工程师，判断语汇是「精密、可靠」，
       不是活泼；界面里只保留品牌蓝，红色只存在于证书原图里。
     - 圆角 4px。零件是车出来的，边缘锐利；8px 以上会滑向消费品语气。
     - 不用阴影。用 1px 线分层，接近产品目录/规格书的阅读习惯，
       阴影是 SaaS 卡片的通用套路，放在工业目录里不合语气。
     - 字阶 28 / 22 / 17 / 16 / 12 / 11，六档，不出现 33.28、11.44 这类
       设计稿换算出来的零碎值。
     ================================================================ */

  /* 8.1 分隔线：原来是 #1c1c1c 近黑，一条条横线像表格框；
     放到 #cfd6df —— 浅到不抢注意力，又能把两条新闻分开 */
  article #sec02 .newList {
    border-top-color: #cfd6df;
    padding: 18px 0 20px;
  }
  article #sec02 .newList:first-child {
    padding-top: 6px;
  }
  /* 卡片内部节奏：日期→标题 10，标题→摘要 6，摘要→图 14 */
  article #sec02 .newPicBox {
    margin-top: 14px;
  }
  article #sec02 .newMs {
    margin-top: 8px;
  }

  /* 8.2 灰阶收敛：原来 #9a9a9a / #8a8a8a / #999 三种灰 */
  article #sec02 .newTime {
    color: #8b95a1;
  }
  article #sec02 .newMs {
    color: #5b6673;
  }
  article #sec02 .field p {
    color: #2a2f36;
  }
  article .hcontent .img-cat .img-title {
    color: #5b6673;
  }

  /* 8.3 圆角统一 4px：原来列表 6 / 详情 6 / 证书 0 / 产品 0+深蓝描边 */
  article #sec02 .field .newPicBox,
  article #sec02 .field .newPicBox img {
    border-radius: 4px;
  }
  article #sec02 .field .tupian2 img {
    border-radius: 4px;
  }
  /* 证书是白底扫描件，在浅灰底上没有边界，补一条中性细线 */
  article .hcontent .img-cat img {
    border-radius: 4px;
    border: 1px solid #e4e7eb;
    background: #fff;
  }
  /* 产品图原来描边是 #083b6d 深蓝，与统一的灰线冲突，改中性 */
  article .pan img {
    border: 1px solid #dbe1e8 !important;
    border-radius: 4px;
  }

  /* 8.4 字阶：banner 33.28px 是页面最大字，但下方标题只有 17px，
     中间空了一档。收到 28px，与详情页 22px 形成可读的层级差。 */
  article #mv .text-box .article-title {
    font-size: 28px !important;
    letter-spacing: 0.02em;
  }
  /* 频道页栏目标题（Who we are 等）同步收敛 */
  article .hcontent p[style*="font-size: 30px"] {
    font-size: 18px !important;
    letter-spacing: 0.01em;
  }

  /* ================================================================
     9. 逐页核查后的修正（32 页全部截过一遍才发现的）

     9.1 频道页正文只有 275px
     #sec01 .inner 20.8px + .about-box 20.8px 两层百分比内边距，
     加上 .page-content 的 16px，正文起点被推到 58px，右侧只剩 10px 余量。
     正文宽 275 → 358。
     ================================================================ */
  article #sec01 .inner {
    padding-left: 0;
    padding-right: 0;
  }
  article #sec01 .about-box {
    padding-left: 0;
    padding-right: 0;
  }

  /* 9.2 招聘页字号失控
     内容是 <span style="font-size: 36px">联系人：张女士…</span>，
     内联字号写在 span 上，p 的 16px 管不到它；36px 下邮箱地址
     「hr@ningbominda.com」被硬断成「hr@ningbominda.c」/「om」。
     让 .hcontent 里带内联字号的 span 回归段落字号。 */
  article .hcontent p span[style*="font-size"] {
    font-size: inherit !important;
  }

  /* 9.3 模块容器的左右内联 padding 是 25px，内容与配图都缩水 */
  article .hcontent {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  /* ================================================================
     10. 厂房数据（发展历程页第二屏以下）

     原设计：.point::before 画一条竖线当时间轴，.point-item 用背景图
     bg_point-item1.png 表现「节点卡片」，卡片内是 flex row：
     厂名固定 49px，三项指标挤在右侧，390 屏上标签与数值完全错位。

     卡片高度是靠背景图比例定死的，内容一旦纵向排列就会溢出到框外。
     所以移动端放弃「时间轴 + 背景图」这套图形语汇，换成三张普通卡片：
     390 屏上时间轴的节点隐喻换不来可读性，内容对应关系才是第一位。
     ================================================================ */
  article .point::before {
    display: none !important;
  }
  article .point-list {
    display: block !important;
  }
  article .point-item {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 14px 16px !important;
    margin-bottom: 12px;
    background-image: none !important;
    border: 1px solid #dbe1e8;
    border-radius: 4px;
    text-align: left !important;
  }
  article .point-item:last-child {
    margin-bottom: 0;
  }
  article .point-item .item-number {
    font-size: 16px !important;
    font-weight: 600;
    color: #14181d !important;
    margin-bottom: 6px;
  }
  article .point-item .item-text {
    font-size: 14px !important;
    line-height: 1.75 !important;
    color: #5b6673 !important;
    margin: 0;
    padding: 0 !important;
  }

  /* 9.4 无配图的新闻条目：摘要放到三行，缩小与有图条目 220px 的高度差，
     让列表节奏不至于断成两段 */
  article #sec02 .newList:not(:has(.newPicBox)) .newMs {
    -webkit-line-clamp: 3;
    max-height: calc(1.7em * 3);
  }
  article #sec02 .newList:not(:has(.newPicBox)) {
    padding-bottom: 26px;
  }

  /* 10.1 修正：正文首行缩进把含图片的段落也推右了 32px，导致
     详情页 27/29/30/31/32 的 7 张图右侧超出视口 12px 被裁。
     含图的段落取消缩进。 */
  article #sec02 .field p:has(img) {
    text-indent: 0 !important;
  }

  /* ================================================================
     11. 产品展示网格（6.html / en/channels/37.html）

     原设计：.pan 宽 50%、padding 10px，标签 .number 绝对定位浮在图片
     左上角（left:10px, top:3px）。390 屏上每格只有 157px，标签色块
     宽 135~145px 直接盖住图片上部；英文标签两行时色块高 46px，比产品
     图还宽，看起来像贴歪的标签。

     改为：卡片内有顺序的「图 → 标签」，标签不再遮挡图片，高度统一。
     第 7 个（单数）横排收尾，避免右侧空洞。
     ================================================================ */
  article .hcontent .img-cat-s > .pan {
    padding: 0 !important;
    height: 148px;
    border: 1px solid #dbe1e8 !important;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }
  article .hcontent .img-cat-s > .pan > img {
    order: 1;
    flex: 0 0 92px;
    width: 100% !important;
    height: 92px !important;
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
    background: #fff;
  }
  article .hcontent .img-cat-s .number {
    position: static !important;
    order: 2;
    flex: 1;
    left: auto !important;
    top: auto !important;
    display: flex;
    align-items: center;
    background: #f7f8fa !important;
    color: #14181d !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    padding: 8px 10px !important;
    border-top: 1px solid #eef0f3;
    text-align: left;
  }
  /* 第 7 个分类：横排收尾 */
  article .hcontent .img-cat-s > .pan:last-child {
    width: 100% !important;
    height: 92px;
    flex-direction: row;
  }
  article .hcontent .img-cat-s > .pan:last-child > img {
    flex: 0 0 50%;
    height: 92px !important;
  }
  article .hcontent .img-cat-s > .pan:last-child .number {
    border-top: 0;
    border-left: 1px solid #eef0f3;
  }
}
