/* ============================================================
   1. VARIABLES GLOBALES Y TOKENS DE DISEÑO - MEMORYTALE
   ✅ Optimizado: eliminadas duplicidades, mejor organización
============================================================ */
:root {
  /* --- Colores Principales (Marca) --- */
  --primary-color: #5e3b4d;
  --primary-light: #7e5b6d;
  --primary-dark: #3e1b2d;
  --secondary-color: #e6c9bc;
  --secondary-light: #f6e9dc;
  --secondary-dark: #c6a99c;
  
  /* --- Colores de Texto y Fondo --- */
  --text-color: #2c2c2c;
  --text-light: #6c6c6c;
  --background-color: #faf7f5;
  --border-color: #e0ddd9;
  --white: #ffffff;
  
  /* --- Colores de Estado --- */
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  
  /* --- Tipografía (Unificada) --- */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;        /* ✅ Unificado a Lato */
  --font-accent: 'Quicksand', sans-serif;
  
  /* --- Efectos y Transiciones --- */
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  
  /* --- Variables Específicas del Diálogo de Resumen --- */
  --dialog-primary: #5d2d46;              /* ✅ Renombrado para claridad */
  --dialog-primary-50: #f4e7ee;
  --dialog-danger: #d72651;
  --dialog-radius: 22px;
  --dialog-shadow: 0 14px 28px rgba(0,0,0,.18);
  
  /* --- Optimización y Accesibilidad --- */
  --modal-padding: clamp(1.5rem, 4vw, 2.5rem);
  --tap-size: 48px;
  /* Logo responsive */
--logo-max-w : clamp(140px, 18vw, 220px);
--logo-max-h : clamp(45px,  6vw,  80px);

}

/* ============================================================
   2. RESET Y ESTILOS BASE
   ✅ Consolidado y optimizado para máxima compatibilidad
============================================================ */

/* Reset universal mejorado */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base HTML con tipografía escalable */
html {
  font-family: var(--font-body);
  scroll-behavior: smooth;
  font-size: 16px; /* Base para cálculos rem */
}

/* Body con herencia optimizada */
body {
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  
  /* Renderizado de texto optimizado */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Soporte para dispositivos con notch */
  padding-top: env(safe-area-inset-top);
}

/* Elementos multimedia responsivos */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Bloqueo de scroll cuando modal está abierto */
body.modal-open {
  overflow: hidden;
}

/* ============================================================
   3. TIPOGRAFÍA Y JERARQUÍA VISUAL
   ✅ Estilos base consolidados con escalado fluido y accesibilidad
============================================================ */

/* Contenedor principal de contenido */
.container {
  width: min(90%, 1200px); /* 90% en móvil, hasta 1200px en escritorio */
  margin: 0 auto;
  padding: 0 1.25rem; /* 20px convertido a rem */
}

/* Espaciado base para todas las secciones */
section {
  padding: 5rem 0; /* 80px convertido a rem */
}

/* --- Títulos con escalado fluido --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem); /* Escala de 2.5rem a 3.5rem */
  margin-bottom: 1.875rem; /* 30px convertido a rem */
}

h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.5rem); /* Escala de 1.8rem a 2.5rem */
  margin-bottom: 1.5625rem; /* 25px convertido a rem */
  text-align: center;
}

h3 {
  font-size: clamp(1.5rem, 3.5vw, 1.8rem); /* Escala de 1.5rem a 1.8rem */
  margin-bottom: 1.25rem; /* 20px convertido a rem */
}

h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-bottom: 1rem;
}

h5 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 0.875rem;
}

h6 {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  margin-bottom: 0.75rem;
}

/* --- Párrafos optimizados --- */
p {
  margin-bottom: 1.25rem; /* 20px convertido a rem */
  line-height: 1.6;
}

/* --- Enlaces con estados accesibles --- */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover,
a:focus {
  color: var(--primary-dark);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
/* ============================================================
   4. COMPONENTES REUTILIZABLES
   ✅ Botones, inputs, tarjetas y elementos interactivos consolidados
============================================================ */

/* --- Elementos multimedia responsive --- */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Botones base con accesibilidad táctil --- */
button, .btn {
  cursor: pointer;
  font-family: var(--font-accent);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  border: none;
  font-size: 1rem;
  transition: var(--transition);
  text-align: center;
  display: inline-block;
  touch-action: manipulation;
  min-height: var(--tap-size); /* Accesibilidad táctil */
  line-height: 1.2;
}

/* Botón primario */
.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Botón secundario */
.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-dark);
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  transform: translateY(-1px);
}

/* Botón deshabilitado */
.btn:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* --- Campos de formulario unificados --- */
input[type="text"],
input[type="email"], 
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: #fdfcfc;
  transition: var(--transition);
  box-sizing: border-box;
  line-height: 1.4;
}

/* Estados de focus para campos */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(94, 59, 77, 0.1);
}

/* Textarea específico */
textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-body);
}

/* --- Estados de accesibilidad para botones --- */
.btn:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* --- Spinner de carga global --- */
.loading-spinner {
  margin: 2rem auto;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  display: block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Accesibilidad para lectores de pantalla --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

/* --- Tarjetas base --- */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
/* ============================================================
   5. FORMULARIO MODAL COMPLETO - WIZARD PASO A PASO
   ✅ Estructura consolidada del sistema de formulario dinámico
============================================================ */

/* --- 5.1. Estructura Base del Modal --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  padding: 1rem;
  align-items: center;
  justify-content: center;
}

.modal-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 850px;
  height: 100%;
  max-height: 95vh;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* --- 5.2. Header del Modal --- */
.modal-header {
  flex-shrink: 0;
  position: relative;
  padding: 1.5rem 2rem 2.5rem;
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.modal-header .progress-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--white);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
  font-weight: 600;
}

.modal-header-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.4;
}

/* --- 5.3. Barra de Progreso del Wizard --- */
.modal-header .wizard-progress {
  height: 6px;
  max-width: 80%;
  margin: 1rem auto 0;
  display: block;
  appearance: none;
  border: none;
  border-radius: 4px;
}

.modal-header .wizard-progress::-webkit-progress-bar {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.modal-header .wizard-progress::-webkit-progress-value {
  background-color: var(--secondary-light);
  border-radius: 4px;
}

.modal-header .wizard-progress::-moz-progress-bar {
  background-color: var(--secondary-light);
  border-radius: 4px;
}

/* --- 5.4. Botón de Cerrar Modal --- */
.modal-header .close-modal {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  background: none;
  border: none;
  top: 1rem;
  right: 1rem;
  transition: all 0.2s ease;
}

.modal-header .close-modal:hover {
  background-color: rgba(0, 0, 0, 0.3);
  transform: rotate(90deg);
}
/* =================================
   Barra de Anuncios Superior
   ================================= */
.promo-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative; /* Para posicionar el botón de cerrar */
  padding: 0.75rem 2.5rem; /* Espacio interno y espacio para el botón */
  background-color: var(--primary-color); /* Usa el color principal de tu marca */
  color: var(--white);
  text-align: center;
}

