/* ============================================================
   wphy-moon 商业化升级补丁（独立文件，可一键回滚）
   分类/归档页 + 文章详情页 视觉与结构优化
   依赖：style.css（原底） + 主题品牌变量 --brand
   ============================================================ */

/* ---------- 1. 归档/分类页 品牌 Hero 头图 ---------- */
.wphy-archive-hero {
  background: linear-gradient(135deg, #E6FAFB 0%, #F8FAFC 100%);
  border-bottom: 1px solid #eef2f6;
  padding: 42px 0 34px;
  margin-bottom: 26px;
}
.wphy-archive-hero .archive-title {
  font-size: 28px;
  font-weight: 600;
  color: #1F2733;
  margin: 0 0 10px;
  letter-spacing: .5px;
}
.wphy-archive-hero .archive-title:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 22px;
  background: var(--brand);
  border-radius: 3px;
  margin-right: 12px;
  vertical-align: -3px;
}
.wphy-archive-hero .archive-desc {
  color: #667085;
  font-size: 15px;
  max-width: 760px;
  line-height: 1.7;
}

/* ---------- 2. 列表文章卡片 ---------- */
#wphy-archive-hero { } /* placeholder, avoid empty rule */
.wphy-post-card {
  margin-bottom: 22px;
}
.wphy-post-card-inner {
  display: flex;
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.wphy-post-card-inner:hover {
  box-shadow: 0 12px 30px rgba(var(--brand-rgb), .12);
  transform: translateY(-3px);
  border-color: rgba(var(--brand-rgb), .35);
}
.wphy-post-thumb {
  position: relative;
  flex: 0 0 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #E6FAFB 0%, #F1F5F9 100%);
  min-height: 200px;
}
.wphy-post-thumb img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  transition: transform .4s ease;
}
.wphy-post-card-inner:hover .wphy-post-thumb img {
  transform: scale(1.06);
}
.wphy-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  background: rgba(var(--brand-rgb), .12);
  color: var(--brand);
  font-size: 36px;
  font-weight: 600;
  border-radius: 50%;
}
.wphy-cat-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.wphy-post-body {
  flex: 1 1 auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}
.wphy-post-body .entry-title {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.45;
}
.wphy-post-body .entry-title a {
  color: #1F2733;
  text-decoration: none;
  transition: color .2s ease;
}
.wphy-post-body .entry-title a:hover {
  color: var(--brand);
}
.wphy-post-body .meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #98A2B3;
  font-size: 13px;
  margin-bottom: 12px;
}
.wphy-post-body .meta-info span:before {
  font-family: 'FontAwesome';
  margin-right: 5px;
  color: var(--brand);
}
.wphy-post-body .meta-info .author:before { content: "\f007"; }
.wphy-post-body .meta-info .date:before  { content: "\f073"; }
.wphy-post-body .meta-info .cat:before   { content: "\f07c"; }
.wphy-post-body .entry-content {
  color: #667085;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
  flex: 1 1 auto;
}
.wphy-read-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  text-decoration: none;
  transition: all .2s ease;
}
.wphy-read-more:hover {
  background: var(--brand);
  color: #fff;
}
.wphy-read-more .wphy-arrow { margin-left: 3px; transition: transform .2s ease; }
.wphy-read-more:hover .wphy-arrow { transform: translateX(3px); }
.wphy-post-body .tag-cloud {
  margin-top: 14px;
}

/* 移动端：纵向堆叠 */
@media (max-width: 767px) {
  .wphy-post-card-inner {
    flex-direction: column;
  }
  .wphy-post-thumb {
    flex: none;
    width: 100%;
  }
  .wphy-post-thumb img {
    min-height: 180px;
    max-height: 220px;
  }
  .wphy-post-body { padding: 16px 18px; }
}

/* ---------- 3. 分页（品牌化、居中、当前页高亮） ---------- */
.pagination {
  text-align: center;
  margin: 30px 0 10px;
  padding-top: 10px;
}
.pagination a,
.pagination span {
  display: inline-block;
  min-width: 38px;
  height: 38px;
  line-height: 38px;
  padding: 0 12px;
  margin: 0 4px 6px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  color: #667085;
  background: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: all .2s ease;
}
.pagination a:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), .15);
}
.pagination .current {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.pagination .dots {
  border: none;
  background: transparent;
}

/* ---------- 4. 侧边栏 widget 卡片化 ---------- */
#secondary {
  padding-top: 0;
}
#secondary .widget {
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 22px;
  box-shadow: 0 2px 10px rgba(31, 39, 51, .04);
}
#secondary .widget-title {
  font-size: 16px;
  font-weight: 600;
  color: #1F2733;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand);
  display: inline-block;
}
#secondary ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#secondary li {
  padding: 7px 0;
  border-bottom: 1px dashed #eef2f6;
}
#secondary li:last-child { border-bottom: none; }
#secondary a { color: #475467; text-decoration: none; }
#secondary a:hover { color: var(--brand); }

