/* The actual timeline (the vertical ruler) */

::before, ::after {
  box-sizing: initial;
}

.timeline {
  position: relative;
  padding-top: 10rem;
  margin: 10rem -40px;
}

/* The actual timeline (the vertical ruler) */

.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: #0d50a6;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.timeline::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  display: block;
  transform: translate(-50%, 100%);
  border-right: solid 1rem transparent;
  border-left: solid 1rem transparent;
  border-top: 2rem solid #0d50a6;
}

/* Container around content */

.timeline-container {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* The circles on the timeline */

.timeline-container::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  right: 0;
  background-color: #0d50a6;
  border: 4px solid #0d50a6;
  top: 20px;
  z-index: 1;
  transform: translateX(50%);
}

/* Place the container to the left */

.left {
  left: 0;
}

/* Place the container to the right */

.right {
  left: 50%;
}

/* Add arrows to the left container (pointing right) */

.left::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  right: 30px;
  border: medium solid #eee;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #eee;
}

/* Add arrows to the right container (pointing left) */

.right::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  left: 30px;
  border: medium solid #eee;
  border-width: 10px 10px 10px 0;
  border-color: transparent #eee transparent transparent;
}

/* Fix the circle for containers on the right side */

.right::after {
  left: 0;
  transform: translateX(-50%);
}

/* The actual content */

.timeline-content {
  padding: 20px 30px;
  background-color: #eee;
  position: relative;
}

.timeline h3 {
  font-size: 3rem;
  color: #0d50a6;
}

/* Media queries - Responsive timeline on screens less than 600px wide */

@media screen and (max-width: 600px) {
  .timeline {
    margin: 0;
  }
  .timeline::before {
    left: 0;
    transform: translateY(100%);
  }
  /* Place the timelime to the left */
  .timeline::after {
    left: 7px;
    transform: none;
  }
  /* Full-width containers */
  .timeline-container {
    width: 100%;
    padding-left: 51px;
    padding-right: 0;
  }
  /* Make sure that all arrows are pointing leftwards */
  .timeline-container::before {
    left: 41px;
    border: medium solid #eee;
    border-width: 10px 10px 10px 0;
    border-color: transparent #eee transparent transparent;
  }
  /* Make sure all circles are at the same spot */
  .left::after, .right::after {
    left: 0;
  }
  .timeline-container::after {
    transform: none;
  }
  /* Make all right containers behave like the left ones */
  .right {
    left: 0%;
  }
}