/* Small additions on top of the original theme */
.qr-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 9999999; }
.qr-modal.show { display: flex; }
.qr-box { background: #fff; border-radius: 12px; padding: 22px 26px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.qr-box img { width: 280px; max-width: 76vw; height: auto; display: block; margin: 0 auto 12px; }
.sidebar-qr-card { background: #fff; padding: 12px 14px 14px; text-align: center; }
.sidebar-qr-title { color: #d60000; font-size: 25px; font-weight: 700; margin-bottom: 8px; }
.sidebar-qr-card img { display: block; width: 100%; height: auto; margin: 0 auto; }
.sidebar-qr-sub { color: #d60000; font-size: 17px; font-weight: 700; margin-top: 8px; }
.header-qq-logo { display: inline-block; color: #d60000; font-size: 24px; font-weight: 700; line-height: 1.2; white-space: nowrap; text-decoration: none; }
.m-nav-logo .header-qq-logo { font-size: 20px; }
.navlogo .header-qq-logo { font-size: 26px; }
.qr-box p { margin: 0 0 14px; color: #555; font-size: 15px; }
.qr-close { border: 0; background: #b22222; color: #fff; padding: 7px 24px; border-radius: 5px; cursor: pointer; font-size: 13px; }
.footer-qr { width: 90px; height: 90px; object-fit: contain; margin-left: 12px; vertical-align: middle; cursor: pointer; border: 1px solid #eee; background: #fff; }

.search-result-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid #eee;
  border-left: 4px solid #b22222;
}
.search-result-head h2 { margin: 0; font-size: 18px; flex: 1; }
.search-result-head span { color: #999; font-size: 13px; }
.search-result-head a { color: #b22222; font-size: 13px; }
.no-result { padding: 40px 20px; text-align: center; color: #999; background: #fff; }

.article-content { padding: 22px 26px 30px; background: #fff; line-height: 1.9; color: #444; font-size: 15px; }
.article-content h3 { margin: 22px 0 8px; font-size: 17px; color: #222; }
.article-content p { margin: 0 0 12px; }
.article-content .demo-note { margin-top: 24px; padding: 10px 14px; background: #fff8f8; border-left: 3px solid #b22222; color: #a33; font-size: 13px; }
.entry-title h1, h1.entry-title { font-size: 24px; line-height: 1.5; }

.mobile_nav.nav-open { display: block !important; }

#weixin { box-shadow: 0 4px 18px rgba(0,0,0,.18); }
.copyyy, #wechat { cursor: pointer; }

@media (max-width: 768px) {
  .search-result-head { flex-wrap: wrap; gap: 8px; }
  .search-result-head h2 { width: 100%; font-size: 16px; }
  .article-content { padding: 16px; }
}

/* ===== 首页顶部图片区布局修复：轮播图与文章主图不再重叠 ===== */

/* 1. 用 flex 取代 float，两列严格并排，杜绝塌陷与挤压 */
.main-slider {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 15px;
  overflow: hidden;
  margin-bottom: 20px;
}
.main-slider::after { display: none !important; }
.main-slider > .sp-slideshow {
  float: none !important;
  flex: 0 0 calc(65.5% - 7.5px);
  width: calc(65.5% - 7.5px) !important;
  height: 335px;
}
.main-slider > .small-slider {
  float: none !important;
  flex: 0 0 calc(32.5% - 7.5px);
  width: calc(32.5% - 7.5px) !important;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.main-slider > .small-slider .small-slider-item {
  flex: 1 1 0;
  height: auto !important;
  min-height: 0;
  margin-bottom: 0 !important;
}

/* 2. 轮播内部只显示当前一张 slide，避免多张叠在一起 */
.main-slider .swiper-container { width: 100%; height: 100%; overflow: hidden; }
.main-slider .swiper-wrapper { display: flex; width: 100%; height: 100%; }
.main-slider .swiper-slide { flex: 0 0 100%; width: 100%; height: 100%; }

/* 3. 文章区与上方图片区严格隔离：清掉首张卡片 -20px 上移 */
.toptext { clear: both; }
.home-main { clear: both; }
.home-main .post-list:first-child { margin-top: 0 !important; }
.homedia.xgtj-recom { clear: both; }

/* 4. 窄屏改为上下排列，避免两列挤压 */
@media (max-width: 800px) {
  .main-slider > .sp-slideshow { flex: 0 0 100%; width: 100% !important; height: 50vw; }
  .main-slider > .small-slider { flex: 0 0 100%; width: 100% !important; flex-direction: row; }
  .main-slider > .small-slider .small-slider-item {
    flex: 0 0 calc(50% - 7.5px);
    height: 27.5vw !important;
    min-height: 0;
  }
}

/* ===== 表单大图去重兜底：防止塌陷残影压在轮播图上 ===== */
/* 顶部 topmedia 用负边距上拉，且 .homedia a img 的 height:100% 会让大图塌陷成
   左上角一小块残影，与轮播重叠。整块隐藏；页面只保留轮播下方一处表单图。 */
.topmedia { display: none !important; }
.homedia.itmedia,
.homedia.post-ads-pc,
.homedia.syimgad,
.homedia.sytextad { display: none !important; }
.homedia.xgtj-recom {
  clear: both;
  margin: 20px auto 10px !important;
  overflow: hidden;
}
/* 覆盖主题里 .homedia a img { height:100% }，避免表单图被压扁/裁切 */
.homedia.xgtj-recom img {
  display: block;
  width: 100%;
  height: auto !important;
  object-fit: contain;
}
/* 文章卡片主图为 absolute 定位，保证容器有足够高度不溢出压到下方 */
.home-main .post-list { overflow: hidden; }
.home-main .entry-container { min-height: 178px; }

/* 原主题在窄视口把 header 压成 20px 且隐藏 secnav，搜索框却溢出浮在轮播图上。
   不依赖断点，全局恢复 header 高度并移除溢出的搜索浮层（首页另有独立搜索表单）。 */
header.top-header { height: auto !important; min-height: 60px; }
.search-warp,
.s-drop-down,
.search-area,
input.search-input,
.showhide-search { display: none !important; }
/* 任何宽度下都不让头部浮层盖到轮播 */
.main-slider { position: relative; z-index: 1; clear: both; }

/* ===== 轮播区 / 文章主图彻底隔离（防重叠） ===== */

/* ===== 轮播区 / 文章主图彻底隔离（防重叠） ===== */
/* 轮播独立成层并裁切：任何文章主图、广告图都不能盖上来或从背后透出 */
.main-slider {
  position: relative !important;
  z-index: 3 !important;
  isolation: isolate;
  overflow: hidden !important;
  clear: both !important;
}
.main-slider > .sp-slideshow {
  position: relative !important;
  z-index: 2 !important;
  overflow: hidden !important;
}
.main-slider .swiper-container,
.main-slider .swiper-wrapper { overflow: hidden !important; }
.main-slider .swiper-slide:not(:first-child) { display: none !important; }
.main-slider .swiper-pagination { display: none !important; }

/* 小图标题强制单行，避免窄屏换行造成文字叠压 */
.main-slider .small-slider-item .title {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
/* 左列整体独立成层，外部浮层不再压进轮播 */
.main.fl { position: relative; z-index: 2; }

/* 首页只保留一处表单大图，隐藏旧版重复/塌陷的块 */
.topmedia,
.homedia.itmedia,
.homedia.post-ads-pc,
.homedia.syimgad,
.homedia.sytextad { display: none !important; }
.homedia.xgtj-recom { clear: both; margin: 20px auto 10px !important; overflow: hidden; }
.homedia.xgtj-recom img { display: block; width: 100%; height: auto !important; }

/* 文章区独立成层：卡片严格待在自己的容器里 */
#pjaxmain,
.home-main { position: relative !important; z-index: 1 !important; clear: both !important; }
.home-main .post-list {
  position: relative !important;
  overflow: hidden !important;
  margin-top: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
  clear: both;
}
.home-main .entry-container { position: relative !important; min-height: 178px !important; }
.home-main .block-image.feaimg {
  position: absolute !important;
  left: 0 !important;
  top: 20px !important;
  z-index: 1;
}
/* 头部浮层不压轮播 */
header.top-header { height: auto !important; min-height: 60px; }
.search-warp,
.s-drop-down,
.search-area,
input.search-input,
.showhide-search { display: none !important; }


/* 轮播图标题保持隐藏，避免与文章主图重叠 */
.main-slider header.swiper-header,
.main-slider span.swiper-title,
.main-slider .swiper-title .badge,
.main-slider .small-slider-item .title { display: none !important; }
/* 底部固定栏删掉一项后，剩余两项平分宽度 */
.eyou-footer-fix ul { display: flex !important; }
.eyou-footer-fix ul > li { flex: 1 1 0 !important; width: auto !important; }


/* ===== 文章详情页：全部文章图片墙 ===== */
.article-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px; background: #fff; }
.article-gallery .gallery-item { display: block; overflow: hidden; border-radius: 6px; background: #f7f7f7; text-decoration: none; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.article-gallery .gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.article-gallery .gallery-item span { display: block; padding: 8px 10px; font-size: 13px; line-height: 1.4; color: #444; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-gallery .gallery-item:hover { box-shadow: 0 3px 14px rgba(0,0,0,.14); }
@media (max-width: 640px) {
  .article-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
  .article-gallery .gallery-item span { font-size: 12px; padding: 6px 8px; }
}


/* ===== 文章图片统一放到摘要下方，不再居左 ===== */
.home-main .entry-container { padding-left: 0 !important; min-height: 0 !important; }
.home-main .block-image.feaimg {
  position: static !important;
  left: auto !important;
  top: auto !important;
  z-index: auto !important;
  width: 100% !important;
  height: auto !important;
  margin: 10px 0 4px !important;
}
.home-main .block-image.feaimg .block-fea { display: block; width: 100%; }
.home-main .block-image.feaimg img { width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: 6px; }
.home-main .entyr-icon { display: none !important; }
.article-summary { margin: 14px 0 10px; padding: 12px 14px; background: #f8f8f8; border-left: 3px solid #b22222; color: #555; line-height: 1.8; }
#article-main .entry-container { padding-left: 0 !important; }
#article-main .article-hero { position: static !important; width: 100% !important; height: auto !important; margin: 12px 0 18px; }
#article-main .article-hero img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: 6px; }


/* ===== 修复手机端：文章图片遮挡文字 =====
   原主题在窄屏把 .block-image.feaimg 设为 float:left !important、
   .post-list img.lazy 设为 position:absolute，并隐藏 .entry-summary，
   同时 .feaimg:after 生成白色块撑高，导致图片压在标题/摘要/正文上。
   以下用高权重 !important 规则彻底解除，图片一律整行排在摘要下方。 */

/* --- 详情页 --- */
#article-main .entry-container {
  position: relative !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  min-height: 0 !important;
}
#article-main .entry-summary,
#article-main .article-summary { display: block !important; }
#article-main .entry-meta {
  position: static !important;
  bottom: auto !important;
  height: auto !important;
  margin: 0 0 12px !important;
}
#article-main .block-image.feaimg,
#article-main .article-hero {
  position: static !important;
  float: none !important;
  clear: both !important;
  left: auto !important;
  top: auto !important;
  z-index: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 12px 0 18px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 6px;
}
#article-main .block-image.feaimg::after,
#article-main .article-hero::after {
  content: none !important;
  display: none !important;
  padding: 0 !important;
  background: none !important;
}
#article-main .block-image.feaimg img,
#article-main .article-hero img,
#article-main .post-list img.lazy {
  position: static !important;
  float: none !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  margin: 0 !important;
}
#article-main .article-content {
  clear: both !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* --- 首页 / 分类列表页卡片 --- */
.home-main .entry-summary { display: block !important; }
.home-main .entry-container { padding-left: 0 !important; padding-right: 0 !important; }
.home-main .block-image.feaimg {
  position: static !important;
  float: none !important;
  clear: both !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 10px 0 12px !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.home-main .block-image.feaimg::after {
  content: none !important;
  display: none !important;
  padding: 0 !important;
  background: none !important;
}
.home-main .block-image.feaimg img,
.home-main .post-list img.lazy {
  position: static !important;
  float: none !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  margin: 0 !important;
}
.home-main .entry-meta { position: static !important; bottom: auto !important; height: auto !important; }

/* --- 小屏再次加固，确保覆盖主题 600px 断点内的 !important --- */
@media screen and (max-width: 640px) {
  #article-main .article-hero,
  #article-main .block-image.feaimg,
  .home-main .block-image.feaimg {
    float: none !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin: 10px 0 14px !important;
  }
  #article-main .article-summary,
  #article-main .entry-summary,
  .home-main .entry-summary { display: block !important; }
  #article-main .article-content p { line-height: 1.9; }
}


/* ===== 卡片图片链接：原主题 a.block-fea 是 absolute 铺满容器，
   会让图片脱离文档流、把标题/摘要压住，这里恢复为普通块级 ===== */
.home-main .block-image.feaimg .block-fea,
.article-gallery .gallery-item .block-fea {
  position: static !important;
  float: none !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  transform: none !important;
}
.home-main .entry-container:hover a.block-fea { transform: none !important; }
