/*================================
=            Timeline            =
=================================*/

.m-timeline {
  text-align: left;
  margin: 45px 0 25px;
  display: flex;
  flex-flow: column nowrap;
}
.m-timeline__item {
  position: relative;
  min-height: 76px;
  margin-left: 72px;
  margin-bottom: 15px;
  padding-left: 16px;
  line-height: 1.2;
}
.m-timeline__item:last-child {
  min-height: 56px;
}
.m-timeline__item h6 {
  color: var(--color-primary-grey);
  font-size: var(--font-l);
  font-weight: 900;
  margin: 0 0 0.1em;
}
.m-timeline.-mini .m-timeline__item h6 {
  color: var(--color-primary-dark);
}
.m-timeline__item p {
  color: var(--color-grayscale-lighter);
  font-weight: bold;
  margin: 0;
}
.m-timeline.-mini .m-timeline__item p {
  color: var(--color-grayscale-medium);
}
.m-timeline__item::before {
  content: '';
  display: block;
  width: 19px;
  height: 19px;
  border: 2px solid black;
  background-color: var(--color-white);
  border-radius: 50%;
  position: absolute;
  top: -2px;
  left: -14.25px;
  z-index: 1;
}
.m-timeline__logo {
  position: absolute;
  left: -75px;
  top: -22px;
  height: 64px;
  width: 64px;
  z-index: 2;
}
.m-timeline__logo::after {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  background-color: black;
  right: -5px;
  top: 0;
  bottom: 0;
  margin: auto;
  transform: rotate(45deg);
  border-radius: 0 2px;
}
.m-timeline__logoInner {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border: 3px solid black;
  border-radius: 50%;
  background-color: var(--color-white);
  z-index: 1;
  text-align: center;
}
.m-timeline__logoInner::before,
.m-timeline__logoInner::after {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}
.m-timeline__logo img {
  width: 80%;
  vertical-align: middle;
}
.m-timeline__thread {
  position: absolute;
  width: 4px;
  top: 0;
  bottom: 0;
  left: -4px;
  background-color: black;
}
.m-timeline__item:last-child .m-timeline__thread {
  top: 43px;
  border-radius: 2px 2px 0 0;
}
.m-timeline__item:last-child .m-timeline__thread::before,
.m-timeline__item:last-child .m-timeline__thread::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  position: absolute;
  background-color: inherit;
  margin: 1px 0;
  top: -11px;
  left: 0;
}
.m-timeline__item:last-child .m-timeline__thread::after {
  top: -21px;
}
.m-timeline__triangle {
  position: absolute;
  left: -7.34px;
  bottom: -5px;
  background-color: black;
}
.m-timeline__triangle::before,
.m-timeline__triangle::after {
  content: '';
  position: absolute;
  background-color: inherit;
}
.m-timeline__triangle,
.m-timeline__triangle::before,
.m-timeline__triangle::after {
  width: 7px;
  height: 7px;
  border-top-right-radius: 30%;
}
.m-timeline__triangle {
  transform: rotate(-120deg) skewX(-30deg) scale(1, 0.866);
}
.m-timeline__triangle::before {
  transform: rotate(-135deg) skewX(-45deg) scale(1.414, 0.707)
    translate(0, -50%);
}
.m-timeline__triangle::after {
  transform: rotate(135deg) skewY(-45deg) scale(0.707, 1.414) translate(50%);
}

.m-timeline__item.-orange::before,
.m-timeline__item.-orange .m-timeline__logoInner {
  border-color: var(--color-primary);
}
.m-timeline__item.-green::before,
.m-timeline__item.-green .m-timeline__logoInner {
  border-color: var(--color-action);
}
.m-timeline__item.-blue::before,
.m-timeline__item.-blue .m-timeline__logoInner {
  border-color: var(--color-accent3);
}
.m-timeline__item.-yellow::before,
.m-timeline__item.-yellow .m-timeline__logoInner {
  border-color: var(--color-accent4);
}
.m-timeline__item.-orange .m-timeline__logo::after,
.m-timeline__item.-orange .m-timeline__thread,
.m-timeline__item.-orange .m-timeline__triangle {
  background-color: var(--color-primary);
}
.m-timeline__item.-green .m-timeline__logo::after,
.m-timeline__item.-green .m-timeline__thread,
.m-timeline__item.-green .m-timeline__triangle {
  background-color: var(--color-action);
}
.m-timeline__item.-blue .m-timeline__logo::after,
.m-timeline__item.-blue .m-timeline__thread,
.m-timeline__item.-blue .m-timeline__triangle {
  background-color: var(--color-accent3);
}
.m-timeline__item.-yellow .m-timeline__logo::after,
.m-timeline__item.-yellow .m-timeline__thread,
.m-timeline__item.-yellow .m-timeline__triangle {
  background-color: var(--color-accent4);
}

