/* Timeline container */
.timeline {
  position: relative;
  padding: 20px 0 0;
}

/* Timeline list */
.timeline ul {
  display: grid;
  padding: 0;
  margin: 0;
  position: relative;
}

/* Timeline list items */
.timeline ul li {
  position: relative;
  list-style-type: none;
  margin: 0 auto;
  background: transparent;
  display: grid;
}

/* Last item in timeline list */
.timeline ul li:last-child {
  margin-bottom: 32px;
}

/* Timeline line (before and after list items) */
.timeline ul li::before {
  content: '';
  position: absolute;
  top: 0;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  transition: all 0.4s ease-in-out;
  z-index: 1;
}

/* Default timeline line */
.timeline .timeline-default-line {
  position: absolute;
  width: 4px;
  z-index: 1;
}

/* Animated timeline line */
.timeline-draw-line {
  position: absolute;
  top: 0;
  width: 4px;
  height: 0;
  z-index: 1;
  background-color: blue; /* Change this to the color you want */
  transition: height 1s ease-out 0s;
}

/* Timeline list items in view */
.timeline ul li.in-view {
  transition: 0.125s ease-in-out, background-color 0.2s ease-out, color 0.1s ease-out, border 0.1s ease-out;
}

/* Circle in front of timeline list item */
.timeline ul li::before {
  content: '';
  position: absolute;
  top: 0;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  transition: all 0.4s ease-in-out;
  z-index: 1;
}

/* Circle wrapper for icon */
.timeline-icon {
  position: absolute;
  z-index: 1;
  width: 55px;
  height: 55px;
  display: flex;
  padding: 16px;
  align-items: center;
  justify-content: center;
}

/* SVG icon in circle */
.timeline-icon svg {
  width: 15px;
}

/* Arrow that points to content */
.timeline-arrow {
  position: absolute;
  top: 35px;
}

/* Arrow after content */
.timeline-arrow::after {
  content: '';
  position: absolute;
  display: inline;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

/* Wrapped content */
.timeline-content {
  position: relative;
  padding: 32px;
  display: grid;
  gap: 20px;
}

/* Title of timeline item */
.timeline-title {
  margin: 0;
}

/* Date of timeline item */
.date {
  text-transform: uppercase;
}

/* Circle in front of last timeline item */
.timeline ul li:last-child::before {
  content: '';
  position: absolute;
  top: 0;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  transition: all 0.4s ease-in-out;
  z-index: 1;
  margin-bottom: 0;
}

/* Circle that appears when timeline item is in view */
.timeline ul li.in-view::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  transition: 0.125s ease-in-out, background-color 0.2s ease-out
}

/* --Display layout Variations-- */

/* left Variations */
.timeline--left-cards {
    margin-right: 30px;
}
@media (min-width: 768px) {
    .timeline--left-cards {
        margin-right: 0;
    }
}
.timeline--left-cards .timeline-default-line,
.timeline--left-cards .timeline-draw-line,
.timeline--left-cards li::before,
.timeline--left-cards li .timeline-icon {
    right: 0;
}
.timeline--left-cards li.in-view::before,
.timeline--left-cards li::before,
.timeline--left-cards li .timeline-icon {
    transform: translateX(45%);
}
.timeline--left-cards .timeline-arrow {
    right: 0;
}
.timeline--left-cards .timeline-arrow::after {
    border-left-style: solid;
    border-left-width: 13px;
}

/* End left Variations */

/* right Variations */
.timeline--right-cards {
    margin-left: 30px;
}
@media (min-width: 768px) {
    .timeline--right-cards {
        margin-left: 0;
    }
}
.timeline--right-cards .timeline-default-line,
.timeline--right-cards .timeline-draw-line,
.timeline--right-cards li::before,
.timeline--right-cards li .timeline-icon {
    left: 0;
}
.timeline--right-cards li.in-view::before,
.timeline--right-cards li::before,
.timeline--right-cards li .timeline-icon {
    transform: translateX(-48%);
}
.timeline--right-cards .timeline-arrow::after {
    border-right-style: solid;
    border-right-width: 13px;
    transform: translateX(-96%);
}
.timeline--right-cards .timeline-arrow {
    left: 0;
}
.timeline--right-cards .timeline-content {
    justify-self: end;
}

/* End right Variations */


/* Mixed Variations */

@media (max-width: 768px) {
  .timeline--mixed-cards {
    margin-left: 30px;
  }
  .timeline--mixed-cards .timeline-content {
    justify-self: end;
  }
  .timeline--mixed-cards li.in-view::before,
  .timeline--mixed-cards li::before,
  .timeline--mixed-cards li .timeline-icon {
    transform: translateX(-50%);
  }
}

@media (min-width: 769px) {
  .timeline--mixed-cards {
    margin-left: 0;
  }
  .timeline--mixed-cards .timeline-default-line,
  .timeline--mixed-cards .timeline-draw-line,
  .timeline--mixed-cards li::before,
  .timeline--mixed-cards li .timeline-icon {
    left: 50%;
  }
  .timeline--mixed-cards li.in-view::before,
  .timeline--mixed-cards li::before,
  .timeline--mixed-cards li .timeline-icon {
    transform: translateX(-47%);
  }
  .timeline--mixed-cards li:nth-child(odd) {
    justify-items: self-end;
  }
  .timeline--mixed-cards li:nth-child(even) .timeline-arrow {
    right: 0;
  }
  .timeline--mixed-cards li:nth-child(even) .timeline-arrow::after {
    border-left-style: solid;
    border-left-width: 13px;
  }
  .timeline--mixed-cards li:nth-child(odd) .timeline-arrow::after {
    border-right-style: solid;
    border-right-width: 13px;
    transform: translateX(-96%);
    border-right-color: #F2F2F2;
  }
  .timeline--mixed-cards li:nth-child(odd) .timeline-arrow {
    left: 0;
  }
}

/* End mixed Variations */


  @media (max-width: 769px) {

      .timeline ul {
            width: 90%;
            margin: auto;
        }

  } 