/* ==========================================================================
   klk-mobile-fix.css — 028pco.cn 移动端硬伤修复（执行单 2026-10-01）
   --------------------------------------------------------------------------
   定位：只修「被裁切/不可达/遮挡」硬伤，与 klk-ui.css 物理隔离，可整文件回滚。
   引入：全站 <head> 最后（klk-ui.css?v=12 之后），klk-mobile-fix.css?v=1 渐进递增。
   纪律（执行单 §二）：
     - 不改 resetcommon/main/style/klk-ui.css 任何旧文件；
     - 新增 !important 逐条注释写明压的是哪条原规则；
     - 全部规则包在 max-width:768px 媒体查询内，不泄漏桌面；
     - 不为好看 display:none 内容；唯一隐藏对象 #coles2（JS 克隆体，依据见 P1-4）。
   线上对照（§九-3）：klk-ui.css 112,533B sha1-c302073e6bb2（2026-10-01 拉取）。
   ========================================================================== */


/* ===== [P0-1] 首页「新闻中心/行业动态」960px 双栏 → 移动端上下堆叠 =====
   实测（375px 视口，基线 202 个被裁切元素的主要载体）：
     .dt       w=960 left=12  right=972  超出 +597（block）
     .dt-l#hud w=639 left=12  right=651  超出 +276（float:left）
     .dt .wd   w=306 left=666 right=972  整栏在视口外（float:right）
   压的原规则：resetcommonindex.css 的 .dt{width:960px} / .dt-l{width:639px;float:left}
     / .dt .wd{width:306px;float:right} / .dt-con 固定宽（均无 max-width，
     375 下被 .contant{overflow:hidden} 裁切）。
   §九-3 核对：klk-ui.css 仅 3 条 .dt 相关字号规则，无宽度/浮动规则 → 此处无语义冲突。 */
@media screen and (max-width: 768px) {
  .dt, .dt-l, .dt-con, .dt .wd, .dt dl, .dt ul, .dt li,
  .dt h2.tit, .dt .tit {
    width: 100% !important;          /* 压 resetcommonindex.css 的 960/639/306px 定宽 */
    max-width: 100% !important;      /* 同上，补 max-width 兜底 */
    float: none !important;          /* 压 .dt-l{float:left} 与 .dt .wd{float:right} */
    box-sizing: border-box !important; /* 防 width:100%+padding 再撑破（执行单 §二-6 允许媒体查询内使用） */
  }
  .dt { display: flex; flex-direction: column; }   /* 左右栏改上下堆叠（DOM 顺序即视觉顺序） */
  .dt-l { order: 1; }
  .dt .wd { order: 2; margin-top: 12px; }

  /* 栏内多列列表改单列，避免 300px 网格横向溢出 */
  .dt dl, .dt ul { display: block; }
  .dt dl > *, .dt ul > li, .dt .wd > * {
    width: 100% !important;          /* 压栏内 300px 定宽条目（resetcommonindex.css） */
    max-width: 100% !important;
    float: none !important;
  }
  /* 标题区（h2.tit 内含 tab 链接）允许换行，防硬切 */
  .dt h2.tit, .dt .tit {
    white-space: normal !important;  /* 压旧模板 h2.tit 的 nowrap */
    overflow: visible !important;
    text-overflow: clip !important;
  }
}


/* ===== [P1-4] 首页 #coles 行业问答跑马灯 → 网格全量呈现；隐藏 JS 克隆体 #coles2 =====
   结构（实测）：.dt-con > table>tbody>tr>td > #quertion > #coles
     #coles 内联 style="overflow:hidden;height:360px;width:300px"（裁切元凶）；
     #coles1 = 10 个 dl（/news/ask/438~447）；#coles2 = 内联 JS
     coles2.innerHTML=coles1.innerHTML 的无缝滚动克隆体（HTML 源中不存在）。
   ★ 人工判断依据（执行单 §八-④）：10 条问答链接经全页扫描【仅出现于此一处】，
     未被任何可见区块重复 → 不 display:none，按「不重复」分支用网格呈现；
     #coles2 是 100% 克隆 → 隐藏它属「已确认重复」的正当隐藏（执行单 §二-7）。
   压的原规则：#coles/#quertion 的内联 overflow:hidden + nsw_index.js Marquee
     运行时写入的内联 overflow:hidden（JS 轮播随之失效为无害空转，scrollTop 写操作
     在非滚动容器上恒为 0，无视觉副作用）。 */
