/*
  Timeline Page Specific Styles
  Vertical timeline with dots, lines, and event cards
*/

.page-timeline {
  background: var(--color-off-white);
}

.page-timeline .page-header {
  background: var(--color-white);
  padding: var(--space-xxl) 0 var(--space-xl);
}

.timeline-section {
  padding: var(--space-xl) 0 var(--space-huge);
}

/* ----- TIMELINE ITEM ----- */
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl); /* Reduced from xxl to xl (half) */
}

/* Remove line from last item */
.timeline-item:last-child .timeline-marker::after {
  display: none;
}

/* ----- TIMELINE MARKER ----- */
.timeline-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Continuous line that goes through padding */
.timeline-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 16px; /* Start from dot center */
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + var(--space-xl)); /* Adjusted for smaller margin */
  background: var(--color-border);
  z-index: 0;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  border: 3px solid var(--color-white);
  box-shadow: 0 0 0 2px var(--color-accent-primary);
  position: relative;
  z-index: 2;
}

.timeline-dot--empty {
  background: var(--color-light-grey);
  box-shadow: 0 0 0 2px var(--color-grey);
}

/* ----- TIMELINE CONTENT ----- */
.timeline-content {
  background: var(--color-white);
  padding: var(--space-md); /* Reduced from lg to md (half) */
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  position: relative;
  top: -24px; /* Offset to align dot with date text - increased for proper alignment */
}

.timeline-date {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.timeline-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-charcoal);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.timeline-content p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-charcoal);
  margin-bottom: var(--space-md);
}

.timeline-content p:last-of-type {
  margin-bottom: var(--space-sm);
}

/* Category badge */
.timeline-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-grey);
  padding: 4px 12px;
  background: var(--color-off-white);
  border-radius: 12px;
}

.timeline-category--life {
  color: var(--color-earth);
  background: rgba(184, 168, 136, 0.15);
}

/* ----- PLACEHOLDER ITEM ----- */
.timeline-item--placeholder .timeline-content {
  background: var(--color-off-white);
  border: 1px dashed var(--color-border);
  box-shadow: none;
}

.timeline-item--placeholder .timeline-title {
  color: var(--color-grey);
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
  .timeline-item {
    grid-template-columns: 40px 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
  }
  
  .timeline-marker::after {
    height: calc(100% + var(--space-xl)); /* Adjust for smaller mobile margin */
  }
  
  .timeline-dot {
    width: 12px;
    height: 12px;
  }
  
  .timeline-content {
    padding: var(--space-md);
  }
  
  .timeline-title {
    font-size: 20px;
  }
}
