

/* 无广游 卡片流 v3：两列卡片网格 | 卡片内：图左跨全高 | 右上标题 | 右下摘要 | 底部分类 */
/* ===== 列表容器：一排两张卡片 ===== */
.home .site-main,
.archive .site-main,
.blog .site-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 18px;
  align-items: start;
}
/* 分页导航占满整行 */
.home .site-main .nav-links,
.archive .site-main .nav-links,
.blog .site-main .nav-links {
  grid-column: 1 / -1;
}

/* ===== 卡片骨架：grid 两列，高度跟随正方形主图 ===== */
.home .inside-article,
.archive .inside-article,
.blog .inside-article {
  display: grid !important;
  grid-template-columns: 120px 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "image header"
    "image summary"
    "image cats";
  column-gap: 12px;
  row-gap: 2px;
  padding: 12px !important;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 0 !important;
  background: #fff;
  align-items: center;
  transition: box-shadow 0.2s;
  width: 100%;
  min-width: 0;
}
.home .inside-article:hover,
.archive .inside-article:hover,
.blog .inside-article:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ===== 图片：左列正方形，卡片整体高度由它决定 ===== */
.home .inside-article .post-image,
.archive .inside-article .post-image,
.blog .inside-article .post-image {
  grid-area: image;
  margin: 0 !important;
  align-self: start;
}
.home .inside-article .post-image img,
.archive .inside-article .post-image img,
.blog .inside-article .post-image img {
  width: 120px !important;
  height: 120px !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px !important;
  display: block;
}

/* ===== 右上：标题 ===== */
.home .inside-article .entry-header,
.archive .inside-article .entry-header,
.blog .inside-article .entry-header {
  grid-area: header;
  margin: 0 !important;
}
.home .entry-title,
.archive .entry-title,
.blog .entry-title {
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 5px !important;
  /* 标题过长只显示一横行，超出部分省略号 */
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* 关键：1fr 列默认 min-width:auto 会被长标题撑破卡片，必须锁 0 */
  min-width: 0;
  max-width: 100%;
}
.home .entry-title a,
.archive .entry-title a,
.blog .entry-title a {
  color: #1a1a1a;
  /* a 是行内元素，省略号要算在块级容器上；这里也锁死防止链接把标题撑开 */
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}
.home .entry-title a:hover,
.archive .entry-title a:hover,
.blog .entry-title a:hover {
  color: #2563eb;
}

/* ===== 右下：摘要 ===== */
.home .inside-article .entry-summary,
.archive .inside-article .entry-summary,
.blog .inside-article .entry-summary {
  grid-area: summary;
  margin: 0 !important;
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  /* 摘要最多 3 行省略（高度贴主图，不高出） */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 62px;
}

/* ===== 底行：分类+标签并排一行、整体上提 ===== */
/* entry-meta 是网格直接子元素（cat-links/tags-links 的父级 footer），由它占 cats 格 */
.home .inside-article .entry-meta,
.archive .inside-article .entry-meta,
.blog .inside-article .entry-meta {
  grid-area: cats;
  align-self: end;
  justify-self: start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0;
  transform: translateY(-6px);
  font-size: 0;
  line-height: 0;
}
/* cat/tags 两个 span 保持行内并排；font-size:0 吞掉标签间的逗号分隔符 */
.home .inside-article .cat-links,
.archive .inside-article .cat-links,
.blog .inside-article .cat-links,
.home .inside-article .tags-links,
.archive .inside-article .tags-links,
.blog .inside-article .tags-links {
  display: inline;
  font-size: 0;
  line-height: 0;
}
/* 分类药丸：蓝色系 */
.home .cat-links a,
.archive .cat-links a,
.blog .cat-links a {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  color: #2563eb !important;
  background: #eff6ff;
  padding: 2px 10px;
  border-radius: 999px;
  margin-right: 6px;
}
.home .cat-links a:hover,
.archive .cat-links a:hover,
.blog .cat-links a:hover {
  background: #dbeafe;
}
/* 标签药丸：灰色系（和分类区分） */
.home .tags-links a,
.archive .tags-links a,
.blog .tags-links a {
  display: inline-block;
  font-size: 12px;
  line-height: 1.6;
  color: #6b7280 !important;
  background: #f3f4f6;
  padding: 2px 10px;
  border-radius: 999px;
  margin-right: 6px;
}
.home .tags-links a:hover,
.archive .tags-links a:hover,
.blog .tags-links a:hover {
  background: #e5e7eb;
}
/* 隐藏 GP 自带的分类/标签图标（svg）和"分类"前缀文字 */
.home .entry-meta .gp-icon,
.archive .entry-meta .gp-icon,
.blog .entry-meta .gp-icon {
  display: none !important;
}