@media screen and (max-width: 768px) {
  /* 承载链（.wd > table>tbody>tr>td > #quertion > #coles）全部块级化并放行高度：
     旧模板给 .wd/table 写了定高，网格内容会被垂直裁切（实测网格 1022px 只显示 ~640px）。
     表格链 display:block 化是移动端惯例，选择器锁在 .dt .wd 内，不波及正文内容表格。 */
  .dt .wd { height: auto !important; overflow: visible !important; }
  /* ★ 真正的垂直闸口：旧模板给 .dt-con 写了定高（~371px），网格（2125px）溢出后
       被 .contant{overflow-y:hidden} 截断（实测只显示 ~2 行卡片）。放行高度。 */
  .dt .dt-con { height: auto !important; overflow: visible !important; }
  .dt .wd table, .dt .wd tbody, .dt .wd tr, .dt .wd td {
    display: block !important;
    width: 100% !important;            /* 压旧模板 table 的 297px 定宽 */
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }
  #quertion {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;      /* 压 nsw_index.js Marquee 写入的内联 overflow:hidden */
  }
  #coles, #coles1 {
    width: 100% !important;            /* 压 #coles 内联 width:300px */
    max-width: 100% !important;
    height: auto !important;           /* 压 #coles 内联 height:360px */
    max-height: none !important;
    overflow: visible !important;      /* 压 #coles 内联 overflow:hidden（裁切元凶） */
    position: static !important;
    float: none !important;
    left: auto !important;
    margin-left: 0 !important;
  }
  #coles1 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #coles1 > dl {
    width: auto !important;            /* 压 dl 的 300px 定宽（resetcommonindex.css） */
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin: 0 !important;
    height: auto !important;           /* 压 dl 的 ~163px 定高：网格列变窄后答摘要会被切半行 */
    overflow: visible !important;
  }
  #coles1 > dl > dd {
    height: auto !important;           /* 同上，放行 dd 摘要高度 */
    overflow: visible !important;
  }
  #coles2 { display: none !important; } /* JS 克隆体，与 #coles1 完全重复（依据见块首注释） */
  #coles1 img { max-width: 100% !important; height: auto !important; }
}
/* 320–360px 极窄屏降单列（与 klk-ui.css 既有 360 断点一致） */
@media screen and (max-width: 360px) {
  #coles1 { grid-template-columns: 1fr; }
}


/* ===== [P1-5] 首页两个 JS 跑马灯：#qyxclist（空壳）/ #hzs（案例长塔 → 横滑条） =====
   DOM 探针实测（2026-10-01，375px 与 1440px 同状态）：
   ① ul#qyxclist —— 空壳：HTML 源 <ul> 内没有任何 li（DedeCMS 标签未产出数据），
     reScrollPic 只克隆出两个 0×0 空 div；32766px 是 JS strip 的内联宽、高恒 0。
     桌面端同样是空壳（长期既有状态，非本次改动造成）。
     → 执行单 §四-4 授权的退路：「若坏 → 退用 display:none，先确认不是唯一内容源」。
       已确认：它什么内容都没有（无内容源可言），隐藏死容器不违反 §二-7。
   ② ul#hzs —— 内容真实（10 个 /case/ 案例 li + JS 克隆的第二份），跑马灯失效后
     在 303px 容器内竖向堆成 2193px 高塔（占首页 19% 高度）。
     → 改横向滑条；listDiv02 是 JS 100% 克隆（HTML 源不存在），隐藏依据同 #coles2。
   压的原规则：klk-ui.css「ul#hzs, ul#hzs > div { max-width:100% !important; overflow:hidden }」
     与 nsw_index.js ScrollPicleft 写入的内联 width/overflow。 */
