/* ===================================================================
   MEDIATEA — Narrative Pulse Showcase (v2)
   
   Mega-cluster narrative bar integrated INSIDE the hero story cluster
   card — replacing the old "Story Thread" lavender bar. The narrative
   bar sits between the hero image and supporting articles, giving
   each mega-cluster a bold, instantly-recognizable color identity.
   =================================================================== */

/* ─── Design System Imports ─── */
@import url('../../tokens.css');
@import url('../../components/_component-base.css');
@import url('../../components/card-hero/card-hero.css');
@import url('../../components/card-standard/card-standard.css');
@import url('../../components/section-header/section-header.css');
@import url('../../components/score-badge/score-badge.css');

/* ─── Page Layout ─── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: #2A2A2A;
  min-height: 100vh;
  padding: 40px 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Showcase Header ─── */

.showcase-header {
  max-width: 520px;
  margin: 0 auto 40px;
  text-align: center;
}

.showcase-title {
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: #E8E8E8;
  margin-bottom: 8px;
}

.showcase-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: #8A8A8A;
  line-height: 1.6;
}

.showcase-updated {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #666;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ─── Feed Canvas ─── */

.feed-canvas {
  max-width: 420px;
  margin: 0 auto 32px;
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 12px 0 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.feed-canvas .hero-card {
  margin: 0 var(--feed-padding);
}

.feed-canvas .standard-card-wrapper {
  margin: 0 var(--feed-padding);
  margin-top: var(--card-gap);
}

/* ═══════════════════════════════════════════════════════════════════
   NARRATIVE ARC BAR (replaces Story Thread bar)
   
   Sits INSIDE the hero card between the hero image zone and
   supporting articles. Bold color identity per mega-cluster.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Color Palette for Narrative Arcs ─── */
/* Each mega-cluster gets a distinct hue for instant recognition */

:root {
  /* The Iran War — urgent warm red-orange */
  --narrative-iran: #C0554F;
  --narrative-iran-light: rgba(192, 85, 79, 0.10);
  --narrative-iran-glow: rgba(192, 85, 79, 0.25);

  /* Artemis II Moon Mission — cosmic deep blue */
  --narrative-artemis: #4A7EC0;
  --narrative-artemis-light: rgba(74, 126, 192, 0.10);
  --narrative-artemis-glow: rgba(74, 126, 192, 0.25);

  /* Israel-Lebanon — amber */
  --narrative-amber: #C08A4A;
  --narrative-amber-light: rgba(192, 138, 74, 0.10);

  /* Generic fallback — accent green */
  --narrative-default: var(--accent-primary);
  --narrative-default-light: rgba(123, 158, 135, 0.10);
}

/* ─── The Bar Itself ─── */

.narrative-arc-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--space-md) 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all var(--duration-snappy) var(--ease-snappy);
}

.narrative-arc-bar:hover {
  filter: brightness(1.05);
}

.narrative-arc-bar:active {
  filter: brightness(0.95);
}

/* ─── Solid Gradient Backgrounds ─── */

.narrative-arc-bar.narrative--iran {
  background: linear-gradient(135deg, #9B3A35 0%, #C0554F 50%, #D47A6A 100%);
}

.narrative-arc-bar.narrative--artemis {
  background: linear-gradient(135deg, #2E5A8C 0%, #4A7EC0 50%, #6A9ED4 100%);
}

/* Subtle shine overlay for depth */
.narrative-arc-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0) 60%,
    rgba(0, 0, 0, 0.05) 100%
  );
  pointer-events: none;
}

/* ─── Arc Title (direct child of bar now) ─── */

.narrative-arc-title {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

/* ─── Arc Stats (right-aligned) ─── */

.narrative-arc-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.narrative-arc-count {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
}

.narrative-arc-count-label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.narrative-arc-chevron {
  font-family: var(--font-body);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.60);
  flex-shrink: 0;
  transition: transform var(--duration-snappy) var(--ease-snappy);
}

.narrative-arc-bar:hover .narrative-arc-chevron {
  color: rgba(255, 255, 255, 0.90);
  transform: translateX(2px);
}

/* ═══════════════════════════════════════════════════════════════════
   ENRICHED COVERAGE FOOTER
   
   The source count and story thread info moves DOWN here,
   merging with the existing coverage footer at the card bottom.
   ═══════════════════════════════════════════════════════════════════ */

.hero-footer-enriched {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--space-md);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-footer-left .source-avatars {
  display: flex;
  align-items: center;
}

