/* =========================================================
   FINXIDIL QUIZ WIDGET — CSS
   Estética clínica premium · Mobile-first · Elementor-ready
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── VARIABLES (sobreescribibles por Elementor) ────────── */
.fq-root {
  --fq-accent:       #1a7a4a;
  --fq-accent-light: #e8f5ee;
  --fq-accent-mid:   #2a9d5c;
  --fq-text:         #111827;
  --fq-text-muted:   #6b7280;
  --fq-bg:           #ffffff;
  --fq-border:       #e5e7eb;
  --fq-radius:       24px;
  --fq-radius-sm:    12px;
  --fq-radius-btn:   12px;
  --fq-shadow:       0 20px 64px rgba(0,0,0,.10);
  --fq-ff-display:   'DM Serif Display', Georgia, serif;
  --fq-ff-body:      'DM Sans', system-ui, sans-serif;
  --fq-transition:   .28s cubic-bezier(.4,0,.2,1);
}

/* ── CONTENEDOR RAÍZ ───────────────────────────────────── */
.fq-root {
  font-family: var(--fq-ff-body);
  background: var(--fq-bg);
  border-radius: var(--fq-radius);
  box-shadow: var(--fq-shadow);
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  color: var(--fq-text);
  -webkit-font-smoothing: antialiased;
}

/* ── SCREENS ───────────────────────────────────────────── */
.fq-screen {
  padding: 3rem 2.5rem;
  animation: fqFadeUp .4s ease both;
}
@media (max-width: 540px) {
  .fq-screen { padding: 2rem 1.5rem; }
}

@keyframes fqFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes fqFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fqSlideLeft {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0);    }
}
@keyframes fqSlideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0);     }
}

/* ── INTRO SCREEN ──────────────────────────────────────── */
.fq-screen--intro {
  text-align: center;
  background: linear-gradient(160deg, #f0faf5 0%, var(--fq-bg) 55%);
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.fq-intro-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--fq-accent-light);
  color: var(--fq-accent);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}
.fq-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fq-accent);
  animation: fqPulse 2s ease infinite;
}
@keyframes fqPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.4); }
}

.fq-intro-title {
  font-family: var(--fq-ff-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  color: var(--fq-text);
  line-height: 1.25;
  margin: 0 0 1rem;
}
.fq-intro-title em {
  font-style: italic;
  color: var(--fq-accent);
}
.fq-intro-sub {
  color: var(--fq-text-muted);
  font-size: .95rem;
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto 2rem;
}

.fq-intro-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--fq-bg);
  border: 1px solid var(--fq-border);
  border-radius: var(--fq-radius-sm);
}
.fq-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
}
.fq-stat strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fq-text);
}
.fq-stat span {
  font-size: .7rem;
  color: var(--fq-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.fq-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--fq-border);
}

.fq-trust-note {
  font-size: .75rem;
  color: var(--fq-text-muted);
  margin-top: 1rem;
  margin-bottom: 0;
}

/* ── BOTÓN PRIMARIO ────────────────────────────────────── */
.fq-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  background: var(--fq-accent);
  color: #fff;
  font-family: var(--fq-ff-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--fq-radius-btn);
  cursor: pointer;
  transition: var(--fq-transition);
  letter-spacing: .01em;
  text-decoration: none;
  line-height: 1;
}
.fq-btn-primary:hover {
  background: var(--fq-accent-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,122,74,.3);
}
.fq-btn-primary:active {
  transform: translateY(0);
}
.fq-btn-primary svg {
  flex-shrink: 0;
  transition: transform var(--fq-transition);
}
.fq-btn-primary:hover svg {
  transform: translateX(4px);
}