/* ===== 隐藏空作者署名（采集文章没有作者名，光秃秃一个"作者"字）===== */
.home .byline,
.archive .byline,
.blog .byline {
  display: none !important;
}

/* ===== 无侧栏布局（右侧栏彻底关闭）===== */
#right-sidebar,
.widget-area.sidebar.is-right-sidebar {
  display: none !important;
}

/* ===== 隐藏页脚 GeneratePress 版权 ===== */
.site-info {
  display: none !important;
}

/* ===== 移动端：单列，图上文下 ===== */
@media (max-width: 768px) {
  /* 手机端：外层单列，卡片内部保持 图左小缩略图 + 文右，不再改成图上文下大图 */
  .home .site-main,
  .archive .site-main,
  .blog .site-main {
    /* 必须用 minmax(0,1fr)：裸 1fr 最小宽度是 auto，会被 nowrap 长标题撑破视口导致整页放大 */
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
  .home .inside-article,
  .archive .inside-article,
  .blog .inside-article {
    grid-template-columns: 110px minmax(0, 1fr);
    column-gap: 10px;
    padding: 10px !important;
  }
  .home .inside-article .post-image img,
  .archive .inside-article .post-image img,
  .blog .inside-article .post-image img {
    width: 110px !important;
    height: 110px !important;
  }
  .home .entry-title,
  .archive .entry-title,
  .blog .entry-title {
    font-size: 15px;
  }
  .home .inside-article .entry-summary,
  .archive .inside-article .entry-summary,
  .blog .inside-article .entry-summary {
    -webkit-line-clamp: 2;
    max-height: 42px;
  }
}

/* ===== 详情页优化：主图缩小50%（1200→约600px 显示宽）+ 正文排版 ===== */
.single .featured-image img,
.single .inside-article  .post-image img {
  width: 90px !important;
  max-width: 90px !important;
  height: 90px !important;
  object-fit: cover;
  display: block;
  margin: 0 auto 24px;
  border-radius: 10px;
}
/* 正文排版（百度对可读性有加分）：字号行距 + 段落间距 + 标题层级 */
.single .entry-content {
  font-size: 16px;
  line-height: 1.9;
  color: #2a2a2a;
  max-width: 800px;
  margin: 0 auto;
}
.single .entry-content p {
  margin: 0 0 16px;
}
.single .entry-content h2 {
  font-size: 19px;
  line-height: 1.5;
  margin: 28px 0 14px;
  padding-left: 12px;
  border-left: 4px solid #2563eb;
}
.single .entry-content h3 {
  font-size: 17px;
  margin: 22px 0 12px;
}
.single .entry-content ul,
.single .entry-content ol {
  padding-left: 26px;
  margin: 0 0 16px;
}
.single .entry-content li {
  margin-bottom: 8px;
}
/* 文章页标题与 meta 居中排版 */
.single .entry-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 24px !important;
}
.single .entry-title {
  font-size: 24px;
  line-height: 1.45;
}
/* 底部分类标签：单页也居中 */
.single .entry-meta {
  text-align: center;
}


/* ===== 详情页手机端：主图从全宽海报缩小为紧凑主图（放在末尾确保覆盖） ===== */
@media (max-width: 768px) {
  .single .featured-image img,
  .single .inside-article  .post-image img {
    width: 75px !important;
    max-width: 75px !important;
    height: 75px !important;
    object-fit: cover;
    margin: 0 auto 14px !important;
    border-radius: 8px;
  }
  .single .entry-title {
    font-size: 20px;
  }
}


/* ===== 手机端兜底：禁止横向溢出撑破视口（2026-09-09 放大版问题） ===== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }
  .entry-title a {
    max-width: 100%;
  }
}


/* ============================================================
   wuguangyou.com 首页（分类模块流）样式 2026-09-09
   追加到 custom_css (ID=55)。规则：严禁 &gt; 子选择器（历史 &gt; 事故），
   移动端 grid 一律 minmax(0,1fr) + overflow-x 兜底（放大版事故）。
   ============================================================ */

