/* ============================================================
   FINANZAS FÁCILES — Encuesta / Evaluación de Perfil
   Estilo visual: Open House (Premium · Moderno · Animado)
   ============================================================ */

/* --- LOADING OVERLAY --- */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #0C2F56 0%, #112d52 50%, #0a2240 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}
.loading-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #5CE1E6;
  border-right-color: #516FF3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
}
.loading-subtext {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin-top: -20px;
}
.loading-progress {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: -16px;
}
.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #516FF3, #5CE1E6);
  border-radius: 3px;
  animation: loadProgress 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes loadProgress {
  0% { width: 0%; }
  30% { width: 45%; }
  60% { width: 70%; }
  80% { width: 88%; }
  100% { width: 100%; }
}

/* --- ANIMATED BG SHAPES (like open-house) --- */
.survey-hero__shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.survey-hero__shapes .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: floatShape 20s ease-in-out infinite;
}
.survey-hero__shapes .shape--1 {
  width: 400px; height: 400px;
  background: #516FF3;
  top: -15%; left: -10%;
}
.survey-hero__shapes .shape--2 {
  width: 350px; height: 350px;
  background: #A855F7;
  top: 20%; right: -15%;
  animation-delay: -5s;
}
.survey-hero__shapes .shape--3 {
  width: 300px; height: 300px;
  background: #5CE1E6;
  bottom: -10%; left: 30%;
  animation-delay: -10s;
}
@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -25px) scale(1.08); }
  50% { transform: translate(-15px, 30px) scale(0.96); }
  75% { transform: translate(25px, 15px) scale(1.04); }
}

/* --- HERO / VIDEO SECTION --- */
.survey-hero {
  padding: 100px 0 40px;
  background: linear-gradient(175deg, #0C2F56 0%, #0a1e3d 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.survey-hero-content {
  max-width: 640px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 2;
}
.survey-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(81, 111, 243, 0.15);
  border: 1px solid rgba(81, 111, 243, 0.3);
  border-radius: var(--radius-pill);
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.survey-hero-title {
  font-family: 'Raleway', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.text-gradient {
  background: linear-gradient(135deg, #5CE1E6, #516FF3, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.survey-hero-subtitle {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto;
}

/* --- VIDEO --- */
.video-wrapper {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.video-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(81,111,243,0.2);
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.1);
}
.video-container video {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
}
.video-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}
.video-caption svg {
  flex-shrink: 0;
}

/* --- REGISTRATION FORM (inline before survey for unidentified visitors) --- */
#registro {
  background: #FAFBFC;
  position: relative;
}
.registro-section {
  max-width: 520px;
  margin: 0 auto;
}
.registro-header {
  text-align: center;
  margin-bottom: 2rem;
}
.registro-header .section-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.registro-header .section-subtitle {
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.6;
}
.registro-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.registro-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.registro-field label {
  font-family: 'Raleway', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.registro-field input,
.registro-field select {
  padding: 14px 16px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  color: var(--navy);
  background: #FFFFFF;
  border: 2px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-md);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.registro-field input:focus,
.registro-field select:focus {
  outline: none;
  border-color: #516FF3;
  box-shadow: 0 0 0 3px rgba(81, 111, 243, 0.1);
}
.registro-field input::placeholder {
  color: var(--gray-400);
}
.registro-field input.invalid,
.registro-field select.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.registro-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.registro-row {
  display: flex;
  gap: 1rem;
}
.registro-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 16px 24px;
  font-size: 1rem;
}
.registro-privacy {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.25rem;
}
.registro-privacy a {
  color: var(--blue);
  text-decoration: underline;
}

/* --- SURVEY SECTION --- */
#encuesta {
  background: #FAFBFC;
  position: relative;
}
.survey-section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.survey-section-header .section-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.survey-section-header .section-subtitle {
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* --- PROGRESS BAR --- */
.survey-progress {
  max-width: 560px;
  margin: 0 auto 2rem;
  text-align: center;
}
.survey-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.survey-progress-fill {
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, #516FF3, #5CE1E6, #A855F7);
  background-size: 200% 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: progressShimmer 3s linear infinite;
}
@keyframes progressShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.survey-progress-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: 0.5px;
}

/* --- SURVEY FORM --- */
.survey-form {
  max-width: 560px;
  margin: 0 auto;
}