/* ── PROGRESO ──────────────────────────────────────────── */
.fq-progress-wrap {
  margin-bottom: 2rem;
}
.fq-progress-bar {
  height: 5px;
  background: var(--fq-border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: .6rem;
}
.fq-progress-fill {
  height: 100%;
  background: var(--fq-accent);
  border-radius: 99px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.fq-progress-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--fq-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── PREGUNTA ──────────────────────────────────────────── */
.fq-question-text {
  font-family: var(--fq-ff-display);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  color: var(--fq-text);
  margin: 0 0 1.5rem;
  line-height: 1.3;
}
.fq-options-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

/* Opción de respuesta */
.fq-opt {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--fq-bg);
  border: 2px solid var(--fq-border);
  border-radius: var(--fq-radius-sm);
  cursor: pointer;
  transition: var(--fq-transition);
  font-family: var(--fq-ff-body);
  font-size: .95rem;
  font-weight: 500;
  color: var(--fq-text);
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.fq-opt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--fq-accent);
  opacity: 0;
  transition: opacity var(--fq-transition);
}
.fq-opt:hover {
  border-color: var(--fq-accent);
  background: var(--fq-accent-light);
  transform: translateX(4px);
}
.fq-opt:hover .fq-opt-letter {
  background: var(--fq-accent);
  color: #fff;
  border-color: var(--fq-accent);
}
.fq-opt.selected {
  border-color: var(--fq-accent);
  background: var(--fq-accent-light);
  box-shadow: 0 0 0 3px rgba(26,122,74,.15);
}
.fq-opt.selected .fq-opt-letter {
  background: var(--fq-accent);
  color: #fff;
  border-color: var(--fq-accent);
}

.fq-opt-letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--fq-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--fq-text-muted);
  flex-shrink: 0;
  transition: var(--fq-transition);
  background: #f9fafb;
  position: relative;
  z-index: 1;
}
.fq-opt-text {
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

/* ── NAVEGACIÓN ────────────────────────────────────────── */
.fq-question-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: .5rem;
}
.fq-btn-back {
  background: none;
  border: none;
  color: var(--fq-text-muted);
  font-family: var(--fq-ff-body);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  padding: .5rem 0;
  transition: color var(--fq-transition);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.fq-btn-back:hover { color: var(--fq-text); }

/* ── LEAD CAPTURE ──────────────────────────────────────── */
.fq-lead-header {
  text-align: center;
  margin-bottom: 2rem;
}
.fq-lead-icon {
  width: 64px;
  height: 64px;
  background: var(--fq-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--fq-accent);
  font-size: 1.75rem;
}
.fq-lead-title {
  font-family: var(--fq-ff-display);
  font-size: 1.4rem;
  margin: 0 0 .5rem;
  color: var(--fq-text);
}
.fq-lead-subtitle {
  font-size: .9rem;
  color: var(--fq-text-muted);
  line-height: 1.6;
}
.fq-lead-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.fq-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.fq-field label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--fq-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.fq-input {
  border: 2px solid var(--fq-border);
  border-radius: var(--fq-radius-sm);
  padding: .875rem 1rem;
  font-family: var(--fq-ff-body);
  font-size: .95rem;
  color: var(--fq-text);
  background: #f9fafb;
  transition: var(--fq-transition);
  width: 100%;
  box-sizing: border-box;
}
.fq-input:focus {
  outline: none;
  border-color: var(--fq-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,122,74,.1);
}
.fq-lead-error {
  color: #dc2626;
  font-size: .8rem;
  font-weight: 600;
  display: none;
}
.fq-lead-skip {
  text-align: center;
  font-size: .8rem;
  color: var(--fq-text-muted);
}
.fq-lead-skip button {
  background: none;
  border: none;
  color: var(--fq-text-muted);
  text-decoration: underline;
  cursor: pointer;
  font-family: var(--fq-ff-body);
  font-size: .8rem;
  padding: 0;
}
.fq-lead-skip button:hover { color: var(--fq-text); }

/* Separador "o continuar sin email" */
.fq-divider-text {
  text-align: center;
  position: relative;
  font-size: .75rem;
  color: var(--fq-text-muted);
  margin: .75rem 0;
}
.fq-divider-text::before,
.fq-divider-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--fq-border);
}
.fq-divider-text::before { left: 0; }
.fq-divider-text::after  { right: 0; }

