/* ==========================================================================
   198bona.com 手机端修复层  v1.0  (仅 ≤768px 生效)
   目的：不改模板、不动桌面端，先用一个 CSS 覆盖层把"排版塌陷"止血。
   验证：注入后在 390px 视口实测，详情页 .news_detail_info 由 40px → 358px，
        页面高度由 24,305px → 约 4,xxx px。
   ========================================================================== */

@media (max-width: 768px) {

  /* ---------- 0. 基础 ---------- */
  html { -webkit-text-size-adjust: 100%; }
  .w1200 { width: 100%; }
  .page_content { background: #f5f7f9; }

  /* ---------- 1. 详情页：取消 flex 双栏，正文占满一屏 ---------- */
  .news_detail_main {
    display: block !important;
    padding: 0 !important;
    background: #fff;
  }
  .news_detail_info {
    float: none !important;
    width: 100% !important;
    padding: 16px 16px 8px !important;
  }
  /* 侧栏（资讯分类 / 热门搜索）移到正文之后，不再挤压正文 */
  .news_detail_page {
    width: 100% !important;
    float: none !important;
    margin: 12px 0 0 !important;
    padding: 18px 16px 6px !important;
    border-top: 8px solid #f5f7f9;
  }

  /* ---------- 2. 详情页排版 ---------- */
  .news_detail_title {
    text-align: left !important;
    padding-bottom: 14px !important;
    margin-bottom: 18px !important;
    border-bottom: 1px solid #eef0f3 !important;
  }
  .news_detail_title h1 {
    font-size: 21px !important;
    line-height: 1.45 !important;
    padding: 0 !important;
  }
  .news_detail_title .news_detail_time time,
  .news_detail_title .news_detail_time p {
    display: block !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.7 !important;
    color: #98a1ac !important;
  }
  .news_detail_txt p {
    font-size: 16px !important;
    line-height: 1.85 !important;
    margin: 13px 0 !important;
    color: #333 !important;
  }
  .news_detail_txt span { line-height: 1.85 !important; }
  .news_detail_txt h2 {
    font-size: 18px !important;
    line-height: 1.45 !important;
    margin: 26px 0 10px !important;
    padding-left: 10px !important;
    border-left: 3px solid #e10000;
  }
  .news_detail_txt img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 10px 0 !important;
    border-radius: 8px;
  }
  .news_detail_txt table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
  }
  .news_detail_txt iframe { max-width: 100% !important; }

  /* 上一篇 / 下一篇：竖排、可点区域更大 */
  .page_fenye { padding: 18px 0 6px !important; }
  .page_fenye a {
    width: 100% !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin-bottom: 8px !important;
    color: #666 !important;
  }
  .page_fenye .page_more {
    position: static !important;
    margin-top: 6px;
  }
  .page_fenye .page_more a {
    width: 100% !important;
    padding: 0 !important;
    height: 42px;
    line-height: 40px !important;
    text-align: center;
    border-radius: 8px !important;
  }

  /* ---------- 3. 面包屑：单行、可横滑，标题不再溢出压行 ---------- */
  .case_detail_nav,
  .news_nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 0 !important;
    overflow: hidden;
  }
  .case_detail_nav h3,
  .news_nav h3 {
    flex: none;
    font-size: 12px !important;
    margin: 0 !important;
    color: #98a1ac !important;
  }
  .case_detail_tit_ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 12px !important;
    line-height: 1.6;
    scrollbar-width: none;
    margin: 0 !important;
  }
  .case_detail_tit_ul::-webkit-scrollbar { display: none; }
  .case_detail_tit_ul a {
    flex: none;
    display: inline-block !important;
    font-size: 12px !important;
    color: #98a1ac !important;
    padding: 0 2px;
  }
  .case_detail_tit_ul a:last-child {
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #6b7480 !important;
  }

  /* ---------- 4. 案例列表：3 列 → 2 列网格，图片回到正常比例 ---------- */
  .case_all_ul {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 14px 16px 0 !important;
    overflow: visible !important;
  }
  .case_all_ul > li {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20, 30, 45, .06);
  }
  .case_all_ul > li:nth-child(3n-1) { margin: 0 !important; }

  /* 关键：原来写死 height:263px，卡片只有 115px 宽 → 图片被压成 115×263 */
  .case_all_ul > li .img a { display: block; border-radius: 10px 10px 0 0; }
  .case_all_ul .img a img,
  .case_all_ul > li .img img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 0 !important;
    border-radius: 10px 10px 0 0;
  }
  .case_all_ul > li:hover .img img { transform: none; }

  /* 卡片标题：原来 width:calc(100% - 130px) 在 115px 卡里算出负值 → 标题塌成竖排 */
  .case_all_ul li .txt {
    padding: 9px 11px 11px !important;
    background: #fff !important;
  }
  .case_all_ul li .txt h2 { margin: 0 !important; }
  .case_all_ul li .txt h2 a {
    float: none !important;
    width: 100% !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    -webkit-line-clamp: 2;
    min-height: 39px;
  }
  .case_all_ul li .txt h2 p { display: none !important; }
  .case_all_ul li .txt_p { display: none !important; }

  /* ---------- 5. 一级分类 tab：等宽分段控件 ---------- */
  .case_select { padding: 12px 0 0 !important; }
  .case_select_ul {
    display: flex !important;
    gap: 8px;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    background: #fff;
  }
  .case_select_ul li {
    float: none !important;
    flex: 1;
    margin: 0 !important;
  }
  .case_select_ul li a {
    text-align: center;
    font-size: 14px !important;
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 !important;
    border-radius: 8px;
  }

  /* ---------- 6. 二级分类：横向滚动 chips ---------- */
  .case_list_list { padding: 12px 0 0 !important; }
  .case_list_list_ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px 6px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #fff;
  }
  .case_list_list_ul::-webkit-scrollbar { display: none; }
  .case_list_list_ul li {
    float: none !important;
    flex: none;
    margin: 0 !important;
  }
  .case_list_list_ul li h2 {
    font-size: 13px !important;
    line-height: 32px !important;
    height: 32px !important;
    color: #98a1ac !important;
    margin: 0 !important;
  }
  .case_list_list_ul li a {
    height: 32px !important;
    line-height: 30px !important;
    padding: 0 13px !important;
    border: 1px solid #e9ecf0;
    border-radius: 16px;
    font-size: 13px !important;
    background: #fff;
  }
  .case_list_list_ul li.active a {
    background: #e10000;
    border-color: #e10000;
    color: #fff;
  }

  /* ---------- 7. 分页：原来 li / a 都写死 50px，a 还有 1px 边框 → 溢出参差 ---------- */
  .p_page { margin: 18px 0 26px !important; }
  .p_page_list {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
  }
  .p_page_list li {
    float: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
  }
  .p_page_list li a,
  .p_page_list li.thisclass {
    display: flex;
    align-items: center;
    justify-content: center;
    float: none !important;
    width: auto !important;
    min-width: 38px;
    height: 38px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 10px;
    border: 1px solid #e9ecf0;
    border-radius: 9px;
    font-size: 13px;
    background: #fff;
  }
  .p_page_list li.thisclass {
    background: #e10000;
    border-color: #e10000;
    color: #fff;
  }

  /* ---------- 8. 文章 / 资讯列表（.news_all_ul）：3 列 → 单列左图右文 ---------- */
  .news_all_ul {
    display: block !important;
    padding: 12px 16px 0 !important;
    overflow: visible !important;
  }
  .news_all_ul li {
    width: 100% !important;
    float: none !important;
    margin: 0 0 10px !important;
    padding: 12px !important;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(20, 30, 45, .06);
    box-sizing: border-box;
  }
  .news_all_ul li .img {
    float: left !important;
    width: 104px !important;
    height: 78px !important;
    margin: 0 12px 0 0 !important;
    border-radius: 6px;
    overflow: hidden;
  }
  .news_all_ul li .img img {
    width: 104px !important;
    height: 78px !important;
    object-fit: cover;
    object-position: left center;
    border-radius: 6px;
  }
  .news_all_ul li .txt {
    overflow: hidden;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
  }
  .news_all_ul .news_title { margin: 0 0 5px !important; }
  .news_all_ul .news_title a,
  .news_all_ul .news_title b {
    font-size: 14px !important;
    line-height: 1.45 !important;
    font-weight: 600 !important;
    color: #1b1f24 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal !important;
  }
  .news_all_ul .news_p p {
    font-size: 12px !important;
    line-height: 1.55 !important;
    color: #8b939d !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .news_all_ul .news_more {
    clear: both;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-top: 9px !important;
    margin: 0 !important;
    border-top: 1px solid #f2f4f7;
    font-size: 11px;
    color: #a5adb6;
  }

  /* ---------- 9. 资讯分类（20 个链接）→ 横向滚动 chips ---------- */
  .news_list { padding: 12px 0 2px !important; overflow: visible !important; }
  .news_list_ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px 6px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .news_list_ul::-webkit-scrollbar { display: none; }
  .news_list_ul li { float: none !important; flex: none; margin: 0 !important; }
  .news_list_ul li a {
    display: block;
    height: 32px !important;
    line-height: 30px !important;
    padding: 0 13px !important;
    border: 1px solid #e9ecf0;
    border-radius: 16px;
    font-size: 13px !important;
    background: #fff;
    white-space: nowrap;
  }
  .news_list_ul li.active a {
    background: #e10000;
    border-color: #e10000;
    color: #fff;
  }

  /* ---------- 10. 内页 banner 与页脚 ---------- */
  .page_banner img { max-height: 190px; object-fit: cover; }
  footer .copyright_title .img img,
  footer .copyright .img img {
    width: 84px !important;
    height: 84px !important;
  }
  footer { font-size: 12px; }
}

