/* psy-access-gate.css — Access Gate for PSY Tests
   Only .psytest-* classes. Tokens from psy-tests-base.css (always loaded first). */

/* ── Wrapper ─────────────────────────────────────────── */
.psytest-gate {
  font-family: var(--psy-font-body);
  max-width: 440px;
  margin: 40px auto;
  padding: 0 16px;
  color: var(--psy-ink);
}

.psytest-card {
  background: var(--psy-surface);
  border: 1px solid var(--psy-border);
  border-radius: var(--psy-radius-sm);
  box-shadow: var(--psy-shadow-card);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 480px) {
  .psytest-card {
    padding: 28px 20px;
  }
}

/* ── Header ──────────────────────────────────────────── */
.psytest-header {
  text-align: center;
  margin-bottom: 20px;
}

.psytest-logo {
  font-family: var(--psy-font-title);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--psy-green);
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}

.psytest-title {
  font-family: var(--psy-font-title);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--psy-ink);
  margin: 0 0 8px;
}

.psytest-subtitle {
  font-family: var(--psy-font-body);
  font-size: 0.88rem;
  color: var(--psy-ink-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Form elements ───────────────────────────────────── */
.psytest-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.psytest-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.psytest-label {
  font-family: var(--psy-font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--psy-ink);
}

.psytest-input,
.psytest-select {
  font-family: var(--psy-font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1px solid var(--psy-border);
  border-radius: 8px;
  background: var(--psy-surface);
  color: var(--psy-ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.psytest-input:focus,
.psytest-select:focus {
  border-color: var(--psy-green);
  box-shadow: 0 0 0 3px rgba(45,74,45,0.1);
}

.psytest-input::placeholder {
  color: var(--psy-ink-muted);
  opacity: 0.7;
}

/* ── Two-column row ──────────────────────────────────── */
.psytest-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .psytest-row {
    grid-template-columns: 1fr;
  }
}

/* ── Missing field highlight ─────────────────────────── */
.psytest-field--missing .psytest-label {
  color: var(--psy-action);
}

.psytest-field--missing .psytest-input,
.psytest-field--missing .psytest-select {
  border-color: var(--psy-action);
}

/* ── A11y field error (F1.5) ─────────────────────────── */
.psytest-field-error {
  font-size: .78rem;
  color: var(--psy-action);
  margin-top: 2px;
}

.psytest-input[aria-invalid="true"] {
  border-color: var(--psy-action);
}

/* ── Consent ─────────────────────────────────────────── */
.psytest-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--psy-green-tint);
  border-radius: 8px;
  margin-top: 4px;
}

.psytest-consent input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--psy-green);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.psytest-consent-text {
  font-family: var(--psy-font-body);
  font-size: 0.82rem;
  color: var(--psy-ink-muted);
  line-height: 1.45;
  /* Texto corto de 1-3 líneas: reparte mejor la última y evita la palabra huérfana
     que parte la frase legal justo antes del enlace. No se usa `balance` porque
     estos textos pueden crecer al traducirse. */
  text-wrap: pretty;
}

.psytest-consent .psytest-small {
  text-wrap: pretty;
}

/* Enlaces legales (términos y condiciones / política de privacidad) dentro del
   bloque de consentimiento.

   psy-tests-base.css no define token de enlace — el design system no contemplaba
   hipervínculos en el gate. Se declara aquí UNA vez en vez de repetir el hex.

   El !important es OBLIGATORIO: la regla heredada `.psytest-wrap *{color:…!important}`
   pisa cualquier color declarado en el intro y el enlace saldría del color del cuerpo
   en lugar de azul. Ver KNOWN_ISSUES #26. */
.psytest-consent {
  --psy-link: #1a56db;
}

/* ESPECIFICIDAD — no bajar los selectores de aquí.
   psytest-ui.css:132 declara `.psytest-consent-card label *{color:#3a4a3a!important}`,
   con especificidad (0,1,2). Un `.psytest-consent a` (0,1,1) PIERDE aunque también
   lleve !important, y el enlace saldría gris en vez de azul. `.psytest-consent-card
   .psytest-consent a` es (0,2,1) y gana. Se mantienen los dos selectores porque el
   gate usa `.psytest-consent` sin el `-card` como ancestro. */
.psytest-consent-card .psytest-consent a,
.psytest-consent a {
  color: var(--psy-link) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  font-weight: 600;
  border-radius: 2px;
  transition-property: text-decoration-thickness, color;
  transition-duration: 120ms;
  transition-timing-function: ease-out;
}

.psytest-consent-card .psytest-consent a:hover,
.psytest-consent a:hover {
  text-decoration-thickness: 2px;
}

/* El label es el área de click real (~48px de alto con el padding heredado), muy por
   encima del mínimo táctil; el checkbox de 16px solo es el indicador visual. */
label.psytest-consent,
.psytest-consent label {
  cursor: pointer;
}

/* Foco visible propio: validateConsent()/require() llaman a .focus() para llevar al
   usuario al checkbox que bloquea. Sin anillo explícito, un tema padre que anule el
   outline del UA deja ese focus() invisible y el bloqueo parece no tener causa. */
.psytest-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--psy-link);
  outline-offset: 2px;
}

