#aanpak {
  border-top: 1px solid var(--accent-subtle);
}

.aanpak-header {
  margin-bottom: var(--space-7);
}

/* Timeline container */
.timeline-phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  position: relative;
}

/* Track segments between icons (one per gap, avoids crossing icons) */
.phase {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.phase:not(:last-child)::after {
  content: '';
  position: absolute;
  top: calc(var(--space-3) + 13px + 28px);
  left: calc(50% + 32px);
  right: calc(-50% + 32px);
  height: 2px;
  background: var(--accent);
  opacity: 0.15;
  transition: opacity 600ms ease;
}

/* Fill: when the next phase activates, the line brightens */
.phase.active + .phase.active::before {
  content: '';
  position: absolute;
  top: calc(var(--space-3) + 13px + 28px);
  right: calc(50% + 32px);
  left: calc(-50% + 32px);
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
}

/* Hide the old fill element on desktop */
.timeline-fill {
  display: none;
}

.phase-number {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: var(--space-3);
  opacity: 0.4;
  transition: opacity 400ms ease;
}

.phase.active .phase-number {
  opacity: 1;
}

/* Icon circle */
.phase-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 2;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 400ms ease, box-shadow 400ms ease, color 400ms ease;
}

.phase-icon svg {
  opacity: 0.4;
  transition: opacity 400ms ease;
}

.phase.active .phase-icon {
  border-color: var(--accent);
  box-shadow: inset 0 0 24px var(--accent-glow);
  color: var(--accent);
}

.phase.active .phase-icon svg {
  opacity: 1;
}

.phase-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: var(--space-3);
  opacity: 0.5;
  transition: opacity 400ms ease;
}

.phase.active .phase-title {
  opacity: 1;
}

.phase-body {
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 320px;
  opacity: 0.5;
  transition: opacity 400ms ease;
}

.phase.active .phase-body {
  opacity: 1;
}

/* Mobile: vertical timeline */
@media (max-width: 768px) {
  .aanpak-header {
    margin-bottom: var(--space-6);
  }

  .timeline-phases {
    grid-template-columns: 1fr;
    gap: var(--space-7);
    padding-left: 80px;
  }

  .phase {
    text-align: left;
    align-items: flex-start;
  }

  .phase-icon {
    position: absolute;
    left: -80px;
    top: 0;
    margin-bottom: 0;
  }

  .phase-number {
    margin-bottom: var(--space-2);
  }

  .phase-body {
    max-width: none;
  }

  /* Vertical track segments */
  .phase:not(:last-child)::after {
    top: 60px;
    left: -52px;
    right: auto;
    bottom: calc(-1 * var(--space-7) + 0px);
    width: 2px;
    height: auto;
  }

  .phase.active + .phase.active::before {
    top: calc(-1 * var(--space-7) + 56px);
    left: -52px;
    right: auto;
    bottom: auto;
    width: 2px;
    height: calc(var(--space-7) - 0px);
  }
}
