/* ==========================================================================
   ZAHIQ AI - Interactive How It Works Timeline
   Visual Step-by-Step Process
   ========================================================================== */

.how-it-works {
  padding: var(--space-20) 0;
  background: var(--white);
  position: relative;
}

.how-container {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.how-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  text-align: center;
  margin-bottom: var(--space-16);
  letter-spacing: var(--tracking-tight);
}

/* Timeline Interactive */
.timeline-interactive {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: var(--space-8) 0;
}

/* Timeline Line */
.timeline-line {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gray-2);
  z-index: 0;
}

.timeline-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--gradient-blue);
  transition: width 1.5s ease;
}

.timeline-interactive:hover .timeline-line::after {
  width: 100%;
}

/* Timeline Steps */
.timeline-step {
  flex: 1;
  position: relative;
  z-index: 1;
  cursor: pointer;
  transition: var(--transition-all);
}

.timeline-step:hover {
  transform: translateY(-10px);
}

/* Step Marker */
.step-marker {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--space-4);
  background: var(--white);
  border: 3px solid var(--gray-2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--gray-4);
  transition: var(--transition-all);
}

.timeline-step.active .step-marker,
.timeline-step:hover .step-marker {
  background: var(--gradient-blue);
  border-color: transparent;
  color: var(--white);
  transform: scale(1.2);
  box-shadow: var(--shadow-blue);
}

/* Step Content */
.step-content {
  text-align: center;
  padding: 0 var(--space-4);
}

.step-content h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
  color: var(--black);
}

.step-content p {
  font-size: var(--text-sm);
  color: var(--gray-4);
  margin-bottom: var(--space-4);
}

/* Step Visuals */
.step-visual {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Phone Connect Animation */
.phone-connect-animation {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.connect-icon {
  font-size: var(--text-3xl);
  animation: pulse 2s ease-in-out infinite;
}

.connect-line {
  width: 40px;
  height: 2px;
  background: var(--gradient-blue);
  position: relative;
  overflow: hidden;
}

.connect-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--white), transparent);
  animation: flow 1.5s linear infinite;
}

@keyframes flow {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Training Animation */
.training-animation {
  width: 150px;
  height: 8px;
  background: var(--gray-2);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.training-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--gradient-green);
  animation: training-progress 2s ease-in-out infinite;
}

@keyframes training-progress {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

/* Live Indicator */
.live-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--gradient-green);
  border-radius: var(--radius-full);
  color: var(--white);
  font-weight: var(--font-bold);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

.live-text {
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
}

/* Active State Animations */
.timeline-step.active .step-visual {
  animation: bounce-visual 2s ease-in-out infinite;
}

@keyframes bounce-visual {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Responsive */
@media (max-width: 768px) {
  .timeline-interactive {
    flex-direction: column;
    gap: var(--space-8);
  }
  
  .timeline-line {
    display: none;
  }
  
  .timeline-step {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    text-align: left;
  }
  
  .step-marker {
    margin: 0;
    flex-shrink: 0;
  }
  
  .step-content {
    text-align: left;
    padding: 0;
  }
  
  .step-visual {
    margin-left: auto;
  }
}