/* ── Tarjeta de términos inyectada en el intro de los tests ──────────────────
   psytest-ui.css:128 define .psytest-consent-card como flex ROW con gap. El mensaje
   de error es hermano del label, así que en fila se colocaba A LA DERECHA y estrechaba
   el recuadro. Aquí se apila: el label ya es flex por su cuenta (checkbox + texto).

   Tampoco repite el border-top del contenedor: junto al checkbox clínico forman UN
   grupo de consentimiento, y un segundo separador los leía como bloques ajenos. */
[data-psy-terms-card] {
  display: block;
  border-top: none;
  padding-top: 0;
  margin-top: 10px;
}

/* Estado de bloqueo: checkbox obligatorio sin marcar tras intentar avanzar.
   La clase --error cae en dos sitios distintos según el contexto:
     · gate            → sobre el propio .psytest-consent (es un div)
     · intro del test  → sobre el .psytest-consent-card contenedor
   El realce se pinta SIEMPRE en una sola superficie —la interior— para no anidar
   dos cajas rojas, que es lo que se veía. */
.psytest-consent.psytest-consent--error,
.psytest-consent--error > .psytest-consent {
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px var(--psy-danger);
}

.psytest-consent--error input[type="checkbox"] {
  accent-color: var(--psy-danger);
}

.psytest-consent,
.psytest-consent--error {
  transition-property: background-color, box-shadow;
  transition-duration: 160ms;
  transition-timing-function: ease-out;
}

/* Mensaje de bloqueo. Texto corto → `pretty` evita la palabra huérfana en la última
   línea, que en un mensaje de error se lee como recorte. */
.psytest-consent-error-msg {
  font-family: var(--psy-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--psy-danger) !important;
  line-height: 1.4;
  margin: 6px 0 0;
  text-wrap: pretty;
  animation: psytest-consent-err-in 160ms ease-out both;
}

/* Entrada breve y contenida: el mensaje aparece al pulsar, no debe robar atención
   del checkbox al que además se le lleva el foco. Sin salida animada — el atributo
   `hidden` lo retira de golpe, que es lo correcto para un error resuelto. */
@keyframes psytest-consent-err-in {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .psytest-consent,
  .psytest-consent--error,
  .psytest-consent-card .psytest-consent a,
  .psytest-consent a {
    transition-duration: 1ms;
  }
  .psytest-consent-error-msg {
    animation-duration: 1ms;
  }
}

