/* The actual timeline (the vertical ruler) */

h2 {
  font-weight: 400 !important;
  font-size: 2.2rem !important;
}

.timeline {
  padding-top: 2px;
  position: relative;
  max-width: 1440px;
  margin: 0 auto;

  overflow: clip;
}

.timeline-item {
  display: flex;
  margin-bottom: 15rem;
}

.timeline-item:last-child {
  margin-bottom: 27px;
}

.fadeUp {
  animation: fadeUp both;
  animation-timeline: view();
}

.timeline-item:nth-child(1) {
  animation-range: entry 20% 40%;
}

.timeline-item:nth-child(2) {
  animation-range: entry 40% 60%;
}

.timeline-item:nth-child(3) {
  animation-range: entry 60% 80%;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.timeline-image {
  width: 50%;
}

/* The actual timeline (the vertical ruler) */
.timeline::after {
  content: "";
  position: absolute;
  width: 6px;
  background-color: #800507;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

/* Container around content */
.container {
  padding: 0 40px 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* The circles on the timeline */
.container::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -12px;
  background-color: #800507;
  border: 4px solid #a60a0c;
  /* top: 15px; */
  top: 50px;
  border-radius: 50%;
  z-index: 1;
}

/* Place the container to the left */
.left {
  left: 0;
}

/* Place the container to the right */
.right {
  /* left: 50%; */
  left: 0;
}

/* Add arrows to the left container (pointing right) */
.left::before {
  content: " ";
  height: 0;
  position: absolute;
  /* top: 25px; */
  top: 60px;
  width: 0;
  z-index: 1;
  right: 0px;
  border: medium solid #800507;
  border-width: 0 90px 5px 0;
}

/* Add arrows to the right container (pointing left) */
.right::before {
  content: " ";
  height: 0;
  position: absolute;
  /* top: 25px; */
  top: 60px;
  width: 0;
  z-index: 1;
  left: 0px;
  border: medium solid #800507;
  border-width: 0px 90px 5px 0;
}

/* Fix the circle for containers on the right side */
.right::after {
  left: -12px;
}

.left .content {
  right: 40px;
}

.right .content {
  left: 40px;
}

.left .content {
  text-align: right;
}

/* The actual content */
.content {
  padding: 0 30px 20px 30px;
  /* background-color: white; */
  position: relative;
  border-radius: 6px;
}

/* Media queries - Responsive timeline on screens less than 600px wide */
@media screen and (max-width: 600px) {
  .flex-col-reverse {
    flex-direction: column-reverse;
  }

  .timeline {
    max-width: fit-content;
  }

  /* Place the timelime to the left */
  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    flex-direction: column;
  }

  .timeline-image {
    width: 100%;
  }

  /* Full-width containers */
  .container {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  /* Make sure that all arrows are pointing leftwards */
  .container::before {
    left: 40px;
    border: medium solid #800507;
    border-width: 0 90px 5px 0;
  }

  /* Make sure all circles are at the same spot */
  .left::after,
  .right::after {
    left: 19px;
  }

  /* Make all right containers behave like the left ones */
  .right {
    left: 0%;
  }

  .left .content {
    text-align: left;
    left: 40px;
  }
}