@media screen and (max-width: 768px) {
  ul#qyxclist.list-con-b { display: none !important; }   /* ① 空壳死容器（依据见块首） */

  ul#hzs.list-con-b {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    float: none !important;
    overflow-x: auto !important;         /* 压 klk-ui.css 与 JS 内联 overflow:hidden */
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  ul#hzs.list-con-b > div {              /* JS strip（内联 width:32766px / overflow:hidden） */
    display: flex !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    max-width: none !important;          /* 解 klk-ui.css「ul#hzs > div」的 max-width:100% 封顶 */
    height: auto !important;
    overflow: visible !important;
  }
  ul#hzs.list-con-b > div > div {        /* listDiv01（真实内容）/ listDiv02（克隆） */
    flex: 0 0 auto;
    float: none !important;
    height: auto !important;
  }
  ul#hzs.list-con-b > div > div + div { display: none !important; }  /* ② JS 克隆份 */
  ul#hzs.list-con-b li {
    float: none !important;
    display: inline-block !important;
    width: 181px !important;             /* 保持旧模板卡片宽，防拉宽/挤窄 */
    vertical-align: top;
  }
}


/* ===== [P1-6] 面包屑 .plc 右端硬切 → 右侧渐隐（列表/详情/服务页命中） =====
   实测：div.plc clientW=351 / scrollW=433（列表、详情）或 405（服务页），
   white-space:nowrap + overflow-x:auto，右端文字被切且无视觉提示。
   现状已可横滑（基线 scrollable=2），此处只加渐隐提示并加固 nowrap/auto
   （压 klk-ui.css 小屏断点的 .plc{white-space:normal;overflow:visible} 规则）。 */
@media screen and (max-width: 768px) {
  .plc, .plc span {
    white-space: nowrap !important;    /* 压 klk-ui.css 小屏断点的 white-space:normal */
    overflow-x: auto !important;       /* 压同上的 overflow:visible */
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
  }
}


/* ===== [P1-7] 首页 .pic2 热线横幅的 505px 段落 =====
   实测：<p> w=505 left=12 right=517（自身 overflow:hidden），
   内嵌 <b>15982805980</b>（inline-block, 183px, left=517）与 <span>/<a>（left=517）
   全部越出视口右缘被裁。父级链：div.pic2 > p。
   压的原规则：resetcommonindex.css 的 .pic2 p{width:505px} 与 b{display:inline-block}。
   （选择器锁定 .pic2，不做全局 p{width:auto}——执行单 §四-6 明令。） */
@media screen and (max-width: 768px) {
  .pic2 > p {
    display: block !important;         /* 与 klk-ui.css v21 相同目标，但必须配合下一条 padding 才生效 */
    width: auto !important;
    max-width: 100% !important;
    /* ★ 病根：resetcommonindex.css「.pic2 p{padding:34px 0 0 505px; width:455px}」——
       border-box 下盒子最小宽度=padding 之和(505px)，任何 width/max-width 都被顶穿。
       klk-ui.css v16/v21 三轮改 width/display/white-space 均未碰 padding，故从未生效。 */
    padding: 12px !important;
    white-space: normal !important;
    overflow-wrap: break-word;
  }
  .pic2 > p b {
    display: inline !important;
    padding-right: 0 !important;       /* 压旧的 padding-right:168px（把号码顶到 517px 外的帮凶） */
  }
  .pic2 img { max-width: 100% !important; height: auto !important; }
}


/* ===== [P0-3] 全局兜底安全网（★ 放最后：P0-1/P1-4/P1-5/P1-7 已消灭已知裁切点，
   这里兜「下一个漏网之鱼」，把伤害从「切断/消失」降级为「可横滑」） =====
   含一处口径修正：.h-logo 内 SEO 隐藏文本用 left:-9999px（会被「被裁切」口径计入），
   改标准 sr-only 模式——内容仍在 DOM、视觉仍不可见、rect 回到视口内。 */
