/* ============================================================
   styles.css — Diagnóstico IA Express v3
   v3: fix mockup producción, sección experto, hero autoridad
   ============================================================ */

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */

/* Cuadrícula tecnológica de fondo */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Blob de acento naranja */
.hero-glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(249,115,22,0.14) 0%, transparent 68%);
  pointer-events: none;
}

/* Badge "En vivo / Gratuito" */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.35);
  color: #FDBA74;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 6px 14px;
  border-radius: 100px;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background: #F97316;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulsar 2s ease-in-out infinite;
}

@keyframes pulsar {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(1.35); }
}

/* Texto de acento en el h1 */
.hero-accent { color: #F97316; }

/* Badges de confianza bajo el CTA */
.trust-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #93C5FD;
  font-weight: 500;
}

.trust-check { color: #34D399; font-weight: 700; }

/* Frase de autoridad bajo los trust badges */
.hero-autoridad {
  margin-top: 18px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.42);
  line-height: 1.65;
  max-width: 440px;
}
.hero-autoridad strong { color: rgba(255,255,255,0.72); font-weight: 600; }

/* ── Mockup card del hero — FIX PRODUCCIÓN v3 ──────────────
   Base: fondo sólido oscuro, siempre visible en cualquier
   navegador. El efecto blur se aplica solo si el browser lo
   soporta (progressive enhancement con @supports).
   Esto corrige el bug donde en producción backdrop-filter
   falla y rgba(255,255,255,0.06) era prácticamente invisible.
─────────────────────────────────────────────────────────── */
.hero-mockup {
  background: rgba(10, 20, 45, 0.90);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,0.40), 0 0 0 1px rgba(255,255,255,0.04);
  transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.4s ease;
  width: 100%;
  max-width: 360px;
}

