.timeline-title {
  margin: 10px auto;
}

.timeline {
  list-style: none;
  padding: 20px 0 20px;
  position: relative;
  margin: 0 auto;
}

.timeline > li {
  margin-bottom: 20px;
  position: relative;
  display: flex;
  justify-content: flex-start;
}

@media screen and (min-width: 768px) {
  .timeline > li:nth-child(even) {
    justify-content: flex-end;
  }

  .timeline > li:nth-child(even) .timeline-panel::before {
    left: -18px;
    right: auto;
    border-left: 0;
    border-right: 22px solid #ccc;
  }

  .timeline > li:nth-child(even) .timeline-panel::after {
    left: -16px;
    right: auto;
    border-left: 0;
    border-right: 20px solid #fff;
  }

  .timeline-panel {
    width: 45%;
  }
}

@media screen and (min-width: 992px) {
  .timeline-panel {
    width: 46%;
  }
}

@media screen and (min-width: 1200px) {
  .timeline-panel {
    width: 46.5%;
  }
}

.timeline::before {
  top: 0;
  bottom: 0;
  position: absolute;
  content: " ";
  width: 3px;
  background-color: #eeeeee;
  left: 50%;
  margin-left: -1.5px;
}

.timeline-badge {
  font-size: 34px;
  color: #fff;
  width: 50px;
  height: 50px;
  line-height: 54px;
  padding-top: 1px;
  padding-left: 1px;
  text-align: center;
  position: absolute;
  top: 16px;
  left: 50%;
  margin-left: -25px;
  background-color: #005c66;
  z-index: 100;
  border-radius: 100%;
}

.timeline-panel {
  float: left;
  border: 1px solid #d4d4d4;
  border-radius: 2px;
  padding: 20px;
  position: relative;
  -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
}

/* Larger triangle for the border */
.timeline-panel::before {
  position: absolute;
  top: 25px;
  right: -18px;
  display: inline-block;
  content: " ";
  border-top: 15px solid transparent;
  border-left: 22px solid #ccc;
  border-bottom: 16px solid transparent;
}

/* Smaller triangle for the inner color */
.timeline-panel::after {
  position: absolute;
  top: 26px;
  right: -16px;
  display: inline-block;
  content: " ";
  border-top: 14px solid transparent;
  border-left: 20px solid #fff;
  border-bottom: 15px solid transparent;
}

.timeline-year > h4 {
  margin-top: 0;
  text-align: center;
  color: #fff;
  background-color: #005c66;
}

@media screen and (max-width: 767px) {
  .timeline-title {
    margin: 30px 20px;
  }

  .timeline {
    margin: 0px 20px;
  }

  .timeline::before {
    left: 0px;
  }

  .timeline > li {
    left: 25px;
  }

  .timeline-badge {
    left: -40px;
    margin-left: 0;
    top: 27px;
    font-size: 21px;

    width: 30px;
    height: 30px;
    line-height: 33px;
    padding-top: 0px;
  }

  .timeline-panel {
    width: calc(100% - 25px);
    width: -moz-calc(100% - 25px);
    width: -webkit-calc(100% - 25px);
    top: 1px;
    right: 0px;
    left: 4px
  }

  .timeline-panel::before {
    left: -18px;
    right: auto;
    border-left: 0;
    border-right: 22px solid #ccc;
  }

  .timeline-panel::after {
    left: -16px;
    right: auto;
    border-left: 0;
    border-right: 20px solid #fff;
  }
}