/* Container */
.timeline-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  max-width: 1000px;
  margin: 50px auto;
  font-family: Arial, sans-serif;
  flex-wrap: wrap;
}

/* Horizontal line */
.timeline-container::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  height: 2px;
  background: #01CAB2;
  z-index: 0;
}

/* Each step */
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 120px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 40px;
}

/* Circle */
.timeline-step .circle {
  width: 20px;
  height: 20px;
  background: #01CAB2;
  border-radius: 50%;
  margin-bottom: 10px;
}

/* Step title */
.timeline-step h5 {
  margin: 5px 0 0;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

/* Step subtitle */
.timeline-step .subtitle {
  font-size: 12px;
  color: #01CAB2;
  margin-bottom: 5px;
}

/* Step icon */
.timeline-step .icon {
  font-size: 25px;
  color: #01CAB2;
  margin-bottom: 8px;
}

/* Blinking arrow */
.down-arrow {
  font-size: 24px;
  color: #01CAB2;
  margin: 1px 0;
  animation: blink 4s infinite;
  position: relative;
}

.down-arrow::after {
  content: '↓';
  display: inline-block;
}

/* Blink keyframes */
@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* Tooltip description */
.timeline-step .description {
  visibility: hidden;
  width: 250px;
  background-color: #fff;
  color: #000;
  text-align: left;
  border-radius: 6px;
  padding: 10px;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 14px;
  pointer-events: none;
}

/* Tooltip arrow */
.timeline-step .description::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

/* Hover tooltips (desktop) */
.timeline-step:hover .description,
.timeline-step .circle:hover ~ .description,
.timeline-step .icon:hover ~ .description {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Active tooltips (click/tap for mobile) */
.timeline-step .description.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* White text */
.white-text {
  color: #fff;
}

/* Responsive layout */
@media (max-width: 768px) {
  .timeline-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .white-text {
  color: #fff;
  }
  .timeline-container::before {
    display: none;
  }

  .timeline-step .circle {
    display: none;
  }

  .timeline-step {
    flex-direction: row;
    align-items: center; /* vertically center icon, arrow, text */
    width: 100%;
    text-align: left;
    margin-left: 10px;
  }

  .timeline-step .icon,
  .timeline-step .down-arrow {
    margin-right: 8px;
    margin-bottom: 0px; /* remove bottom margin so arrow stays in row */
  }

  .timeline-step h5 {
    font-size: 20px;
    margin-top: 0; /* remove top margin for row layout */
  }

  .timeline-step .subtitle {
    display: none;
  }

  .timeline-step .description {
    width: 90%;
    bottom: 110%;
  }

  /* Change arrow to right on mobile */
  .down-arrow::after {
    content: '→';
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  /* Styles */
    .timeline-step {
    flex-direction: row;
    align-items: center; /* vertically center icon, arrow, text */
    width: 100%;
    text-align: left;
    margin-left: 20vw;
  }
  
  
  .timeline-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .white-text {
  color: #fff;
  }
  .timeline-container::before {
    display: none;
  }

  .timeline-step .circle {
    display: none;
  }


  .timeline-step .icon,
  .timeline-step .down-arrow {
    margin-right: 8px;
    margin-bottom: 0px; /* remove bottom margin so arrow stays in row */
  }

  .timeline-step h5 {
    font-size: 20px;
    margin-top: 0; /* remove top margin for row layout */
  }

  .timeline-step .subtitle {
    display: none;
  }

  .timeline-step .description {
    width: 90%;
    bottom: 110%;
  }

  /* Change arrow to right on mobile */
  .down-arrow::after {
    content: '→';
}
}
