/* ========== BLOG ARTICLE STYLES ========== */
/* Extends ../style.css — uses same CSS variables */

/* ---- Article Hero ---- */
.article-hero {
  position: relative;
  padding: 140px 24px 56px;
  text-align: center;
  overflow: hidden;
}
.article-hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}
.article-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.14;
  margin-bottom: 20px;
}

/* ---- Breadcrumb ---- */
.art-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}
.art-breadcrumb a { color: var(--primary); }
.art-breadcrumb a:hover { text-decoration: underline; }
.art-breadcrumb svg { opacity: 0.4; }

/* ---- Article Meta (date, read time) ---- */
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-top: 4px;
}
.article-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-foreground);
  opacity: 0.4;
}

/* ---- Main Container ---- */
.article-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---- Featured Image ---- */
.article-featured-image {
  margin: 0 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  aspect-ratio: 1200 / 628;
  background: var(--secondary);
}
.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Article Body ---- */
.article-body {
  font-size: 0.9375rem;
  line-height: 1.78;
  color: var(--foreground);
}
.article-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
  line-height: 1.2;
}
.article-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 28px 0 12px;
}
.article-body p {
  margin-bottom: 20px;
}
.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li {
  margin-bottom: 8px;
  line-height: 1.68;
}
.article-body strong { font-weight: 600; }
.article-body em { font-style: italic; }
.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-body a:hover { opacity: 0.8; }

/* ---- Blockquote (citations from RSS sources) ---- */
.article-body blockquote {
  border-left: 3px solid var(--primary);
  margin: 28px 0;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.article-body blockquote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary);
  opacity: 0.85;
}
.article-body blockquote cite a {
  color: var(--primary);
  text-decoration: underline;
}

/* ---- Article Footer / Related ---- */
.article-footer-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0 40px;
}

/* ---- Related Posts ---- */
.related-posts {
  margin-top: 48px;
}
.related-posts h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  text-decoration: none;
}
.related-card-img {
  aspect-ratio: 16/9;
  background: var(--secondary);
  overflow: hidden;
}
.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.related-card-category {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary);
}
.related-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.related-card-date {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: auto;
  padding-top: 8px;
}

/* ---- Blog Index (listing page) ---- */
.blog-hero {
  position: relative;
  padding: 140px 24px 60px;
  text-align: center;
  overflow: hidden;
}
.blog-hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}
.blog-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.blog-hero p {
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ---- Category Filter ---- */
.blog-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 24px 40px;
}
.blog-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'DM Sans', sans-serif;
}
.blog-filter-btn svg { flex-shrink: 0; }
.blog-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}
.blog-filter-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ---- Empty State ---- */
.blog-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  gap: 12px;
}
.blog-empty-state h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}
.blog-empty-state p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  max-width: 360px;
  margin: 0;
}

/* ---- Article Grid ---- */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}
.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.blog-card-img {
  aspect-ratio: 1200/628;
  background: var(--secondary);
  overflow: hidden;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.blog-card:hover .blog-card-img img {
  transform: scale(1.03);
}
.blog-card-body {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blog-card-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 3px 10px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-radius: 50px;
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
}
.blog-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ---- Pagination ---- */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.blog-page-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: all 0.15s ease;
}
.blog-page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}
.blog-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.blog-page-btn.wide {
  width: auto;
  padding: 0 14px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; gap: 16px; }
  .related-grid { grid-template-columns: 1fr; gap: 12px; }
  .article-hero { padding: 120px 20px 40px; }
  .article-container { padding: 0 20px 60px; }
  .blog-hero { padding: 120px 20px 40px; }
  .blog-container { padding: 0 20px 60px; }
  .blog-filters { padding: 0 20px 28px; gap: 6px; }
}
