/* 中国医疗健康网 复刻版 - 移动端响应式适配
 * 说明：宽屏（>980px）完全沿用原站 960px 样式；窄屏下自动改为单列自适应布局。
 *      使用 !important 覆盖原站内联/固定宽度样式，不影响 PC 端视觉。
 */

/* ============ 平板 / 窄桌面：980px 以下 ============ */
@media (max-width: 980px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  /* 主容器宽度自适应 */
  .w960, .w950 {
    width: auto !important;
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
  }

  /* 顶部提示条：只保留热点，隐藏右侧工具链接 */
  .top { height: auto !important; min-height: 30px; line-height: 30px; }
  .top .fl {
    float: none !important;
    display: block;
    width: 100%;
    padding-left: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .top .fr { display: none !important; }

  /* Logo 区：隐藏右侧广告 banner，Logo 居中 */
  .w960 > .mt10.mb10 { text-align: center; }
  .logo { float: none !important; display: inline-block; vertical-align: middle; width: auto; padding-top: 8px; }
  .logo img { max-width: 100%; height: auto; }
  .nav { display: none !important; }

  /* 主导航：去掉固定背景图，自动换行居中 */
  .menu {
    width: 100% !important;
    height: auto !important;
    background: #268dd2;
    border-bottom: 2px solid #1768a8;
    overflow: visible !important;
  }
  .mlist { line-height: 34px; text-align: center; }
  .mlist a { display: inline-block; padding: 0 6px; color: #fff !important; }
  .mtopic { padding-left: 0; line-height: 26px; text-align: center; }

  /* 搜索区：输入框 + 按钮同行，热门关键词换行 */
  .serch { height: auto !important; background: none; overflow: visible !important; padding: 6px 0; }
  .serch form { display: flex; align-items: center; }
  .sibox {
    float: none !important;
    padding-left: 0 !important;
    padding-top: 0;
    width: calc(100% - 96px) !important;
  }
  .sinput {
    width: 100% !important;
    box-sizing: border-box;
    height: 34px;
    line-height: 32px;
    padding: 0 8px;
    border: 1px solid #cfe2f0 !important;
    font-size: 14px;
    color: #666;
  }
  .sbtbox { float: none !important; width: 88px !important; padding-top: 0; margin-left: 6px; }
  .sbut {
    width: 88px !important;
    height: 34px !important;
    background: #268dd2 url(/templets/default/jiankang/health_search.jpg) no-repeat center center;
    border: 0;
    font-size: 0;
    cursor: pointer;
  }
  .shot {
    float: none !important;
    width: 100% !important;
    line-height: 24px;
    padding-top: 6px;
    font-size: 12px;
  }

  /* 首页所有固定宽度栏目盒子：改为单列全宽 */
  .w300, .w250, .ttbox, .tenbox, .tabox, .tybox, .tyRbox,
  .zzbox, .qzhot, .QAbox, .quanbox, .flink, .zttjbox,
  .newbox, .bgtbox, .weatherImage, .imgFlash {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    height: auto !important;
    box-sizing: border-box;
  }

  /* 首页焦点图 */
  .weatherImage { border: 0; }
  .imgFlash .imgBox { width: 100% !important; height: auto !important; border: 0; }
  .imgFlash .imgBox P { width: 100% !important; height: auto !important; padding: 0; }
  /* 焦点图为多张图叠放的轮播，窄屏只显示第一张，避免纵向堆成数屏 */
  .imgFlash .imgBox P { display: none !important; }
  .imgFlash .imgBox P:first-child { display: block !important; }
  .imgFlash .imgBox IMG { display: block; width: 100% !important; height: auto !important; max-height: 260px; object-fit: cover; }
  .imgFlash .num { bottom: 6px; left: 0; right: 0; margin: 0 !important; text-align: center; }
  .imgFlash .txt { height: auto !important; line-height: 32px; overflow: hidden; }

  /* 曝光台 / 头条区 */
  .bgtbox .up { height: auto !important; padding: 8px 0; }
  .bgtbox .up P { width: auto !important; height: auto !important; }
  .bgtbox UL LI { white-space: normal; }
  .ttbox H2 { height: auto !important; line-height: 30px; font-size: 16px; }
  .ttbox P { height: auto !important; margin: 0 10px; }
  .ttbox UL.a, .ttbox UL.b { height: auto !important; }
  .ttbox UL.a LI { width: 100% !important; }
  .ttbox UL.b LI { width: 100% !important; margin-left: 0 !important; }
  .ttbox UL.c LI.b { width: calc(100% - 60px) !important; }

  /* 右栏最新文章 */
  .newbox .up { height: auto !important; }
  .newbox IMG { width: 100% !important; height: auto !important; }
  #sideHot li, #sideNew li { white-space: normal; }

  /* 专题推荐 */
  .zttjlist { width: 100% !important; float: none !important; border-right: 0; border-bottom: 1px dashed #cee9ff; }
  .zttjlist UL LI { width: 33.33% !important; }

  /* 健康 TOP10 */
  .tenbox .list { width: auto !important; height: auto !important; margin: 0 10px; padding-left: 18px; }
  .tenbox table { width: 100% !important; table-layout: fixed; }
  .tenbox td { width: auto !important; white-space: nowrap; }

  /* 男女性栏目切换 */
  .tabul { display: flex; }
  .tabul LI { flex: 1; width: auto !important; }
  .tabor { height: auto !important; }
  .tabor .up { height: auto !important; margin: 10px; }
  .tabor .up .tu { width: 110px !important; }
  .tabor .up .tu IMG { max-width: 100%; height: auto; }
  .tabor .up .text { width: calc(100% - 130px) !important; }
  .tabor .dw LI { white-space: normal; }

  /* 栏目文章盒子 */
  .title6 { height: auto !important; background: none; border-bottom: 1px solid #dae3e9; overflow: hidden; }
  .title6 DT { width: auto !important; }
  .title6 DD { width: auto !important; float: none !important; text-align: left; margin-right: 0; line-height: 26px; }
  .title6 DD A { display: inline-block; margin-right: 8px; }
  .tybox .up { height: auto !important; margin: 10px; }
  .tybox .up P { width: auto !important; height: auto !important; }
  .tybox UL LI { width: 100% !important; float: none !important; }
  .tyRbox UL LI { white-space: normal; }

  /* 自诊盒子 */
  .zzflash .l { width: 50% !important; height: auto !important; }
  .zzflash .l IMG { width: 100%; height: auto; }
  .zzflash .r { width: 46% !important; }
  .zzflash .r LI { width: 100% !important; text-indent: 12pt; }
  .zzbox DD { height: auto !important; }

  /* 问答 / 疾病大全 */
  .QAbox DL { height: auto !important; }
  .quanbox { height: auto !important; }
  .quanlist { width: 100% !important; height: auto !important; }
  .quanlist .up { height: auto !important; }
  .quanlist .up IMG { max-width: 100%; height: auto; }
  .quanlist .dw LI { width: 100% !important; }

  /* 友情链接 */
  .flink #titOp, .flink .tab { width: 100% !important; }
  .flink #titOp LI { flex: 1; width: auto !important; }
  .flink .tab LI { width: 100% !important; }

  /* 列表页 / 搜索页 / 文章页：两栏改单栏 */
  .main_left, .main_right, .insid_left, .insid_right {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
  }
  .insid_right { margin-top: 10px !important; }

  /* 原站 new_inside.css 中的固定宽度标题与正文容器 */
  .main_left_top, .main_left_btpx { width: 100% !important; box-sizing: border-box; }
  .main_left H1, .main_left_btpx h1 { width: auto !important; float: none !important; border-right: 0; }
  .main_left_btpx_m, .main_left_btpx_r { width: auto !important; float: none !important; display: inline-block; }
  .main_left_btpx { line-height: 30px; }
  .main_left_nr1 { width: 100% !important; box-sizing: border-box; padding: 0 8px; }

  /* 全局 H2 在原站固定 514px 且左浮动，列表项标题会撑破容器 */
  .art-item h2 { float: none !important; width: auto !important; }
  .art-item h2 a.title { display: inline; }

  /* 文章页：标题 / 正文宽度放宽到容器 */
  .conten1 H1, .conten1 H1 .lvTitle, .conten1 H1 .lvTime,
  .conten1 .neiRon, .conten1 .readAll {
    width: 100% !important;
    box-sizing: border-box;
  }
  .conten1 { padding-left: 10px; padding-right: 10px; box-sizing: border-box; }
  #artTitle, #icontent { width: 100% !important; box-sizing: border-box; }
  .lvTitle { font-size: 20px; }

  .main_left_btpx { overflow: hidden; }
  .main_left_btpx h1 { float: left; }
  .main_left_btpx_r { float: right; }

  /* 文章列表条目：标题与摘要留出缩略图空间 */
  .art-item h2 { font-size: 15px; line-height: 24px; }
  .art-item p.summary { line-height: 21px; }

  /* 文章内容：防止表格 / 视频溢出 */
  .neiRon { padding: 12px 8px; }
  .neiRon img, .neiRon video, .neiRon iframe, .neiRon table { max-width: 100% !important; height: auto; }
  .neiRon table { table-layout: auto; word-break: break-all; }

  /* 页脚 */
  .foot { line-height: 24px; }
}

/* ============ 手机：600px 以下 ============ */
@media (max-width: 600px) {
  .w960, .w950 { padding-left: 8px; padding-right: 8px; }

  .top { font-size: 11px; }
  .top .fl { padding-left: 0; }

  .logo img { max-width: 170px; height: auto; }
  .mlist { line-height: 32px; }
  .mlist a { padding: 0 5px; font-size: 13px; }
  .mtopic { display: none; }

  .shot { display: none; }

  .ttbox UL.a LI, .ttbox UL.b LI { text-align: left; }
  .bgtbox .up .fld { margin-left: 0 !important; }

  .tabor .up .tu { width: 88px !important; }
  .tabor .up .text { width: calc(100% - 100px) !important; }

  .art-item .thumb { width: 88px; height: 66px; margin-left: 8px; }
  .art-item h2, .art-item h2 a.title { font-size: 14px; line-height: 22px; }
  .art-item p.summary { font-size: 12px; }
  .art-item .date { font-size: 11px; }
  .pages a, .pages span { padding: 3px 8px; margin: 0 1px; font-size: 12px; }

  .lvTitle { font-size: 17px; line-height: 28px; }
  .lvTime { font-size: 11px; }
  .neiRon { font-size: 16px; line-height: 1.9; padding: 12px 8px; }
  .neiRon p { margin: 10px 0; }

  .texlist1 li { line-height: 24px; }

  /* 右侧悬浮入口在小屏隐藏，避免遮挡正文 */
  .corner-links { display: none; }
}