/* ---------- 4.1 自定义小工具内部样式（wphy-*） ---------- */
/* 作者模块 */
.wphy-widget-author .wphy-author-main { text-align: center; }
.wphy-widget-author .wphy-author-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand);
  padding: 2px;
}
.wphy-widget-author .wphy-author-name { font-weight: 600; font-size: 16px; color: #1F2733; margin-top: 8px; }
.wphy-widget-author .wphy-author-desc { color: #667085; font-size: 13px; margin: 8px 0; line-height: 1.6; }
.wphy-widget-author .wphy-author-meta { display: flex; justify-content: center; gap: 18px; margin: 10px 0; }
.wphy-widget-author .wphy-author-meta-box { color: #475467; font-size: 13px; }
.wphy-widget-author .wphy-author-meta-box i { color: var(--brand); margin-right: 4px; }
.wphy-widget-author .wphy-author-title { font-size: 14px; font-weight: 600; color: #1F2733; margin: 16px 0 6px; }
.wphy-widget-author .wphy-author-post-list ul { margin: 0; padding: 0; list-style: none; }
.wphy-widget-author .wphy-author-post-list li {
  padding: 7px 0; border-bottom: 1px dashed #eef2f6; font-size: 14px;
}
.wphy-widget-author .wphy-author-post-list li:last-child { border-bottom: none; }

/* 最新评论模块 */
.wphy-widget-comments { margin: 0; padding: 0; list-style: none; }
.wphy-widget-comments li { padding: 12px 0; border-bottom: 1px dashed #eef2f6; }
.wphy-widget-comments li:last-child { border-bottom: none; }
.wphy-comment-info { display: flex; align-items: center; justify-content: space-between; }
.wphy-comment-user { display: flex; align-items: center; gap: 8px; }
.wphy-comment-avatar .wphy-avatar { border-radius: 50%; object-fit: cover; }
.wphy-comment-name { font-weight: 600; color: #1F2733; font-size: 14px; }
.wphy-comment-time { color: #98A2B3; font-size: 12px; }
.wphy-comment-excerpt { margin: 8px 0 4px; color: #475467; font-size: 13px; line-height: 1.6; }
.wphy-comment-postlink { margin: 0; font-size: 12px; color: #98A2B3; }
.wphy-comment-postlink a { color: var(--brand); }

/* 热门文章模块 */
.wphy-widget-hot { display: block; }
.wphy-hot-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #eef2f6; }
.wphy-hot-item:last-child { border-bottom: none; }
.wphy-hot-num {
  flex: 0 0 24px; height: 24px; line-height: 24px; text-align: center;
  background: #f1f5f9; color: #98A2B3; border-radius: 6px; font-size: 13px; font-weight: 600;
}
.wphy-hot-item:nth-child(1) .wphy-hot-num { background: var(--brand); color: #fff; }
.wphy-hot-body { flex: 1; min-width: 0; }
.wphy-hot-title {
  display: block; color: #1F2733; font-size: 14px; font-weight: 500; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wphy-hot-title:hover { color: var(--brand); }
.wphy-hot-meta { display: flex; gap: 12px; margin-top: 4px; color: #98A2B3; font-size: 12px; }
.wphy-hot-meta a { color: var(--brand); text-decoration: none; }

/* 句子模块 */
.wphy-widget-sentence { padding: 6px 2px; }
.wphy-sentence-text { margin: 0; color: #475467; font-size: 14px; line-height: 1.8; font-style: italic; }

/* 标签云模块 */
.wphy-tag-cloud { margin: 6px 0; min-height: 180px; }
.wphy-tag-cloud .wphy-tag-container { position: relative; height: 200px; }
.wphy-tag-cloud .tagcloud--item a { color: #fff; text-decoration: none; }
.wphy-tag-cloud .tagcloud--item a:hover { text-decoration: underline; }

/* ---------- 5. 文章详情页 ---------- */
.detail-page .breadcrumbs {
  font-size: 13px;
  color: #98A2B3;
  margin-bottom: 14px;
}
.detail-page .breadcrumbs a { color: #667085; text-decoration: none; }
.detail-page .breadcrumbs a:hover { color: var(--brand); }
.detail-page .entry-title {
  font-size: 28px;
  font-weight: 600;
  color: #1F2733;
  margin: 0 0 16px;
  text-align: center;
}
.detail-page .meta-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  color: #98A2B3;
  font-size: 13px;
  margin-bottom: 22px;
}
.detail-page .meta-info span:before {
  font-family: 'FontAwesome';
  margin-right: 5px;
  color: var(--brand);
}
.detail-page .meta-info .author:before { content: "\f007"; }
.detail-page .meta-info .date:before   { content: "\f073"; }
.detail-page .meta-info .cat:before    { content: "\f07c"; }
.detail-page .entry-content {
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 26px 30px;
  color: #1F2733;
  line-height: 1.9;
  font-size: 15px;
}

/* 自定义字段信息盒 */
.customed-field {
  background: #F8FAFC;
  border: 1px solid #eef2f6;
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 22px;
}
.customed-field .item {
  padding: 5px 0;
  font-size: 14px;
  color: #475467;
}
.customed-field .item strong { color: #1F2733; margin-right: 6px; }
.customed-field .item a { color: var(--brand); text-decoration: none; }

/* 作者信息盒 */
.wphy-author-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 18px 22px;
  margin: 26px 0;
}
.wphy-author-box .avatar {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
}
.wphy-author-box .avatar img { width: 100%; height: 100%; object-fit: cover; }
.wphy-author-box .author-meta { flex: 1; }
.wphy-author-box .author-name { font-weight: 600; color: #1F2733; font-size: 15px; }
.wphy-author-box .author-desc { color: #98A2B3; font-size: 13px; margin-top: 4px; }

/* QQ 群提示 / 转化条 */
.qq-group {
  background: linear-gradient(135deg, #E6FAFB, #F8FAFC);
  border: 1px solid rgba(var(--brand-rgb), .3);
  border-radius: 10px;
  padding: 14px 18px;
  color: #475467;
  font-size: 14px;
}
.wphy-post-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}
.wphy-like-btn,
.wphy-reward-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  border-radius: 24px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}
.wphy-like-btn:hover,
.wphy-reward-btn:hover { background: var(--brand); color: #fff; }
.wphy-like-btn.liked { background: var(--brand); color: #fff; }

/* 相关文章卡片网格 */
.wphy-related {
  margin-top: 30px;
}
.wphy-related .block-title h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1F2733;
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
}
.wphy-related .rel-card {
  display: block;
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow .25s ease, transform .25s ease;
  height: 100%;
}
.wphy-related .rel-card:hover {
  box-shadow: 0 10px 26px rgba(var(--brand-rgb), .14);
  transform: translateY(-3px);
}
.wphy-related .rel-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.wphy-related .rel-card .rel-title {
  display: block;
  padding: 10px 12px;
  color: #1F2733;
  font-size: 14px;
  line-height: 1.5;
}
.wphy-related .rel-card:hover .rel-title { color: var(--brand); }

/* 上一篇/下一篇 */
.page-nav-wphy {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0;
  flex-wrap: wrap;
}
.page-nav-wphy .nav-previous,
.page-nav-wphy .nav-next {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
}
.page-nav-wphy .nav-previous a,
.page-nav-wphy .nav-next a {
  color: #475467;
  text-decoration: none;
}
.page-nav-wphy .nav-previous a:hover,
.page-nav-wphy .nav-next a:hover { color: var(--brand); }
.page-nav-wphy .nav-next { text-align: right; }

/* 文章页容器留白 */
.detail-page { padding-top: 6px; }

@media (max-width: 767px) {
  .detail-page .entry-content { padding: 18px 16px; }
  .detail-page .entry-title { font-size: 22px; }
  .wphy-post-actions { flex-wrap: wrap; }
}

/* ---------- 6. 入场微动画 ---------- */
.wphy-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.wphy-reveal-in {
  opacity: 1;
  transform: none;
}
.wphy-archive-hero {
  opacity: 0;
  transform: translateY(-10px);
  animation: wphyHeroIn .5s ease forwards;
}
@keyframes wphyHeroIn {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wphy-reveal, .wphy-archive-hero { opacity: 1 !important; transform: none !important; animation: none !important; }
}
