/* ============ Reserva de matrícula — estilos ============ */
:root {
  --pm-navy: #201547;
  --pm-blue: #006BA6;
  --pm-yellow: #FFBF3F;
  --pm-text: #2b2b3a;
  --pm-muted: #6b6b7d;
  --pm-line: #e4e0ee;
  --pm-bg: #f6f4fb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--pm-bg); color: var(--pm-text); font-family: 'Source Sans 3', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--pm-blue); text-decoration: none; }
a:hover { color: #00527f; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.pm-wrap { max-width: 980px; margin: 0 auto; padding: 0 20px 64px; }

/* ── Cabecera ──────────────────────────────────────────────────────── */
.pm-header { background: #fff; border-bottom: 1px solid var(--pm-line); }
.pm-header__in { max-width: 980px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 16px; }
.pm-header__in img { height: 52px; width: auto; }
.pm-volver { margin-left: auto; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }

/* ── Portada ───────────────────────────────────────────────────────── */
.pm-hero { background: linear-gradient(120deg, #201547, #3a2a7d); color: #fff; padding: 44px 0 56px; }
.pm-hero__in { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.pm-hero h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 900; line-height: 1.05; letter-spacing: -.5px; }
.pm-hero h1 span { color: var(--pm-yellow); }
.pm-hero p { margin-top: 14px; font-size: 17px; line-height: 1.55; max-width: 620px; color: #e6e1f5; }
.pm-hero__nota { margin-top: 18px; display: inline-flex; align-items: flex-start; gap: 10px; background: rgba(255,255,255,.12); border-radius: 14px; padding: 12px 16px; font-size: 14.5px; line-height: 1.45; max-width: 620px; }
.pm-hero__nota svg { flex: none; margin-top: 2px; }

/* ── Tarjeta del formulario ────────────────────────────────────────── */
.pm-card { background: #fff; border-radius: 20px; box-shadow: 0 12px 34px rgba(32,21,71,.09); padding: clamp(22px, 4vw, 38px); margin-top: -28px; }

.pm-paso { border-top: 1px solid var(--pm-line); margin-top: 32px; padding-top: 28px; }
.pm-paso:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.pm-paso__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.pm-paso__num { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--pm-navy); color: #fff; font-weight: 900; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.pm-paso__head h2 { font-size: 21px; font-weight: 800; line-height: 1.15; }
.pm-paso__head p { font-size: 14px; color: var(--pm-muted); margin-top: 2px; }

/* ── Campos ────────────────────────────────────────────────────────── */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px 18px; }
.pm-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pm-campo--ancho { grid-column: 1 / -1; }
.pm-campo label { font-size: 14px; font-weight: 700; color: #3a3a4c; }
.pm-campo label .pm-req { color: #d33b5c; }
.pm-campo .pm-ayuda { font-size: 12.5px; color: var(--pm-muted); }

.pm-campo input,
.pm-campo select,
.pm-campo textarea {
  width: 100%; font: inherit; font-size: 15.5px; color: var(--pm-text);
  padding: 11px 13px; border: 1.5px solid var(--pm-line); border-radius: 11px;
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.pm-campo textarea { resize: vertical; min-height: 92px; }
.pm-campo input:focus,
.pm-campo select:focus,
.pm-campo textarea:focus { outline: none; border-color: var(--pm-blue); box-shadow: 0 0 0 3px rgba(0,107,166,.14); }
.pm-campo input[aria-invalid="true"],
.pm-campo select[aria-invalid="true"] { border-color: #d33b5c; }
.pm-error { font-size: 13px; font-weight: 600; color: #d33b5c; }

/* El campo trampa para bots: fuera de pantalla, nunca enfocable. */
.pm-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Segundo apoderado ─────────────────────────────────────────────── */
.pm-check { display: flex; align-items: flex-start; gap: 11px; background: var(--pm-bg); border-radius: 13px; padding: 14px 16px; cursor: pointer; }
.pm-check input { flex: none; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--pm-blue); cursor: pointer; }
.pm-check span { font-size: 15px; font-weight: 700; }
.pm-check small { display: block; font-weight: 400; font-size: 13.5px; color: var(--pm-muted); margin-top: 2px; }
#pm-bloque2[hidden] { display: none; }
#pm-bloque2 { margin-top: 18px; }

/* ── Avisos ────────────────────────────────────────────────────────── */
.pm-aviso { border-radius: 14px; padding: 15px 17px; font-size: 14.5px; line-height: 1.5; margin-bottom: 24px; }
.pm-aviso--error { background: #fdecef; border: 1.5px solid #f3c3cd; color: #8c1f38; }
.pm-aviso--error ul { margin: 8px 0 0; padding-left: 20px; }
.pm-aviso--error li { margin-top: 3px; }

/* ── Enviar ────────────────────────────────────────────────────────── */
.pm-enviar { border-top: 1px solid var(--pm-line); margin-top: 32px; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.pm-enviar p { font-size: 13.5px; color: var(--pm-muted); line-height: 1.45; max-width: 420px; }
.pm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-size: 16px; font-weight: 900; padding: 15px 34px; border: 0; border-radius: 999px; cursor: pointer; background: var(--pm-yellow); color: var(--pm-navy); transition: background .2s ease, transform .2s ease; }
.pm-btn:hover { background: #ffcf6b; }
.pm-btn:active { transform: translateY(1px); }
.pm-btn--fantasma { background: #fff; border: 2px solid var(--pm-navy); color: var(--pm-navy); }
.pm-btn--fantasma:hover { background: var(--pm-navy); color: #fff; }

/* ── Gracias ───────────────────────────────────────────────────────── */
.pm-ok { background: #fff; border-radius: 20px; box-shadow: 0 12px 34px rgba(32,21,71,.09); padding: clamp(28px, 5vw, 46px); margin-top: -28px; text-align: center; }
.pm-ok__icono { width: 82px; height: 82px; border-radius: 50%; background: #e3f6ea; color: #1a7a43; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.pm-ok h1 { font-size: clamp(26px, 4.5vw, 34px); font-weight: 900; line-height: 1.1; color: var(--pm-navy); }
.pm-ok > p { margin-top: 12px; font-size: 16.5px; line-height: 1.55; color: var(--pm-muted); max-width: 560px; margin-left: auto; margin-right: auto; }
.pm-codigo { margin: 26px auto; max-width: 400px; background: var(--pm-bg); border: 2px dashed #c9c1e0; border-radius: 16px; padding: 20px; }
.pm-codigo span { display: block; font-size: 13px; font-weight: 800; letter-spacing: 1.4px; color: var(--pm-muted); text-transform: uppercase; }
.pm-codigo strong { display: block; margin-top: 8px; font-size: clamp(26px, 5vw, 32px); font-weight: 900; letter-spacing: 1px; color: var(--pm-navy); }
.pm-ok__pasos { text-align: left; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.pm-ok__paso { display: flex; gap: 13px; align-items: flex-start; font-size: 15.5px; line-height: 1.5; }
.pm-ok__paso b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--pm-navy); color: #fff; font-size: 13.5px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.pm-ok__botones { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 599px) {
  .pm-header__in { padding: 12px 18px; }
  .pm-header__in img { height: 44px; }
  .pm-volver span { display: none; }
  .pm-wrap { padding: 0 14px 48px; }
  .pm-hero { padding: 34px 0 48px; }
  .pm-enviar { flex-direction: column; align-items: stretch; }
  .pm-btn { width: 100%; }
  .pm-ok__botones .pm-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
