/* reset & base */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: Arial, sans-serif; }

/* timeline container */
.timeline {
  position: relative;
  width: 100%;
  margin: 50px auto;
  padding: 0 20px;
}

.timeline h1 {
  margin: 50px 0;
  text-align: center;
  font-size: 4rem;
}

/* grey centre line */
.timeline .line {
  position: absolute;
  left: 50%; top: 130px;
  width: 4px; height: 100%;
  background: #e0e0e0;
  transform: translateX(-50%);
}

/* red progress line */
.timeline .progress {
  position: absolute;
  left: 50%; top: 130px;
  width: 6px; height: 0;
  background: #FF5700;
  transform: translateX(-50%);
  z-index: 1;
}

/* each event */
.timeline .item {
  position: relative;
  width: 100%;
  margin: 50px 0;
  opacity: 0.6;
  transition: opacity 0.6s ease-in-out;
}
.timeline .item.in-view {
  opacity: 1;
}

/* dot on the centre */
.timeline .item .dot {
  position: absolute;
  left: 50%;
  width: 24px; height: 24px;
  background: #FF5700;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* flex-wrapper for combined content */
.timeline .item.combined .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* reverse order on left items */
.timeline .item.left.combined .content {
  flex-direction: row-reverse;
}

.timeline .item.combined .content .card-img {
  width: 45%;
  position: relative;
}

.timeline .item.combined .content .card-img img{
  width: 100%;
  border-radius: 8px;
}

/* card sizing */
.timeline .item.combined .content .card {
  width: 45%;
}

/* card styling */
.timeline .card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.timeline .card .number {
  display: block;
  font-size: 1.6rem;
  color: #FF5700;
  font-weight: 700;
}
.timeline .card .date {
  display: block;
  margin: 5px 0 15px;
  color: #FF5700;
  font-weight: 300;
  font-size: 1.3rem;
}
.timeline .card h3 {
  font-size: 1.4rem;
  line-height: 1.5;
}

/* ----------------------------
   RESPONSIVE BREAKPOINTS
   ---------------------------- */

/* Medium desktops / smaller laptops */
@media (max-width: 1024px) {
  .timeline h1 {
    font-size: 3rem;
  }
  /* narrow the flex children a bit */
  .timeline .item.combined .content img,
  .timeline .item.combined .content .card {
    width: 48%;
  }
}

/* Tablets & landscape phones */
@media (max-width: 768px) {
  .timeline h1 {
    font-size: 2.5rem;
  }
  /* shift to vertical stacking */
  .timeline .item.combined .content {
    flex-direction: column;
  }
  /* full-width images & cards, add spacing */
  .timeline .item.combined .content img,
  .timeline .item.combined .content .card {
    width: 100%;
  }
  .timeline .item.combined .content img {
    margin-bottom: 20px;
  }
  /* move the center line and progress down a bit less */
  .timeline .line,
  .timeline .progress {
    display: none;
  }
  /* shrink the dot */
  .timeline .item .dot {
    display: none;
  }
}

/* Portrait phones */
@media (max-width: 480px) {
  .timeline h1 {
    font-size: 2rem;
  }
  /* even smaller fonts in cards */
  .timeline .card .number {
    font-size: 1.4rem;
  }
  .timeline .card .date {
    font-size: 0.9rem;
  }
  .timeline .card h3 {
    font-size: 1.2rem;
  }
  /* reduce margins */
  .timeline .item {
    margin: 30px 0;
  }
}