.promo-message {
  margin: 0;
  font-family: var(--font-accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.promo-message strong {
  font-weight: 700;
}

.close-promo-btn {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.close-promo-btn:hover {
  opacity: 1;
}

/* Ocultamos la barra si tiene la clase 'hidden' */
.promo-bar.hidden {
  display: none;
}

/* --- 5.5. Cuerpo del Modal --- */
.modal-body {
  flex-grow: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* --- 5.6. Sistema de Pasos del Formulario --- */
.form-step {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.form-step.active {
  display: block;
  opacity: 1;
  transform: none;
}

/* --- 5.7. Grupos de Campos del Formulario --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-family: var(--font-accent);
}

/* --- 5.8. Títulos de Preguntas del Wizard --- */
.question-title,
#form-modal h3.question-title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--primary-dark);
  text-align: center;
  margin: 0 auto 1.5rem;
  line-height: 1.4;
}

/* --- 5.9. Contador de Pasos --- */
.step-counter {
  display: block;
  width: fit-content;
  margin: 0 auto 1.5rem auto;
  background: rgba(94, 59, 77, 0.08);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: var(--font-accent);
}

.step-counter:empty {
  display: none;
}

/* --- 5.10. Navegación del Formulario --- */
.form-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.form-navigation .btn {
  min-height: var(--tap-size);
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  max-width: 200px;
    width:auto;          /* ← NUEVO: anula el 100 % heredado */
}

/* --- 5.11. Tarjetas de Selección de Destinatario --- */
.recipient-options.recipient-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0 auto;
  max-width: 580px;
}

.recipient-options .recipient-option {
  background-color: var(--white);
  border: 2px solid #f0e9e6;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.recipient-options .recipient-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(94, 59, 77, 0.08);
  border-color: var(--secondary-color);
}

.recipient-options .recipient-option.selected {
  border-color: var(--primary-color);
  background-color: rgba(94, 59, 77, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(94, 59, 77, 0.15);
}

/* --- 5.12. Iconos y Textos de las Tarjetas --- */
.recipient-icon {
  margin-bottom: 0.5rem;
}

.recipient-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--primary-light);
  opacity: 0.9;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.card-subtitle {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.4;
  margin: 0;
  font-style: italic;
}

/* --- 5.13. Estados Responsive del Modal --- */
/* --- 5.13. Estados Responsive del Modal (CORREGIDO) --- */
@media (max-width: 767px) {
  .modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .modal-body {
    padding: 1.25rem;
    overflow-x: hidden; /* ✅ CLAVE: Previene scroll horizontal */
  }
  
  .form-navigation {
    flex-direction: column-reverse;
    gap: 0.75rem;
    padding: 1.25rem;
  }
  
  .form-navigation .btn {
    width: 100%;
    max-width: none;
  }
  
  .recipient-options.recipient-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    max-width: 100%; /* ✅ CORRECCIÓN: Era 580px */
  }
  
  /* ✅ NUEVAS CORRECCIONES ANTI-SCROLL */
  #consejos-step .consejos-wrapper {
    max-width: 100%; /* ✅ CORRECCIÓN: Era 650px */
    padding: 0 0.5rem; /* Pequeño padding interno */
  }
  
  .form-step .form-group,
  .story-coaching,
  .ejemplos-inspiracion,
  .error-container {
    max-width: 100%; /* ✅ Asegura que ningún elemento se desborde */
    margin-left: auto;
    margin-right: auto;
  }
  
  /* ✅ CORRECCIÓN ESPECÍFICA PARA EL VISOR */
  .visor-content {
    max-width: 100%;
    margin: 0;
    padding: 0.5rem;
  }
  
  .visor-carrusel {
    overflow-x: hidden; /* ✅ Previene scroll en el carrusel */
  }
}
/* Consejos step */
#consejos-step .consejos-wrapper {
  max-width: 650px;
  margin: 0 auto;
  text-align: left;
}

#consejos-step .consejos-intro-box {
  background-color: #fdfaf8;
  border: 1px solid #EAD7DD;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

/* Elementos auxiliares */
.field-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  line-height: 1.4;
  display: block;
}

.form-explanation {
  background-color: #fdfaf8;
  border-left: 3px solid var(--secondary-color);
  padding: 10px 14px;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #5c4a50;
  line-height: 1.5;
}

.dynamic-subtitle {
  font-size: 0.85rem;
  color: var(--primary-color);
  background-color: rgba(94, 59, 77, 0.05);
  border-left: 3px solid var(--primary-color);
  padding: 8px 12px;
  margin-top: 0.75rem;
  border-radius: 4px;
  transition: opacity 0.3s ease;
  font-style: italic;
}

.error-message {
  color: var(--error-color);
  background-color: rgba(244, 67, 54, 0.1);
  border: 1px solid var(--error-color);
  padding: 15px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}
/* ============================================================
   5.14. PREVENCIÓN GLOBAL DE SCROLL HORIZONTAL
   ✅ Regla de seguridad para evitar overflow en móviles
============================================================ */

/* Prevenir scroll horizontal en toda la aplicación */
html {
  overflow-x: hidden;
}

/* Asegurar que todos los elementos del modal respeten el ancho disponible */
.modal-body *,
.visor-overlay * {
  max-width: 100%;
  box-sizing: border-box;
}
/* ============================================================
   5.5. HEADER Y NAVEGACIÓN PRINCIPAL
   ✅ Consolidado con optimizaciones de todos los pasos anteriores
============================================================ */

/* ===== HEADER GENERAL (Unificado y optimizado) ===== */
.main-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: env(safe-area-inset-top, 0);  /* Alineado con notch si aplica */
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: min(90%, 1200px); /* Consolidado del Paso 3 */
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== HEADER – LOGO Responsive Mejorado ===== */
.main-header .logo {
  flex-shrink: 0;
  max-width: 280px;                /* Puedes aumentar a 240px si lo ves pequeño */
  padding: 0.5rem 0;
}

.main-header .logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(75px, 12vh, 115px);  /* Escalable con tope */
  object-fit: contain;
}

/* 1. Re-definimos el contenedor para que funcione con el slogan */
.main-header .logo {
  display: flex;             /* Permite alinear logo y slogan */
  flex-direction: column;    /* Pone el slogan debajo del logo */
  align-items: flex-start;   /* Alinea todo a la izquierda */
  text-decoration: none;     /* Quita el subrayado del enlace */
}

/* 2. Estilos del texto del slogan */
.logo-slogan {
  display: none; /* Oculto por defecto en móviles */
  font-family: var(--font-accent); /* Usamos la fuente 'Quicksand' de tu marca */
  font-size: 0.8rem;               /* Tamaño pequeño y discreto */
  color: var(--text-light);        /* Un color gris suave (#6c6c6c) */
  margin-top: 4px;                 /* Pequeño espacio debajo del logo */
  font-weight: 500;
  letter-spacing: 0.2px;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.main-nav {
  position: absolute;   /* 1. Lo sacamos del flujo normal */
  left: 50%;            /* 2. Lo movemos para que su borde izquierdo empiece en el 50% de la pantalla */
  transform: translateX(-50%); /* 3. Lo movemos hacia la izquierda el 50% de SU PROPIO ANCHO. Esto lo centra perfectamente. */
}

.main-nav ul li {
  display: inline-block;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  font-family: var(--font-accent);
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--primary-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-btn {
  background: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 1.2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-accent);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.header-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ============================================================
   6. SECCIONES DE LANDING PAGE
   ✅ Hero, testimonios, precios, FAQ y footer consolidados
============================================================ */

/* --- 6.1. Sección Hero con Video de Fondo --- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  padding: clamp(5rem, 15vh, 9.375rem) 0;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.9s ease forwards;
}

.hero-cta {
  margin-bottom: 3.75rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-cta .btn {
  padding: 0.75rem 2rem;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1.875rem;
}

.book-mockup,
.mobile-mockup {
  max-height: 18.75rem;
  box-shadow: var(--shadow);
  border-radius: 8px;
  transform: perspective(800px) rotateY(10deg);
}

/* --- 6.2. Sección "¿Cómo Funciona?" --- */
.como-funciona {
  padding: 5rem 1.5rem;
  background-color: #FFF9F7;
  text-align: center;
}

.como-funciona .subtitulo {
  font-size: 1.2rem;
  color: #5B324B;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.pasos-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.paso {
  flex: 1 1 300px;
  max-width: 340px;
  padding: 2.5rem 1.5rem;
  border-radius: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  cursor: pointer;
}

.paso:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(94, 59, 77, 0.12);
}

.paso.paso-1 {
  background-color: #ffffff;
  border-color: #f0e9e6;
}

.paso.paso-2 {
  background-color: #f6e9e4;
  border-color: #e9d9d4;
}

.paso.paso-3 {
  background-color: #e9e2e6;
  border-color: #d9d2d6;
}

.paso-numero {
  display: inline-block;
  background-color: #EAD7DD;
  color: #5B324B;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}

/* --- 6.3. Sección "Para Quién Es" --- */
.buyer-persona-section {
  padding: 4rem 0;
  background-color: #fdfaf8;
  text-align: center;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.875rem;
  margin-top: 2.5rem;
}

a.persona-card {
  display: block;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.persona-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

a.persona-card img {
  width: 100%;
  height: 12.5rem;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.9375rem;
}

a.persona-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.625rem;
}

a.persona-card p {
  font-family: var(--font-accent);
  font-size: 1rem;
  line-height: 1.5;
  color: #6c5f67;
}

.ver-ejemplo-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 10px 20px;
  border: 1px solid var(--secondary-dark);
  color: var(--primary-color);
  border-radius: 999px;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease-in-out;
  cursor: pointer;
}

.persona-card:hover .ver-ejemplo-btn {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  transform: scale(1.05);
}

/* --- 6.4. Sección de Testimonios --- */
.testimonial-stories {
  padding: 5rem 0;
  background-color: var(--white);
  position: relative;
  overflow: hidden;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 800px;
  margin: 2.5rem auto 0;
  justify-items: center;
}

.story-card {
  display: block;
  background: var(--background-color);
  padding: 1.5625rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 700px;
}

.story-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 35px rgba(94, 59, 77, 0.1);
}

