/* =========================================================================
   VisaGo — hoja de estilos compartida
   Diseño: mobile-first, limpio y profesional. Paleta azul/celeste con
   acentos amarillos. Fuentes "Corporate Trust": Lexend (títulos) +
   Source Sans 3 (cuerpo), elegidas por su excelente legibilidad.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ---- Tokens de diseño (paleta y medidas) ---- */
:root {
  /* Azules / celestes */
  --azul-900: #0b2a52;   /* navy profundo */
  --azul-800: #103a73;
  --azul-700: #1e4fa3;
  --azul-600: #2563c9;   /* azul principal de marca */
  --azul-500: #3b82f6;
  --celeste-400: #38bdf8; /* celeste de acento */
  --celeste-300: #7dd3fc;
  --celeste-100: #e0f2fe;
  --celeste-50:  #f0f9ff;

  /* Amarillo (toque de marca / CTA secundario) */
  --amarillo-500: #f5b301;
  --amarillo-400: #fbc02d;
  --amarillo-100: #fff4cc;

  /* Neutros */
  --texto:        #0f2138;
  --texto-suave:  #4b5b70;
  --borde:        #d6e2f0;
  --fondo:        #f4f8fd;
  --blanco:       #ffffff;

  /* Estados */
  --ok:      #15803d;
  --ok-bg:   #dcfce7;
  --alerta:  #b45309;
  --alerta-bg: #fef3c7;
  --error:   #b91c1c;
  --error-bg:#fee2e2;

  /* Bandas de resultado */
  --banda-alta:  #15803d;
  --banda-media: #b45309;
  --banda-baja:  #b91c1c;

  --radio:   14px;
  --radio-sm: 9px;
  --sombra:  0 10px 30px rgba(16, 58, 115, 0.10);
  --sombra-sm: 0 2px 8px rgba(16, 58, 115, 0.08);
  --ancho-max: 880px;
}

/* ---- Reset ligero ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Lexend', sans-serif; line-height: 1.2; color: var(--azul-900); margin: 0 0 .5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--azul-700); }

/* ---- Layout / contenedor ---- */
.contenedor { width: 100%; max-width: var(--ancho-max); margin: 0 auto; padding: 0 18px; }

/* ---- Encabezado / barra de marca ---- */
.barra {
  background: var(--blanco);
  border-bottom: 1px solid var(--borde);
  position: sticky; top: 0; z-index: 30;
}
.barra .contenedor { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img, .logo svg { height: 36px; width: auto; display: block; }
.logo-texto { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--azul-800); letter-spacing: -.01em; }
.logo-texto b { color: var(--azul-600); }
.barra .menu { margin-left: auto; display: flex; gap: 8px; }

/* ---- Hero (landing) ---- */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, var(--celeste-100), transparent 60%),
    linear-gradient(160deg, var(--azul-900), var(--azul-700) 60%, var(--azul-600));
  color: #eaf3ff;
  padding: 56px 0 64px;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3rem); margin-bottom: .3em; }
.hero p.sub { color: #cfe2ff; font-size: 1.15rem; max-width: 640px; }
.hero .acentro { color: var(--amarillo-400); }

/* ---- Tarjetas ---- */
.tarjeta {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-sm);
  padding: 22px;
}
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr; }

/* Tarjetas de opción en la landing */
.opcion { display: flex; flex-direction: column; height: 100%; }
.opcion .etiqueta {
  display: inline-block; align-self: flex-start;
  background: var(--celeste-100); color: var(--azul-700);
  font-weight: 600; font-size: .8rem; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.opcion h3 { font-size: 1.3rem; }
.opcion p { color: var(--texto-suave); flex: 1; }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Lexend', sans-serif; font-weight: 600; font-size: 1rem;
  padding: 13px 22px; border-radius: var(--radio-sm); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--azul-600); color: #fff; box-shadow: 0 6px 16px rgba(37,99,201,.35); }