@media only screen and (min-width: 920px) {
  .m-timeline:not(.-mini) {
    flex-flow: row nowrap;
    justify-content: center;
    margin: 30px 0 15px 30px;
  }
  .m-timeline:not(.-mini) .m-timeline__item {
    margin: 110px 15px 0 0;
    padding: 1.5rem 0;
    min-height: auto;
    flex-basis: 25%;
  }
  .m-timeline:not(.-mini) .m-timeline__item.-small {
    flex-basis: 11%;
  }
  .m-timeline:not(.-mini) .m-timeline__item.-large {
    flex-basis: 39%;
  }
  .m-timeline:not(.-mini) .m-timeline__item::before {
    top: -14px;
    left: 0;
  }
  .m-timeline:not(.-mini) .m-timeline__item:last-child {
    min-height: auto;
  }
  .m-timeline:not(.-mini) .m-timeline__item:not(:last-child) h6,
  .m-timeline:not(.-mini) .m-timeline__item:not(:last-child) p {
    width: 80%;
  }
  .m-timeline:not(.-mini) .m-timeline__item h6 {
    margin-bottom: 0;
  }
  .m-timeline:not(.-mini) .m-timeline__thread {
    top: -4px;
    bottom: auto;
    left: 22px;
    width: calc(100% - 22px);
    height: 0;
  }
  .m-timeline:not(.-mini) .m-timeline__thread::before,
  .m-timeline:not(.-mini) .m-timeline__thread::after {
    content: '';
    position: absolute;
    background-color: inherit;
    height: 4px;
    width: calc(50% - 1px);
    top: 0;
  }
  .m-timeline:not(.-mini) .m-timeline__thread::before {
    left: 0;
    border-radius: 0 2px 2px 0;
  }
  .m-timeline:not(.-mini) .m-timeline__thread::after {
    right: 0;
    border-radius: 2px 0 0 2px;
  }
  .m-timeline:not(.-mini) .m-timeline__item:last-child .m-timeline__thread {
    height: 4px;
    border-radius: 2px 0 0 2px;
    top: -4px;
    right: 0;
    left: 84px;
    width: auto;
  }
  .m-timeline:not(.-mini)
    .m-timeline__item:last-child
    .m-timeline__thread::before,
  .m-timeline:not(.-mini)
    .m-timeline__item:last-child
    .m-timeline__thread::after {
    margin: 0;
    width: 30px;
    height: 4px;
    top: 0;
  }
  .m-timeline:not(.-mini)
    .m-timeline__item:last-child
    .m-timeline__thread::before {
    left: -64px;
  }
  .m-timeline:not(.-mini)
    .m-timeline__item:last-child
    .m-timeline__thread::after {
    left: -32px;
  }
  .m-timeline:not(.-mini) .m-timeline__triangle {
    transform: rotate(-90deg) skewX(-30deg) scale(1, 0.866);
    right: -6px;
    top: -7.34px;
    left: auto;
    bottom: auto;
  }
  .m-timeline:not(.-mini) .m-timeline__logo {
    height: 96px;
    width: 96px;
    left: -36px;
    top: -109px;
  }
  .m-timeline:not(.-mini) .m-timeline__logo::after {
    transform: rotate(135deg);
    top: auto;
    left: 0;
    right: 0;
    bottom: -6px;
  }
  .m-timeline:not(.-mini) .m-timeline__logoInner {
    border-width: 4px;
  }
}
