/* ==========================================================================
   Chronological Timeline AI Styles - Civictory
   Sesuai panduan design-taste-frontend dan antislop-ui
   ========================================================================== */

.timeline-hero-section {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-2);
}

.timeline-page-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.25;
  margin-bottom: var(--space-2);
}

.timeline-page-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 720px;
  margin-bottom: var(--space-4);
}

/* Filter Bar Babak Historis */
.timeline-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.timeline-filter-btn {
  padding: 8px 14px;
  min-height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.timeline-filter-btn:hover {
  background-color: var(--color-surface-subtle);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.timeline-filter-btn.is-active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
}

/* Wadah Garis Waktu Relatif */
.timeline-container {
  position: relative;
  padding: var(--space-4) 0 var(--space-8) 0;
}

.timeline-spine-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 3px;
  background-color: #cbd5e1;
  border-radius: var(--radius-pill);
  z-index: 1;
}

.timeline-events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: relative;
  z-index: 2;
}

/* Komponen Kartu Peristiwa */
.timeline-event-card {
  position: relative;
  margin-left: 56px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.timeline-event-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.1);
}

/* Titik Marker pada Spine Line */
.timeline-event-marker {
  position: absolute;
  left: -44px;
  top: var(--space-5);
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background-color: #ffffff;
  border: 3px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
  z-index: 3;
}

.timeline-event-card.phase-fase-1 .timeline-event-marker {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.timeline-event-card.phase-fase-2 .timeline-event-marker {
  border-color: #0f766e;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.timeline-event-card.phase-fase-3 .timeline-event-marker {
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.marker-dot-inner {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary);
}

.timeline-event-card.phase-fase-1 .marker-dot-inner { background-color: #0284c7; }
.timeline-event-card.phase-fase-2 .marker-dot-inner { background-color: #0f766e; }
.timeline-event-card.phase-fase-3 .marker-dot-inner { background-color: #7c3aed; }

/* Header Kartu */
.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.event-badges-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.event-order-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background-color: var(--color-surface-subtle);
  color: var(--color-text-secondary);
}

.event-stage-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.timeline-event-card.phase-fase-1 .event-stage-badge {
  background-color: #e0f2fe;
  color: #0369a1;
}

.timeline-event-card.phase-fase-2 .event-stage-badge {
  background-color: #ccfbf1;
  color: #0f766e;
}

.timeline-event-card.phase-fase-3 .event-stage-badge {
  background-color: #ede9fe;
  color: #6d28d9;
}

.event-date-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-primary);
}

.event-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.event-description {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

/* Kotak Signifikansi Historis */
.event-significance-box {
  background-color: #f8fafc;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.significance-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.significance-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* Footer Kartu & Tokoh */
.event-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-surface-subtle);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.event-figures-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.figure-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.event-location-text {
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

/* Responsivitas Mobile */
@media (max-width: 640px) {
  .timeline-spine-line {
    left: 12px;
  }

  .timeline-event-card {
    margin-left: 36px;
    padding: var(--space-4);
  }

  .timeline-event-marker {
    left: -32px;
    width: 18px;
    height: 18px;
  }
}