.btn-primario:hover { background: var(--azul-700); }
.btn-amarillo { background: var(--amarillo-500); color: var(--azul-900); box-shadow: 0 6px 16px rgba(245,179,1,.35); }
.btn-amarillo:hover { background: var(--amarillo-400); }
.btn-claro { background: #fff; color: var(--azul-700); border-color: var(--borde); }
.btn-claro:hover { border-color: var(--azul-500); }
.btn-fantasma { background: transparent; color: #eaf3ff; border-color: rgba(255,255,255,.5); }
.btn-fantasma:hover { background: rgba(255,255,255,.12); }
.btn-bloque { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---- Disclaimer ---- */
.disclaimer {
  background: var(--alerta-bg); border: 1px solid #fcd34d; color: #7c4a03;
  border-radius: var(--radio-sm); padding: 14px 16px; font-size: .95rem;
  display: flex; gap: 10px; align-items: flex-start; margin: 18px 0;
}
.disclaimer.compacto { font-size: .85rem; padding: 10px 12px; }
.disclaimer .ico { flex: 0 0 auto; font-size: 1.1rem; line-height: 1.4; }
.disclaimer strong { color: #6b3f02; }

/* ---- Bloque de instrucciones ---- */
.instrucciones {
  background: var(--celeste-50); border: 1px solid var(--celeste-100);
  border-radius: var(--radio); padding: 18px 20px; margin: 18px 0;
}
.instrucciones h2 { color: var(--azul-700); font-size: 1.2rem; }
.instrucciones ul { margin: .4em 0 0; padding-left: 1.2em; }
.instrucciones li { margin-bottom: .25em; }
.meta-form { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .92rem; color: var(--texto-suave); }
.meta-form span { display: inline-flex; align-items: center; gap: 6px; background:#fff; border:1px solid var(--borde); padding:6px 12px; border-radius:999px; }

/* ---- Formularios ---- */
.seccion-form { margin: 22px 0; }
fieldset { border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px 18px 6px; margin: 0 0 18px; background: var(--blanco); }
legend { font-family: 'Lexend', sans-serif; font-weight: 600; color: var(--azul-700); padding: 0 8px; font-size: 1.05rem; }
.campo { margin-bottom: 16px; }
.campo > label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--texto); }
.campo .ayuda { display: block; font-size: .85rem; color: var(--texto-suave); margin: -2px 0 6px; }
.obligatorio::after { content: " *"; color: var(--error); font-weight: 700; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"],
input[type="date"], input[type="url"], select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--texto);
  background: #fff; border: 1.5px solid var(--borde); border-radius: var(--radio-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--azul-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
/* Grupos de opciones (radio/checkbox como tarjetas tocables) */
.opciones { display: grid; gap: 8px; }
.opcion-radio {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border: 1.5px solid var(--borde); border-radius: var(--radio-sm); background: #fff; cursor: pointer;
}
.opcion-radio:hover { border-color: var(--celeste-300); }
.opcion-radio input { width: auto; margin: 0; accent-color: var(--azul-600); }
.opcion-radio:has(input:checked) { border-color: var(--azul-500); background: var(--celeste-50); }
.fila { display: grid; gap: 14px; grid-template-columns: 1fr; }
.aviso-pasaporte { font-size: .85rem; color: var(--alerta); background: var(--alerta-bg); border-radius: var(--radio-sm); padding: 6px 10px; display:inline-block; margin-bottom: 10px; }

/* ---- Barra de progreso (DS-160) ---- */
.progreso-wrap { position: sticky; top: 64px; z-index: 20; background: var(--fondo); padding: 12px 0 8px; }
.progreso-barra { height: 10px; background: var(--celeste-100); border-radius: 999px; overflow: hidden; }
.progreso-relleno { height: 100%; width: 0%; background: linear-gradient(90deg, var(--azul-600), var(--celeste-400)); transition: width .3s ease; }
.progreso-texto { font-size: .85rem; color: var(--texto-suave); margin-top: 6px; display:flex; justify-content: space-between; }
.paso { display: none; }
.paso.activo { display: block; animation: aparecer .25s ease; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.nav-pasos { display: flex; gap: 10px; justify-content: space-between; margin-top: 10px; }
.guardado-aviso { font-size: .82rem; color: var(--ok); text-align: center; margin-top: 8px; min-height: 1.2em; }

/* ---- Resultado del puntaje (Form 1) ---- */
.resultado { display: none; }
.resultado.visible { display: block; animation: aparecer .3s ease; }
.medidor {
  text-align: center; padding: 24px; border-radius: var(--radio); color: #fff; margin-bottom: 18px;
}
.medidor.alta  { background: linear-gradient(160deg, #166534, var(--banda-alta)); }
.medidor.media { background: linear-gradient(160deg, #92400e, var(--banda-media)); }
.medidor.baja  { background: linear-gradient(160deg, #991b1b, var(--banda-baja)); }
.medidor .num { font-family: 'Lexend', sans-serif; font-size: 3.4rem; font-weight: 700; line-height: 1; }
.medidor .banda { font-size: 1.3rem; font-weight: 600; margin-top: 4px; }
.medidor .de { opacity: .85; font-size: .95rem; }
.consejos li { margin-bottom: 8px; }
.desglose { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .95rem; }
.desglose th, .desglose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--borde); }
.desglose td:last-child, .desglose th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Mensajes de envío ---- */
.mensaje { border-radius: var(--radio-sm); padding: 12px 14px; margin: 14px 0; display: none; }
.mensaje.visible { display: block; }
.mensaje.ok    { background: var(--ok-bg); color: var(--ok); border:1px solid #86efac; }
.mensaje.error { background: var(--error-bg); color: var(--error); border:1px solid #fca5a5; }
.mensaje.info  { background: var(--celeste-50); color: var(--azul-700); border:1px solid var(--celeste-100); }

/* ---- Vista resumen (DS-160) ---- */
.resumen { display:none; }
.resumen.visible { display:block; }
.resumen dl { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0; }
.resumen .grupo { margin-bottom: 16px; }
.resumen .grupo h3 { border-bottom: 2px solid var(--celeste-100); padding-bottom: 4px; }
.resumen dt { font-weight: 600; color: var(--azul-800); font-size: .9rem; }
.resumen dd { margin: 0 0 8px; color: var(--texto-suave); }

/* ---- Pie ---- */
.pie { background: var(--azul-900); color: #b9cdec; padding: 28px 0; margin-top: 48px; font-size: .92rem; }
.pie a { color: var(--celeste-300); }
.pie .contenedor { display: flex; flex-direction: column; gap: 8px; }

/* ---- Utilidades ---- */
.centrado { text-align: center; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.oculto { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ---- Responsive (a partir de tablet) ---- */
@media (min-width: 700px) {
  h1 { font-size: 2.3rem; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .fila.dos { grid-template-columns: 1fr 1fr; }
  .fila.tres { grid-template-columns: 1fr 1fr 1fr; }
  .resumen dl { grid-template-columns: 1fr 1fr; }
}

/* Impresión (para que el usuario pueda imprimir el resumen del DS-160) */
@media print {
  .barra, .pie, .progreso-wrap, .nav-pasos, .btn, .disclaimer, .instrucciones { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .resumen { display: block !important; }
}
