/* Enhanced How It Works Section */
.how-it-works {
  padding: 6rem 0;
  background-color: var(--white);
  position: relative;
  overflow: hidden;
}

/* Improved background pattern with subtle animation */
.how-it-works::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%234285f4' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.5;
  animation: subtleBgShift 60s linear infinite;
}

@keyframes subtleBgShift {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  position: relative;
}

/* Add connecting lines between steps */
.steps::before {
  content: '';
  position: absolute;
  top: 3rem;
  left: calc(16.67% + 1.25rem);
  width: calc(66.67% - 2.5rem);
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  z-index: 0;
}

.step {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(66, 133, 244, 0.1);
}

.step:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(66, 133, 244, 0.3);
}

.step::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  box-shadow: 0 10px 20px rgba(66, 133, 244, 0.3);
}

.step:nth-child(1)::before {
  content: '1';
}

.step:nth-child(2)::before {
  content: '2';
}

.step:nth-child(3)::before {
  content: '3';
}

.step h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
}

.step p {
  color: var(--gray);
  line-height: 1.6;
  font-size: 1.05rem;
}

/* Add icons to each step */
.step:nth-child(1) {
  border-top: 4px solid var(--primary);
}

.step:nth-child(2) {
  border-top: 4px solid var(--accent);
}

.step:nth-child(3) {
  border-top: 4px solid var(--secondary);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .steps {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .steps::before {
    display: none;
  }
  
  .step {
    margin-bottom: 3rem;
  }
  
  .step::before {
    top: -30px;
  }
}

/* Animation for steps */
.step {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.step:nth-child(1) {
  animation-delay: 0.2s;
}

.step:nth-child(2) {
  animation-delay: 0.4s;
}

.step:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}