/* Seção Como Funciona */
.how-it-works {
  padding: 8rem 5%;
  background-color: var(--white);
  position: relative;
  overflow: hidden;
}

.how-it-works::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%23f5f7fa" d="M0,0 L100,0 L100,100 L0,100 Z"></path></svg>')
    no-repeat;
  background-size: cover;
  z-index: 0;
  opacity: 0.7;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards 0.2s;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border-radius: 3px;
}

.section-header .subtitle {
  font-size: 1.2rem;
  color: #78909c;
  max-width: 700px;
  margin: 0 auto;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

.step-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  opacity: 0;
  transform: translateY(30px);
}

.step-card:nth-child(1) {
  animation: fadeInUp 0.8s forwards 0.4s;
}

.step-card:nth-child(2) {
  animation: fadeInUp 0.8s forwards 0.6s;
}

.step-card:nth-child(3) {
  animation: fadeInUp 0.8s forwards 0.8s;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
}

.step-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.step-number {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  position: relative;
}

.step-number::after {
  content: '';
  position: absolute;
  width: 70px;
  height: 70px;
  background: rgba(94, 53, 177, 0.1);
  border-radius: 50%;
  z-index: -1;
}

.step-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.step-icon svg {
  width: 100%;
  height: 100%;
}

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

.step-card p {
  color: #78909c;
  font-size: 1.05rem;
}

.cta-container {
  text-align: center;
  margin-top: 4rem;
  opacity: 0;
  animation: fadeIn 1s forwards 1s;
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(94, 53, 177, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(94, 53, 177, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(94, 53, 177, 0);
  }
}

@media (max-width: 768px) {
  .how-it-works {
    padding: 5rem 5%;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .steps-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
