/* 博客列表页样式 — 需在 main.css 之后加载（依赖 :root CSS 变量） */

/* ── Blog ── */

.blog-page__actions {
  margin-top: 48px;
  text-align: center;
}

@media (min-width: 768px) {
  .blog-page__actions {
    text-align: left;
  }
}

.blog-hero {
  position: relative;
  margin-bottom: 48px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-align: center;
}

@media (min-width: 640px) {
  .blog-hero {
    padding: 48px;
  }
}

@media (min-width: 1024px) {
  .blog-hero {
    margin-bottom: 64px;
    text-align: left;
  }
}

.blog-hero__pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--slate-200) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
  pointer-events: none;
}

.blog-hero__glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 320px;
  margin-top: -80px;
  margin-right: -80px;
  background: rgba(14, 165, 233, 0.05);
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
}

.blog-hero__content {
  position: relative;
  z-index: 1;
}

.blog-hero__title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--slate-900);
}

.blog-hero__intro {
  margin: 0 auto;
  max-width: 42rem;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--slate-600);
}

.blog-nav {
  display: inline-flex;
  gap: 4px;
  margin-top: 24px;
  padding: 4px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
}

.blog-nav__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--slate-600);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-nav__tab:hover {
  color: var(--slate-900);
}

.blog-nav__tab--active {
  background: #fff;
  color: var(--ice-700);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (min-width: 1024px) {
  .blog-hero__intro {
    margin: 0;
  }
}

.blog-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 640px) {
  .blog-card {
    padding: 32px;
  }
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.05),
    0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.blog-card__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-500);
}

.blog-card__date-icon,
.blog-article__date-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.blog-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.blog-card__badge--tutorial {
  background: #dbeafe;
  color: #1e40af;
}

.blog-card__badge--comparison {
  background: #ede9fe;
  color: #5b21b6;
}

.blog-card__badge--best-practices {
  background: #dcfce7;
  color: #166534;
}

.blog-card__badge--tool-guide {
  background: #ffedd5;
  color: #9a3412;
}

.blog-card__title {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--slate-900);
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card__title a:hover {
  color: var(--ice-500);
}

.blog-card__excerpt {
  display: -webkit-box;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--slate-600);
  line-height: 1.65;
}

.blog-card__footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--slate-100);
}

.blog-card__link,
.blog-article__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ice-500);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card__link:hover,
.blog-article__cta:hover {
  color: var(--ice-600);
}

.blog-card__link-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card__link-icon,
.blog-article__cta:hover .blog-card__link-icon {
  transform: translateX(4px);
}

.blog-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
  color: var(--slate-700);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.blog-back-btn:hover {
  background: var(--slate-50);
  color: var(--slate-900);
}

.blog-back-btn--compact {
  padding: 8px 14px;
  font-size: 14px;
}

.blog-back-btn__icon {
  width: 16px;
  height: 16px;
}

.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .blog-pagination {
    justify-content: space-between;
  }
}

.blog-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 16px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.blog-pagination__btn:hover {
  background: var(--slate-50);
  color: var(--slate-900);
}

.blog-pagination__btn--disabled {
  opacity: 0.45;
  cursor: default;
}

.blog-pagination__pages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-pagination__page {
  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(--slate-600);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.blog-pagination__page:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.blog-pagination__page--active {
  background: var(--ice-100);
  color: var(--ice-700);
  font-weight: 600;
}
