/* .spacer {
  height: 100vh;
  display: grid;
  place-items: center;
  color: #aaa;
} */

/* ================= SECTION ================= */

.timeline-section {
  min-height: 100vh;
  display: grid;
  place-items: center;
  width: 100%;
  position: relative;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.timeline-section::before {
  pointer-events: none;
}

.timeline {
  width: 90%;
  max-width: 100%;
  position: relative;
}

/* ================= MOBILE / TABLET ================= */

.timeline-line-mobile,
.timeline-progress-mobile {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.timeline-line-mobile {
  background: #444;
}

.timeline-progress-mobile {
  background: hsl(355, 70%, 50%);
  transform-origin: top;
  scale: 1 0;
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding: 120px 0;
  position: relative;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  min-height: 120px;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-content {
  flex: 1;
  max-width: 39%;
  opacity: 0;
  text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content {
  padding-right: 0px;
}

.timeline-item:nth-child(even) .timeline-content {
  padding-left: 0px;
}

.timeline-title {
  /* font-size: 16px;
  font-weight: 700; */
  margin-bottom: 6px;
}

/* .timeline-desc {} */

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scale(1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: hsl(355, 70%, 50%);
  display: grid;
  place-items: center;
  color: #fff;
  z-index: 5;
}

.timeline-number {
  flex: 1;
  text-align: center;
}

/* ================= DESKTOP ================= */

@media (min-width: 1024px) {
  .timeline-line-mobile,
  .timeline-progress-mobile {
    display: none;
  }

  .timeline {
    height: 315px;
  }

  .timeline-line,
  .timeline-progress {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
  }

  .timeline-line {
    background: #444;
  }

  .timeline-progress {
    background: hsl(355, 70%, 50%);
    transform-origin: right;
    scale: 0 1;
  }

  .timeline-cap {
    position: absolute;
    width: 2px;
    height: 60px;
    background: #444;
    top: 50%;
    transform: translateY(-50%);
  }

  .timeline-cap.start {
    right: 0;
    display: none;
  }
  .timeline-cap.end {
    left: 0;
  }

  .timeline-items {
    flex-direction: row-reverse;
    padding: 0;
    height: 100%;
    gap: 40px;
  }

  .timeline-item {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: end;
    text-align: end;
    opacity: 1;
    transform: none;
  }

  .timeline-item.top {
    flex-direction: column;
  }
  .timeline-item.bottom {
    flex-direction: column-reverse;
  }

  .timeline-content {
    position: absolute;
    max-width: 100%;
    opacity: 0;
  }

  .timeline-item.top .timeline-content {
    top: 0;
  }
  .timeline-item.bottom .timeline-content {
    bottom: 0;
  }

  .timeline-dot {
    position: relative;
    left: auto;
    transform: scale(1);
    width: 40px;
    height: 40px;
  }

  .timeline-number {
    position: absolute;
    width: 100%;
    font-size: 72px;
    line-height: 65px;
    opacity: 1;
    text-align: right;
  }

  .timeline-item.top .timeline-number {
    bottom: 0;
  }
  .timeline-item.bottom .timeline-number {
    top: 0;
  }

  .connector-line {
    position: absolute;
    right: 19px;
    width: 2px;
    height: 60px;
    background: hsl(355, 70%, 50%);
    transform: scaleY(0);
  }

  .timeline-item.top .connector-line {
    bottom: calc(50% + 10px);
    transform-origin: bottom;
  }

  .timeline-item.bottom .connector-line {
    top: calc(50% + 10px);
    transform-origin: top;
  }

  .timeline-item:nth-child(odd) .timeline-content {
    padding-right: 0px;
  }

  .timeline-item:nth-child(even) .timeline-content {
    padding-left: 0px;
  }
}
