/* SafeW003 CMS 补充：首页文章区 / 分类列表 / 文章详情 / 分页 */

.articles-home .blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.blog-card-cover:empty {
  display: none;
}

.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-list-page .blog-grid,
.category-page .blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.list-empty {
  text-align: center;
  padding: 48px 0;
  color: rgba(255, 255, 255, 0.65);
}

.list-empty p {
  margin-bottom: 16px;
}

.category-count {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
}

.article-page .article-cover:empty {
  display: none;
}

.article-page .article-cover img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.article-page .article-body {
  line-height: 1.8;
}

.article-page .article-body h2,
.article-page .article-body h3 {
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.article-more {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-more .blog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pg {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 32px;
}

.pg a,
.pg span {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.875rem;
}

.pg a:hover {
  border-color: rgba(99, 102, 241, 0.5);
  color: #fff;
}

.pg .on {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 992px) {
  .articles-home .blog-grid,
  .blog-list-page .blog-grid,
  .category-page .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .articles-home .blog-grid,
  .blog-list-page .blog-grid,
  .category-page .blog-grid,
  .article-more .blog-grid {
    grid-template-columns: 1fr;
  }
}
