/* 开灵官网 · 全站手机端自适应(≤768px竖向单列/拉条子) · 桌面不读此段,零影响
   注入方式:nginx sub_filter 全站注入 <meta viewport> + 本文件 + kl-mega.js(内含汉堡逻辑) */
@media(max-width:768px){
  html,body{overflow-x:hidden!important;max-width:100vw}
  #klroot{overflow-x:hidden!important}
  #klroot img{max-width:100%!important;height:auto}
  #klroot table,#klroot pre{max-width:100%;overflow-x:auto;display:block}

  /* 容器统一留边、满宽 */
  #klroot .klwrap,#klroot .wrap,#klroot .main,#klroot .container,#klroot .Container{width:auto!important;max-width:100%!important;padding-left:16px!important;padding-right:16px!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box}

  /* 所有多列网格/横排 → 单列 */
  #klroot [class*="grid"],#klroot .cols,#klroot .foot .cols,#klroot .row,#klroot .g2,#klroot .g3,#klroot .g4,#klroot .st4,#klroot .about,#klroot .pos,#klroot .pgrid,#klroot .pgrid.p3,#klroot .kl-az4,#klroot .kl-advgrid,#klroot .kl-advmain,#klroot .kl-aznet{grid-template-columns:1fr!important;display:block!important}
  #klroot [class*="grid"]>*,#klroot .kl-aznet>*,#klroot .kl-advmain>*{width:auto!important;margin-bottom:12px}

  /* 装饰/水印/绝对定位大图 隐藏,防溢出 */
  #klroot .kglow,#klroot .ac-wm,#klroot .portal-sec::after,#klroot .portal-sec::before,#klroot .consult .cimg{display:none!important}

  /* 导航:桌面横排菜单隐藏,露 logo + 汉堡(JS注入) */
  #klroot .klnav .klmain,#klroot nav.klmain,#klroot .klnav .acts>*:not(.kl-mham),#klroot .navlinks{display:none!important}
  #klroot .klnav,#klroot header .klwrap.klrow{flex-wrap:nowrap!important}
  .kl-mham{display:flex!important;flex-direction:column;justify-content:center;gap:5px;width:30px;height:30px;margin-left:auto;cursor:pointer;background:none;border:0}
  .kl-mham i{height:2px;width:24px;background:#1f2a3c;border-radius:2px;display:block}
  /* 汉堡展开的下拉菜单 */
  .kl-mmenu{display:none;position:fixed;top:0;right:0;width:78%;max-width:320px;height:100vh;background:#fff;box-shadow:-8px 0 30px rgba(15,50,110,.18);z-index:9999;padding:64px 22px 22px;overflow-y:auto;transition:transform .25s;transform:translateX(100%)}
  body.klm-open .kl-mmenu{display:block;transform:translateX(0)}
  body.klm-open::after{content:"";position:fixed;inset:0;background:rgba(15,30,60,.4);z-index:9998}
  .kl-mmenu a{display:block;padding:14px 4px;font-size:16px;color:#1f2a3c;text-decoration:none;border-bottom:1px solid #eef2f7;font-weight:600}
  .kl-mmenu .kl-mclose{position:absolute;top:18px;right:20px;font-size:26px;color:#5a6b8c;background:none;border:0;line-height:1}

  /* Hero/首屏轮播 */
  #klroot .hgrid{grid-template-columns:1fr!important;gap:14px!important}
  #klroot .hslide,#klroot .hslide .hgrid,#klroot .hslide>div,#klroot .heroart{width:100%!important;max-width:100%!important;min-width:0!important}
  #klroot .hslide h1,#klroot .hero h1,#klroot .hgrid h1,#klroot h1{font-size:26px!important;line-height:1.34!important;white-space:normal!important;word-break:break-word}
  #klroot .sub,#klroot .hero p{font-size:14.5px!important;white-space:normal!important}
  #klroot .hbtns{flex-wrap:wrap!important}
  #klroot .hbtns a{flex:1 1 44%}
  #klroot .harrow,#klroot .hprev,#klroot .hnext,#klroot [class*="arrow"]{display:none!important}

  /* 产品区:双子星大卡取消跨列,序号标题竖排 */
  #klroot .kl-de-card,#klroot .kl-agent-card{grid-column:auto!important;width:auto!important}
  #klroot .det,#klroot .kl-de-card .det{width:auto!important;min-width:0!important}
  #klroot .delogos,#klroot .decaps,#klroot .agtags,#klroot .kl2-tags,#klroot .tags{flex-wrap:wrap!important}
  #klroot .pcat{flex-wrap:wrap!important;align-items:baseline!important}
  #klroot .pcat .cn,#klroot .pcat .cd,#klroot .pcat .rl1,#klroot .pcat .rl2{white-space:normal!important}
  #klroot .pcat .cd{flex:1 1 100%!important;margin-top:2px}
  #klroot .pcat .num,#klroot .pcat.pnum .num{font-size:30px!important}
  #klroot .ptile,#klroot .lcard,#klroot .cert,#klroot .kl-advcard{width:auto!important}

  /* 客户案例(cases .kc-card) */
  #klroot .kc-card{width:auto!important}
  #klroot .kc-cover{height:180px!important}
  #klroot .kc-stats,#klroot .kc-frow{flex-wrap:wrap!important}

  /* 公司区/关于蓝卡 */
  #klroot .kl-aboutcard{padding:22px 18px!important}
  #klroot .kl-aboutcard .ac-title,#klroot .kl-aboutcard .ac-name{font-size:22px!important}

  /* 页脚 */
  #klroot .foot .cols{grid-template-columns:1fr!important;gap:22px!important}
  #klroot .qr{flex-wrap:wrap!important;justify-content:flex-start!important;gap:14px!important}

  /* 留资表单竖排 */
  #klroot .hb-form,#klroot .leadbar form,#klroot .lead form,#klroot .consult,#klroot form.klrow{flex-direction:column!important;align-items:stretch!important}
  #klroot .hb-form input,#klroot .hb-form button,#klroot form input,#klroot form button{width:100%!important}

  /* 区块内距收敛,行距舒适 */
  #klroot .sec{padding-top:34px!important;padding-bottom:8px!important}
  #klroot p{line-height:1.7}
}