.story-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background-color: #e0d9d5;
  margin: 0 auto 1.25rem auto;
  height: 250px;
}

.story-image video,
.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-content {
  text-align: center;
}

.story-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 0.9375rem;
  justify-content: center;
}

.story-text {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--text-color);
}

.story-author strong {
  font-weight: 600;
  color: var(--text-color);
}

.micro-ticker-wrapper {
  width: 100%;
  overflow: hidden;
  margin-top: 3.75rem;
}

.microtestimonios-carousel {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  padding: 1rem 0;
  font-style: italic;
  font-size: 1rem;
  color: #5B324B;
  animation: ticker 30s linear infinite;
}

.microtestimonios-carousel p {
  display: inline-block;
  margin: 0;
}

.microtestimonios-carousel:hover {
  animation-play-state: paused;
}

/* --- 6.5. Sección de Precios --- */
.pricing {
  background-color: var(--background-color);
  padding: 5rem 0;
}

.price-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.price-card {
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  padding: 2.5rem;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.price-card:hover {
  transform: translateY(-5px);
}

.price-card.featured {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--secondary-color);
}

.price-card.featured:hover {
  transform: scale(1.05) translateY(-5px);
}

.most-popular {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--primary-color);
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.875rem 0;
  text-align: left;
}

.features-list li {
  position: relative;
  padding-left: 1.5625rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.features-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--primary-color);
  font-weight: 600;
}

.satisfaction-guarantee {
  max-width: 700px;
  margin: 3.75rem auto 0;
  padding: 1.875rem;
  background-color: #fdfaf8;
  border: 1px solid #EAD7DD;
  border-radius: 12px;
  text-align: center;
}

.satisfaction-guarantee .guarantee-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 0.9375rem 0;
}

.satisfaction-guarantee .guarantee-text {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  margin: 0;
}

.satisfaction-guarantee .guarantee-text + .guarantee-text {
  margin-top: 0.9375rem;
}

.satisfaction-guarantee .guarantee-text strong {
  font-weight: 600;
  color: var(--primary-dark);
}

/* --- 6.6. FAQ Section --- */
.faq {
  background-color: var(--white);
  padding: 5rem 0;
}

.faq-list {
  max-width: 800px;
  margin: 2.5rem auto 0;
}

.faq-item {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9375rem 0;
  cursor: pointer;
}

.faq-question span {
  flex: 1;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
}

.faq-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 0.9375rem;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

