/* Global box-sizing for layout sanity */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Container setup */
.timeline-container {
  position: relative;
  width: 100%;
  padding: 2rem 1rem 4rem;
  overflow-x: hidden; 
}

/* Timeline body */
.timeline-events {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Main event wrapper */
.timeline-event {
  position: relative;
  display: flex;
  align-items: center;
  margin: 2rem 0;
  width: 100%;
}

/* LEFT SIDE EVENTS */
.timeline-event.left {
  flex-direction: row;
  text-align: right;
  padding-left: 5%;
  padding-right: 2%;
}

/* RIGHT SIDE EVENTS */
.timeline-event.right {
  flex-direction: row-reverse;
  text-align: left;
  padding-left: 2%;
  padding-right: 5%;
}

/* Connector setup */
.connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 180px;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}

/* Horizontal line */
.connector .horizontal {
  width: 160px;
  height: 2px;
  background: white;
  margin-top: 0.5rem;
  position: relative;
}

/* Dot at elbow of horizontal line */
.connector .horizontal::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -3px;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

/* Flip dot for left events */
.timeline-event.left .horizontal::after {
  left: -3px;
  right: auto;
}

/* Vertical line (the stagger) */
.connector .horizontal::before {
  content: '';
  position: absolute;
  top: 100%;
  width: 2px;
  background: white;
  height: var(--vertical-height, 100px);
}

.timeline-event.right .horizontal::before {
  left: 0;
}

.timeline-event.left .horizontal::before {
  right: 0;
}

/* Content box */
.content {
  width: calc(50% - 185px);
  padding: 1rem;
  color: white;
}

.connector #date {
  font-size: 16px;
  font-weight:700;
  color: white;
  margin-bottom: 0px;
  text-align: center;
  white-space: nowrap;
}

.right .connector #date {
    padding-left:40px;
}

.left .connector #date {
    padding-right:40px;
}

.content img{
    width:80%;
    height:auto;
    margin-bottom:30px;
}

.horizontal.last::before {
  display: none;
}

@media only screen and (max-width: 1024px) {
  .timeline-container {
    flex-direction:column;
  }

  .connector .horizontal,
  .connector .horizontal::before,
  .connector .horizontal::after {
    display: none !important;
  }

  .content {
    width:100%;
  }
  .connector #date {
    padding:20px;
  }

  .timeline-event.left, .timeline-event.right {
    padding: 0px;
  }
}

@media only screen and (max-width: 400px) {
  .content h3 {
    font-size:18px;
  }

   .content {
    width: 100%;
    padding: 0.5rem 0;
  }

  .content p {
    font-size:14px;
  }

  .timeline-event.left,
  .timeline-event.right {
    flex-direction: column-reverse;
    padding: 0;
  }

  .timeline-event.left {
    align-items:flex-end;
  }

  .timeline-event.right{ 
    align-items:flex-start;
  }

  .right .connector {
    width: 100%;
    height: auto;
    align-items:flex-start;
    margin-bottom: 0.5rem;
  }

  .left .connector {
    align-items:flex-end;
  }

  .left .connector #date {
    justify-self:left;
    padding: 0;
    font-size: 16px;
  }

  .right .connector #date {
    text-align: right;
    padding: 0;
    font-size: 16px;
  }

 .timeline-event {
  align-items:flex-start;
 }

}