/* ===================================================================
   MEDIATEA — Timeline Card Showcase (Mega-Cluster Timeline Entry)
   
   A/B comparison for the mega-cluster timeline card.
   Option A: Right-side thumbnail (compact)
   Option B: Hero thumbnail at top (editorial)
   =================================================================== */

/* ─── Design System Imports ─── */
@import url('../../tokens.css');
@import url('../../components/_component-base.css');
@import url('../../components/card-standard/card-standard.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: #1A1A2E;
  min-height: 100vh;
  padding: 40px 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

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

/* ─── A/B Comparison Layout ─── */

.comparison-row {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
}

.variant-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 380px;
  max-width: 440px;
}

/* ─── Option Label (A / B) ─── */

.option-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
}

.option-letter {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--pastel-lavender);
}

.option-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #C8C8C8;
  letter-spacing: 0.02em;
}

/* ─── Card Canvas ─── */

.card-canvas {
  width: 100%;
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ─── Variant Sub-label ─── */

.variant-sublabel {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.variant-sublabel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

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

/* ═══════════════════════════════════════════════════
   TIMELINE CARD — Shared Styles (both A and B)
   ═══════════════════════════════════════════════════ */

.timeline-card {
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--duration-snappy) var(--ease-snappy);
  cursor: pointer;
}

.timeline-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.timeline-card:active {
  transform: scale(0.985);
}

/* ─── Cluster Context Zone ─── */

.cluster-context {
  padding: 16px 16px 12px;
}

.cluster-context-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.cluster-context-icon {
  font-size: 13px;
  opacity: 0.8;
}

.cluster-context-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}

.cluster-context-count {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  flex-shrink: 0;
  white-space: nowrap;
}

.cluster-context-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  /* Default: truncated to 3 lines for compact card height */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all var(--duration-smooth) var(--ease-smooth);
}

/* Expanded state — removes clamp to show full summary */
.cluster-context-desc.expanded {
  -webkit-line-clamp: unset;
  display: block;
}

/* Show More / Show Less toggle */
.show-more-toggle {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity var(--duration-snappy) var(--ease-snappy);
}

.show-more-toggle:hover {
  opacity: 0.75;
}

.show-more-toggle .toggle-arrow {
  font-size: 10px;
  transition: transform var(--duration-snappy) var(--ease-snappy);
}

.show-more-toggle.expanded .toggle-arrow {
  transform: rotate(180deg);
}

/* ─── Article Zone Divider ─── */

.article-zone-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0 16px;
}

/* ─── Featured Article Block — Compact with multi-line headline ─── */

.featured-article-row {
  padding: 10px 16px 12px;
  cursor: pointer;
  transition: background var(--duration-snappy) var(--ease-snappy);
}

.featured-article-row:hover {
  background: var(--surface-card-hover);
}

/* Top line: dot + publisher + chevron ... time */
.featured-article-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.featured-article-row-meta .credibility-dot {
  flex-shrink: 0;
}

.featured-article-row-pub {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.featured-article-row-chevron {
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-left: -2px;
}

.featured-article-row-time {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

/* Headline: wraps to 2-3 lines, no truncation */
.featured-article-row-headline {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Cluster Footer (reused from card-standard) ─── */
/* Already imported via card-standard.css */

/* ═══════════════════════════════════════════════════
   OPTION B — Hero Thumbnail at Top
   ═══════════════════════════════════════════════════ */

.timeline-hero-image {
  width: 100%;
  height: 140px;
  overflow: hidden;
  position: relative;
}

.timeline-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-smooth) var(--ease-smooth);
}

.timeline-card:hover .timeline-hero-image img {
  transform: scale(1.03);
}

/* Subtle gradient at bottom of hero for smooth transition */
.timeline-hero-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.4));
  pointer-events: none;
}

/* Score badge on hero */
.timeline-hero-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* ═══════════════════════════════════════════════════
   DESIGN NOTES SECTION
   ═══════════════════════════════════════════════════ */

.design-notes {
  max-width: 960px;
  margin: 56px auto 40px;
  padding: 0 20px;
}

.design-notes h2 {
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 700;
  color: #E8E8E8;
  margin-bottom: 24px;
  text-align: center;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.note-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
}

.note-card h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: #C8C8C8;
  margin-bottom: 12px;
}

.note-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.note-card li strong {
  color: #C8C8C8;
}

/* ─── Responsive ─── */

@media (max-width: 860px) {
  .comparison-row {
    flex-direction: column;
    align-items: center;
  }

  .variant-column {
    min-width: 320px;
  }

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