/* ── CÓMO FUNCIONA ── */
#como-funciona {
  padding: 120px 5%;
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}

#como-funciona::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0.5px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

#como-funciona::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0.5px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

/* ── STEPS ── */
.steps-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

/* Línea conectora horizontal (desktop) */
.steps-connector {
  position: absolute;
  top: 36px;
  left: calc(12.5% + 24px);
  right: calc(12.5% + 24px);
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.steps-connector-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 1.2s ease;
}

.steps-connector-fill.active {
  width: 100%;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

/* ── STEP CARD ── */
.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
  opacity: 0;
  transform: translateY(28px);
}

.step-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Círculo numerado */
.step-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  transition: border-color 0.3s, background 0.3s;
  flex-shrink: 0;
}

.step-card.visible .step-circle {
  border-color: var(--blue);
}

.step-card:nth-child(4) .step-circle,
.step-card:nth-child(4).visible .step-circle {
  border-color: var(--teal);
  background: rgba(29, 158, 117, 0.08);
}

.step-num {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.step-card:nth-child(4) .step-num {
  color: var(--teal);
}

/* Ícono dentro del círculo (superpuesto al número) */
.step-circle svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 26px;
  height: 26px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.3s;
}

.step-card:nth-child(4) .step-circle svg {
  stroke: var(--teal);
}

.step-circle:hover svg,
.step-circle:hover .step-num {
  opacity: 1;
}

.step-circle:hover .step-num {
  opacity: 0;
}

/* Contenido */
.step-body {
  flex: 1;
}

.step-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.step-card:nth-child(4) .step-label {
  color: var(--teal);
}

.step-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  font-weight: 300;
}

/* ── CTA INLINE ── */
.como-funciona-cta {
  text-align: center;
  margin-top: 72px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease 0.6s, transform 0.5s ease 0.6s;
}

.como-funciona-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

.como-funciona-cta p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 300;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .steps-connector { display: none; }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 560px) {
  #como-funciona { padding: 80px 5%; }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .step-card {
    flex-direction: row;
    text-align: left;
    gap: 20px;
    align-items: flex-start;
  }

  .step-circle {
    margin-bottom: 0;
    flex-shrink: 0;
  }
}