/* --- 6.7. Footer --- */
.footer {
  background-color: var(--primary-color);
  color: #f4f4f4;
  padding: 3.75rem 1.25rem 1.875rem;
  font-family: var(--font-accent);
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul li a {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.footer-column ul li a:hover {
  color: var(--white);
}

.footer-logo {
  font-size: 1.6rem;
  font-weight: bold;
  font-family: var(--font-heading);
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 1rem;
  max-width: 200px;
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 2.5rem;
}
/* === BLOQUE PROFESIONAL PARA LOGOS DE PAGO =================== */
.footer-payments {          /* mantiene la fila y el gap */
  display: flex;
  gap: 12px;                /* separación uniforme */
  align-items: center;      /* centra verticalmente */
}

.paylogo {                  /* “caja” idéntica para cada logo */
  width: 70px;              /* ancho exterior uniforme */
  height: 40px;             /* alto exterior uniforme */
  display: flex;
  align-items: center;      /* centra logo en Y */
  justify-content: center;  /* centra logo en X */
}

.paylogo img {              /* imagen ajustada dentro de la caja */
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;      /* respeta proporción */
}



/* --- 6.8. Animaciones Globales --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Media query específica para testimonios en desktop */
@media (min-width: 700px) {
  .story-card {
    display: grid;
    grid-template-columns: 180px auto;
    gap: 2.5rem;
    align-items: center;
    padding: 2.1875rem;
  }

  .story-image {
    width: 180px;
    height: 240px;
    margin: 0;
    flex-shrink: 0;
  }

  .story-content {
    max-width: 450px;
    text-align: left;
  }

  .story-stars {
    justify-content: flex-start;
  }
}
/* ============================================================
   6.9. CORRECCIÓN DE CENTRADO DE TÍTULOS DE SECCIÓN
   ✅ Asegura que los títulos principales estén centrados consistentemente
============================================================ */

/* Forzar centrado de títulos principales de sección */
.buyer-persona-section h2,
.como-funciona h2,
.testimonial-stories h2,
.pricing h2,
.faq h2 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: block;
}

/* Centrado de subtítulos de sección */
.como-funciona .subtitulo,
.testimonial-stories .section-subtitle {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

/* Asegurar que las secciones completas estén centradas */
.buyer-persona-section,
.pricing,
.faq {
  text-align: center;
}
/* Corrección específica para títulos en contenedores flex */
.section-title {
  display: flex;
  justify-content: center; /* ✅ Centra el contenido flex horizontalmente */
  align-items: center;     /* ✅ Centra el contenido flex verticalmente */
  width: 100%;
  margin: 0 auto;
}

/* Asegurar que el h2 dentro del section-title también esté centrado */
.section-title h2 {
  text-align: center;
  margin: 0;
}
/* ============================================================
   7. COMPONENTES ESPECÍFICOS Y UTILIDADES
   ✅ Visor, cookies, tooltips, diálogos y elementos auxiliares consolidados
============================================================ */

/* --- 7.1. Visor de Libros de Ejemplo --- */
.visor-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  box-sizing: border-box;
  background: rgba(44, 44, 44, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.visor-overlay[hidden] {
  display: none;
}

.visor-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
  padding: 0;
  box-sizing: border-box;
}

.visor-carrusel {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visor-carrusel img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
}

.visor-carrusel img.activo {
  display: block;
  animation: fadeInVisor 0.4s ease;
}

.visor-prev,
.visor-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visor-prev {
  left: 10px;
}

.visor-next {
  right: 10px;
}

.visor-prev:hover,
.visor-next:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.visor-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  transition: all 0.2s ease;
}

.visor-close:hover {
  color: #111;
  transform: rotate(90deg);
}

.visor-cta {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  width: 90%;
  max-width: 400px;
  padding: 16px 20px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.visor-cta:hover {
  background-color: var(--primary-dark);
  transform: translateX(-50%) scale(1.05);
}

.visor-indicator {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  font-size: 14px;
  font-family: var(--font-accent);
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 15px;
  pointer-events: none;
}

/* --- 7.2. Banner de Cookies --- */
.cc-window {
  font-family: var(--font-accent) !important;
  line-height: 1.5em !important;
  z-index: 10000 !important;
}

.cc-settings-panel {
  display: none;
  padding: 1em;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  margin-top: 1em;
  text-align: left;
}

.cc-settings-open .cc-settings-panel {
  display: block !important;
}

.cc-compliance {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 1em !important;
  margin-top: 1.5em !important;
}

.cc-compliance .cc-btn {
  display: inline-flex !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 10px 20px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  border: 2px solid #e6c9bc;
  background-color: transparent;
  color: var(--white);
  transition: all 0.2s ease-in-out;
}

.cc-compliance .cc-btn.cc-dismiss {
  background-color: #e6c9bc !important;
  color: var(--primary-color) !important;
  order: 3;
}

.cc-compliance .cc-btn.cc-dismiss:hover {
  background-color: var(--white) !important;
  border-color: var(--white) !important;
}

.cc-compliance .cc-btn.cc-allow {
  color: var(--white) !important;
  order: 2;
}

.cc-compliance .cc-btn.cc-allow:hover {
  background-color: #e6c9bc !important;
  color: var(--primary-color) !important;
}

.cc-compliance .cc-btn.cc-deny {
  border: none !important;
  background-color: transparent !important;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: underline !important;
  order: 1;
}

.cc-compliance .cc-btn.cc-deny:hover {
  color: var(--white) !important;
}

/* --- 7.3. Tooltips Informativos --- */
.field-hint-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.info-tooltip-container {
  position: relative;
  display: inline-block;
}

.info-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  font-style: normal;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-icon:hover {
  background-color: var(--primary-dark);
  transform: scale(1.1);
}

.tooltip-text {
  position: fixed;
  z-index: 10000;
  width: 240px;
  background-color: #333;
  color: var(--white);
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.tooltip-text.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tooltip-text::after {
  content: "";
  position: absolute;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
}

.tooltip-text[style*="--arrow-direction: down"]::after,
.tooltip-text::after {
  bottom: -12px;
  border-color: #333 transparent transparent transparent;
}

.tooltip-text[style*="--arrow-direction: up"]::after {
  top: -12px;
  border-color: transparent transparent #333 transparent;
}

/* --- 7.4. Diálogos Legales ----------------------------------- */
dialog.legal-dialog{
  width: min(90vw, 720px);
  max-height: 80vh;
  border: 0;
  border-radius: .75rem;
  padding: 0;
  box-shadow: 0 8px 40px rgba(0,0,0,.45);
}

/* Contenedor desplazable */
dialog.legal-dialog .legal-content{
  overflow-y: auto;
  padding: 0 2.5rem 2rem;      /* sin espacio arriba */
  font-size: .95rem;
  line-height: 1.55;
}

/* Card interna del documento (tiene .content-box en tus HTML) */
dialog.legal-dialog .content-box{
  margin-top: 0;               /* anula los 2 rem por defecto */
}

/* Botón ✕ */
dialog.legal-dialog .legal-close{
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 3;
  background: none;
  border: 0;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

/* Oculta la cabecera “Volver” solo en el modal */
dialog.legal-dialog .volver,
dialog.legal-dialog .volver-container,
dialog.legal-dialog .volver-link{ display:none; }

/* Elimina margen del primer H1/H2 que aparezca */
dialog.legal-dialog h1:first-child,
dialog.legal-dialog h2:first-child{ margin-top:0; }
/* Quita cualquier margin-top del PRIMER hijo real
   – sea div, section, article… – que viva dentro de .legal-content */
dialog.legal-dialog .legal-content > *:first-child {
  margin-top: 0 !important;
}


/* --- 7.5. Elementos de Formulario Avanzados --- */
.quality-indicator {
  margin-top: 1rem;
  text-align: left;
}

.quality-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.quality-fill {
  height: 100%;
  background: linear-gradient(90deg, #e6c9bc 0%, #7e5b6d 50%, #5e3b4d 100%);
  width: 0%;
  transition: width 0.5s ease;
  display: block;
  border-radius: 4px;
}

.quality-text {
  font-size: 0.8rem;
  color: #6c757d;
  font-style: italic;
}

.quality-text.error,
.quality-text.word-count-warning {
  color: var(--error-color);
  font-weight: 600;
  font-style: normal;
  animation: pulse-error 1.5s ease-in-out;
}

.field-hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  line-height: 1.4;
  display: block;
}

.field-hint.error {
  color: var(--error-color);
}

small.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #7a5c63;
  font-style: italic;
}

/* --- 7.6. Selección de Diseño --- */
 .design-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.design-option-card {
  display: block;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.design-option-card:hover {
  border-color: var(--secondary-dark);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.design-option-card input[type="radio"] {
  display: none;
}

.design-option-card input[type="radio"]:checked + .design-card-content {
  outline: 3px solid var(--primary-color);
  outline-offset: 4px;
  border-radius: 8px;
}

.design-preview-img {
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background-color: var(--background-color);
}

.design-card-content h4 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.2rem;
  margin: 0.5rem 0;
}

.design-card-content p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0;
}
/* ---------- 7.6.1 Carrusel externo (Swiper) ---------- */
.design-swiper{
  width:100%;
  padding:10px 0;
}
.design-swiper .swiper-slide{
  display:flex;
  justify-content:center;
}

/* ---------- 7.6.2 Carrusel interno portada/capítulo/conclusión ---------- */
.design-preview-swiper{
  width:100%;
  border-radius:var(--border-radius);
  overflow:hidden;
}
.design-preview-swiper .swiper-slide{
  display:flex;
  justify-content:center;
}
.design-preview-swiper .swiper-pagination{
  bottom:6px!important;   /* bullets pegados a la imagen */
}
/* Sólo el hijo debe poder “pan-y” dentro (vertical nada, horizontal sí) */
.swiper-no-swiping {
  touch-action: pan-y;
}

/* --- 7.7. Preview y Elementos de Página --- */
.page {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.page-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.page .content-wrapper {
  position: relative;
  z-index: 2;
}

#preview-template {
  position: absolute;
  left: -9999px;
  top: 0;
  pointer-events: none;
  opacity: 1;
}

/* --- 7.8. Estados de Error --- */
.error-container {
  max-width: 550px;
  margin: 2rem auto;
  padding: 2.5rem;
  text-align: center;
  background-color: #fef3f3;
  border: 1px solid #f8d7da;
  border-radius: var(--border-radius);
  font-family: var(--font-accent);
}

.error-icon {
  margin-bottom: 1.5rem;
}

.error-icon svg {
  stroke: var(--error-color);
}

.error-title {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.error-message strong {
  color: var(--text-color);
}

.error-actions {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.error-actions p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* --- 7.9. Utilidades Globales --- */
.close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

.reset-form-btn {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--white);
  font: 600 0.9rem/1 var(--font-body);
  text-decoration: underline;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: opacity 0.15s;
}

.reset-form-btn:hover {
  opacity: 0.7;
}

.modal-note {
  display: block;
  margin: 12px auto 0;
  max-width: 70%;
  font-size: 0.8rem;
  color: #6b6b6b;
  text-align: center;
  font-family: var(--font-body);
}

progress.wizard-progress {
  width: 100%;
  height: 6px;
  appearance: none;
  border: none;
  margin: 12px 0 20px;
}

progress.wizard-progress::-webkit-progress-bar {
  background: #eee;
  border-radius: 4px;
}

progress.wizard-progress::-webkit-progress-value {
  background: #76425e;
  border-radius: 4px;
}

progress.wizard-progress::-moz-progress-bar {
  background: #76425e;
  border-radius: 4px;
}

/* --- 7.10. Animaciones Consolidadas --- */
@keyframes fadeInVisor {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-error {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes selection-confirmed {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* --- 7.11. Estados Responsive para Componentes --- */
@media (max-width: 420px) {
  .reset-form-btn {
    font-size: 0.8rem;
  }
  
  .visor-content {
    max-width: 100%;
    margin: 0;
    padding: 0.5rem;
  }
  
  .visor-carrusel {
    overflow-x: hidden;
  }
  
  .tooltip-text {
    width: 200px;
    font-size: 12px;
  }
}

@media (min-width: 1024px) {
  .visor-overlay .visor-content {
    max-width: 850px;
    padding: 15px;
  }
  
  .visor-overlay .visor-carrusel {
    aspect-ratio: 16 / 9;
    border-radius: 0;
  }
  
  .visor-overlay .visor-prev {
    left: calc(50% - 425px - 60px);
  }
  
  .visor-overlay .visor-next {
    right: calc(50% - 425px - 60px);
  }
}
/* ============================================================
   7.13. DIÁLOGO DE REANUDACIÓN - RESTAURADO
   ✅ Estilos del diálogo "Libro inacabado encontrado"
============================================================ */

dialog#resume-dialog {
  border: 0;
  border-radius: var(--dialog-radius);
  padding: 2.5rem 2.75rem;
  background: var(--white);
  max-width: 32rem;
  box-shadow: var(--dialog-shadow);
  font-family: var(--font-body);
  line-height: 1.55;
  color: var(--text-color);
}

dialog#resume-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

/* --- Texto del diálogo --- */
dialog#resume-dialog h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--dialog-primary);
}

dialog#resume-dialog p {
  margin: 0 0 1.75rem;
  color: #444;
  font-size: 1rem;
  line-height: 1.6;
}

/* --- Botones del diálogo --- */
dialog#resume-dialog .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: calc(var(--dialog-radius) - 10px);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: var(--font-accent);
}

/* Botón Aceptar */
dialog#resume-dialog .btn-primary {
  background: var(--dialog-primary);
  color: var(--white);
}

dialog#resume-dialog .btn-primary:hover {
  background: #432136;
  transform: translateY(-1px);
}

/* Botón Cancelar */
dialog#resume-dialog .btn-secondary {
  background: var(--dialog-primary-50);
  color: var(--dialog-primary);
  border-color: var(--dialog-primary-50);
}

dialog#resume-dialog .btn-secondary:hover {
  background: #e9d4de;
  transform: translateY(-1px);
}

/* Layout de botones */
dialog#resume-dialog .actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Responsive para móviles */
@media (max-width: 420px) {
  dialog#resume-dialog {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
  
  dialog#resume-dialog .actions {
    justify-content: center;
    flex-direction: column-reverse;
  }
  
  dialog#resume-dialog .btn {
    width: 100%;
  }
}
/* ============================================================
   8. SISTEMA RESPONSIVE CONSOLIDADO
   ✅ Mobile-first approach con breakpoints optimizados para MemoryTale
============================================================ */

