/* ═══════════════════════════════════════════════════════════════
   blog-list.css — Blog listing page
   Unified with the site's jade/gold theme (adapts light/dark)
   ═══════════════════════════════════════════════════════════════ */

/* ── Page ── */
.blog-page {
  min-height: 100vh;
  padding: 0 1rem 3rem;
}

/* ── Hero ── */
.blog-hero {
  position: relative;
  text-align: center;
  padding: 4rem 1rem 3rem;
  margin: 0 -1rem 2.5rem;
  background: linear-gradient(165deg, var(--bg-dark) 0%, var(--royal-jade) 45%, var(--bg-dark-alt) 100%);
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 20% 80%, rgba(207, 164, 52, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 80% 20%, rgba(207, 164, 52, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.blog-hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold-500), var(--royal-jade), transparent);
}

.blog-hero__deco {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(207, 164, 52, 0.12);
  border-radius: 50%;
  top: -40px;
  right: -30px;
  pointer-events: none;
}
.blog-hero__deco::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(207, 164, 52, 0.08);
  border-radius: 50%;
  bottom: -10px;
  left: -10px;
}

.blog-hero__title {
  position: relative;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.blog-hero__title span {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero__subtitle {
  position: relative;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.blog-hero__stats {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.blog-hero__stat {
  text-align: center;
}

.blog-hero__stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-500);
  display: block;
}

.blog-hero__stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Filters ── */
.blog-filters {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--bg-white);
  padding: 0.75rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border-gold-light);
  box-shadow: var(--shadow-sm);
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.filter-label svg { width: 1rem; height: 1rem; color: var(--gold-500); }

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.filter-pill {
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border-divider);
  border-radius: 9999px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
  color: var(--text-primary);
}

.filter-pill:hover {
  border-color: var(--gold-500);
  color: var(--gold-600);
}

.filter-pill.active {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  border-color: var(--gold-500);
  color: var(--bg-dark);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(207, 164, 52, 0.35);
}

.clear-filters {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  transition: all 0.2s;
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.clear-filters:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.clear-filters svg { width: 0.875rem; height: 0.875rem; }

/* ── Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

/* ── Card ── */
.blog-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-gold-light);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  animation: cardIn 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(26, 92, 42, 0.16);
  border-color: var(--gold-500);
}

.blog-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(145deg, var(--bg-inset), var(--bg-subtle));
  position: relative;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blog-card:hover .blog-card__image img { transform: scale(1.08); }

.blog-card__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.blog-card__no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
}
.blog-card__no-img svg { width: 3rem; height: 3rem; color: currentColor; }

.blog-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.blog-card__badge svg { width: 0.75rem; height: 0.75rem; }

.blog-card__category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--bg-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  z-index: 2;
}

.blog-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.blog-card__meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.blog-card__meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.blog-card__meta svg { width: 0.8125rem; height: 0.8125rem; }

.blog-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}
.blog-card:hover .blog-card__title { color: var(--royal-jade); }

.blog-card__summary {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.blog-card__cat {
  background: color-mix(in srgb, var(--royal-jade) 12%, transparent);
  color: var(--royal-jade);
  padding: 0.2rem 0.625rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
}

/* ── Pagination ── */
.pagination-container {
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-white);
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold-light);
  box-shadow: var(--shadow-sm);
}

.page-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  background: linear-gradient(135deg, var(--dark-jade), var(--royal-jade));
  color: #fff;
}

.page-btn svg {
  width: 14px;
  height: 14px;
}

.page-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(207, 164, 52, 0.3);
}

.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.page-info {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 100px;
  text-align: center;
}

/* ── States ── */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 1rem;
}

.loading-spinner {
  width: 2.75rem;
  height: 2.75rem;
  border: 3px solid var(--border-gold-light);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state p { color: var(--text-muted); font-size: 0.9rem; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 1rem;
}

.empty-state svg {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--gold-soft);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
  .blog-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
}

@media (max-width: 767px) {
  .blog-hero { padding: 3rem 1rem 2.5rem; margin: 0 -1rem 2rem; }
  .blog-hero__stats { gap: 1.5rem; }
  .blog-hero__stat-num { font-size: 1.2rem; }
  .blog-page { padding: 0 0.75rem 2rem; }
  .blog-filters { padding: 0.75rem; gap: 0.5rem; }
  .filter-label { display: none; }
  .filter-pill { font-size: 0.75rem; padding: 0.375rem 0.75rem; }
  .blog-grid { grid-template-columns: 1fr; gap: 1rem; }
  .blog-card__body { padding: 1rem 1.25rem; }
  .blog-card__title { font-size: 0.95rem; }
  .pagination { padding: var(--space-xs) var(--space-md); gap: var(--space-sm); }
  .page-btn { padding: 8px 16px; font-size: 0.75rem; }
  .page-info { font-size: 0.75rem; min-width: auto; }
}

@media (max-width: 480px) {
  .blog-hero { padding: 2.5rem 0.75rem 2rem; }
  .blog-hero__deco { display: none; }
  .blog-grid { gap: 0.875rem; }
}
