/* ===========================
   04. CÓMO FUNCIONA — VARIANTE OSCURA
   Fondo morado profundo con degradados sutiles. Textos en blanco/gris claro.
   La caja .cf-steps usa una variante translúcida en lugar de blanca.
=========================== */
#como-funciona {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(107,31,184,0.35), transparent 70%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(255,107,26,0.16), transparent 70%),
    linear-gradient(180deg, #1a0a3e 0%, #150832 60%, #1a0a3e 100%);
  padding: 121px 0 120px;
  margin-top: -1px;
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Cubre el borde/seam de subpíxel que Chrome muestra entre PULSE360 y esta sección en pantallas desktop. */
#como-funciona::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 4px;
  background: #1a0a3e;
  pointer-events: none;
  z-index: 0;
}

#como-funciona > .section-inner {
  position: relative;
  z-index: 1;
}

/* Override de los títulos compartidos para tema oscuro */
#como-funciona .section-title { color: #fff; }
#como-funciona .section-sub { color: rgba(255,255,255,0.72); }
/* .section-label (naranja) ya destaca correctamente */

.cf-header { margin-bottom: 72px; }

/* ---- Container "cf-steps" en versión oscura ---- */
.cf-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 44px 34px 38px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    radial-gradient(circle at 16% 0%, rgba(107,31,184,0.32), transparent 38%),
    radial-gradient(circle at 82% 100%, rgba(255,107,26,0.20), transparent 42%);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Línea horizontal que conecta los pasos (más brillante sobre oscuro) */
.cf-steps::before {
  content: '';
  position: absolute;
  left: 42px;
  right: 42px;
  top: 54px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.06),
    rgba(160, 100, 255, 0.85),
    rgba(255, 140, 60, 0.95),
    rgba(255,255,255,0.06));
  box-shadow:
    0 0 22px rgba(160, 100, 255, 0.45),
    0 0 26px rgba(255, 140, 60, 0.30);
  z-index: 0;
}

/* Veil sutil con noise para textura premium */
.cf-steps::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.08) 42%, transparent 58%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.2'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.18;
}

@media (max-width: 900px) {
  .cf-steps {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 28px;
  }
  .cf-steps::before { display: none; }
}
@media (max-width: 500px) {
  .cf-steps {
    grid-template-columns: 1fr;
    padding: 22px;
  }
}

/* SVG connector (línea animada que se dibuja con scroll) */
.cf-connector {
  position: absolute;
  top: 54px; left: 42px; right: 42px;
  height: 2px;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(255,140,60,0.4));
}
@media (max-width: 900px) { .cf-connector { display: none; } }

/* ---- Cada paso ---- */
.cf-step {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 34px 18px 10px;
  border-radius: 18px;
  transition: transform 0.35s var(--ease-out), background 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

/* Punto sobre la línea: bola con degradado de marca y halo */
.cf-step::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--grad-btn);
  box-shadow:
    0 0 0 6px rgba(107,31,184,0.20),
    0 0 24px rgba(255,107,26,0.55);
  z-index: 3;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.cf-step::after {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.95);
  z-index: 4;
}

.cf-step:hover {
  transform: translateY(-8px);
  background: rgba(255,255,255,0.06);
  box-shadow:
    0 18px 48px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.10);
}
.cf-step:hover::before {
  transform: translateX(-50%) scale(1.2);
  box-shadow:
    0 0 0 8px rgba(107,31,184,0.25),
    0 0 30px rgba(255,107,26,0.65),
    0 0 34px rgba(160,100,255,0.45);
}

/* ---- Numerador 01/02/03/04 ---- */
/* En tema claro era una píldora blanca con borde degradado.
   En tema oscuro: caja translúcida con borde degradado y texto blanco. */
.cf-step-num {
  min-width: 46px;
  height: 24px;
  padding: 0 13px;
  border-radius: 999px;
  background:
    linear-gradient(rgba(255,255,255,0.06), rgba(255,255,255,0.06)) padding-box,
    var(--grad-btn) border-box;
  border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 18px;
  position: relative;
  transition: color 0.3s, box-shadow 0.3s, transform 0.3s, background 0.3s;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(107,31,184,0.30);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cf-step:hover .cf-step-num {
  background: var(--grad-btn);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(255,107,26,0.40);
}

/* ---- Iconos (eran naranja, mantenemos pero más vibrantes) ---- */
.cf-step-icon {
  width: 40px; height: 40px; margin-bottom: 16px;
  color: var(--orange);
  filter: drop-shadow(0 8px 20px rgba(255,107,26,0.45));
  transition: transform 0.35s var(--ease-out), color 0.35s var(--ease-out), filter 0.35s var(--ease-out);
}
.cf-step:hover .cf-step-icon {
  color: #d29eff;  /* lavanda claro al hover (en lugar de morado oscuro) */
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 10px 24px rgba(210,158,255,0.50));
}

/* ---- Texto de cada paso ---- */
.cf-step h3 {
  font-size: 15px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff;
  margin-bottom: 10px;
}
.cf-step p {
  font-size: 14px; line-height: 1.6;
  color: rgba(255,255,255,0.72);
}