/* --- 8.1. Móviles Pequeños (hasta 480px) --- */
@media (max-width: 480px) {
  /* Tipografía ultra-compacta */
  body { font-size: 15px; }
  h1 { font-size: clamp(2rem, 8vw, 2.5rem); }
  h2 { font-size: clamp(1.6rem, 7vw, 2rem); }
  h3 { font-size: clamp(1.2rem, 6vw, 1.5rem); }
  
  /* Container y layout general */
  .container { 
    width: 95%; 
    padding: 0 10px; 
  }
  
  /* Header ultra-compacto */
  .main-header { padding: 0.5rem 0; }
  .main-header .logo img { max-height: 35px; }
  .header-btn { 
    padding: 0.5rem 0.8rem; 
    font-size: 0.85rem; 
  }
  
  /* Hero compacto */
  .hero { 
    padding: 4rem 0; 
    min-height: 60vh; 
  }
  .hero-cta { 
    flex-direction: column; 
    gap: 0.75rem; 
  }
  .hero-cta .btn { width: 100%; }
  
  /* Secciones compactas */
  section { padding: 3rem 0; }
  .como-funciona, .buyer-persona-section, .testimonial-stories, .pricing { 
    padding: 3rem 1rem; 
  }
  
  /* Grids en una columna */
  .pasos-container { 
    flex-direction: column; 
    gap: 1.5rem; 
  }
  .persona-grid { 
    grid-template-columns: 1fr; 
    gap: 1.5rem; 
  }
  .price-options { 
    flex-direction: column; 
    gap: 1.5rem; 
  }
  
  /* Footer compacto */
  .footer { padding: 2rem 1rem 1.5rem; }
  .footer-container { 
    grid-template-columns: 1fr; 
    gap: 1.5rem; 
  }
  
  /* Story cards compactas */
  .story-card { 
    padding: 1.25rem; 
  }
  .story-image { 
    width: 80%; 
    max-width: 200px; 
    height: 200px; 
  }
   .footer-payments img {
    width: 48px;
  }
    .paylogo { width: 60px; height: 34px; }

}

/* --- 8.2. Móviles Estándar (481px a 767px) --- */
@media (min-width: 481px) and (max-width: 767px) {
  /* Header estándar */
  .main-header .logo img { max-height: 40px; }
  .header-btn { padding: 0.6rem 1rem; }
  
  /* Hero estándar */
  .hero { padding: 5rem 0; }
  
  /* Grids optimizados */
  .persona-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5rem; 
  }
  .pasos-container { 
    gap: 2rem; 
  }
  
  /* Footer en dos columnas */
  .footer-container { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 2rem; 
  }
}
@media (min-width: 768px) {
  .logo-slogan {
    display: block; /* Lo mostramos en tablets y escritorio */
  }
}
/* --- 8.3. Tablets (768px a 1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Container optimizado para tablet */
  .container { width: 85%; }
  
  /* Header tablet */
  .main-header { padding: 0.75rem 0; }
  .main-header .logo img { max-height: 45px; }
  .header-btn { 
    padding: 0.6rem 1.2rem; 
    font-size: 1rem; 
  }
  
  /* Hero tablet */
  .hero { padding: 6rem 0; }
  
  /* Secciones tablet */
  section { padding: 4rem 0; }
  
  /* Grids tablet */
  .persona-grid { 
    grid-template-columns: repeat(3, 1fr); 
  }
  .pasos-container { 
    gap: 2rem; 
  }
  
  /* Footer en 3 columnas */
  .footer-container { 
    grid-template-columns: repeat(3, 1fr); 
  }
  
  /* Story cards tablet */
  .story-card { 
    padding: 1.5rem; 
  }
  
  /* Price cards tablet */
  .price-card { 
    padding: 1.875rem; 
  }
}

/* --- 8.4. Desktop (1024px y más) --- */
@media (min-width: 1024px) {
  /* Container desktop */
  .container { width: 90%; }
  
  /* Header desktop */
  .main-header { padding: 1rem 0; }
  .main-header .logo img { max-height: 90px; }
  .header-btn { 
    padding: 0.75rem 1.2rem; 
    font-size: 1rem; 
  }
  
  /* Hero desktop */
  .hero { 
    padding: 6rem 0; 
    min-height: 70vh; 
  }
  
  /* Secciones desktop */
  section { padding: 5rem 0; }
  
  /* Footer completo */
  .footer-container { 
    grid-template-columns: repeat(4, 1fr); 
  }
  
  /* Grids desktop */
  .persona-grid { 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 2rem; 
  }
}

/* --- 8.5. Desktop Grande (1200px y más) --- */
@media (min-width: 1200px) {
  /* Container máximo */
  .container { 
    width: 90%; 
    max-width: 1200px; 
  }
  
  /* Hero desktop grande */
  .hero { padding: 7rem 0; }
  
  /* Secciones con más espacio */
  .como-funciona, .buyer-persona-section, .testimonial-stories, .pricing { 
    padding: 6rem 0; 
  }
}

/* --- 8.6. Orientación Landscape en Móviles --- */
@media (orientation: landscape) and (max-height: 550px) {
  /* Hero compacto en landscape */
  .hero { 
    padding: 3rem 0; 
    min-height: 50vh; 
  }
  
  /* Secciones compactas */
  section { padding: 2rem 0; }
  
  /* Títulos compactos */
  h1 { font-size: clamp(1.8rem, 6vw, 2.2rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 1.8rem); }
  
  /* Footer compacto */
  .footer { padding: 2rem 1rem 1rem; }
}