.hero-footer-thread {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-footer-thread-icon {
  font-size: 10px;
  opacity: 0.6;
}

.hero-footer-thread-text {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.hero-footer-right {
  display: flex;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════════════
   NARRATIVE CLUSTER FOOTER
   
   Replaces the standard green-tinted cluster footer when the card
   belongs to a mega-cluster. Uses the narrative's gradient color
   and integrates "Part of: The Iran War" text directly.
   ═══════════════════════════════════════════════════════════════════ */

.cluster-footer.cluster-footer--narrative {
  position: relative;
  overflow: hidden;
  border-top: none;
  padding: 11px var(--space-md);
}

/* Solid gradient background */
.cluster-footer.cluster-footer--narrative.narrative--iran {
  background: linear-gradient(135deg, #9B3A35 0%, #C0554F 50%, #D47A6A 100%);
}

.cluster-footer.cluster-footer--narrative.narrative--artemis {
  background: linear-gradient(135deg, #2E5A8C 0%, #4A7EC0 50%, #6A9ED4 100%);
}

/* Shine overlay for depth (matches arc bar) */
.cluster-footer.cluster-footer--narrative::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0) 60%,
    rgba(0, 0, 0, 0.04) 100%
  );
  pointer-events: none;
}

.cluster-footer.cluster-footer--narrative:hover {
  filter: brightness(1.05);
  background: inherit;
}

.cluster-footer.cluster-footer--narrative:active {
  filter: brightness(0.95);
}

/* Override child text colors to white */
.cluster-footer--narrative .cluster-footer-sources {
  color: rgba(255, 255, 255, 0.85);
}

.cluster-footer--narrative .cluster-footer-dot {
  color: rgba(255, 255, 255, 0.40);
}

.cluster-footer--narrative .cluster-footer-cta {
  color: #FFFFFF;
  font-weight: 700;
}

.cluster-footer--narrative .cluster-footer-chevron {
  color: rgba(255, 255, 255, 0.60);
  opacity: 1;
}

.cluster-footer--narrative:hover .cluster-footer-chevron {
  color: rgba(255, 255, 255, 0.90);
}

/* "Part of" text — sits between sources and CTA */
.cluster-footer-narrative-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
}

.cluster-footer-narrative-title {
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
}

/* ═══════════════════════════════════════════════════════════════════
   "+ N MORE" NARRATIVE FOOTER
   ═══════════════════════════════════════════════════════════════════ */

.narrative-more {
  margin: var(--space-sm) var(--feed-padding) 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-snappy) var(--ease-snappy);
}

.narrative-more.narrative-more--iran {
  background: var(--narrative-iran-light);
  border: 1px dashed rgba(192, 85, 79, 0.20);
}

.narrative-more.narrative-more--iran:hover {
  background: rgba(192, 85, 79, 0.14);
  border-color: rgba(192, 85, 79, 0.30);
}

.narrative-more.narrative-more--artemis {
  background: var(--narrative-artemis-light);
  border: 1px dashed rgba(74, 126, 192, 0.20);
}

.narrative-more.narrative-more--artemis:hover {
  background: rgba(74, 126, 192, 0.14);
  border-color: rgba(74, 126, 192, 0.30);
}

.narrative-more-text {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
}

.narrative-more--iran .narrative-more-text {
  color: var(--narrative-iran);
}

.narrative-more--artemis .narrative-more-text {
  color: var(--narrative-artemis);
}

.narrative-more-chevron {
  font-size: 12px;
}

.narrative-more--iran .narrative-more-chevron {
  color: var(--narrative-iran);
}

.narrative-more--artemis .narrative-more-chevron {
  color: var(--narrative-artemis);
}

/* ═══════════════════════════════════════════════════════════════════
   SHOWCASE CHROME (labels, annotations, dividers)
   ═══════════════════════════════════════════════════════════════════ */

.variant-label {
  max-width: 420px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.variant-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.variant-dot--iran { background: var(--narrative-iran); }
.variant-dot--artemis { background: var(--narrative-artemis); }
.variant-dot--badge { background: var(--pastel-sky); }

.variant-name {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: #C8C8C8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.variant-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: #777;
  margin-left: auto;
}

.annotation {
  max-width: 420px;
  margin: 24px auto 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.annotation-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.annotation-title--iran { color: var(--narrative-iran); }
.annotation-title--artemis { color: var(--narrative-artemis); }
.annotation-title--badge { color: var(--pastel-sky); }
.annotation-title--generic { color: var(--accent-primary); }

.annotation-text {
  font-family: var(--font-body);
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

.showcase-divider {
  max-width: 420px;
  margin: 16px auto 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* ─── Responsive ─── */

@media (max-width: 500px) {
  body {
    padding: 20px 12px;
  }

  .feed-canvas {
    border-radius: 16px;
  }

  .showcase-title {
    font-size: 22px;
  }
}
