/* =========================
   CUSTOM FONT
========================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap');

body {
  font-family: 'Inter', sans-serif;
  background-color: #f0f2f5;
  color: #212529;
  padding-bottom: 20vh;
}

/* =========================
   TIMELINE CONTAINER
========================= */
.timeline-container {
  position: relative;
  max-width: 768px;
  margin: 0;
  min-height: 200px;
  padding-left: 0;
}

/* =========================
   CANVAS ROAD (BACKGROUND)
========================= */
#roadCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* =========================
   TIMELINE ITEM
========================= */
.timeline-item {
  position: relative;
  padding: 1.5rem 1rem 3.5rem 10rem;
  z-index: 1;
}

/* =========================
   YEAR BADGE (ROUND)
========================= */
.timeline-badge {
  position: absolute;
  top: 0.5rem;
  left: 4.5rem;
  width: 4rem;
  height: 4rem;
  background-color: #f8f9fa;
  border: 4px solid #adb5bd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #495057;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Year text */
.timeline-badge .year-text {
  white-space: nowrap;
}

/* =========================
   CONNECTOR ARROW
========================= */
.timeline-item::after {
  content: '▶';
  position: absolute;
  top: 2.5rem;
  left: 9rem;
  font-size: 1.5rem;
  color: #0d6efd;
  z-index: 5;
  transition: color 0.3s ease;
}

/* =========================
   LIGHT-UP / REACHED STATE
========================= */
.timeline-badge.reached {
  background-color: #0d6efd;
  border-color: #007bff;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.7);
  transform: scale(1.1);
}

.timeline-badge.reached .year-text {
  color: #fff;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

.timeline-item:has(.timeline-badge.reached)::after {
  color: #007bff;
}

/* =========================
   CARD STYLING
========================= */
.timeline-card {
  border: none;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25);
}

/* Blue glow when reached */
.timeline-item:has(.timeline-badge.reached) .timeline-card {
  box-shadow:
    0 0.5rem 2rem rgba(0, 123, 255, 0.4),
    0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* =========================
   ICON STYLING
========================= */
.timeline-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #0d6efd;
  transition: color 0.3s ease;
}

.timeline-item:has(.timeline-badge.reached) .timeline-icon {
  color: #007bff;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .timeline-item {
    padding-left: 6rem;
  }

  .timeline-badge {
    left: 0;
  }

  .timeline-item::after {
    left: 4.5rem;
  }
}