@supports (backdrop-filter: blur(10px)) {
  .hero-mockup {
    background: rgba(10, 20, 45, 0.70);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.hero-mockup:hover {
  transform: perspective(900px) rotateY(0deg) rotateX(0deg);
}

.mockup-bar-header {
  background: rgba(255,255,255,0.07);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup-dot:nth-child(1) { background: #EF4444; }
.mockup-dot:nth-child(2) { background: #EAB308; }
.mockup-dot:nth-child(3) { background: #22C55E; }

.mockup-title-text {
  margin-left: auto;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.mockup-body { padding: 20px 22px 22px; }

.mockup-tag {
  display: inline-block;
  background: rgba(249,115,22,0.22);
  color: #FDBA74;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.mockup-name {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.mockup-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin-bottom: 16px;
}

.mockup-stat { margin-bottom: 13px; }

.mockup-stat-label {
  display: block;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-bottom: 5px;
}

.mockup-bar-track {
  height: 7px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.mockup-bar-fill {
  height: 100%;
  border-radius: 4px;
  animation-duration: 2.5s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
  width: 0;
}

.mockup-bar-fill-orange {
  background: linear-gradient(90deg, #F97316, #EA580C);
  animation-name: fill-80;
}

.mockup-bar-fill-blue {
  background: linear-gradient(90deg, #3B82F6, #1D4ED8);
  animation-name: fill-60;
}

.mockup-bar-fill-green {
  background: linear-gradient(90deg, #22C55E, #16A34A);
  animation-name: fill-50;
}

@keyframes fill-80 { 0%{width:0} 100%{width:80%} }
@keyframes fill-60 { 0%,40%{width:0} 100%{width:60%} }
@keyframes fill-50 { 0%,60%{width:0} 100%{width:50%} }

.mockup-cta-pill {
  display: block;
  background: #F97316;
  color: #fff;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 16px;
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════════════
   SECCIÓN PREVIEW — "Lo que recibes en 3 minutos"
══════════════════════════════════════════════════════════════ */
.recibo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.recibo-card {
  background: #fff;
  border-radius: 16px;
  padding: 26px 22px 22px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 10px rgba(30,58,95,0.05);
  transition: transform 0.22s, box-shadow 0.22s;
  position: relative;
  overflow: hidden;
}

.recibo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.recibo-card-1::before { background: linear-gradient(90deg, #F97316, #EA6A0A); }
.recibo-card-2::before { background: linear-gradient(90deg, #1E3A5F, #2D5A8E); }
.recibo-card-3::before { background: linear-gradient(90deg, #22C55E, #16A34A); }
.recibo-card-4::before { background: linear-gradient(90deg, #EAB308, #CA8A04); }

.recibo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(30,58,95,0.11);
}

.recibo-emoji {
  font-size: 2.1rem;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.recibo-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9CA3AF;
  margin-bottom: 5px;
  display: block;
}

.recibo-titulo {
  font-size: 0.97rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 6px;
  line-height: 1.35;
}

.recibo-desc {
  font-size: 0.8rem;
  color: #6B7280;
  line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════
   SECCIÓN PROBLEMA — Cards mejoradas
══════════════════════════════════════════════════════════════ */
.problema-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 8px rgba(30,58,95,0.04);
  transition: box-shadow 0.25s, transform 0.25s;
}

.problema-card:hover {
  box-shadow: 0 12px 32px rgba(30,58,95,0.12);
  transform: translateY(-4px);
}

.problema-emoji {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 14px;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════════
   CÓMO FUNCIONA — Iconos de paso
══════════════════════════════════════════════════════════════ */
.paso-icono {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A5F, #2D5A8E);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(30,58,95,0.28);
}

/* ══════════════════════════════════════════════════════════════
   FORMULARIO — Contenedor elegante
══════════════════════════════════════════════════════════════ */
.form-container {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 8px 40px rgba(30,58,95,0.09);
  padding: 40px 38px;
}

/* Barra de progreso mejorada */
.progress-track {
  background: #E5E7EB;
  border-radius: 8px;
  height: 8px;
  position: relative;
  overflow: visible;
}

.barra-progreso-relleno {
  height: 8px;
  background: linear-gradient(90deg, #1E3A5F 0%, #2563EB 60%, #F97316 100%);
  border-radius: 8px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.barra-progreso-relleno::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: #2563EB;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #2563EB;
}

/* Opciones del formulario */
.opcion-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  background: #fff;
  font-size: 0.95rem;
  line-height: 1.45;
  user-select: none;
}

.opcion-card:hover {
  border-color: #2D5A8E;
  background: #F8FAFF;
  box-shadow: 0 2px 8px rgba(30,58,95,0.07);
}

.opcion-card:has(input:checked) {
  border-color: #1E3A5F;
  background: #EEF2FF;
  box-shadow: 0 2px 12px rgba(30,58,95,0.1);
}

.opcion-card input[type="radio"],
.opcion-card input[type="checkbox"] {
  accent-color: #1E3A5F;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

/* Pasos del formulario */
.form-step { display: none; }

.form-step.activo {
  display: block;
  animation: fadeSlideUp 0.28s ease forwards;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   CARGANDO
══════════════════════════════════════════════════════════════ */
.spinner {
  width: 56px;
  height: 56px;
  border: 5px solid #E5E7EB;
  border-top-color: #F97316;
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes girar { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   RESULTADO — Estilo reporte ejecutivo
══════════════════════════════════════════════════════════════ */
.resultado-header {
  background: linear-gradient(135deg, #162D4A 0%, #1E3A5F 50%, #2D5A8E 100%);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.resultado-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.resultado-header::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(249,115,22,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.result-card {
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  border-left: 4px solid transparent;
  animation: fadeSlideUp 0.4s ease forwards;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.result-card-label {
  display: block;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 8px;
}

.result-card-dolor {
  background: #FFF7ED;
  border-left-color: #F97316;
  border-color: #FED7AA;
}
.result-card-dolor .result-card-label { color: #C2410C; }

.result-card-asistente {
  background: #F0F9FF;
  border-left-color: #1E3A5F;
  border-color: #BAE6FD;
}
.result-card-asistente .result-card-label { color: #1E3A5F; }

.result-card-inversion {
  background: #F0FDF4;
  border-left-color: #22C55E;
  border-color: #BBF7D0;
}
.result-card-inversion .result-card-label { color: #15803D; }

.result-card-paso {
  background: #FFFBEB;
  border-left-color: #EAB308;
  border-color: #FDE68A;
}
.result-card-paso .result-card-label { color: #92400E; }

.result-card-encuadre {
  background: #F8FAFC;
  border-left-color: #94A3B8;
  border-color: #E2E8F0;
}
.result-card-encuadre .result-card-label { color: #64748B; }

/* Lista de qué resuelve / no resuelve */
.resultado-lista li {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   BOTONES
══════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #F97316, #EA6A0A);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(249,115,22,0.32);
}

.btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249,115,22,0.42); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1E3A5F;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-secondary:hover { background: #162D4A; transform: translateY(-1px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #1E3A5F;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 12px;
  border: 2px solid #1E3A5F;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-outline:hover { background: #EEF2FF; transform: translateY(-1px); }

/* ══════════════════════════════════════════════════════════════
   UTILIDADES
══════════════════════════════════════════════════════════════ */
.oculto { display: none !important; }

/* Tarjeta de dolor original (sección problema) */
.dolor-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  transition: box-shadow 0.2s;
}
.dolor-card:hover { box-shadow: 0 4px 16px rgba(30,58,95,0.10); }

/* ══════════════════════════════════════════════════════════════
   SECCIÓN EXPERTO — Sergio Londoño / Criterio detrás del diagnóstico
══════════════════════════════════════════════════════════════ */
.experto-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A5F, #2D5A8E);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 28px rgba(30,58,95,0.32);
  letter-spacing: 0.02em;
}

.experto-pilar {
  background: #fff;
  border-radius: 16px;
  padding: 26px 22px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 10px rgba(30,58,95,0.05);
  transition: transform 0.22s, box-shadow 0.22s;
}

.experto-pilar:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(30,58,95,0.12);
}

.experto-pilar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.experto-pilar h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 8px;
  line-height: 1.35;
}

.experto-pilar p {
  font-size: 0.8rem;
  color: #6B7280;
  line-height: 1.6;
}

.experto-nota-aliados {
  background: rgba(30,58,95,0.05);
  border: 1px solid rgba(30,58,95,0.12);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.8rem;
  color: #374151;
  line-height: 1.65;
  margin-top: 24px;
  text-align: center;
}

.experto-nota-aliados strong { color: #1E3A5F; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .result-card { padding: 18px 16px; }
  .resultado-header { padding: 22px 18px; }
  .form-container { padding: 24px 18px; border-radius: 14px; }
  .btn-primary, .btn-secondary, .btn-outline { width: 100%; justify-content: center; }
  .trust-row { justify-content: center; }
  .hero-mockup { display: none; }
  .barra-progreso-relleno::after { display: none; }
  .experto-avatar { width: 64px; height: 64px; font-size: 1.1rem; }
  .hero-autoridad { max-width: 100%; text-align: center; }
}

/* ══════════════════════════════════════════════════════════════
   IMPRESIÓN — Solo mostrar resultado
══════════════════════════════════════════════════════════════ */
@media print {
  #sec-hero, #sec-preview-resultado, #sec-experto, #sec-problema,
  #sec-como-funciona, #sec-que-recibes, #sec-formulario,
  #sec-cargando, #sec-prueba-social, #sec-garantia,
  footer, .cta-bloque { display: none !important; }
  #sec-resultado { display: block !important; }
}
