/* 响应式增强：覆盖 home.css 的 PC 固定宽度，一套模板适配手机与桌面 */

/* —— 解除桌面强约束（home.css: body min-width 1200 / container 1230） —— */
html {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  min-width: 0 !important;
  max-width: 100%;
  /* home.css 为底部浮层预留的 100px；文章等页无 float-bottom，会在 footer 下留白 */
  padding-bottom: 0 !important;
}
body:has(.float-bottom) {
  padding-bottom: 100px !important;
}

.container {
  width: auto !important;
  max-width: 1170px !important;
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
}

.navbar {
  min-width: 0 !important;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.header-bar .brand img,
header .brand img,
header .pull-left img {
  max-width: min(470px, 70vw);
  height: auto;
}
.nav-toggle {
  display: none;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}

/* —— 文章 / 案例详情布局 —— */
.article-layout,
.case-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
}
.article-layout .nav-news,
.case-layout .sidebar {
  float: none !important;
  flex: 0 0 220px;
  width: auto !important;
  margin-right: 0 !important;
}
.article-layout .news-content,
.case-layout .case_detail {
  float: none !important;
  flex: 1 1 480px;
  width: auto !important;
  min-width: 0;
  max-width: 100%;
}
.case-layout .sidebar {
  flex: 0 0 240px;
}
.case_detail img,
.article-body img,
.article-body video,
.article-body iframe {
  max-width: 100% !important;
  height: auto !important;
}
.article-body table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
}
.article-body {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.75;
}
.article-body h1 {
  font-size: 1.5em;
}
.news-content h1 {
  font-size: 28px;
  line-height: 1.4;
  padding: 0 8px;
}
.news-content .related {
  clear: both;
  overflow: hidden;
}
.news-content .related ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: block;
  overflow: hidden;
}
.news-content .related ul li {
  float: none !important;
  width: auto !important;
  max-width: 100%;
  margin: 8px 0;
  display: block;
}
.case-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.case-related-list li {
  flex: 1 1 160px;
  max-width: 277px;
}
.case-related-list img {
  max-width: 100%;
  height: auto;
}

/* —— 列表 —— */
.article-list-item {
  border-bottom: 1px solid #eee;
  padding: 16px 0;
}
.article-list-item .item-link {
  display: flex;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}
.article-list-item .thumb {
  width: 140px;
  height: 90px;
  object-fit: cover;
  flex-shrink: 0;
}
.article-list-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.4;
}
.list-page h1 {
  font-size: 24px;
  margin: 16px 0;
}
.home-hero {
  padding: 32px 15px;
  text-align: center;
}
.breadcrumb.container {
  margin-top: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* —— Footer：避免栅格挤出横向滚动，去掉多余底部空白 —— */
footer {
  margin-top: 24px;
  padding-bottom: 24px;
}
footer .row > [class*="col-"] {
  float: left;
}
footer .copyright {
  clear: both;
  padding-top: 16px;
}
footer .copyright p {
  margin-bottom: 8px;
  line-height: 1.6;
}

@media (max-width: 992px) {
  .article-layout .nav-news,
  .case-layout .sidebar {
    display: none;
  }
  .article-layout .news-content,
  .case-layout .case_detail {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-block;
  }
  .header-wechat,
  header .pull-right,
  .navbar-right {
    display: none !important;
  }
  .site-nav .navbar-nav,
  .navbar .navbar-nav {
    display: none;
    float: none !important;
    width: 100%;
    margin: 0;
  }
  body.nav-open .site-nav .navbar-nav,
  body.nav-open .navbar .navbar-nav {
    display: block;
  }
  .navbar .navbar-nav > li {
    float: none !important;
    display: block;
    border-bottom: 1px solid #eee;
  }
  .navbar .navbar-nav > li > a {
    padding: 12px 8px;
  }
  .navbar .navbar-nav > li > .nav {
    display: none;
  }

  .news-content h1 {
    font-size: 22px;
  }

  .article-list-item .item-link {
    flex-direction: column;
  }
  .article-list-item .thumb {
    width: 100%;
    height: 180px;
  }

  footer .row > [class*="col-"] {
    width: 100% !important;
    float: none !important;
    margin-bottom: 12px;
  }
  footer dl[class*="col-"] {
    width: 50% !important;
    float: left !important;
    margin-bottom: 12px;
  }

  /* 隐藏 PC 侧边浮动条，避免占视觉空间 */
  .float {
    display: none !important;
  }
}