/* ---------- 顶栏：搜索框(左) + logo(右) ---------- */
.wgy-home { max-width: 1080px; margin: 0 auto; padding: 12px; }
.wgy-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.wgy-search { flex: 1 1 auto; display: flex; min-width: 0; }
.wgy-search-input {
  flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 14px;
  border: 2px solid #ff5a5f; border-right: none; border-radius: 20px 0 0 20px;
  font-size: 14px; outline: none; background: #fff; color: #333;
}
.wgy-search-btn {
  height: 40px; padding: 0 16px; border: 2px solid #ff5a5f; background: #ff5a5f;
  color: #fff; border-radius: 0 20px 20px 0; font-size: 15px; cursor: pointer;
}
.wgy-logo { flex: 0 0 auto; text-decoration: none; }
.wgy-logo img { max-height: 40px; width: auto; vertical-align: middle; }
.wgy-logo-text {
  display: inline-block; padding: 6px 14px; background: #ff5a5f; color: #fff;
  border-radius: 8px; font-weight: 700; font-size: 16px; letter-spacing: 1px;
}

/* ---------- 分类模块：桌面两列流 ---------- */
.wgy-cat-block {
  background: #fff; border-radius: 10px; padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.wgy-cat-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 10px 0; font-size: 17px; line-height: 1.3;
  border-left: 4px solid #ff5a5f; padding-left: 10px;
}
.wgy-cat-title a { color: #222; text-decoration: none; }
.wgy-more { font-size: 13px; color: #999 !important; font-weight: 400; }

/* 桌面：两列 */
@media (min-width: 769px) {
  .wgy-home .wgy-cat-blocks-two-col {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  }
}
/* 两列包裹层：模板输出为平铺 section，这里用 CSS grid 兼容法——
   外层 .wgy-home 直接 grid，模块自动两列（移动端单列） */
@media (min-width: 769px) {
  .wgy-home { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
  .wgy-topbar { grid-column: 1 / -1; }
  .wgy-cat-block { margin-bottom: 0; }
}

/* ---------- 模块内列表：图左 72px + 标题右（紧凑型，区别于文章页 110px） ---------- */
.wgy-cat-list { list-style: none; margin: 0; padding: 0; }
.wgy-cat-list li { border-bottom: 1px dashed #f0f0f0; }
.wgy-cat-list li:last-child { border-bottom: none; }
.wgy-cat-list li a {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  text-decoration: none; min-width: 0;
}
.wgy-thumb {
  flex: 0 0 72px; width: 72px; height: 54px; object-fit: cover;
  border-radius: 6px; background: #f5f5f5;
}
.wgy-item-title {
  flex: 1 1 auto; min-width: 0; font-size: 14px; color: #333;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.45;
}
.wgy-cat-list li a:active .wgy-item-title,
.wgy-cat-list li a:hover .wgy-item-title { color: #ff5a5f; }

/* ---------- 移动端：单列，铁律 minmax(0,1fr) + overflow 兜底 ---------- */
@media (max-width: 768px) {
  .wgy-home { display: block; padding: 10px; }
  .wgy-topbar { display: flex; gap: 8px; }
  .wgy-logo-text { padding: 5px 10px; font-size: 14px; }
  .wgy-search-input { height: 36px; font-size: 13px; }
  .wgy-search-btn { height: 36px; padding: 0 12px; }
  .wgy-cat-title { font-size: 16px; }
  html, body { overflow-x: hidden; }
}


/* ---------- 09-10：站头=唯一首页入口，手机端恢复显示；隐藏空菜单条 ---------- */
.main-navigation .menu { display: none; }
@media (max-width: 768px) {
  .site-header { display: block; }
  .wgy-home { padding-top: 12px; }
}


/* ---------- 缩略图尺寸调整（09-09 晚 2）：首页正方形缩略图 + 详情页主图缩小 70% ---------- */
/* 首页模块缩略图：以高为准 54px，宽=高 → 正方形；圆角保持 */
.wgy-thumb {
  flex: 0 0 54px; width: 54px; height: 54px; object-fit: cover;
  border-radius: 8px;
}
/* 文章正文内的插图维持响应式，不跟主图规则冲突 */
.single .entry-content img { max-width: 100%; height: auto; }
