/* ============ HOW IT WORKS SECTION ============ */
.how-it-works {
  position: relative;
  padding: 120px 0;
  background: var(--dark-bg);
  overflow: hidden;
}

/* Background Effects */
.hiw-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hiw-orb-1 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.12), transparent);
  top: 10%;
  left: -150px;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 10s ease-in-out infinite;
}

.hiw-orb-2 {
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08), transparent);
  bottom: 10%;
  right: -150px;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 12s ease-in-out infinite reverse;
}

.grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(124, 92, 252, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 252, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hiw-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 92, 252, 0.15);
  border: 1px solid rgba(124, 92, 252, 0.3);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-badge i {
  animation: iconFloat 3s ease-in-out infinite;
}

.section-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-description {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Timeline Wrapper */
.timeline-wrapper {
  position: relative;
  margin-bottom: 80px;
}

/* Connecting Line */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 50px;
  bottom: 50px;
  width: 3px;
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(124, 92, 252, 0.15);
  border-radius: 3px;
}

.line-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--gradient-1);
  border-radius: 3px;
  transition: height 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(124, 92, 252, 0.4);
}

.line-dots {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.line-dot {
  width: 16px;
  height: 16px;
  background: var(--dark-card);
  border: 3px solid rgba(124, 92, 252, 0.3);
  border-radius: 50%;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.5s ease;
}

.line-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(124, 92, 252, 0.6);
}

/* Timeline Steps */
.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* Step Card */
.step-card {
  position: relative;
  z-index: 2;
}

.step-card-inner {
  display: grid;
  grid-template-columns: 80px 1fr 200px;
  gap: 30px;
  background: var(--dark-card);
  border: 1px solid rgba(124, 92, 252, 0.15);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.step-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-1);
  transform: scaleY(0);
  transition: transform 0.5s ease;
  transform-origin: top;
}

.step-card-inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 50%, rgba(124, 92, 252, 0.05), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.step-card:hover .step-card-inner {
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(124, 92, 252, 0.15);
  transform: translateX(10px);
}

.step-card:hover .step-card-inner::before {
  transform: scaleY(1);
}

.step-card:hover .step-card-inner::after {
  opacity: 1;
}

/* Step Number */
.step-number-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.step-number {
  position: relative;
  width: 60px;
  height: 60px;
  background: rgba(124, 92, 252, 0.1);
  border: 2px solid rgba(124, 92, 252, 0.3);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.step-number span {
  font-size: 24px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.number-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--primary);
  border-radius: 50%;
  filter: blur(25px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.step-card:hover .step-number {
  background: var(--gradient-1);
  border-color: transparent;
  transform: scale(1.05);
}

.step-card:hover .step-number span {
  -webkit-text-fill-color: white;
}

.step-card:hover .number-glow {
  opacity: 0.3;
}

.step-icon-circle {
  width: 40px;
  height: 40px;
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--primary);
  transition: all 0.4s ease;
}

.step-card:hover .step-icon-circle {
  background: var(--primary);
  color: white;
  transform: rotate(360deg);
}

/* Step Content */
.step-content {
  position: relative;
  z-index: 1;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 12px;
}

.step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 15px;
}

.step-details {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.step-details li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.step-details li i {
  color: var(--success);
  font-size: 14px;
}

.step-action {
  margin-top: 5px;
}

.step-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.step-link:hover {
  gap: 12px;
  color: var(--secondary);
}

.step-link i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

/* Step Illustration */
.step-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
}

.illustration-container {
  position: relative;
  width: 160px;
  height: 160px;
}

.illustration-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(124, 92, 252, 0.1);
  border: 2px solid rgba(124, 92, 252, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary);
  z-index: 2;
  transition: all 0.4s ease;
}

.step-card:hover .illustration-icon {
  background: var(--gradient-1);
  border-color: transparent;
  color: white;
  transform: translate(-50%, -50%) scale(1.1);
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.float-element {
  position: absolute;
  width: 35px;
  height: 35px;
  background: var(--dark-surface);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  animation: floatAround 4s ease-in-out infinite;
  transition: all 0.3s ease;
}

.step-card:hover .float-element {
  border-color: var(--primary);
  color: var(--primary);
}

.el-1 {
  top: 10px;
  left: 10px;
  animation-delay: 0s;
}

.el-2 {
  top: 10px;
  right: 10px;
  animation-delay: -1.5s;
}

.el-3 {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: -3s;
}

/* Step Connector */
.step-connector {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.step-connector i {
  font-size: 20px;
  color: rgba(124, 92, 252, 0.3);
  animation: bounceDown 2s ease-in-out infinite;
}

.step-card:last-child .step-connector {
  display: none;
}

/* CTA Banner */
.hiw-cta {
  margin-bottom: 60px;
}

.hiw-cta .cta-content {
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.1), rgba(0, 212, 255, 0.05));
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: 24px;
  padding: 50px 60px;
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
}

.hiw-cta .cta-content::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.15), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.cta-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: white;
  flex-shrink: 0;
  animation: iconFloat 3s ease-in-out infinite;
}

.cta-text {
  flex: 1;
}

.cta-text h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cta-text p {
  font-size: 15px;
  color: var(--text-secondary);
}

.cta-actions {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}

.cta-primary {
  padding: 14px 30px;
  background: var(--gradient-1);
  border: none;
  border-radius: 50px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 10px 25px rgba(124, 92, 252, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(124, 92, 252, 0.5);
}

.cta-secondary {
  padding: 14px 30px;
  background: transparent;
  border: 2px solid rgba(124, 92, 252, 0.3);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cta-secondary:hover {
  background: rgba(124, 92, 252, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Trust Indicators */
.hiw-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 30px 40px;
  background: var(--dark-card);
  border: 1px solid rgba(124, 92, 252, 0.15);
  border-radius: 20px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-item i {
  font-size: 22px;
  color: var(--success);
  flex-shrink: 0;
}

.trust-text {
  display: flex;
  flex-direction: column;
}

.trust-text strong {
  font-size: 14px;
  color: var(--text-primary);
}

.trust-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.trust-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(124, 92, 252, 0.2), transparent);
}

/* ============ ANIMATIONS ============ */
@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

@keyframes iconFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatAround {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(8px, -8px) scale(1.1);
  }

  50% {
    transform: translate(-5px, 5px) scale(0.9);
  }

  75% {
    transform: translate(-8px, -3px) scale(1.05);
  }
}

@keyframes bounceDown {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }

  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
  .step-card-inner {
    grid-template-columns: 60px 1fr;
    gap: 20px;
    padding: 30px;
  }

  .step-illustration {
    display: none;
  }

  .hiw-cta .cta-content {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
  }

  .cta-actions {
    justify-content: center;
  }

  .hiw-trust {
    gap: 20px;
  }

  .trust-divider {
    display: none;
  }
}

@media (max-width: 768px) {
  .how-it-works {
    padding: 80px 0;
  }

  .hiw-container {
    padding: 0 30px;
  }

  .section-title {
    font-size: 32px;
  }

  .timeline-line {
    left: 30px;
  }

  .step-card-inner {
    grid-template-columns: 60px 1fr;
    padding: 25px;
    margin-left: 20px;
  }

  .step-title {
    font-size: 20px;
  }

  .hiw-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hiw-container {
    padding: 0 20px;
  }

  .section-title {
    font-size: 28px;
  }

  .step-card-inner {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .step-number-wrapper {
    flex-direction: row;
    justify-content: flex-start;
    gap: 15px;
  }

  .timeline-line {
    display: none;
  }

  .step-connector {
    margin-left: 0;
  }
}