/* ===== 页面 Hero（文章中心） ===== */
.page-hero {
  padding: 140px 0 72px;
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
  text-align: center;
}

.page-hero-tag {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(37,99,235,.2);
  color: #93C5FD;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.page-hero-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.page-hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,.65);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== 文章筛选 ===== */
.articles-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 14px;
  color: var(--gray-400);
  margin-right: 4px;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  background: #fff;
  color: var(--gray-600);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.filter-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ===== 文章网格 ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}

.article-card-img-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-card-body {
  padding: 24px 20px;
}

.article-card-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.article-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.article-card-title a {
  color: var(--gray-900);
  transition: var(--transition);
}

.article-card-title a:hover {
  color: var(--blue);
}

.article-card-desc {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-400);
}

.meta-dot {
  color: var(--gray-300);
}

/* 隐藏态 */
.article-card.hidden {
  display: none;
}

/* ===== 文章详情页 ===== */
.article-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 0 80px;
}

.article-header {
  margin-bottom: 40px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 24px;
}

.article-breadcrumb a {
  color: var(--blue);
  transition: var(--transition);
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-header h1 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.35;
  margin-bottom: 16px;
}

.article-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-400);
  flex-wrap: wrap;
}

.article-header-meta .article-cat {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.article-content {
  font-size: 17px;
  line-height: 1.9;
  color: var(--gray-700);
}

.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-100);
}

.article-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 32px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content ul li { list-style: disc; }
.article-content ol li { list-style: decimal; }

.article-content strong {
  color: var(--gray-900);
}

.article-content blockquote {
  border-left: 4px solid var(--blue);
  background: var(--blue-light);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--gray-700);
  font-style: italic;
}

.article-content a {
  color: var(--blue);
  text-decoration: underline;
}

.article-content a:hover {
  color: var(--blue-dark);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

.article-content th {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-800);
}

.article-content td {
  border: 1px solid var(--gray-200);
  padding: 10px 14px;
  color: var(--gray-700);
}

.article-content code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
  color: var(--blue);
  font-family: "SF Mono", "Fira Code", monospace;
}

/* 文章底部 */
.article-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.article-prevnext {
  display: flex;
  gap: 32px;
  flex: 1;
  flex-wrap: wrap;
}

.article-prev,
.article-next {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.prevnext-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-400);
  font-weight: 600;
}

.article-prev a,
.article-next a {
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 500;
  transition: var(--transition);
  line-height: 1.5;
}

.article-prev a:hover,
.article-next a:hover {
  color: var(--blue);
}

.article-back {
  font-size: 15px;
  color: var(--blue);
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.article-back:hover {
  color: var(--blue-dark);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-400);
}

/* ===== 文章列表：分类动态色（PBootCMS scode 匹配） ===== */
/* 分类 2 = 小程序开发（蓝） */
.cat-label-2 { background: #EBF5FF; color: #2563EB; }
/* 分类 3 = 网站建设（绿） */
.cat-label-3 { background: #F0FDF4; color: #16A34A; }
/* 分类 4 = GEO 推广（橙） */
.cat-label-4 { background: #FFF7ED; color: #EA580C; }

/* 占位背景渐变：分类 2 */
.cat-bg-2 { background: linear-gradient(135deg, #2563EB, #60A5FA); }
/* 占位背景渐变：分类 3 */
.cat-bg-3 { background: linear-gradient(135deg, #16A34A, #4ADE80); }
/* 占位背景渐变：分类 4 */
.cat-bg-4 { background: linear-gradient(135deg, #EA580C, #FB923C); }

/* ===== 分页 ===== */
.articles-pagination {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  gap: 6px;
}

.articles-pagination a,
.articles-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  text-decoration: none;
}

.articles-pagination a:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.articles-pagination .page-current {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-weight: 600;
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-detail {
    padding: 32px 0 56px;
  }
}

@media (max-width: 640px) {
  .page-hero {
    padding: 120px 0 48px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .article-detail {
    padding: 24px 0 48px;
  }

  .article-content {
    font-size: 16px;
  }

  .article-content h2 {
    font-size: 21px;
  }
}
