.ac-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.ac-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #b0b0b0;
  transform: translateX(-50%);
  z-index: 0;
}

.ac-timeline .progress-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 0;
  background: #004f88;
  transform: translateX(-50%);
  z-index: 1;
  transition: height 0.4s ease, background 0.3s ease;
}

.ac-timeline-event {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

.ac-timeline-event.show {
  opacity: 1;
  transform: translateY(0);
}

.ac-timeline-event.left {
  left: 0;
  text-align: right;
}

.ac-timeline-event.right {
  left: 50%;
}

/* Centered markers on the main timeline */
.ac-timeline-event::before {
content: "";
position: absolute;
top: 41.5%;
width: 20px;
height: 20px;
background: white;
border: 4px solid #b0b0b0;
border-radius: 50%;
z-index: 3;
transition: border-color 0.4s ease, background 0.4s ease;
}


.ac-timeline-event.left::before {
right: -14px; /* perfectly centers over the main timeline */
}


.ac-timeline-event.right::before {
left: -14px; /* perfectly centers over the main timeline */
}

.ac-timeline-event.active::before {
  border-color: #004f88;
  background: #004f88;
}

/* Connector line aligning with main timeline */
.ac-timeline-event .connector {
  position: absolute;
  top: 50%;
  height: 2px;
  background: #b0b0b0;
  width: calc(50% - 22px);
  transition: background 0.4s ease;
  z-index: 2;
}

.ac-timeline-event.left .connector {
  right: 0;
}

.ac-timeline-event.right .connector {
  left: 0;
}

.ac-timeline-event.active .connector {
  background: #004f88;
}

.ac-timeline-content {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 2px solid transparent;
  transition: border-color 0.4s ease;
  position: relative;
  z-index: 2;
}

.ac-timeline-event.active .ac-timeline-content {
  border-color: #004f88;
}

.ac-timeline-event.left .ac-timeline-content {
  margin-right: 40px;
}

.ac-timeline-event.right .ac-timeline-content {
  margin-left: 40px;
}


@media screen and (max-width: 768px) {
  .ac-timeline::before, .ac-timeline .progress-line {
    left: 8px;
  }
  .ac-timeline-event {
    width: 100%;
    padding-left: 40px;
    text-align: left;
  }
  .ac-timeline-event.left,
  .ac-timeline-event.right {
    left: 0;
  }
  .ac-timeline-event::before {
    left: 0;
    transform: none;
  }
  .connector {
    display: none;
  }
  .ac-timeline-content {
    margin: 0 0 20px 30px;
  }
}