.timeline-section {
  background: #f8f9fa;
}

.timeline-container {
  max-width: 800px;
  margin: auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.location {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.location-label {
  flex: 0 0 120px;
  text-align: center;
  font-size: 16px;
  color: #333;
}

.timeline {
  flex: 1;
  position: relative;
  margin: 0 20px;
  padding-left: 40px;
  border-left: 4px solid #e0e0e0;
}

.step {
  position: relative;
  margin-bottom: 30px;
  padding-left: 10px;
}

.step-icon {
  position: absolute;
  left: -32px;
  top: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 1;
  color: #ccc;
}

.step-done .step-icon {
  color: #0fc709;
}

.step-active .step-icon {
  color: #e53e3e;
  font-size: 24px;
}

.step-label {
  font-size: 16px;
  color: #333;
}

@media (max-width: 768px) {
  .location {
    flex-direction: column;
    align-items: center;
  }
  .location-label, .timeline {
    flex: 1 1 100%;
    margin-bottom: 20px;
  }
}

/* Blinking animation for the active step icon */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.step-active .step-icon i {
  animation: blink 1.5s infinite;
}

/* Pulsing glow for the active step icon */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(229, 62, 62, 0);
    transform: scale(1.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0);
    transform: scale(1);
  }
}

.step-active .step-icon {
  color: #e53e3e;
  font-size: 28px;
  animation: pulse 2s infinite ease-in-out;
}

/* Animated connector lines */
.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #e0e0e0;
  z-index: 0;
  transform-origin: top;
  animation: draw-line 2s forwards;
}

/* Draw line from top to active step */
@keyframes draw-line {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

.step {
  position: relative;
  z-index: 1;
}

/* Highlighted section of connector up to active step */
.step-done ~ .step,
.step-active ~ .step {
  opacity: 0.6; /* fade upcoming steps */
}
