/* ========================================
   HOW IT WORKS - MODERN ZIGZAG TIMELINE
   ======================================== */
.how-it-works-section {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF9 100%);
  padding: var(--space-20) 0;
  overflow: hidden;
  position: relative;
}

.hiw-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  position: relative;
  max-width: 1200px;
  margin: var(--space-16) auto 0;
}

/* Connecting Line */
.hiw-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg,
      rgba(211, 97, 53, 0.1) 0%,
      rgba(211, 97, 53, 0.3) 50%,
      rgba(211, 97, 53, 0.1) 100%);
  transform: translateX(-50%);
  z-index: 0;
}

.hiw-step {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  position: relative;
  z-index: 1;
}

.hiw-step.reverse {
  flex-direction: row-reverse;
}

/* Step Content */
.hiw-content {
  flex: 1;
  padding: var(--space-8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--gradient-primary);
  color: white;
  font-size: var(--font-size-xl);
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: var(--space-6);
  box-shadow: 0 8px 16px rgba(211, 97, 53, 0.3);
  position: relative;
  z-index: 2;
}

.hiw-content h3 {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.hiw-content p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.step-benefits {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.step-benefits li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  font-weight: 500;
}

.step-benefits li i {
  color: #10B981;
  font-size: 1.1em;
  filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.2));
}

/* Step Image */
.hiw-image {
  flex: 1;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.image-wrapper {
  background: white;
  padding: var(--space-3);
  border-radius: var(--radius-2xl);
  box-shadow:
    0 20px 40px -4px rgba(0, 0, 0, 0.1),
    0 8px 16px -4px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--color-border-light);
  position: relative;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.image-wrapper:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 25px 50px -12px rgba(211, 97, 53, 0.15),
    0 12px 24px -12px rgba(0, 0, 0, 0.08);
}

.image-wrapper img {
  border-radius: var(--radius-xl);
  width: 100%;
  height: auto;
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .how-it-works-section {
    padding: var(--space-12) 0;
  }

  .hiw-timeline {
    gap: var(--space-16);
    margin-top: var(--space-8);
  }

  .hiw-timeline::before {
    left: 28px;
    transform: none;
    background: linear-gradient(180deg,
        rgba(211, 97, 53, 0) 0%,
        rgba(211, 97, 53, 0.2) 20%,
        rgba(211, 97, 53, 0.2) 80%,
        rgba(211, 97, 53, 0) 100%);
  }

  .hiw-step,
  .hiw-step.reverse {
    flex-direction: column-reverse;
    /* Content below image on mobile usually better? Or content top? User prefers image heavy? Let's do Text First actually. */
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
    padding-left: 60px;
    /* space for timeline */
  }

  .hiw-step {
    flex-direction: column-reverse;
    /* Keep image on top? No, timeline usually has icon on left. */
    /* Let's align icon with content */
  }

  /* Reset flex direction to be consistent */
  .hiw-step,
  .hiw-step.reverse {
    flex-direction: column-reverse;
    /* Image Top, Text Bottom */
  }

  /* Wait, badge is in text content. */
  .hiw-content {
    background: transparent;
    padding: 0;
    border: none;
    width: 100%;
  }

  .step-badge {
    position: absolute;
    left: 0;
    top: 0;
    /* Align with top of content */
    width: 48px;
    height: 48px;
    font-size: var(--font-size-lg);
  }

  .hiw-image {
    width: 100%;
    margin-bottom: var(--space-4);
  }

  .hiw-content h3 {
    font-size: var(--font-size-2xl);
  }
}

@media (max-width: 640px) {
  .hiw-timeline::before {
    display: none;
    /* Remove line on small screens for cleaner look */
  }

  .hiw-step,
  .hiw-step.reverse {
    padding-left: 0;
    gap: var(--space-8);
  }

  .step-badge {
    position: relative;
    left: auto;
    top: auto;
    margin-bottom: var(--space-4);
  }

  .hiw-content {
    text-align: center;
  }

  .step-benefits {
    align-items: center;
    /* Center list items effectively? */
    text-align: left;
  }

  .step-benefits li {
    width: 100%;
    justify-content: flex-start;
  }
}