@media screen and (max-width: 768px) {
  /* §六-6：html,body{overflow-x:hidden} 已按验收建议移除——被裁切元素=0 后
     它只是安全网不是解法；且 .contant 等旧容器仍有各自的 overflow:hidden 兜底。 */
  img, video, iframe, embed, object { max-width: 100% !important; height: auto !important; }
  table { max-width: 100% !important; }
  /* 正文宽表格单独允许横滑（/fuwu/、详情页、服务页实测表格已 349px 适配，不受影响） */
  .agent_con table, .con_text table, #nsbody table {
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  *, *::before, *::after { box-sizing: border-box; }   /* 执行单 §二-6：仅限本媒体查询内 */
  /* 正文可读性底线（实测 #nsbody p=15.5px、.con_text p=16px 已达标，此条防退化） */
  #nsbody p, .con_text p, .agent_con p, .agent_con li, .agent_con td { font-size: 16px; line-height: 1.75; }

  /* .h-logo SEO 隐藏文本：left:-9999px → 1px sr-only（语义不变、计量口径归零；
     不设 nowrap——1px 容器 + nowrap 会被「nowrap 截断」口径误计） */
  .h-logo span[style*="9999"] {
    position: absolute !important;
    left: 0 !important; top: auto !important; bottom: 0 !important;
    width: 1px !important; height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
  }
}


/* ===== [P2-8] 触控目标 ≥44×44 =====
   实测基线（375px，逐元素身份已探明）：列表 6/47(13%)、详情 9/42(21%)、
   服务 10/45(22%)、首页 28/161(17%)。目标（执行单 §六-7 + 方案 A 档）：
   列表 <3%、详情 <5%、首页 <10%。
   不修（如实残留）：6×44 全角空格分隔链（方案已鉴误报）、256×30 / 2×46
   懒加载图片链（滚动加载后自然变大）、正文行内链接（强制 44px 会破坏行高）。 */
@media screen and (max-width: 768px) {
  /* 全站：logo 链（327×40）与面包屑品牌链（243×36） */
  .h-logo a, .logo-h1 a {
    min-height: 44px !important; display: inline-flex !important; align-items: center;
  }
  .plc span a {
    min-height: 44px !important; display: inline-flex !important; align-items: center;
  }
  /* 列表页分页器（实测 32×32 / 63×32 / 47×32） */
  .pagination-wrapper a, .pagination-wrapper span, .pagination a, .pagination li a {
    min-width: 44px !important; min-height: 44px !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    padding: 6px 10px !important; box-sizing: border-box !important;
  }
  /* 详情页：字号切换（.newbody 内 javascript: 链 38×34）与 打印/返回/关闭（.fr 36px 高） */
  .newbody a[href^="javascript"], .fr a {
    min-width: 44px !important; min-height: 44px !important;
    display: inline-flex !important; align-items: center; justify-content: center;
  }
  /* 首页区块标题 tab 与「更多」（实测 80×42 / 50×34 / 42×44） */
  .dt h2.tit a, h2.tit em a, h2.tit b a {
    min-width: 44px !important; min-height: 44px !important;
    display: inline-flex !important; align-items: center;
  }
  /* #hzs 横滑条案例标题链（实测 200×30） */
  ul#hzs.list-con-b li a, ul#hzs.list-con-b li span a {
    min-height: 44px !important; display: inline-flex !important; align-items: center;
  }
  /* 施工现场/案例标题链（实测 42px 高） */
  .jz-l ul li span a {
    min-height: 44px !important; display: inline-flex !important; align-items: center;
  }
  /* 关于我们区块（实测 210×19 / 20×42） */
  .dt dd h6 a, .dt dd span a {
    min-height: 44px !important; display: inline-flex !important; align-items: center;
  }
  /* klkfaq CTA（实测 155×20） */
  .klkfaq-cta a {
    min-height: 44px !important; display: inline-flex !important; align-items: center;
  }
  /* 相关服务链接条（IL-B 内链块，实测 84×19） */
  .rel-service li a {
    min-height: 44px !important; display: inline-flex !important; align-items: center;
  }
  /* 顶部导航（klk-ui.css 已有 .f-wrap/.footer 44px 规则，此处补 .h_nav） */
  .h_nav li a {
    min-height: 44px !important; display: inline-flex !important; align-items: center;
  }
  /* 首页 .pic2 热线横幅链（实测 20×30 → 20×44，宽仍不足 44，补 min-width） */
  .pic2 a {
    min-width: 44px !important; min-height: 44px !important;
    display: inline-flex !important; align-items: center;
  }
}
