:root {
  --backround-color: #f5f5f5;
  --primary-color: #6497b1;
  --secondary-color: #c51f5d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.main-header {
  font-family: "Rajdhani", sans-serif;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 40px;
  color: #333;
}

.main-header h3,
.main-header h1 {
  font-weight: 300;
}

.main-header h1 {
  font-size: 42px;
  font-weight: 600;
  text-align: left;
  margin-bottom: 10px;
  ;
  color: rgb(44, 44, 44);
  padding-top: 50px;
}

.main-header p {
  color: #333;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
  margin-bottom: 50px;
}

/* Top Down Arrow */

#timeline {
  padding-bottom: 150px;
}

#timeline ul {
  list-style: none;
}

/* Central Line */
#timeline ul li {
  position: relative;
  width: 0;
  border-left: 6px dotted #9ccdff;
  margin: 0 auto;
}

/* Dots */
#timeline ul li:before {
  content: "";
  position: absolute;
  top: 0;
  left: -11px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fafafa;
  transition: background 1s ease-in-out;
}

#timeline ul h2 {
  font-family: "Rajdhani", sans-serif;
  font-weight: 500;
  font-size: 18px;
  text-align: center;
}

/* Year */
#timeline ul h3 {
  font-family: "Montserrat";
  font-weight: 300;
  font-size: 1.5rem;
  text-align: center;
  margin: 30px 0 10px;
}

/* Boxes &  Bottom Text */
#timeline ul li>div {
  width: 350px;
  margin-bottom: 5px;
  text-align: center;
  position: relative;
  opacity: 0;
  visibility: hidden;
  transition: all 1s ease-in-out;
}

#timeline ul li>div p {
  padding-top: 20px;
}

#timeline ul li:nth-child(2n + 0)>div {
  margin-left: 70px;
  transform: translateX(60px);
}

#timeline ul li:nth-child(4n + 0)>div {
  margin-left: -414px;
  transform: translateX(-60px);
}

#timeline ul li>div>div {
  position: relative;
  top: -14px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 25px;
  box-shadow: 1px 2px 5px #1E90FF;
  width: 350px;
  padding: 5px 10px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

#timeline ul li>div>div:hover {
  transform: translateY(-4px);
  box-shadow: 5px 5px 10px #1E90FF;
}

/* Top boxes arrows */
#timeline ul li>div:before {
  content: "";
  width: 0;
  height: 0;
  position: absolute;
  top: 0;
  border-style: solid;
}

/* Show Boxes */
#timeline ul li.show>div {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

#timeline ul li.show:before {
  background: #1E90FF;
}

@media (max-width: 900px) {
  #timeline ul li>div p {
    font-size: 15px;
  }

  #timeline ul h2 {
    font-family: "Rajdhani", sans-serif;
    font-weight: 500;
    font-size: 15px;
    text-align: center;
  }

  #timeline ul li>div,
  #timeline ul li>div>div {
    width: 200px;
  }

  #timeline ul li:nth-child(4n + 0)>div {
    margin-left: -264px;
  }

  #timeline ul li:nth-child(4n + 0)>div:before {
    transform: translateX(215px);
  }
}

@media (max-width: 600px) {
  .main-header h1 {
    font-size: 25px;
    text-align: center;
  }

  #timeline ul li {
    margin: 0 50px;
  }

  #timeline ul li>div,
  #timeline ul li>div>div {
    width: calc(100vw - 170px);
  }

  #timeline ul h3 {
    text-align: unset;
    padding-left: 30px;
    font-size: 20px;
  }

  #timeline ul li:nth-child(4n + 0)>div {
    margin-left: 70px;
    transform: translateX(60px);
  }

  #timeline ul li:nth-child(4n + 0)>div:before {
    transform: translateX(0);
    border-width: 8px 16px 8px 0;
    border-color: transparent var(--secondary-color) transparent transparent;
  }

  #timeline ul li.show>div {
    transform: none;
  }
}