/* --- 8.7. Estados de Accesibilidad Global --- */
@media (prefers-reduced-motion: reduce) {
  /* Reducir animaciones para usuarios sensibles al movimiento */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- 8.8. Optimización para Impresión --- */
@media print {
  /* Ocultar elementos no necesarios en impresión */
  .modal, .visor-overlay, .cc-window, .header-btn {
    display: none !important;
  }
  
  /* Optimizar colores para impresión */
  body {
    background: white !important;
    color: black !important;
  }
  
  .hero {
    background: white !important;
    color: black !important;
  }
  
  /* Mostrar URLs de enlaces */
  a {
    text-decoration: underline !important;
  }
}

/* --- 8.9. Correcciones Finales y Limpieza Global --- */




/* Animación del header cuando modal está abierto */
body.modal-open .main-header {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Asegurar espacio del contenido principal */
main {
  min-height: calc(100vh - 150px);
  display: block;
}

/* Prevención global de scroll horizontal */
html, body {
  overflow-x: hidden;
}

/* Asegurar que todos los elementos respeten el ancho disponible */
* {
  max-width: 100%;
  box-sizing: border-box;
}

/* Prefijos webkit para Safari iOS */
.element-with-transform {
  transform: translateX(0);
  -webkit-transform: translateX(0);
}

.element-with-transition {
  transition: all 0.3s ease;
  -webkit-transition: all 0.3s ease;
}

/* Optimización táctil para iOS */
.examples-toggle {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

/* A PARTIR DE AQUI */





.detalle-testimonio {
  display: block;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-light);
}



.progreso {
  font-size: 0.85rem;
  color: #7a5c63;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

/* Oculta el título en los pasos > 0 */
.progress-title.hidden {
  display: none;
}


form input,
form textarea,
form button {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
/* --- Botones legales inline dentro del consentimiento --- */
.consent-group .legal-btn{
  display:inline;           /* se comporta como link */
  width:auto !important;    /* anula el 100 % heredado */
  background:none;
  border:0;
  padding:0;
  margin:0 2px;             /* micro-separación */
  font:inherit;
  font-weight:600;
  color:var(--primary-color);
  text-decoration:underline;
  cursor:pointer;
}
.consent-group .legal-btn:hover{
  text-decoration:none;
}


/* Bloque de confianza de pago */
.secure-payment-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: var(--font-accent);
}

.secure-payment-info img { opacity: 0.7; }

/* Estilos para la tarjeta "Próximamente" */
.price-coming-soon {
  display: inline-block;
  border: 1px solid var(--secondary-dark);
  color: var(--text-light);
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 18px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.notify-form input[type="email"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 10px;
  text-align: center;
}

.notify-form .btn-secondary { width: 100%; }


/* =================================
   Ajustes para Pasos Clicables
   ================================= */
a.paso {
  text-decoration: none; /* Elimina el subrayado de los enlaces */
  color: inherit; /* Usa el color de texto por defecto de su padre */
}

/* Asegura que los textos dentro del enlace mantengan su color original */
a.paso h3,
a.paso p {
  color: #3C2B34; /* O la variable que corresponda si la tienes */
}

a.paso h3 {
    color: #2F1E25;
}


/* === MEJORAS FORMULARIO - PASO A PASO (ACTUALIZADO) === */

/* Separación emoji/icono del texto */
.form-step h2::before,
.question-title::before {
    margin-right: 12px !important;
    display: inline-block !important;
}

/* Texto explicativo más visible */
.form-explanation,
.step-description {
    color: #4a4a4a !important;          /* Era demasiado claro */
    font-size: 15px !important;         /* Era muy pequeño */
    font-weight: 500 !important;        /* Más peso visual */
    line-height: 1.5 !important;
    margin-bottom: 20px !important;     /* Más separación */
    background: #f8f6f4 !important;     /* Fondo sutil */
    padding: 12px 16px !important;      /* Padding para destacar */
    border-radius: 8px !important;
    border-left: 3px solid var(--primary-color) !important; /* Barra lateral */
}

/* Contador de pasos más prominente */
/* Estilos base compartidos por ambas etiquetas */
.progress-title,
.step-counter {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 25px;
  background: rgba(94, 59, 77, 0.08);
  padding: 10px 20px;
  border-radius: 999px;
  width: -moz-fit-content; /* Soporte para Firefox */
  width: fit-content;    /* Hacemos que el bloque sea tan ancho como su texto */
}

/* MÉTODO DE CENTRADO DIRECTO: Aplicamos a ambas etiquetas */
.progress-title,
.step-counter {
  display: block;        /* Lo tratamos como un bloque */
  margin-left: auto;     /* Con 'auto' en ambos lados, el navegador lo centra */
  margin-right: auto;    /* Esto fuerza el centrado horizontal */
}

/* Títulos de preguntas más suaves (ACTUALIZADO) */
.question-title {
    font-size: 18px !important;         /* Reducido de 20px */
    font-weight: 500 !important;        /* Reducido de 600 */
    color: #333 !important;             /* Más suave que #2c2c2c */
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
    font-family: var(--font-body) !important; /* Usar fuente del cuerpo */
}

/* Subtítulo dinámico sin fondo (ACTUALIZADO) */
.dynamic-subtitle {
    color: var(--primary-color) !important;             /* Color más sutil */
    font-style: italic !important;
    font-size: 14px !important;
    margin-top: 8px !important;
    padding: 0 !important;              /* Sin padding */
    background: none !important;        /* Sin fondo azul */
    border: none !important;            /* Sin border */
    font-weight: 500 !important;        /* Poco más de peso */
}


/* Espaciado entre grupos del formulario */
.form-step .form-group {
    margin-bottom: 22px !important;     /* Poco más de separación */
}

/* =======================================================
   ESTILOS UNIFICADOS PARA LAS PREGUNTAS Y EJEMPLOS
   ======================================================= */

/* --- Bloque de "Story Coaching" (la guía) --- */
.story-coaching {
  background: linear-gradient(135deg, #f8f4ff 0%, #e8f4fd 100%);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #495057;
  box-shadow: 0 2px 8px rgba(94, 59, 77, 0.05);
}
.story-coaching strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* --- Desplegable de "Ver ejemplos" --- */
.ejemplos-inspiracion {
  margin: 1.25rem 0;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
}
.ejemplo-trigger {
  padding: 12px 15px;
  background: #f8f9fa;
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
  transition: all 0.3s ease;
}
.ejemplo-trigger:hover {
  background: #e2e6ea;
}
.ejemplos-contenido {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}
.ejemplos-contenido.show {
  max-height: 600px; /* Suficiente para varios ejemplos */
}
.ejemplo-situacion {
  padding: 1.25rem;
  border-bottom: 1px solid #f1f3f4;
}
.ejemplo-situacion:last-child { border-bottom: none; }
.ejemplo-situacion h4 {
  margin: 0 0 0.5rem 0;
  color: #495057;
  font-size: 0.9rem;
  font-weight: 600;
}
.ejemplo-situacion p {
  margin: 0;
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
  line-height: 1.5;
  background: white;
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid #28a745;
}

/* === LIMPIAR PRIMERA INTERFAZ === */

/* Reducir espaciado en step intro */
#intro-step {
    padding: 25px 20px !important;
}

#intro-step .form-group {
    margin-bottom: 18px !important;
}

/* Hacer la advertencia más elegante y discreta */
#intro-step .form-explanation {
    font-size: 13px !important;
    padding: 10px 14px !important;
    margin-bottom: 15px !important;
    background: #f9f7f6 !important;
    border-left: 3px solid #d4a574 !important;
    color: #8b5a2b !important;
}

/* Compactar inputs */
#intro-step input {
    margin-bottom: 8px !important;
    padding: 14px 16px !important;
}

/* Botón más elegante */
#intro-step .btn-primary {
    margin-top: 15px !important;
    padding: 16px 32px !important;
}

/* Nota final más discreta */
#intro-step .modal-note {
    font-size: 12px !important;
    margin-top: 12px !important;
    line-height: 1.4 !important;
}

/* --- Corrección: lista de consejos --- */
#consejos-practicos-step .consejos-list{
  list-style:none;          /* elimina el • */
  padding:0;
  margin:0;
}

#consejos-practicos-step .consejos-list li{
  display:flex;
  align-items:flex-start;   /* texto alineado con el icono */
  gap:12px;                 /* separación regular */
}

#consejos-practicos-step .consejo-icon{
  font-size:1.2rem;
  line-height:1.4;
  margin-top:2px;           /* ajusta la chispa verticalmente */
}

/* ✅ ESTO ES LO QUE DEBE QUEDAR EN SU LUGAR ✅ */
/* === ESTILOS PARA LA PANTALLA DE CONSEJOS EMOTIVA === */

#consejos-step .consejos-container {
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #fdfcfd;
  border-radius: 12px;
}

#consejos-step .consejos-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
  color: var(--primary-color);
}

#consejos-step .consejos-header svg {
  width: 28px;
  height: 28px;
}

#consejos-step .consejos-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
  color: var(--primary-color);
}

#consejos-step .consejos-body {
  margin-bottom: 30px;
}

#consejos-step .consejos-body p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 1.5em;
}

#consejos-step .consejos-body strong {
  color: var(--primary-color);
  font-weight: 600;
}

#consejos-step .consejos-body em {
  font-style: italic;
  font-weight: 500;
}

#consejos-step .continuar-consejos {
  width: 100%;
  max-width: 300px;
  padding: 15px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#consejos-step .continuar-consejos:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(94, 59, 77, 0.2);
}
/* --- Estilos para el vídeo dentro de la tarjeta de testimonio --- */
/* --- ESTILOS FINALES Y ROBUSTOS PARA EL VÍDEO EN LA TARJETA --- */

.story-card .story-image {
  /* ¡LA CLAVE! Le damos una altura fija y razonable a la zona del vídeo. */
  height: 250px; 
  /* Aseguramos un fondo por si el vídeo tarda en cargar. */
  background-color: #e0d9d5; 
  overflow: hidden; /* Oculta cualquier parte del vídeo que se salga. */
}

.story-card .story-image video {
  width: 100%;
  height: 100%;
  /* Hace que el vídeo cubra todo el espacio sin deformarse. */
  object-fit: cover;
}
/* ... Estilos anteriores de #consejos-step ... */

/* NUEVOS ESTILOS PARA EL SEPARADOR Y LA PREGUNTA FINAL */

#consejos-step .consejos-divider {
  border: none;
  height: 1px;
  width: 50%;
  max-width: 150px;
  margin: 30px auto;
  background: linear-gradient(to right, transparent, rgba(94, 59, 77, 0.3), transparent); /* Un degradado sutil con tu color primario */
}

#consejos-step .final-invitation {
  font-style: italic;
  color: #555;
  margin-top: 20px;
  margin-bottom: 30px !important; /* Importante para asegurar el espacio antes del botón */
}

/* Esta es la forma correcta de evitar el scroll sin romper la página. */
body.modal-open {
  overflow: hidden;
}

#intro-step p {
  font-size: 1.1rem;
  color: #4a4a4a;
  line-height: 1.6;
  max-width: 550px; /* <--- ¡Punto clave! */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
  font-family: var(--font-body);
}

/* ======================================================= 
   HEADER OPTIMIZADO PARA MEJOR UX CON MODAL
======================================================= */