/* Steps */
.survey-step {
  display: none;
  animation: fadeUp 0.35s ease forwards;
}
.survey-step.active {
  display: block;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.survey-question-number {
  font-family: 'Raleway', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #516FF3, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}
.survey-question {
  font-family: 'Raleway', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.survey-hint {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

/* Options */
.survey-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 1.25rem;
}
.survey-option {
  cursor: pointer;
  display: block;
}
.survey-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.survey-option-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 2px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.survey-option-box:active {
  transform: scale(0.98);
}
.survey-option input:checked + .survey-option-box {
  border-color: #516FF3;
  background: rgba(81, 111, 243, 0.06);
  box-shadow: 0 0 0 1px #516FF3, 0 4px 16px rgba(81, 111, 243, 0.12);
}
.survey-option input:focus-visible + .survey-option-box {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.survey-option-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(81,111,243,0.08), rgba(92,225,230,0.08));
  border-radius: 10px;
}
.survey-option-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a2e;
  line-height: 1.35;
}

/* Hover - only for non-touch */
@media (hover: hover) {
  .survey-option-box:hover {
    border-color: rgba(81, 111, 243, 0.3);
    background: rgba(81, 111, 243, 0.03);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  }
}

/* --- NAVIGATION BUTTONS --- */
.survey-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  gap: 12px;
}
.survey-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}
.survey-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.survey-btn--back {
  background: transparent;
  color: var(--gray-500);
  border: 2px solid rgba(0,0,0,0.1);
}
.survey-btn--back:not(:disabled):hover {
  border-color: rgba(0,0,0,0.2);
  color: var(--navy);
}
.survey-btn--next,
.survey-btn--submit {
  background: linear-gradient(135deg, #516FF3, #A855F7);
  background-size: 200% 200%;
  color: #fff;
  margin-left: auto;
  box-shadow: 0 4px 16px rgba(81, 111, 243, 0.3);
  animation: gradientBtn 4s ease-in-out infinite;
}
@keyframes gradientBtn {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.survey-btn--next:hover,
.survey-btn--submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(81, 111, 243, 0.4);
}
.survey-btn--submit {
  background: linear-gradient(135deg, #516FF3, #A855F7, #EC4899);
  background-size: 200% 200%;
}

/* --- SHAKE ANIMATION (unanswered) --- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.survey-step.shake {
  animation: shake 0.4s ease;
}

/* --- SUCCESS STATE --- */
.survey-success {
  text-align: center;
  padding: 3rem 0;
  max-width: 520px;
  margin: 0 auto;
  animation: fadeUp 0.5s ease forwards;
}
.survey-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}
.check-draw {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.6s 0.3s ease forwards;
}
@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}
.survey-success-title {
  font-family: 'Raleway', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
}
.survey-success-text {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.survey-success-card {
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-align: left;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.survey-success-card p {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.survey-success-card ul {
  list-style: none;
  padding: 0;
}
.survey-success-card li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
}
.survey-success-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #22C55E;
  font-weight: 700;
}

/* Wait / "evaluating" notice */
.survey-success-wait {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(81, 111, 243, 0.06);
  border: 1px solid rgba(81, 111, 243, 0.15);
  border-radius: var(--radius-md);
  text-align: left;
}
.survey-success-wait__icon {
  flex-shrink: 0;
  color: var(--blue);
  animation: pulse-wait 2s ease-in-out infinite;
}
@keyframes pulse-wait {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.survey-success-wait p {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
}

/* --- MORE INFO BANNER --- */
.more-info-banner {
  text-align: center;
  padding: 2rem 1rem;
  background: #FAFBFC;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.more-info-banner p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}
.more-info-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #516FF3;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.more-info-link:hover {
  opacity: 0.7;
}

/* --- FOOTER ENCUESTA (consistent gradient style) --- */
.encuesta-footer {
  padding: 40px 0 32px;
  background: linear-gradient(135deg, #0C2F56 0%, #112d52 50%, #0a2240 100%);
  color: rgba(255,255,255,0.6);
  position: relative;
}
.encuesta-footer .footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.encuesta-footer .footer-logo {
  height: 28px;
  width: auto;
  opacity: 0.6;
  filter: brightness(0) invert(1);
}
.encuesta-footer .footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}
.encuesta-footer .footer-legal {
  display: flex;
  gap: 20px;
}
.encuesta-footer .footer-legal a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  transition: color 0.3s ease;
}
.encuesta-footer .footer-legal a:hover {
  color: rgba(255,255,255,0.8);
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 480px) {
  .video-wrapper,
  .video-container {
    max-width: calc(100% - 24px);
  }
  .survey-form {
    max-width: calc(100% - 16px);
  }
}

/* --- TABLET & DESKTOP --- */
@media (min-width: 768px) {
  .survey-hero {
    padding: 120px 0 60px;
  }
  .survey-hero-title {
    font-size: 2.5rem;
  }
  .survey-hero-subtitle {
    font-size: 1.1rem;
  }
  .survey-question {
    font-size: 1.35rem;
  }
  .survey-option-box {
    padding: 16px 20px;
  }
  .survey-success-title {
    font-size: 1.8rem;
  }
}