/* ── RESULTADO ─────────────────────────────────────────── */
.fq-result-top {
  background: linear-gradient(135deg, #f0faf5 0%, #fff 70%);
  padding: 2rem 2.5rem 1.5rem;
  border-bottom: 1px solid var(--fq-border);
  text-align: center;
}
@media (max-width: 540px) {
  .fq-result-top { padding: 1.5rem; }
}
.fq-result-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--fq-accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.fq-result-check {
  width: 56px;
  height: 56px;
  background: #fff;
  border: 3px solid var(--fq-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .75rem;
  color: var(--fq-accent);
  animation: fqCheckIn .5s cubic-bezier(.175,.885,.32,1.275) both;
}
@keyframes fqCheckIn {
  from { opacity:0; transform: scale(.5) rotate(-20deg); }
  to   { opacity:1; transform: scale(1) rotate(0deg); }
}
.fq-result-name {
  font-family: var(--fq-ff-display);
  font-size: 1.6rem;
  color: var(--fq-text);
  margin: 0 0 .5rem;
}
.fq-result-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--fq-accent);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.fq-result-body-inner {
  padding: 2rem 2.5rem;
}
@media (max-width: 540px) {
  .fq-result-body-inner { padding: 1.5rem; }
}

.fq-result-desc {
  color: var(--fq-text-muted);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Benefit pill */
.fq-result-benefit {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--fq-accent-light);
  color: var(--fq-accent);
  font-size: .8rem;
  font-weight: 600;
  padding: .5rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}

/* Efectividad */
.fq-effectiveness-wrap {
  margin-bottom: 1.75rem;
}
.fq-effectiveness-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}
.fq-effectiveness-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--fq-text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.fq-effectiveness-pct {
  font-size: .85rem;
  font-weight: 700;
  color: var(--fq-accent);
}
.fq-effectiveness-bar {
  height: 8px;
  background: var(--fq-border);
  border-radius: 99px;
  overflow: hidden;
}
.fq-effectiveness-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fq-accent) 0%, var(--fq-accent-mid) 100%);
  border-radius: 99px;
  width: 0%;
  transition: width 1s cubic-bezier(.4,0,.2,1) .3s;
}

.fq-result-cta {
  margin-bottom: 1rem;
}

/* Botón de retomar */
.fq-btn-retake {
  display: block;
  text-align: center;
  background: none;
  border: none;
  color: var(--fq-text-muted);
  font-family: var(--fq-ff-body);
  font-size: .8rem;
  cursor: pointer;
  padding: .35rem;
  transition: color var(--fq-transition);
}
.fq-btn-retake:hover { color: var(--fq-text); }

/* Garantía mini */
.fq-result-guarantee {
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-content: center;
  font-size: .75rem;
  color: var(--fq-text-muted);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--fq-border);
}
.fq-result-guarantee svg { color: var(--fq-accent); flex-shrink:0; }

/* ── LOADING STATE ─────────────────────────────────────── */
.fq-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  text-align: center;
}
.fq-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--fq-border);
  border-top-color: var(--fq-accent);
  border-radius: 50%;
  animation: fqSpin .8s linear infinite;
}
@keyframes fqSpin {
  to { transform: rotate(360deg); }
}
.fq-loading-text {
  font-size: .9rem;
  color: var(--fq-text-muted);
  font-weight: 500;
}

/* ── UTILIDADES ────────────────────────────────────────── */
.fq-hidden { display: none !important; }

/* Transición entre pantallas */
.fq-screen-exit {
  animation: fqFadeOut .2s ease forwards;
}
@keyframes fqFadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* Elementor editor: mostrar placeholder */
.elementor-editor-active .fq-screen--intro.fq-active {
  display: block !important;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 480px) {
  .fq-intro-stats { gap: .75rem; padding: 1rem; }
  .fq-opt { padding: .875rem 1rem; gap: .75rem; }
}
