/* ============================================
   KOMPAS4 — Article Page CSS
   Prose, sidebar, related articles, lead widget
   ============================================ */

/* ─── Article Hero ──────────────────────── */
.article-hero {
  background: var(--navy-900);
  padding: clamp(6rem, 10vw, 8rem) 0 clamp(3rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 70% 40%, rgba(0,155,155,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.article-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.article-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  color: var(--gray-400);
  text-decoration: none;
  margin-bottom: var(--s6);
  transition: color var(--t-fast);
}

.article-back-link:hover { color: var(--white); }

.article-back-link svg {
  width: 16px;
  height: 16px;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s5);
  flex-wrap: wrap;
}

.article-hero h1 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--weight-bold);
  color: var(--white);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--s5);
}

.article-hero-summary {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: var(--gray-400);
  line-height: var(--leading-relaxed);
  max-width: 680px;
}

.article-reading-time {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.article-reading-time svg {
  width: 15px;
  height: 15px;
}

.article-author {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.article-date {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

/* ─── Article Layout ────────────────────── */
.article-layout {
  background: var(--gray-50);
  padding: var(--s12) 0 var(--s20);
}

.article-layout-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--s10);
  align-items: start;
}

/* ─── Article Body (Prose) ──────────────── */
.article-body {
  background: var(--white);
  border-radius: var(--r-2xl);
  padding: var(--s10) var(--s12);
  border: 1px solid var(--gray-200);
  min-width: 0;
}

.article-prose {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--gray-700);
}

.article-prose-intro {
  font-size: clamp(var(--text-base), 1.8vw, var(--text-lg));
  color: var(--gray-700);
  line-height: var(--leading-relaxed);
  font-weight: var(--weight-medium);
  margin-bottom: var(--s8);
  padding-bottom: var(--s8);
  border-bottom: 2px solid var(--gray-100);
}

.article-prose h2 {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: var(--weight-bold);
  color: var(--navy-900);
  letter-spacing: var(--tracking-tight);
  margin-top: var(--s10);
  margin-bottom: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--gray-100);
}

.article-prose p {
  margin-bottom: var(--s5);
  color: var(--gray-700);
}

.article-callout {
  background: var(--teal-50);
  border-left: 4px solid var(--teal-500);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: var(--s5) var(--s6);
  margin: var(--s8) 0;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--navy-800);
  line-height: var(--leading-relaxed);
  font-style: italic;
}

/* ─── CTA Box ───────────────────────────── */
.article-cta-box {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 100%);
  border-radius: var(--r-xl);
  padding: var(--s8) var(--s10);
  margin-top: var(--s10);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  border: 1px solid rgba(255,255,255,0.07);
  position: relative;
  overflow: hidden;
}

.article-cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 90% 50%, rgba(0,155,155,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.article-cta-box-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  flex-wrap: wrap;
}

.article-cta-box h3 {
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
  font-weight: var(--weight-bold);
  color: var(--white);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--s2);
}

.article-cta-box p {
  font-size: var(--text-sm);
  color: var(--gray-400);
  line-height: var(--leading-relaxed);
  max-width: 360px;
}

.article-cta-actions {
  display: flex;
  gap: var(--s3);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ─── Related Articles ──────────────────── */
.article-related {
  margin-top: var(--s10);
}

.article-related h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--navy-900);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--s6);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
}

/* ─── Sidebar ───────────────────────────── */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--s6));
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

/* Table of Contents */
.toc-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: var(--s6);
}

.toc-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--gray-500);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  margin-bottom: var(--s4);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.toc-list a {
  font-size: var(--text-sm);
  color: var(--gray-600);
  text-decoration: none;
  line-height: var(--leading-snug);
  transition: color var(--t-fast);
  display: block;
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--gray-100);
}

.toc-list li:last-child a { border-bottom: none; }
.toc-list a:hover { color: var(--teal-600); }

/* Lead Capture Widget */
.lead-widget {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
  border-radius: var(--r-xl);
  padding: var(--s6);
  border: 1px solid rgba(255,255,255,0.07);
}

.lead-widget-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--white);
  margin-bottom: var(--s2);
  letter-spacing: var(--tracking-tight);
}

.lead-widget-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-400);
  margin-bottom: var(--s5);
  line-height: var(--leading-relaxed);
}

.lead-widget-form {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.lead-widget-field {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.lead-widget-field label {
  font-size: var(--text-xs);
  color: var(--gray-400);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.lead-widget-field input {
  padding: var(--s3) var(--s4);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--t-base);
}

.lead-widget-field input::placeholder { color: var(--gray-600); }
.lead-widget-field input:focus { border-color: var(--teal-500); }

.lead-widget-success {
  display: none;
  text-align: center;
  padding: var(--s6) var(--s4);
  color: var(--white);
}

.lead-widget-success svg {
  width: 40px;
  height: 40px;
  color: var(--success);
  margin-bottom: var(--s3);
}

.lead-widget-success p {
  font-size: var(--text-sm);
  color: var(--gray-400);
  margin-top: var(--s2);
}

/* ─── Article not found ─────────────────── */
.article-not-found {
  text-align: center;
  padding: var(--s20) var(--s4);
  color: var(--gray-500);
}

.article-not-found h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--navy-900);
  margin-bottom: var(--s4);
}

/* ─── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
  .article-layout-inner {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-cta-box-inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .article-body {
    padding: var(--s6) var(--s5);
  }

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

  .article-cta-actions {
    flex-direction: column;
  }
}