/* 4. OCULTAR HEADER CUANDO MODAL ESTÁ ABIERTO */
body.modal-open .main-header {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}




/* ======================================================= 
   REFINAMIENTOS PARA LOS NUEVOS PASOS DIVIDIDOS
======================================================= */

/* Mensaje de transición entre pasos */
.transition-message {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 1.5rem;
    text-align: center;
}

/* Invitación final en el paso de consejos */
.final-invitation {
    font-style: italic;
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
}
/* ======================================================= 
   PASOS DE DATOS ESENCIALES - DISEÑO PREMIUM Y LEGAL
======================================================= */

/* 1. SECCIONES DE DATOS - ORGANIZACIÓN VISUAL */
.data-section {
    background: linear-gradient(135deg, #fdfcfd 0%, #f9f7f5 100%);
    border: 1px solid rgba(94, 59, 77, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.data-section:hover {
    border-color: rgba(94, 59, 77, 0.15);
    box-shadow: 0 4px 15px rgba(94, 59, 77, 0.05);
}

/* 2. TÍTULOS DE SECCIÓN CON ICONOS */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 0.9vw + 1.1rem, 1.8rem); /* 22 – 29 px aprox. */
    line-height: 1.3;   /* opcional: respira mejor */
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(94, 59, 77, 0.1);
}

.section-icon {
       font-size: clamp(1.35rem, 0.9vw + 1.1rem, 1.8rem); /* 22 – 29 px aprox. */
    line-height: 1.3;   /* opcional: respira mejor */
    opacity: 0.8;
}

/* 3. OPCIONES DE GÉNERO - DISEÑO MODERNO */
.gender-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.gender-option {
    position: relative;
    cursor: pointer;
    display: block;
}

.gender-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gender-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #fff;
    transition: all 0.3s ease;
    min-height: 60px;
    justify-content: center;
}

.gender-option:hover .gender-label {
    border-color: var(--primary-color);
    background: rgba(94, 59, 77, 0.02);
    transform: translateY(-2px);
}

.gender-option input[type="radio"]:checked + .gender-label {
    border-color: var(--primary-color);
    background: rgba(94, 59, 77, 0.05);
    box-shadow: 0 4px 12px rgba(94, 59, 77, 0.1);
}


.gender-icon {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    display: block;
}

.gender-text {
    font-family: var(--font-accent);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-color);
    text-align: center;
}

.gender-option input[type="radio"]:checked + .gender-label .gender-text {
    color: var(--primary-color);
}

/* 4. NOTA DE PRIVACIDAD */
.privacy-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(94, 59, 77, 0.03);
    border: 1px solid rgba(94, 59, 77, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
    font-size: 0.75rem;
    color: var(--text-light);
}

.privacy-icon {
    font-size: 1rem;
    opacity: 0.7;
}

.privacy-text {
    font-family: var(--font-accent);
    line-height: 1.4;
}

/* Animación para selecciones con auto-avance */
.recipient-card.selected,
.gender-option input[type="radio"]:checked + .gender-label {
    animation: selection-confirmed 0.3s ease-out;
}

@keyframes selection-confirmed {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Transición suave para transformaciones */
.recipient-card,
.gender-label {
    transition: transform 0.3s ease;
}
/* =======================================================
   ✅ EXPANSIÓN DEL CONTENIDO INTERNO DEL FORMULARIO
   ======================================================= */
/*
  Este bloque anula las restricciones de ancho (max-width) que tenía el
  contenido del formulario, permitiéndole ocupar todo el nuevo
  espacio disponible en el modal más ancho.
*/
/* ====================================================================
   ✅ SECCIÓN PREVIEW - DISEÑO DE ALTO IMPACTO EMOCIONAL (UNIFICADO)
   ==================================================================== */

/* --- 1. Títulos y subtítulos que guían al usuario --- */
#preview .subtitulo-preview {
  font-family: var(--font-accent);
  font-size: 1.2rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 2rem;
}

#preview p:not(.subtitulo-preview) { /* Para el texto "¡Así empezaría..." */
  font-family: var(--font-body);
  font-style: italic;
  text-align: center;
  color: var(--text-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}


/* --- 2. EL TEXTO DE LA PREVIEW (LA JOYA DE LA CORONA) --- */
#preview-text {
  background: none; /* Sin fondo para un look más limpio */
  border: none; /* Sin borde */
  padding: 1rem 0;
  margin: 1rem auto;
  max-width: 90%;
  
  /* Tipografía para máximo impacto */
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.3rem); /* TAMAÑO GRANDE Y FLUIDO */
  font-weight: 400;
  color: var(--primary-dark);
  line-height: 1.6;
  text-align: center;
  font-style: normal;
  white-space: normal;
}


/* --- 3. LA IMAGEN DE LA PÁGINA - ELEGANTE Y CON SOMBRA --- */
.preview-image-container {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

#preview-image {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  background-color: #f9f9f9;
}


/* --- 4. LOS BOTONES DE ACCIÓN - CLAROS Y DIRECTOS --- */
.preview-actions {
  margin-top: 2rem;
  justify-content: center;
}

#preview-digital {
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

/* --- 5. Ocultar el blockquote si está vacío (cuando solo hay imagen) --- */
#preview-text:empty {
    display: none;
}

/* =======================================================
   ✅ DIFERENCIACIÓN VISUAL PARA EL PASO DEL AUTOR (PASO 4)
   ======================================================= */

/*
  Este bloque aplica un ligero cambio de estilo al contenedor de datos
  del Paso 4 (#author-details-step) para reforzar visualmente el
  "Giro de Perspectiva" cuando se pregunta por el autor.
*/
#author-details-step .data-section {
    /* Un degradado ligeramente diferente o un color sólido sutil */
    background: linear-gradient(135deg, #fdfcfd 0%, #f9f7f5 100%);
    
    /* Un borde con un tono de tu marca para destacarlo sutilmente */
    border-color: rgba(126, 91, 109, 0.15); 
}

/* Opcional: Un pequeño efecto de transición al entrar en este paso */
#author-details-step.active .data-section {
    animation: fadeIn Subtle 0.5s ease-out;
}
/* === BLOQUE EXPLICATIVO ENTRE DESTINATARIO Y AUTOR === */
.form-explanation {
  color: #4a4a4a;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  margin: 2rem auto;
  background: #f8f6f4;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  max-width: 95%;
  text-align: left;
}
/* === Animación de aparición suave para bloques informativos === */
@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-explanation {
  animation: fadeSlideIn 0.6s ease-out both;
}


/* =======================================================
   ✅ TÍTULOS Y DESPLEGABLES DE PREGUNTAS (DISEÑO PREMIUM)
   ======================================================= */


/* --- 2. Estructura base para ambos desplegables --- */
.story-coaching-collapsible,
.ejemplos-inspiracion {
  margin-bottom: 1rem;
  border-radius: 10px;
  overflow: hidden; /* Clave para que el contenido no se salga */
  transition: all 0.3s ease;
  border: 1px solid transparent; /* Borde inicial invisible */
}

.coaching-trigger,
.ejemplo-trigger {
  width: 100%;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.coaching-icon,
.ejemplo-icon { /* Añade <span class="ejemplo-icon">📖</span> a tus ejemplos si quieres un icono */
  font-size: 1.1rem;
}

.coaching-title,
.ejemplo-title {
  flex: 1;
  text-align: left;
}

.coaching-arrow,
.ejemplo-arrow {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  font-weight: bold;
}

/* --- 3. Desplegable de "Consejos" (Story Coaching) - Estilo cálido y principal --- */
.story-coaching-collapsible {
  background-color: var(--secondary-light); /* Color de fondo cálido: #f6e9dc */
  border-color: var(--secondary-color); /* Borde a juego: #e6c9bc */
}

.coaching-trigger {
  color: var(--primary-dark); /* Texto oscuro: #3e1b2d */
}

.coaching-trigger:hover {
  background-color: var(--secondary-color); /* Un poco más oscuro al pasar el ratón */
}

/* --- 4. Desplegable de "Ejemplos" - Estilo secundario y diferenciado --- */
.ejemplos-inspiracion {
  background-color: var(--white);
  border: 1px dashed var(--secondary-color); /* Borde discontinuo para diferenciarlo */
}

.ejemplo-trigger {
  color: var(--primary-color); /* Texto color vino: #5e3b4d */
}

.ejemplo-trigger:hover {
  background-color: var(--secondary-light); /* Fondo cálido al pasar el ratón */
}

/* --- 5. Contenido de los desplegables --- */
.coaching-content,
.ejemplos-contenido {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  background: var(--white);
  color: var(--text-color);
  line-height: 1.6;
}

/* Estado ABIERTO de los desplegables */
.coaching-trigger[aria-expanded="true"] + .coaching-content,
.ejemplo-trigger[aria-expanded="false"] + .ejemplos-contenido.show { /* Se corrigió el selector del ejemplo */
  max-height: 500px;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Rotación de la flecha al abrir */
.coaching-trigger[aria-expanded="true"] .coaching-arrow,
.ejemplo-trigger[aria-expanded="true"] .ejemplo-arrow {
  transform: rotate(180deg);
}

/* --- 6. Estilos internos del contenido de "Ejemplos" --- */
.ejemplo-situacion {
  padding: 0 0 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.ejemplo-situacion:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.ejemplo-situacion h4 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
}
.ejemplo-situacion p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-light);
  margin: 0;
}
/* =========================================================
   SUBTÍTULOS / PÁRRAFOS-LEAD UNIFICADOS
   ========================================================= */
