/* =============================================================================
   VIDUR FOUNDATION — ARTICLE READING STYLES
   Optimised for long-form, depth reading. Every detail matters here.
   The article is the product. Make it exceptional.
   ============================================================================= */

/* ── Article Layout ───────────────────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr min(var(--max-width-content), 100%) 1fr;
  padding-top: var(--space-16);
  padding-bottom: var(--space-24);
}

.article-layout > * {
  grid-column: 2;
}

/* Full-bleed elements (images, pull quotes) */
.article-layout .full-bleed {
  grid-column: 1 / -1;
  width: 100%;
}

/* Wide elements (tables, code blocks) */
.article-layout .wide {
  grid-column: 1 / -1;
  max-width: 960px;
  margin-inline: auto;
  width: 100%;
  padding-inline: var(--space-6);
}

/* ── Article Header ───────────────────────────────────────────────────────── */
.article-header {
  margin-bottom: var(--space-12);
}

.article-pillar-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.article-pillar-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.article-excerpt {
  font-size: var(--text-xl);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  font-weight: var(--weight-regular);
  border-left: 3px solid #C9922A;
  padding-left: var(--space-6);
  margin-bottom: var(--space-8);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.article-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--border-medium);
}

/* ── Article Body ─────────────────────────────────────────────────────────── */
.article-body {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: var(--space-6);
}

.article-body h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-16);
  margin-bottom: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-light);
  color: var(--text-primary);
}

.article-body h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.article-body h4 {
  font-size: var(--text-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.article-body ul,
.article-body ol {
  margin-bottom: var(--space-6);
  padding-left: var(--space-8);
}

.article-body li {
  margin-bottom: var(--space-3);
  line-height: var(--leading-relaxed);
}

.article-body blockquote {
  margin: var(--space-10) 0;
  padding: var(--space-6) var(--space-8);
  background: #F5F5F7;
  border-left: 3px solid #C9922A;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.article-body blockquote p { margin-bottom: 0; }

.article-body img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin: var(--space-10) 0;
  box-shadow: var(--shadow-lg);
}

.article-body img + em {
  display: block;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: calc(-1 * var(--space-6));
  margin-bottom: var(--space-10);
}

.article-body a {
  text-decoration-color: var(--color-gold-400);
}

.article-body code {
  font-size: 0.85em;
}

.article-body pre {
  background: #1D1D1F;
  color: #F5F5F7;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-8) 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ── Government Scheme Callout ─────────────────────────────────────────────
   Special callout for government schemes (used heavily in Indian NGO content)
*/
.scheme-callout {
  background: #FBF5E6;
  border: 1px solid #ECD08A;
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.scheme-callout__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold-600);
  margin-bottom: var(--space-2);
}

.scheme-callout__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: #2D2D2F;
  margin-bottom: var(--space-3);
}

.scheme-callout__body {
  font-size: var(--text-sm);
  color: #3D3D3F;
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* ── Key Takeaway Box ─────────────────────────────────────────────────────── */
.takeaway-box {
  background: #F5F5F7;
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-10) 0;
}

.takeaway-box__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-primary);
  margin-bottom: var(--space-3);
}

.takeaway-box p { margin-bottom: 0; font-weight: var(--weight-medium); }

/* ── Data/Stat callout ────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin: var(--space-8) 0;
}

.stat-item {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--brand-primary);
  display: block;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-snug);
}

.stat-source {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ── Article Footer ───────────────────────────────────────────────────────── */
.article-footer {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 2px solid var(--border-light);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.article-share {
  margin-bottom: var(--space-12);
}

.article-share__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

/* ── Related Articles ─────────────────────────────────────────────────────── */
.related-articles {
  margin-top: 0;
  background: #F5F5F7;
  padding: var(--space-16) 0;
}

.related-articles__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
}

/* ── Featured Image ───────────────────────────────────────────────────────── */
.article-featured-image {
  grid-column: 1 / -1;
  margin: 0 0 var(--space-12);
  padding-inline: var(--space-6);
  max-width: 1100px;
  width: 100%;
  margin-inline: auto;
}

.article-featured-image img {
  box-shadow: var(--shadow-lg);
}

/* Gradient fallback when no image */
.article-hero-gradient {
  grid-column: 1 / -1;
  height: 3px;
  background: #C9922A;
  margin-bottom: var(--space-8);
}
