/* ============================================
   TIMELINE PAGE STYLES
   ============================================ */

.timeline-section {
  padding: var(--space-lg) var(--space-md) var(--space-xl);
}

.timeline-container {
  max-width: 900px;
  margin: 0 auto;
}

/* Navigation */
.timeline-nav {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  justify-content: center;
}

.timeline-nav-btn {
  padding: 0.75rem 1.25rem;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--duration-fast);
}

.timeline-nav-btn:hover,
.timeline-nav-btn[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #000;
}

/* Main Timeline */
.timeline-main {
  position: relative;
}

.timeline-axis {
  position: absolute;
  left: 120px;
  top: 0;
  bottom: 0;
  width: 2px;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent) 0%, rgba(212, 175, 55, 0.3) 100%);
  transform: translateX(-50%);
}

/* Era Headers */
.timeline-header {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.timeline-era-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.timeline-era-description {
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Events */
.timeline-event {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  position: relative;
}

.timeline-event-marker {
  width: 16px;
  height: 16px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  margin-left: 113px; /* Align with timeline */
  z-index: 2;
}

.timeline-event-marker--gold {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.3);
}

.marker-crisis {
  background: #E74C3C;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.3);
}

.timeline-event-content {
  flex: 1;
  background: var(--color-bg-tertiary);
  border-radius: 16px;
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  margin-left: var(--space-md);
}

.timeline-event-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(212, 175, 55, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  margin-bottom: var(--space-xs);
}

.timeline-event-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-event-type {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.timeline-event-description {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.timeline-event-people {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.timeline-person-thumb,
.timeline-person-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.timeline-person-placeholder {
  background: var(--color-accent);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.timeline-person-name {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* Quotes */
.timeline-quote {
  margin: var(--space-sm) 0;
  padding: var(--space-sm);
  border-left: 3px solid var(--color-accent);
  background: rgba(212, 175, 55, 0.05);
  border-radius: 0 8px 8px 0;
}

.timeline-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.timeline-quote cite {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-style: normal;
}

.timeline-event--major .timeline-event-content {
  border: 2px solid var(--color-accent);
}

.timeline-event--crisis .timeline-event-content {
  border-left: 4px solid #E74C3C;
}

/* Lifelines Section */
.lifelines-section {
  padding: var(--space-xl) var(--space-md);
}

.lifelines-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.lifelines-description {
  text-align: center;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.lifelines-chart {
  max-width: 900px;
  margin: 0 auto;
}

.lifelines-timeline {
  background: var(--color-bg-tertiary);
  border-radius: 16px;
  padding: var(--space-md);
  overflow-x: auto;
}

.lifelines-years {
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.lifelines-lines {
  position: relative;
  height: 240px;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent calc(20% - 1px),
    var(--color-border) calc(20% - 1px),
    var(--color-border) 20%
  );
}

.lifeline {
  position: absolute;
  height: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #000;
}

.lifeline--fox {
  background: linear-gradient(90deg, #D4AF37, #B8941F);
  width: 60%;
  left: 2%;
  top: 20px;
}

.lifeline--penington {
  background: linear-gradient(90deg, #9B8BA5, #8B7B95);
  width: 55%;
  left: 0%;
  top: 60px;
}

.lifeline--burrough {
  background: linear-gradient(90deg, #8B7355, #7B6345);
  width: 25%;
  left: 10%;
  top: 100px;
}

.lifeline--ellwood {
  background: linear-gradient(90deg, #C9A227, #B89217);
  width: 65%;
  left: 15%;
  top: 140px;
}

.lifeline--fell {
  background: linear-gradient(90deg, #B89A5A, #A88A4A);
  width: 75%;
  left: 0%;
  top: 180px;
}

.lifeline--penn {
  background: linear-gradient(90deg, #7AB8D4, #6AA8C4);
  width: 65%;
  left: 20%;
  top: 220px;
}

.lifeline--barclay {
  background: linear-gradient(90deg, #9B7A5A, #8B6A4A);
  width: 35%;
  left: 22%;
  top: 260px;
}

.lifeline-label {
  display: none;
}

@media (min-width: 600px) {
  .lifeline {
    font-size: 0.8rem;
  }
  
  .lifeline-label {
    display: inline;
  }
  
  .liveline-period {
    margin-left: auto;
    opacity: 0.7;
    font-weight: 400;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .timeline-axis {
    left: 20px;
  }
  
  .timeline-event-marker {
    margin-left: 13px;
  }
  
  .timeline-event {
    flex-direction: column;
  }
  
  .timeline-event-content {
    margin-left: 0;
  }
}