.subtitle,
.subtitulo,              /* soporte retro-compatibilidad */
.section-subtitle,
.guarantee-text {
  font-family: var(--font-body);             /* Quicksand */
  font-weight: 500;                          /* semi-negrita */
  font-size: clamp(1rem, 0.45vw + 0.9rem, 1.15rem); /* 16 – 18 px */
  line-height: 1.65;
  color: var(--text-color);                  /* #2c2c2c actual */
  max-width: 780px;                          /* ancho cómodo */
  margin: 0 auto 1.75rem;                    /* centrado + separación */
  text-align: center;
  letter-spacing: 0.15px;                    /* micro-tracking elegante */
}

/* Variante ‘light’ para secciones oscuras */
.dark-section .subtitle {
  color: #f4f4f4;
}

/* Animación suave al hacer scroll (opcional) */
@media (prefers-reduced-motion: no-preference) {
  .subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .subtitle.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ============================================================
   FAQ ✨ versión conversión-ready – MemoryTale
   ============================================================ */
.faq-item{
  border:1px solid #EAD7DD;          /* tono suave de tu paleta */
  border-radius:10px;
  margin-bottom:1.5rem;
  overflow:hidden;
  transition:box-shadow .3s ease;
}
.faq-item:hover{
  box-shadow:0 6px 26px rgba(94,59,77,.08);   /* halo sutil */
}

/* ------------ CABECERA (pregunta) ------------- */
.faq-question{
background:var(--background-color); /* #faf7f5 — mismo tono que .pricing */
  padding:1.25rem 1.5rem;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  cursor:pointer;
}
.faq-question span{
  font-family:var(--font-heading);
  font-size:clamp(1rem,.4vw+1rem,1.15rem);
  font-weight:600;
  line-height:1.4;
}
.faq-toggle{
  width:32px;height:32px;
  border:2px solid currentColor;
  border-radius:50%;
  font-size:1.2rem;
  line-height:26px;                  /* centra el “+” */
  text-align:center;
  background:none;
  color:var(--primary-color);
  flex-shrink:0;
  transition:transform .3s ease,background .3s;
}
/* Estado abierto → branding + inversión de color */
.faq-item.active .faq-question{
  background:var(--primary-color);
  color:#fff;
}
.faq-item.active .faq-toggle{
  background:#fff;
  color:var(--primary-color);
}

/* ------------ RESPUESTA ------------- */
.faq-answer{
  max-height:0;                      /* hereda animación de tu CSS */
  overflow:hidden;
  background:#fff;
  padding:0 1.75rem;
  font-family:var(--font-body);
  font-size:.95rem;
  line-height:1.75;
  color:var(--text-color);
  transition:max-height .4s ease,padding .3s;
}
.faq-item.active .faq-answer{
  padding:1.15rem 1.75rem 1.5rem;
}

/* texto dentro */
.faq-answer p{margin:0;}
.faq-answer a{color:var(--primary-color);font-weight:600;text-decoration:none;}
.faq-answer a:hover{text-decoration:underline;}

/* ------------ Mobile fine-tuning ------------- */
@media(max-width:600px){
  .faq-question span{font-size:1rem;}
  .faq-toggle{width:28px;height:28px;font-size:1rem;}
}
/* =============================================================
   MEMORYTALE – HEADER RESPONSIVE DEFINITIVO (2025‑07‑12)
   ----------------------------------------------------------------
   ✅ OBJETIVOS
   1. Mantener logo SIEMPRE a la izquierda y navegación a la derecha
   2. Evitar que se corten los textos ("Cómo funciona", "FAQ")
   3. Ocultar acciones / enlaces secundarios en breakpoints críticos
   4. Eliminar transform‑centering heredado del desktop
   5. Mantener un HTML sin cambios (no hace falta añadir clases extra)
   ============================================================= */

/* -----------------------------------------------------------------
   0. RESET DE COMPORTAMIENTOS HEREDADOS
   -----------------------------------------------------------------*/
.main-header .container {
  display: flex !important;        /* fuerzo layout flex */
  justify-content: space-between !important;
  align-items: center !important;
  position: relative;              /* para elementos absolutos hijos */
  padding: 0 1rem;
  gap: 1rem;
  max-width: 100% !important;      /* evita recortes laterales */
}

/* El nav ya no se centra con transform en móvil */
.main-nav {
  position: static !important;
  transform: none !important;
  left: auto !important;
  flex: 1 1 auto;                  /* ocupa todo el espacio restante */
  display: flex !important;
  justify-content: flex-end;       /* alinea items a la derecha */
}

/* -----------------------------------------------------------------
   1. ESTILOS GLOBAL < 992 px – OCULTO CTA DE CABECERA
   -----------------------------------------------------------------*/
@media (max-width: 991px) {
  .header-actions { display: none !important; }
}

/* -----------------------------------------------------------------
   2. TABLET / SMARTPHONE (≤ 768 px)
   -----------------------------------------------------------------*/
@media (max-width: 768px) {
  .main-header {
    padding: 1rem 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 99;
  }

  /* ── LOGO ─────────────────────────────────────────────────── */
  .main-header .logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  .main-header .logo img {
    max-width: 120px !important;
    height: auto;
  }
  .main-header .logo .logo-slogan { display: none !important; }

  /* ── NAVEGACIÓN ───────────────────────────────────────────── */
  .main-nav ul {
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap;             /* evita salto de línea */
  }

  .main-nav a {
    font-size: .8rem !important;
    padding: .45rem .6rem;
    color: #6B4E71;
    border-radius: 6px;
    transition: all .3s ease;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  .main-nav a:hover {
    background: rgba(107, 78, 113, .1);
    border-color: rgba(107, 78, 113, .2);
    transform: translateY(-1px);
  }
}

/* -----------------------------------------------------------------
   3. SMARTPHONE COMPACTO (≤ 480 px)
   -----------------------------------------------------------------*/
@media (max-width: 480px) {
  /* logo ligeramente reducido */
  .main-header .logo img { max-width: 110px !important; }

  /* texto del menú aún legible pero más compacto */
  .main-nav a {
    font-size: .75rem !important;
    padding: .4rem .5rem;
  }

  /* 👉 Oculto el enlace “Planes y precios” (3.º li) para ganar espacio */
  .main-nav ul li:nth-child(3) { display: none; }
}
/* =========================================================
   HEADER “PLAN B” – solo logo + eslogan
   Samsung Galaxy S8+, iPhone SE…   (ancho real ≤ 360 px)
   ========================================================= */
@media (max-width: 360px) {

  .main-header .container {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .45rem !important;
    padding-block: .7rem !important;
  }

  .main-header .logo img {
    max-height: 42px !important;
  }

  /* ✅ AJUSTE CRÍTICO: asegúrate que tenga más especificidad */
  .main-header .logo .logo-slogan {
    display: block !important;
    font-size: .75rem;
    line-height: 1.25;
    text-align: center;
    color: var(--text-light);
    margin-top: .15rem;
  }

  .main-nav,
  .header-actions {
    display: none !important;
  }
}
/* ============================================================
   DESKTOP ≥ 992px — Corrección de separación logo ↔ menú
   ============================================================ */
@media (min-width: 992px) {

  .main-header .container {
    gap: 0.75rem !important;         /* reduce aire entre bloques */
  }

  .main-nav {
    flex: unset !important;          /* anula expansión forzada */
  }

  .logo {
    margin-right: 1rem;              /* opcional: empuja un poco el nav */
  }

}