/* ── Buttons ─────────────────────────────────────────── */
.psytest-btn {
  font-family: var(--psy-font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  isolation: isolate;
}

.psytest-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Blindaje vs tema padre: Astra/OceanWP/Elementor inyectan :hover rosa/magenta
   con !important sobre <button>. Imponemos la identidad psy-tests con !important. */
.psytest-btn--primary {
  background: var(--psy-action) !important;
  color: #fff !important;
  width: 100%;
}

.psytest-btn--primary:hover:not(:disabled) {
  background: var(--psy-action-h) !important;
  color: #fff !important;
}

.psytest-btn--ghost {
  background: transparent !important;
  color: var(--psy-ink-muted) !important;
  border: 1px solid var(--psy-border) !important;
  width: 100%;
}

.psytest-btn--ghost:hover:not(:disabled) {
  background: var(--psy-green-light) !important;
  color: var(--psy-ink) !important;
}

/* ── Alerts ──────────────────────────────────────────── */
.psytest-alert {
  font-family: var(--psy-font-body);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.psytest-alert--error {
  background: rgba(181,58,42,.08);
  color: var(--psy-danger);
  border: 1px solid rgba(181,58,42,.15);
}

.psytest-alert--warning {
  background: rgba(217,119,6,.08);
  color: var(--psy-warning);
  border: 1px solid rgba(217,119,6,.15);
}

.psytest-alert--success {
  background: rgba(45,74,45,.08);
  color: var(--psy-green);
  border: 1px solid rgba(45,74,45,.15);
}

/* ── Welcome / Ready state ───────────────────────────── */
.psytest-welcome {
  text-align: center;
}

/* Icono en círculo tintado y centrado (el SVG es display:block; sin contenedor
   flex el margin:auto no lo centraba — de ahí el "escudo desalineado"). */
.psytest-welcome-icon {
  width: 72px;
  height: 72px;
  margin: 4px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--psy-green-light, rgba(45,74,45,.08));
}

.psytest-welcome-icon svg {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
}

.psytest-welcome-greeting {
  font-size: 0.9rem;
  color: var(--psy-ink-muted);
  margin: 0 auto 24px;
  max-width: 320px;
  line-height: 1.5;
}

/* ── Completion (post-submit, PSY_GATE.complete) ──────────
   Estos estilos faltaban: el markup existía (icono check + título + countdown)
   pero sin CSS se veía "desordenado, sin icono, sin contador". */
.psytest-complete {
  text-align: center;
  align-items: center;
}

.psytest-complete-icon {
  width: 76px;
  height: 76px;
  margin: 6px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(45, 74, 45, .10);
  animation: psytest-complete-pop .45s cubic-bezier(.2, .8, .25, 1) both;
}

.psytest-complete-icon svg {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  stroke: var(--psy-green, #2d4a2d) !important;
}

@keyframes psytest-complete-pop {
  0%   { transform: scale(.4);  opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

.psytest-complete-title {
  font-family: var(--psy-font-display, var(--psy-font-body));
  font-size: 1.25rem;
  color: var(--psy-ink);
  margin: 0 0 8px;
  line-height: 1.3;
}

.psytest-complete-text {
  font-size: 0.92rem;
  color: var(--psy-ink-muted);
  margin: 0 auto;
  max-width: 340px;
  line-height: 1.55;
}

/* Loader de transición post-test — el spinner es el héroe (pantalla de carga limpia).
   Se evita el contrasentido check-éxito + spinner-cargando: solo spinner + mensaje. */
.psytest-spinner--lg {
  width: 28px;
  height: 28px;
  border-width: 3px;
}
/* Variante del círculo de ícono cuando aloja el spinner (sin el "pop" del check) */
.psytest-complete-icon--loading { animation: none; }
.psytest-complete-icon--loading .psytest-spinner--lg {
  width: 40px;
  height: 40px;
  border-width: 3.5px;
}

#psyCompleteCountdown {
  display: inline-block;
  min-width: 1.1em;
  font-weight: 700;
  color: var(--psy-green, #2d4a2d);
  font-variant-numeric: tabular-nums;
}

/* ── Pantalla de salida post-test (estándar para todos los tests) ──────────────
   Sofía levemente sobre la card + loader + mensaje + countdown. El min-height
   evita el "rectángulo blanco colapsado" que se veía durante la transición. */
.psytest-exit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 24px 16px;
}
.psytest-exit-sofia {
  width: 168px;
  max-width: 42vw;
  height: auto;
  display: block;
  margin-bottom: -28px;   /* Sofía solapa levemente la parte superior de la card */
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.psytest-exit-card {
  min-height: 196px;
  max-width: 440px;
  width: 100%;
  padding: 46px 28px 30px;   /* top extra por el solape de Sofía */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
@media (max-width: 600px) {
  .psytest-exit-sofia { width: 128px; max-width: 46vw; margin-bottom: -22px; }
  .psytest-exit-card  { padding: 38px 20px 26px; }
}

/* ── Error / Static states ───────────────────────────── */
.psytest-error-wrap {
  text-align: center;
  padding: 12px 0;
}

.psytest-error-icon {
  margin: 0 auto 16px;
}

.psytest-error-title {
  font-family: var(--psy-font-title);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--psy-ink);
  margin: 0 0 8px;
}

.psytest-error-text {
  font-family: var(--psy-font-body);
  font-size: 0.88rem;
  color: var(--psy-ink-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ── Inline link ─────────────────────────────────────── */
.psytest-link {
  color: var(--psy-green);
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-size: inherit;
  font-family: inherit;
  padding: 0 2px;
  display: inline;
  border-radius: 3px;
  transition: color 0.15s ease;
}

.psytest-link:hover {
  color: var(--psy-action);
  text-decoration-color: var(--psy-action);
}

/* ── Divider ─────────────────────────────────────────── */
.psytest-divider {
  font-family: var(--psy-font-body);
  text-align: center;
  font-size: 0.8rem;
  color: var(--psy-ink-muted);
  margin: 12px 0 8px;
}

/* ── Loading spinner ─────────────────────────────────── */
.psytest-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--psy-border);
  border-top-color: var(--psy-green);
  border-radius: 50%;
  animation: psytest-spin 0.6s linear infinite;
}

@keyframes psytest-spin {
  to { transform: rotate(360deg); }
}

/* ── Wrapper de campos de perfil faltantes (antes "bienvenida"; el saludo se eliminó
   2026-06-16, queda solo como contenedor de la inserción dinámica de datos faltantes) */
.psytest-welcome-user {
  margin-bottom: 16px;
}
/* Sin campos faltantes el wrapper queda vacío → no debe ocupar espacio ni mostrarse */
.psytest-welcome-user:empty {
  display: none;
}

.psytest-welcome-user .psytest-welcome-greeting {
  font-size: 1rem;
  color: var(--psy-green);
  /* El fondo tintado ya distingue el saludo: la barra lateral de color está
     prohibida (CLAUDE.md · DESIGN_SYSTEM.md §17.0). */
  background: var(--psy-green-light);
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.psytest-profile-missing {
  background: var(--psy-warning-bg);
  border: 1px solid var(--psy-warning-border);
  border-radius: 8px;
  padding: 16px;
  margin: 8px 0 16px 0;
}

.psytest-profile-missing h4 {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  color: var(--psy-warning-text);
}

/* ── Fade animation ──────────────────────────────────── */
.psytest-fade-in {
  animation: psytest-fadein 0.25s ease both;
}

@keyframes psytest-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .psytest-btn,
  .psytest-spinner,
  .psytest-fade-in {
    transition: none !important;
    animation: none !important;
  }
}

/* ── Split layout (registro / login / completar perfil) ──
   Formulario a la izquierda + ilustración a la derecha.
   Inspirado en el layout de acceso del portal de pacientes, recreado con
   namespace .psytest-* y tokens --psy-* (sin dependencias de pyc-booking). */
.psytest-split {
  display: flex;
  max-width: 900px;
  margin: 40px auto;
  background: var(--psy-surface);
  border: 1px solid var(--psy-border);
  border-radius: var(--psy-radius-lg);
  box-shadow: var(--psy-shadow-card);
  overflow: hidden;
}

.psytest-split__form {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 32px;
}

/* Dentro del split, el gate/card no repite ancho, márgenes ni chrome:
   esos los aporta el contenedor .psytest-split. */
.psytest-split .psytest-gate {
  max-width: 420px;
  width: 100%;
  margin: 0;
  padding: 0;
}
.psytest-split .psytest-card {
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.psytest-split__visual {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--psy-green-tint);
}

.psytest-split__hero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 32px;
}
.psytest-split__hero img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* En pantallas estrechas el split colapsa a una sola columna y se oculta la
   ilustración (igual que el patrón de acceso del portal en mobile). */
@media (max-width: 720px) {
  .psytest-split {
    flex-direction: column;
    max-width: 440px;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  .psytest-split__form {
    padding: 0 16px;
  }
  .psytest-split .psytest-gate {
    max-width: none;
  }
  .psytest-split .psytest-card {
    border: 1px solid var(--psy-border);
    box-shadow: var(--psy-shadow-card);
    border-radius: var(--psy-radius-sm);
    padding: 36px 32px;
  }
  .psytest-split__visual {
    display: none;
  }
}

@media (max-width: 480px) {
  .psytest-split .psytest-card {
    padding: 28px 20px;
  }
}

/* ── Hero-gate (pantalla "ready" — gate general reutilizable) ─────────
   Dos columnas sobre #fff: contenido dinámico del test (izq.) + ilustración
   Sofía (der.). No muestra instrucciones del test: van en la pantalla
   siguiente, tras "Comenzar test". Estilo clínico cálido, jerarquía clara. */
.psytest-hero-gate {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 980px;
  margin: 40px auto;
  padding: 44px;
  background: #ffffff;
  border: 1px solid var(--psy-border);
  border-radius: var(--psy-radius-lg);
  box-shadow: var(--psy-shadow-card);
}

.psytest-hero-gate__content {
  flex: 1 1 54%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.psytest-hero-gate__label {
  font-family: var(--psy-font-title);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--psy-green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.psytest-hero-gate__title {
  font-family: var(--psy-font-title);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.18;
  color: var(--psy-ink);
  margin: 0;
}

.psytest-hero-gate__subtitle {
  font-family: var(--psy-font-body);
  font-size: 0.92rem;
  color: var(--psy-ink-muted);
  line-height: 1.55;
  margin: 0;
  max-width: 48ch;
}

/* ── Chips informativos ── */
.psytest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 2px;
}

.psytest-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--psy-green-tint);
  border: 1px solid var(--psy-green-light);
  border-radius: var(--psy-radius-md);
  color: var(--psy-green); /* da currentColor a los iconos */
}

.psytest-chip__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.psytest-chip__val {
  font-family: var(--psy-font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--psy-ink);
}

.psytest-chip__lbl {
  font-family: var(--psy-font-body);
  font-size: 0.72rem;
  color: var(--psy-ink-muted);
}

/* ── CTA: no estira a todo el ancho de la columna en desktop ── */
.psytest-hero-gate .psytest-btn--primary {
  width: auto;
  align-self: flex-start;
  padding: 13px 34px;
  margin-top: 8px;
}

.psytest-hero-gate__trust {
  font-family: var(--psy-font-body);
  font-size: 0.8rem;
  color: var(--psy-ink-faint);
  line-height: 1.5;
  margin: 4px 0 0;
}

/* Enlace "← Volver al portal" — discreto, debajo del CTA primario, encima de la
   nota de confianza. No compite con "Comenzar test": tamaño menor, color apagado. */
.psytest-hero-gate__back {
  display: inline-block;
  font-family: var(--psy-font-body);
  font-size: 0.82rem;
  color: var(--psy-ink-muted);
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.15s ease;
}

.psytest-hero-gate__back:hover {
  color: var(--psy-ink);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .psytest-hero-gate__back {
    transition-duration: 1ms;
  }
}

/* ── Columna ilustración ── */
.psytest-hero-gate__visual {
  flex: 1 1 46%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.psytest-hero-gate__visual img {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  object-fit: contain;
}

/* En tablet/móvil colapsa a una columna; la ilustración pasa arriba. */
@media (max-width: 760px) {
  .psytest-hero-gate {
    flex-direction: column;
    align-items: stretch;
    max-width: 480px;
    padding: 32px 24px;
    gap: 20px;
  }
  .psytest-hero-gate__visual {
    order: -1;
  }
  .psytest-hero-gate__visual img {
    max-width: 340px;
  }
  .psytest-hero-gate .psytest-btn--primary {
    width: 100%;
    align-self: stretch;
  }
}

@media (max-width: 420px) {
  .psytest-hero-gate {
    padding: 24px 18px;
  }
  .psytest-hero-gate__title {
    font-size: 1.5rem;
  }
}
