/*
 * 回收匠资讯频道专属样式
 * 说明：主站 css/style.css 与 css/shuoming.css 已通过 functions.php 加载，
 *       本文件仅补充资讯频道特有样式，颜色与主站 CSS 变量保持一致。
 */

/* ============ 资讯频道头部 ============ */
.news-hero {
  padding: 64px 0 40px;
  color: #fff;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.14), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(255,255,255,.10), transparent 50%),
    linear-gradient(135deg, var(--green), var(--green-dark));
  margin-bottom: 40px;
}
.news-hero .page-title {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
}
.news-hero .page-sub {
  margin: 0 0 18px;
  font-size: 15px;
  opacity: .92;
  color: #fff;
}
.news-hero .crumb,
.news-single .crumb {
  font-size: 13px;
  color: rgba(255,255,255,.85);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.news-hero .crumb a { color: rgba(255,255,255,.92); text-decoration: underline; text-underline-offset: 3px; }
.news-hero .crumb a:hover { color: #fff; }
.news-single .crumb { color: #888; }
.news-single .crumb a { color: var(--green); text-decoration: none; }
.news-single .crumb a:hover { color: var(--green-dark); text-decoration: underline; }

/* ============ 列表主体 ============ */
.news-section { padding: 0 0 56px; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 文章卡片 */
.news-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(22,163,74,.14); }
.news-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--green-light); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.news-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.news-date { color: #888; }
.news-cat {
  color: var(--green);
  background: var(--green-light);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.news-cat:hover { background: var(--green); color: #fff; }
.news-title { margin: 0 0 8px; font-size: 18px; line-height: 1.5; }
.news-title a { color: var(--text, #1f2937); text-decoration: none; }
.news-title a:hover { color: var(--green); }
.news-excerpt {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-foot { margin-top: auto; }
.news-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}
.news-more:hover { color: var(--green-dark); text-decoration: underline; }

/* 分页 */
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: #555;
  background: #fff;
  text-decoration: none;
  transition: all .2s ease;
}
.pagination a:hover { border-color: var(--green); color: var(--green); }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }

/* 空状态 */
.no-news { text-align: center; padding: 80px 0; color: #999; font-size: 15px; }

/* ============ 标签云 ============ */
.news-tags-section { border-top: 1px solid var(--line); padding-top: 44px; }
.tags-title { font-size: 18px; margin: 0 0 16px; color: var(--green-dark); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: #444;
  background: #fff;
  text-decoration: none;
  transition: all .2s ease;
}
.tag-chip span { font-size: 11px; color: #999; }
.tag-chip:hover { border-color: var(--green); color: var(--green); background: var(--green-light); }
.tag-chip:hover span { color: var(--green); }

/* ============ 文章详情页 ============ */
.news-single { padding: 8px 0 60px; }
.news-single-inner { max-width: 860px; }
.news-single-head { margin: 20px 0 24px; }
.news-single-title {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.4;
  color: var(--text, #1f2937);
}
.news-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: #888;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.news-single-meta a { color: var(--green); text-decoration: none; }
.news-single-meta a:hover { text-decoration: underline; }
.news-single-thumb {
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.news-single-thumb img { width: 100%; height: auto; display: block; }

/* 正文排版 */
.entry-content { font-size: 15.5px; line-height: 1.9; color: #333; }
.entry-content h2 { font-size: 23px; margin: 34px 0 14px; color: var(--green-dark); padding-left: 12px; border-left: 4px solid var(--green); }
.entry-content h3 { font-size: 19px; margin: 28px 0 12px; color: var(--green-dark); }
.entry-content h4 { font-size: 17px; margin: 22px 0 10px; color: #1f2937; }
.entry-content p { margin: 0 0 18px; }
.entry-content a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--green-dark); }
.entry-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.entry-content ul, .entry-content ol { margin: 0 0 18px; padding-left: 24px; }
.entry-content ul li, .entry-content ol li { margin-bottom: 6px; }
.entry-content ul li::marker { color: var(--green); }
.entry-content blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--green);
  background: var(--green-light);
  border-radius: 0 10px 10px 0;
  color: #444;
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.entry-content table th { background: var(--green); color: #fff; }
.entry-content table th, .entry-content table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content table tr:nth-child(even) { background: #fafcfa; }
.entry-content figure { margin: 20px 0; }
.entry-content figcaption { text-align: center; font-size: 13px; color: #888; margin-top: 6px; }
.entry-content .wp-block-quote { font-style: normal; }

/* 文末：标签 / 上一篇下一篇 / 返回 */
.news-single-foot { margin-top: 34px; }
.news-tags { font-size: 14px; color: #666; margin-bottom: 22px; }
.news-tags a { color: var(--green); text-decoration: none; }
.news-tags a:hover { text-decoration: underline; }
.news-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.news-nav a { color: var(--green); text-decoration: none; }
.news-nav a:hover { color: var(--green-dark); text-decoration: underline; }
.news-prev { max-width: 48%; }
.news-next { max-width: 48%; text-align: right; }
.news-back { margin-top: 20px; }
.news-back a { font-size: 14px; color: #666; text-decoration: none; }
.news-back a:hover { color: var(--green); }

/* 相关资讯 */
.related-news { margin-top: 44px; }
.related-title { font-size: 18px; margin: 0 0 16px; color: var(--green-dark); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: all .2s ease;
}
.related-item:hover { border-color: var(--green); box-shadow: 0 6px 18px rgba(22,163,74,.12); }
.related-item img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; }
.related-item-title { font-size: 14px; line-height: 1.5; color: var(--text, #1f2937); font-weight: 600; }
.related-item:hover .related-item-title { color: var(--green); }
.related-item-date { font-size: 12px; color: #999; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .news-hero { padding: 44px 0 30px; }
  .news-hero .page-title { font-size: 26px; }
  .news-single-title { font-size: 23px; }
  .entry-content { font-size: 15px; }
  .news-nav { flex-direction: column; }
  .news-prev, .news-next { max-width: 100%; text-align: left; }
}
