/* Área Familias · Solicitud de matrícula (same look as the login page). */
.afm {
    --afm-navy: #313280;
    --afm-sky: #72a7f7;
    --afm-orange: #dc8e2b;
    --afm-ink: #1f2240;
    --afm-muted: #5d6285;
    --afm-line: #e3e6f2;
    --afm-bg: #f7f8fc;
    --afm-red: #9a2c1c;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--afm-ink);
    line-height: 1.5;
    padding-bottom: 40px;
    scroll-margin-top: 10px;
}
.afm *, .afm *::before, .afm *::after { box-sizing: border-box; }
html:has(.afm), body:has(.afm) { overflow-x: clip; }
.afm .afm-bleed { position: relative; width: 100vw; max-width: 100vw; left: 50%; margin-left: -50vw; }
.afm .afm-header { background: #fff; padding: 10px 12px; }
.afm .afm-logo { display: block; max-width: 170px; max-height: 100px; width: auto; height: auto; border: 0; }
.afm .afm-tribanda { line-height: 0; overflow: hidden; margin-bottom: 30px; }
.afm .afm-tribanda img { display: block; width: 100%; max-width: none; height: 36px; object-fit: fill; transform: rotate(180deg); }
.afm .afm-card {
    max-width: 860px; margin: 0 auto; padding: 30px 30px 26px; background: #fff;
    border: 1px solid var(--afm-line); border-top: 5px solid var(--afm-navy); border-radius: 18px;
    box-shadow: 0 12px 30px rgba(49, 50, 128, .10);
}
.afm .afm-kicker { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--afm-orange); text-align: center; }
.afm .afm-title { margin: 0 0 14px; padding: 0; border: 0; font-family: inherit; font-size: 28px; line-height: 1.15; font-weight: 800; text-transform: uppercase; color: var(--afm-sky); text-align: center; }
.afm .afm-text { font-size: 15px; color: var(--afm-muted); margin: 0 0 10px; }
.afm .afm-help { display: block; font-size: 13px; color: var(--afm-muted); margin: 4px 0 8px; }
.afm .afm-help:empty { display: none; }
.afm .afm-info { background: #eef3fe; color: var(--afm-navy); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 14px; }
.afm .afm-error-box { background: #fdf0ee; color: var(--afm-red); border: 1px solid #f5c2b8; border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; margin: 0 0 16px; }
.afm .afm-req { color: var(--afm-red); }

/* Steps */
.afm .afm-pasos { list-style: none; margin: 18px 0 20px; padding: 0; display: flex; gap: 6px; counter-reset: paso; }
.afm .afm-pasos li { flex: 1 1 0; counter-increment: paso; text-align: center; font-size: 12px; font-weight: 700; color: var(--afm-muted); cursor: pointer; padding-top: 34px; position: relative; min-width: 0; overflow-wrap: anywhere; }
.afm .afm-pasos li::before { content: counter(paso); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; line-height: 28px; border-radius: 50%; background: var(--afm-line); color: var(--afm-muted); font-size: 14px; }
.afm .afm-pasos li.is-hecho::before { content: "✓"; background: #dcfce7; color: #166534; }
.afm .afm-pasos li.is-actual { color: var(--afm-navy); }
.afm .afm-pasos li.is-actual::before { background: var(--afm-navy); color: #fff; }
.afm.is-js .afm-paso { display: none; }
.afm.is-js .afm-paso.is-actual { display: block; }
.afm .afm-paso { margin: 0 0 18px; }
.afm .afm-paso > h2 { display: flex; align-items: center; gap: 10px; font-family: inherit; font-size: 20px; font-weight: 800; color: var(--afm-navy); margin: 8px 0 14px; outline: none; text-transform: none; letter-spacing: 0; }
.afm .afm-paso > h2 span { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--afm-orange); color: #fff; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.afm h3 { font-family: inherit; font-size: 16px; font-weight: 800; color: var(--afm-ink); margin: 16px 0 8px; text-transform: none; letter-spacing: 0; }

/* Fields */
.afm .afm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.afm .afm-grid .afm-ancho { grid-column: 1 / -1; }
.afm .afm-campo { margin: 0 0 8px; min-width: 0; }
.afm .afm-campo > label, .afm .afm-radios legend { display: block; font-size: 14px; font-weight: 700; margin: 0 0 4px; padding: 0; color: var(--afm-ink); }
.afm input[type="text"], .afm input[type="email"], .afm input[type="tel"], .afm input[type="date"], .afm input[type="number"], .afm select, .afm textarea {
    display: block; width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid #cfd4e6; border-radius: 12px;
    background: #fff; color: var(--afm-ink); font-family: inherit; font-size: 16px; line-height: 1.3; margin: 0;
}
.afm textarea { min-height: 90px; }
.afm input:focus, .afm select:focus, .afm textarea:focus { outline: 3px solid rgba(114, 167, 247, .45); outline-offset: 1px; border-color: var(--afm-navy); }
.afm .afm-radios { border: 0; margin: 0; padding: 0; min-width: 0; }
.afm .afm-radios label { display: inline-flex; align-items: center; gap: 8px; margin: 2px 18px 4px 0; font-size: 15px; min-height: 40px; cursor: pointer; }
.afm input[type="radio"], .afm input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--afm-navy); flex: none; margin: 0; }
.afm .afm-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; margin: 10px 0; cursor: pointer; }
.afm .afm-check input { margin-top: 2px; }
.afm .afm-error { display: none; color: var(--afm-red); font-size: 13px; font-weight: 600; margin-top: 4px; }
.afm .has-error .afm-error { display: block; }
.afm .has-error input:not([type="radio"]):not([type="checkbox"]), .afm .has-error select, .afm .has-error textarea { border-color: #d0533b; background: #fffaf9; }
.afm .afm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Repeatable blocks */
.afm .afm-repetible { border: 1px solid var(--afm-line); background: var(--afm-bg); border-radius: 14px; padding: 12px 16px 6px; margin: 0 0 14px; }
.afm .afm-repetible h3 { margin-top: 2px; color: var(--afm-navy); }
.afm .afm-repetible-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.afm .afm-quitar { border: 0; background: none; color: var(--afm-red); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 6px; }
.afm .afm-lista .afm-repetible:only-child .afm-quitar { display: none; }
.afm .afm-fila { display: grid; grid-template-columns: 2fr 1fr auto; gap: 0 12px; align-items: end; padding-bottom: 4px; }
.afm .afm-fila .afm-quitar { margin-bottom: 14px; }
.afm .afm-lista[data-lista="hermanos"] .afm-repetible:only-child .afm-quitar { display: none; }

/* Buttons */
.afm .afm-btn, .afm a.afm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 26px;
    border: 0; border-radius: 999px; background: var(--afm-navy); color: #fff; text-decoration: none; cursor: pointer;
    font-family: inherit; font-size: 16px; font-weight: 700; box-shadow: 0 6px 16px rgba(49, 50, 128, .25); transition: background .15s;
}
.afm .afm-btn:hover, .afm .afm-btn:focus-visible { background: var(--afm-orange); color: #fff; }
.afm .afm-btn:disabled { opacity: .6; cursor: wait; }
.afm .afm-btn-sec {
    display: inline-flex; align-items: center; min-height: 42px; padding: 8px 18px; border: 1.5px solid var(--afm-navy); border-radius: 999px;
    background: #fff; color: var(--afm-navy); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; margin: 0 6px 8px 0;
}
.afm .afm-btn-sec:hover { background: #eef3fe; }
.afm .afm-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--afm-line); }
.afm .afm-nav [data-siguiente] { margin-left: auto; }
.afm .afm-link { display: inline-block; margin-top: 18px; font-size: 13px; color: var(--afm-muted); text-decoration: underline; }
.afm .afm-link-btn { border: 0; background: none; padding: 0; color: var(--afm-navy); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

.afm .afm-resumen { border: 1px dashed var(--afm-sky); border-radius: 14px; padding: 4px 16px 8px; margin: 0 0 16px; background: #f5f9ff; font-size: 14px; }
.afm .afm-resumen ul { margin: 0; padding-left: 18px; }
.afm .afm-privacidad { margin: 6px 0; font-size: 13px; color: var(--afm-muted); }
.afm .afm-privacidad summary { cursor: pointer; font-weight: 700; color: var(--afm-navy); }
.afm .afm-privacidad p { margin: 6px 0; }

/* Code and done */
.afm .afm-codigo { text-align: center; max-width: 480px; margin: 0 auto; }
.afm .afm-codigo h2, .afm .afm-ok h2 { font-family: inherit; font-size: 22px; color: var(--afm-navy); margin: 0 0 10px; text-transform: none; letter-spacing: 0; }
.afm .afm-codigo-input { max-width: 240px; margin: 14px auto !important; text-align: center; font-size: 30px !important; letter-spacing: 10px; font-weight: 700; }
.afm .afm-reenviar { margin-top: 14px; }
.afm .afm-ok { text-align: center; }
.afm .afm-ok ul { text-align: left; max-width: 560px; margin: 10px auto; }
.afm .afm-ok-icono { width: 64px; height: 64px; line-height: 64px; margin: 0 auto 10px; border-radius: 50%; background: #dcfce7; color: #166534; font-size: 34px; font-weight: 700; }

.afm [hidden] { display: none !important; }

@media (max-width: 640px) {
    .afm .afm-logo { max-width: 110px; max-height: 70px; }
    .afm .afm-tribanda { margin-bottom: 18px; }
    .afm .afm-tribanda img { height: 24px; }
    .afm .afm-card { padding: 22px 16px 20px; margin: 0; border-radius: 14px; }
    .afm .afm-title { font-size: 22px; }
    .afm .afm-grid { grid-template-columns: 1fr; }
    .afm .afm-pasos li { font-size: 0; padding-top: 28px; }
    .afm .afm-pasos li.is-actual { font-size: 11px; }
    .afm .afm-fila { grid-template-columns: 1fr; }
    .afm .afm-fila .afm-quitar { justify-self: start; margin-bottom: 8px; }
    .afm .afm-nav .afm-btn { padding: 12px 18px; }
}

/* Información del centro y protección de datos */
.afm .afm-texto { max-height: 340px; overflow-y: auto; border: 1.5px solid var(--afm-line); border-radius: 14px; padding: 6px 16px 10px; background: var(--afm-bg); font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.afm .afm-texto:focus { outline: 3px solid rgba(114, 167, 247, .45); }
.afm .afm-texto h4 { font-family: inherit; font-size: 15px; font-weight: 800; color: var(--afm-navy); margin: 12px 0 4px; text-transform: none; letter-spacing: 0; }
.afm .afm-texto p { margin: 0 0 8px; }
.afm .afm-texto ul { margin: 0 0 8px; padding-left: 10px; list-style: none; }
.afm .afm-texto-rgpd { max-height: 420px; font-size: 13px; }
.afm .afm-consentimiento { margin: 8px 0 12px; padding: 10px 14px; border: 2px solid var(--afm-orange); border-radius: 12px; background: #fff; }
.afm .afm-consentimiento legend { font-size: 14px; }
.afm .afm-manif { border-bottom: 1px solid var(--afm-line); padding: 8px 0 10px; margin: 0; font-size: 14px; }
.afm .afm-manif .afm-check { font-size: 14px; margin: 0; }
.afm .afm-manif .afm-check p, .afm .afm-manif .afm-check ul { margin: 0 0 4px; }
.afm .afm-manif .afm-check ul { padding-left: 18px; }
.afm .afm-manif .afm-radios legend { font-weight: 400; font-size: 14px; margin-bottom: 6px; }
.afm .afm-manif > label { font-weight: 400; }
.afm .afm-opcional { color: var(--afm-muted); font-size: 13px; }
.afm .afm-texto li.sub { padding-left: 18px; }
