.timeline-block{
    color: beige;
    overflow: hidden;
    cursor: default;
}

.timeline-block .horizontal-window {
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.timeline-block .line {
  position: absolute;
  width: calc(100% - 150px);
  height: 2px;
  background-color: #ccc;
  top: 50%;
  z-index: 1;
}
.timeline-block .timelineContainer {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  padding-left: 50px;
  padding-right: 50px;
  box-sizing: border-box;
  position: relative;
  height: 400px;
  width: calc(auto +100px);
  gap: 50px;
}

.timeline-block .timecard {
  position: relative;
  height: 400px;
  width: 400px;
  box-sizing: border-box;
  margin-right: 50px;
}

.timeline-block .timecard:hover .upper,
.timeline-block .timecard:hover .lower {
  transform: translateY(0);
}

.timeline-block .upper {
  height: 200px;
  width: 400px;
  position: relative;
  display: flex;
  color: white;
  font-family: var(--headerfont);
  font-weight: bolder;
  font-size: 25px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 3;
  transform: translateY(100px);
  transition: 0.3s ease-in-out;
}

.timeline-block .year {
  font-size: 35px;
  margin-bottom: 10px;
}

.timeline-block .lower {
  height: 200px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: white;
  box-sizing: border-box;
  transform: translateY(-100px);
  transition: 0.3s ease-in-out;
  color: black;
  z-index: 2;
}

.timeline-block .lower p {
  text-align: center;
}
.timeline-block .timecard:nth-child(3n+1) .upper{
  background-color: #000;
  color: var(--green);
}
.timeline-block .timecard:nth-child(3n+2) .upper{
  background-color: var(--green);
  color: #000;
}
.timeline-block .timecard:nth-child(3n+3) .upper{
  background-color: var(--teal);
  color: var(--green);
}