/* 老系统兜底：不支持 aspect-ratio 的 iOS 14- 用固定比例盒 */
@supports not (aspect-ratio: 4 / 3) {
  @media (max-width: 768px) {
    .case_all_ul > li .img a { position: relative; padding-top: 75%; }
    .case_all_ul > li .img a img {
      position: absolute; left: 0; top: 0;
      width: 100% !important; height: 100% !important;
    }
  }
}

/* ==========================================================================
   11. 手机端导航抽屉 / 底部操作条 / 二维码弹层   v20261107a
   桌面端全部隐藏，仅 ≤768px 生效
   ========================================================================== */
.mui-burger, .mui-mask, .mui-drawer, .mui-bar, .mui-qr { display: none; }

@media (max-width: 768px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important; }

  .mui-burger {
    display: flex; position: fixed; left: 10px; top: 12px; z-index: 9020;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px;
    background: rgba(255, 255, 255, .95); box-shadow: 0 2px 10px rgba(20, 30, 45, .14);
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  }
  .mui-burger span { width: 17px; height: 2px; border-radius: 2px; background: #1b1f24; transition: transform .25s, opacity .2s; }
  body.mui-open .mui-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.mui-open .mui-burger span:nth-child(2) { opacity: 0; }
  body.mui-open .mui-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .mui-mask {
    display: block; position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 9000;
    background: rgba(10, 15, 22, .5); opacity: 0; visibility: hidden; transition: opacity .25s;
  }
  body.mui-open .mui-mask { opacity: 1; visibility: visible; }

  .mui-drawer {
    display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 78%; max-width: 320px;
    background: #fff; z-index: 9010; transform: translateX(-102%);
    transition: transform .28s cubic-bezier(.22, .61, .36, 1);
    flex-direction: column; overflow-y: auto; box-shadow: 8px 0 30px rgba(10, 20, 35, .18);
  }
  body.mui-open .mui-drawer { transform: translateX(0); }
  .mui-dh { padding: 22px 18px 18px; background: linear-gradient(135deg, #151b22, #232d38); color: #fff; }
  .mui-logo { display: block; height: 30px; width: auto; }
  .mui-dh p { margin: 10px 0 0; font-size: 11px; line-height: 1.5; color: #9fb0c0; letter-spacing: .3px; }
  .mui-nav { padding: 4px 0; }
  .mui-nav a {
    display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 18px;
    font-size: 15px; color: #1b1f24; text-decoration: none; border-bottom: 1px solid #f2f4f7;
  }
  .mui-nav a::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid #c3c9d1; border-bottom: 1.5px solid #c3c9d1; transform: rotate(-45deg); }
  .mui-nav a:active { background: #f7f8fa; }
  .mui-df { margin-top: auto; padding: 16px 18px 26px; background: #f7f8fa; }
  .mui-df .mui-tel { display: block; font-size: 19px; font-weight: 700; color: #e10000; text-decoration: none; }
  .mui-df span { display: block; margin: 4px 0 8px; font-size: 11px; color: #98a1ac; }
  .mui-df .mui-mail { font-size: 12px; color: #6b7480; text-decoration: none; }

  .mui-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
    height: calc(60px + env(safe-area-inset-bottom)); padding: 0 10px env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .97); border-top: 1px solid #e9ecf0;
    align-items: center; gap: 2px; box-shadow: 0 -4px 18px rgba(20, 30, 45, .07);
  }
  .mui-bar > a {
    flex: 1; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; color: #6b7480; font-size: 10px; text-decoration: none;
  }
  .mui-bar > a svg { width: 20px; height: 20px; }
  .mui-bar > a em { font-style: normal; line-height: 1; }
  .mui-bar > a.mui-cta {
    flex: 1.9; height: 42px; margin-left: 6px; border-radius: 21px;
    background: linear-gradient(135deg, #e10000, #c00000); color: #fff;
    font-size: 14px; font-weight: 600; flex-direction: row; box-shadow: 0 4px 12px rgba(225, 0, 0, .25);
  }

  .mui-qr {
    display: flex; position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 9050;
    background: rgba(10, 15, 22, .55); align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .2s;
  }
  .mui-qr.mui-show { opacity: 1; visibility: visible; }
  .mui-qr-box { width: 220px; padding: 18px 18px 14px; background: #fff; border-radius: 14px; text-align: center; }
  .mui-qr-box img { display: block; width: 180px; height: 180px; margin: 0 auto; }
  .mui-qr-box p { margin: 8px 0 0; font-size: 12px; color: #6b7480; }
}

/* 12. 抽屉头部改为浅色 + 关闭按钮（避免与汉堡按钮重叠） */
@media (max-width: 768px) {
  body.mui-open .mui-burger { opacity: 0; visibility: hidden; }
  .mui-dh { position: relative; background: #fff; border-bottom: 1px solid #eef0f3; padding: 20px 56px 16px 18px; }
  .mui-dh p { color: #8b939d; }
  .mui-close { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; padding: 0; border: 1px solid #e9ecf0; background: #fff; border-radius: 10px; color: #6b7480; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; }
}

/* 13. 抽屉头部不再重复 logo 里的标语 */
@media (max-width: 768px) {
  .mui-dh p { display: none; }
  .mui-dh { padding: 18px 56px 18px 18px; }
}

/* 14. 手机端面包屑隐藏当前页长标题，避免溢出裁切 */
@media (max-width: 768px) {
  .case_detail_tit_ul a:last-child { display: none !important; }
  .case_detail_tit_ul { gap: 4px; }
}

/* 15. 隐藏面包屑最后的分隔符 */
@media (max-width: 768px) {
  .case_detail_tit_ul a:nth-last-child(2)::after,
  .case_detail_tit_ul a:nth-last-child(2) i { display: none !important; }
}

/* 16. 手机端头部：按导航条比例放大 logo（PC 端不受影响） */
@media (max-width: 768px) {
  #header .header-container,
  #header .header-wrapper,
  #header .header-inner,
  #header .header-bottom { height: 64px !important; min-height: 64px !important; }
  #header .header-logo-outer { height: 64px !important; display: flex !important; align-items: center !important; margin: 0 !important; }
  #header .header-logo { height: 64px !important; display: flex !important; align-items: center !important; }
  #header .header-logo img { height: 50px !important; width: auto !important; max-height: 50px !important; max-width: 220px !important; }
  #header .header-topnav { display: none !important; }
}

/* 17. 头部 logo 再放大一点 + 面包屑改为省略号截断（不再整条隐藏） */
@media (max-width: 768px) {
  #header .header-logo img { height: 54px !important; max-height: 54px !important; }
  .case_detail_tit_ul a:last-child {
    display: inline-block !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 46vw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: #6b7480 !important;
  }
  .case_detail_tit_ul a:nth-last-child(2)::after { display: inline !important; }
}

/* 18. 报价卡片：价格为空时显示“面议”，不再出现空白 */
@media (max-width: 768px) {
  .news_p div { font-size: 13px; line-height: 1.7; color: #4a525b; }
  .news_p div span:empty::after { content: "面议"; color: #e10000; }
}
