
/* ============================================================
   响应式适配 — 移动端 (<=768px)
   PC端 (>768px) 布局完全不变
   ============================================================ */
@media screen and (max-width: 768px) {

  /* --- 全局宽度容器 --- */
  .wide {
    width: 100% !important;
    box-sizing: border-box;
    padding: 20px 10px;
    overflow: visible;
  }

  /* --- 列表/详情 section：手机端 padding 0，让 .wide 接管 --- */
  section.wide[style*="padding: 25px 0 30px"] {
    padding: 0 !important;
  }

  /* --- 顶部栏 --- */
  .top { display: none; }

  /* --- LOGO 区 --- */
  .logo {
    height: auto !important;
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .logo h1 { float: none; }
  .logo h1 a img {
    padding: 5px 10px 0 0 !important;
    max-width: 160px;
    height: auto;
  }
  .logo ul {
    display: none !important;
  }
  .logo dl {
    float: none;
    padding-top: 5px;
  }
  .logo dl dt { float: left; }
  .logo dl dt img { padding-top: 3px !important; max-width: 28px; }
  .logo dl dd p { font-size: 13px !important; line-height: 20px; }
  .logo dl dd p span { font-size: 18px !important; }

  /* --- 汉堡导航 --- */
  .nav_wrap { height: auto !important; line-height: normal !important; position: relative; overflow: visible !important; }
  .nav_wrap .wide { padding: 0; }
  .nav_wrap ul { overflow: visible !important; }
  .nav_wrap ul#aa {
    display: none !important;
    flex-direction: column;
    background: #0e539e;
    width: 100%;
    position: absolute;
    z-index: 999;
    top: 46px;
    left: 0;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav_wrap ul#aa.open { display: flex !important; }
  .nav_wrap ul#aa li {
    float: none !important;
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #0a4b92;
    text-align: left !important;
    font-size: 15px !important;
  }
  .nav_wrap ul#aa li a { padding: 0 15px; display: block; line-height: 46px; }

  /* 汉堡按钮 */
  .mobile-nav-toggle {
    display: block !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    float: right;
  }
  .mobile-nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
  }

  /* --- 轮播图（owl carousel 移动端）--- */
  #owl-demo {
    height: 200px !important;
    overflow: hidden !important;
  }
  #owl-demo .owl-wrapper-outer {
    overflow: hidden !important;
  }
  #owl-demo .owl-item a {
    height: 200px !important;
    background-size: cover !important;
    background-position: center center !important;
    display: block !important;
  }
  #owl-demo img { height: 200px !important; }
  .owl-controls { position: relative; z-index: 10; }
  .owl-pagination { bottom: 6px !important; }

  /* --- 新闻动态 + 患者服务 --- */
  .xw_box { padding-top: 5px !important; }
  .xwdt {
    width: 100% !important;
    float: none !important;
  }
  .xwdt dl { padding: 10px 0 !important; }
  .xwdt dl dt { float: none !important; width: 100% !important; }
  .xwdt dl dt img { width: 100% !important; height: auto !important; }
  .xwdt dl dd { float: none !important; width: 100% !important; margin-top: 8px; }
  .xwdt dl dd h3 { font-size: 16px !important; }
  .xwdt ul li { font-size: 14px !important; line-height: 28px !important; }
  .xwdt ul li span { float: none !important; display: inline; margin-left: 5px; }

  .hzfw {
    width: 100% !important;
    float: none !important;
    margin-top: 15px;
  }
  .hzfw h2 { font-size: 18px !important; margin-bottom: 5px; }

  /* 患者服务：4列图标网格 */
  .hxfw_box { border-top: 2px solid #0a4b92 !important; border: 1px solid #d9e6f6; overflow: hidden; }
  .hxfw_box ul { display: flex !important; flex-wrap: wrap !important; overflow: visible !important; }
  .hxfw_box ul li {
    float: none !important;
    width: 25% !important;           /* 每行4个 */
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 80px !important;
    padding: 10px 4px 8px 4px !important;
    border-right: 1px dashed #d9e6f6 !important;
    border-bottom: 1px dashed #d9e6f6 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    font-size: 13px !important;
    color: #333 !important;
    line-height: 1.4 !important;
    background-position: center 10px !important;
    background-size: 36px 36px !important;
  }
  /* 消除每行最右一个的右边框 */
  .hxfw_box ul li:nth-child(4n) { border-right: none !important; }
  /* 最后一行的下边框去掉 */
  .hxfw_box ul li:nth-last-child(-n+4) { border-bottom: none !important; }
  /* 图标上方留空让背景图显示 */
  .hxfw_box ul li a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding-top: 40px !important;   /* 背景图高度占位 */
    color: #333 !important;
    width: 100% !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
  .hxfw_box ul li a span {
    display: block !important;
    font-size: 9px !important;
    color: #999 !important;
    line-height: 1.3 !important;
    margin-top: 2px !important;
    word-break: break-all !important;
  }
  /* 所有 li 恢复正常高度，去掉 hxfw_box4/8 的特殊高度 */
  .hxfw_box ul li.hxfw_box4,
  .hxfw_box ul li.hxfw_box8 {
    height: auto !important;
    padding-top: 10px !important;
  }

  /* --- 横幅广告 --- */
  .x_banner { padding-top: 15px !important; }
  .x_banner a img { width: 100% !important; height: auto !important; display: block; }

  /* --- 特色科室 --- */
  .tsks { padding: 15px 0 20px !important; }
  .ks_bt { font-size: 18px !important; }
  .ks_bt a span { font-size: 14px !important; }
  .tsks ul li {
    width: 25% !important;
    margin-top: 15px !important;
  }
  .tsks ul li div.icon_images { width: 60px !important; height: 60px !important; }
  .tsks ul li div.icon_images a {
    width: 58px !important;
    height: 58px !important;
  }
  .tsks ul li div.icon_images a img { max-width: 36px !important; }
  .tsks ul li h4 a span { font-size: 12px !important; padding-top: 8px !important; }

  /* --- 名医工作室 --- */
  .mygzs { margin-top: 15px !important; }
  .mygzs ul { margin-top: 10px !important; }
  .mygzs ul li {
    width: 50% !important;
    height: 160px !important;
    float: left !important;
  }
  .mygzs ul li div img { width: 100%; height: 160px; object-fit: cover; }
  .mygzs ul li h3 {
    font-size: 16px !important;
    padding-top: 10px !important;
    width: 100% !important;
  }

  /* --- 三列新闻（科普视频/公益活动/媒体报道）--- */
  .sp_news {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-top: 10px !important;
  }
  .sp_news a img {
    width: 100% !important;
    height: auto !important;
  }
  .sp_news ul li { font-size: 14px !important; line-height: 28px !important; }

  /* --- 友情链接 --- */
  .yqlj ul li { padding: 0 8px !important; font-size: 13px !important; }

  /* --- 底部导航 --- */
  .foot { height: auto !important; line-height: normal !important; padding: 8px 0; }
  .foot ul { display: flex; flex-wrap: wrap; }
  .foot ul li { width: 33.33% !important; font-size: 13px !important; text-align: center; line-height: 34px; }

  /* --- 版权区 --- */
  .banquan .wide { display: block; padding-bottom: 15px; }
  /* 左侧：logo + 联系方式 */
  .bq_logo {
    width: 100% !important;
    float: none !important;
    text-align: center;
  }
  .bq_logo img {
    max-width: 180px !important;
    height: auto !important;
    margin: 0 auto 10px;
    display: block;
  }
  .bq_logo p {
    font-size: 12px !important;
    line-height: 22px !important;
    color: #777 !important;
  }
  /* 右侧：4列导航 → 2列2行网格 */
  .bq_nav {
    float: none !important;
    padding: 20px 6px 0 !important;
    display: flex;
    flex-wrap: wrap;
  }
  .ksdh {
    width: 50% !important;
    box-sizing: border-box !important;
    padding: 0 8px !important;
    margin-bottom: 16px;
    float: none !important;
  }
  .ksdh h3 {
    font-size: 14px !important;
    font-weight: bold !important;
    color: #555 !important;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
    margin-bottom: 6px;
  }
  .ksdh ul {
    text-align: left !important;
    padding-top: 0 !important;
    overflow: visible !important;
  }
  .ksdh ul li {
    font-size: 13px !important;
    line-height: 28px !important;
    white-space: nowrap;
  }

  /* --- 公安备案 --- */
  div[style*="width:300px"] {
    width: 100% !important;
    text-align: center;
    padding: 10px 0 !important;
  }
  /* --- 兜底修复：移动端全局图片不溢出 --- */
  img { max-width: 100% !important; height: auto !important; }
  .x_banner a { display: block; }
  .x_banner a img { width: 100% !important; height: auto !important; }
  .logo h1 a img { max-width: 160px !important; height: auto !important; padding: 0 !important; }
  .bq_logo img { max-width: 180px !important; height: auto !important; }
  .xwdt dl dt img { max-width: 100% !important; height: auto !important; }
  .sp_news a img { max-width: 100% !important; height: auto !important; }
  /* 详情页/列表页用了 inline style width:850px/300px 写死，这里强制重置 */
  .xz-box, .wide > div[style*="width:850px"],
  .wide > div[style*="width:300px"],
  .wide > section > div[style*="width:850px"] {
    width: 100% !important;
    float: none !important;
  }
  .wide > div[style*="float: left"],
  .wide > div[style*="float: right"],
  .wide > section > div[style*="float: left"],
  .wide > section > div[style*="float: right"] {
    float: none !important;
    width: auto !important;
  }
  /* 详情页主框：手机端恢复左右 25px 内边距（PC 已改为 25px 0） */
  .detail-main { padding: 25px !important; }

  /* 首页 xwdt 新闻动态：手机端 ul 自适应（PC 是单列铺满，加日期右对齐） */
  .xwdt-list li {
    line-height: 28px !important;
    font-size: 14px !important;
    padding: 6px 0 !important;
    border-bottom: 1px dashed #eee;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .xwdt-list li span {
    float: none !important;
    display: inline-block;
    margin-right: 8px;
    color: #999 !important;
  }
  .xwdt-list li a {
    display: inline-block;
    color: #333;
    max-width: calc(100% - 100px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
  }
  /* 列表项里 200x130 缩略图保留 */
  .wide a[style*="width:200px"] {
    width: 120px !important;
    height: 80px !important;
  }

  /* --- 移动端隐藏指定区块 --- */
  .hide-mobile { display: none !important; }
}

/* 汉堡按钮默认在PC端隐藏 */
.mobile-nav-toggle { display: none; }
