/* Final Scroll-Spy CSS */
.scroll-spy-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-track-bg {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 23px;
  width: 4px;
  background: var(--border);
  z-index: 1;
  border-radius: 2px;
}

.timeline-progress-fill {
  position: absolute;
  top: 24px;
  left: 23px;
  width: 4px;
  background: var(--gradient-cta);
  z-index: 1; /* Hide behind the number */
  border-radius: 2px;
  height: 0%;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-spy-steps {
  position: relative;
  z-index: 2;
  padding-bottom: 0; /* Removed padding so video un-sticks exactly with the 4th card */
}

.scroll-spy-card {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 80vh; /* Spaced out so they act like full pages */
  opacity: 0.4;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateX(-20px);
}

.scroll-spy-card:last-child {
  margin-bottom: 0;
}

.scroll-spy-card.active {
  opacity: 1;
  transform: translateX(0);
}

.timeline-number {
  width: 48px;
  height: 48px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.scroll-spy-card.active .timeline-number {
  background: var(--gradient-cta);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-colored);
}

.scroll-spy-content {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

.scroll-spy-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.scroll-spy-content p {
  color: var(--text-body);
  margin: 0;
  line-height: 1.6;
}

/* Right Column: Sticky Visuals */
.scroll-spy-visuals {
  position: sticky;
  top: 30vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: fit-content;
}

.sticky-visual-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: white;
  border: 1px solid var(--border);
}

.spy-visual {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.spy-visual.active {
  opacity: 1;
  z-index: 2;
}

@media (max-width: 992px) {
  .scroll-spy-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .scroll-spy-visuals {
    position: relative;
    top: 0;
    margin-bottom: 2rem;
    order: -1;
  }
  .scroll-spy-card {
    margin-bottom: 3rem;
  }
}
