/* Registro (layouts.public). Se apoya en home.css: variables, cabecera, botones, .field y pie. */
.page-register { background: var(--ground); }
.header-note { color: rgba(255, 255, 255, .7); font-size: 14px; font-weight: 600; }

/* Cabecera de la página */
.reg-hero { background: var(--teal-900); color: var(--white); padding: 56px 0 120px; }
.reg-hero .eyebrow { color: var(--mint); }
.reg-hero h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; max-width: 820px; }
.reg-hero h1 em { font-style: normal; color: var(--mint); }
.reg-hero p { margin-top: 14px; font-size: 18px; color: rgba(255, 255, 255, .8); max-width: 640px; }

/* Formulario + tarjeta de ayuda */
.reg-wrap { margin-top: -80px; padding-bottom: 80px; }
.reg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "form aside"; gap: 24px; align-items: start; }
.reg-card { grid-area: form; background: var(--white); border-radius: 24px; box-shadow: var(--shadow); padding: 40px; }
.reg-aside { grid-area: aside; position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.aside-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.aside-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.aside-card p { font-size: 14px; color: var(--ink-2); }
.aside-card p + p { margin-top: 8px; }
.aside-card a { color: var(--teal-700); font-weight: 700; overflow-wrap: anywhere; }
.aside-card.accent { background: var(--teal-700); border-color: var(--teal-700); color: var(--white); }
.aside-card.accent p { color: rgba(255, 255, 255, .85); }
.aside-card.accent a { color: var(--white); }
.aside-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: step; }
.aside-steps li { display: flex; gap: 12px; font-size: 14px; color: var(--ink-2); counter-increment: step; }
.aside-steps li::before { content: counter(step); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--teal-50); color: var(--teal-800); font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.aside-steps li b { color: var(--ink); }
.contact-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 14px; }

/* Secciones del formulario */
.registration-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.reg-section + .reg-section { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.reg-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.reg-section-head .num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--teal-700); color: var(--white); font-size: 14px; font-weight: 800; display: grid; place-items: center; }
.reg-section-head h2 { font-size: 20px; font-weight: 800; }
.reg-section-head p { font-size: 14px; color: var(--ink-2); }
.reg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.reg-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reg-grid .full { grid-column: 1 / -1; }
.field-title { font-size: 14px; font-weight: 700; }
.field .hint { font-weight: 500; color: var(--ink-2); font-size: 13px; }
.field select { font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--ground); color: var(--ink); min-height: 48px; width: 100%; }
.field select:focus { outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 4px var(--teal-50); }
.field input.uppercase { text-transform: uppercase; }
.field input.uppercase::placeholder { text-transform: none; }
.field-note { font-size: 13px; color: var(--ink-2); margin-top: 8px; }

/* Errores de jquery.validate */
label.error, .field label.error { color: #9b1238; font-size: 13px; font-weight: 600; margin-top: 2px; }
.field input.error, .field select.error { border-color: #d64b75; background: #fff7f9; }
#email_exist { color: #9b1238; font-size: 13px; font-weight: 600; }

/* Equipo: personas adicionales */
.team-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.team-row .field { flex: 1 1 260px; }
.team-actions { display: flex; gap: 8px; }
.btn-small { min-height: 48px; padding: 0 18px; font-size: 14px; }
#add_text_field { margin-top: 18px; }
#add_text_field:empty { display: none; }

/* Opciones de envío */
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; font-size: 15px; font-weight: 600; }
.radio-card:has(input:checked) { border-color: var(--teal); background: var(--teal-50); }
.radio-card > span:last-child { flex: 1; }
/* Sin los estilos de caja de texto de .field input (home.css). */
.radio-card input { order: 3; margin: 0; padding: 0; width: 20px; height: 20px; min-height: 0; border: 0; background: none; box-shadow: none; accent-color: var(--teal-700); flex: none; align-self: center; }
.rc-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-700); transition: background .15s, color .15s; }
.rc-icon svg { width: 22px; height: 22px; }
.radio-card:has(input:checked) .rc-icon { background: var(--teal-700); color: var(--white); }
.radio-card small { display: block; font-weight: 500; color: var(--ink-2); font-size: 13px; }

/* Autorización en PDF */
.file-drop { padding: 18px; border: 2px dashed var(--line); border-radius: 14px; background: var(--ground); }
.file-drop input[type="file"] { font: inherit; font-size: 14px; color: var(--ink-2); width: 100%; }
.file-drop input[type="file"]::file-selector-button { font: inherit; font-weight: 700; font-size: 14px; margin-right: 14px; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--teal-700); color: var(--white); cursor: pointer; }

/* Consentimientos */
.checks { display: flex; flex-direction: column; gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.check input[type="checkbox"] { margin: 3px 0 0; width: 20px; height: 20px; accent-color: var(--teal-700); flex: none; }
.check > label:not(.error) { flex: 1; font-size: 14px; color: var(--ink); cursor: pointer; }
.check > label.error { flex-basis: 100%; padding-left: 32px; }
.check a { color: var(--teal-700); font-weight: 700; }

/* Textos legales */
.legal-box { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.legal-box p + p { margin-top: 10px; }
.legal-box a { color: var(--teal-700); font-weight: 700; }
.data-protection { margin-top: 28px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 12px; color: var(--ink-2); }
.data-protection table { width: 100%; border-collapse: collapse; }
.data-protection caption { padding: 12px 16px; background: var(--ground); font-weight: 800; color: var(--ink); text-align: left; letter-spacing: .04em; }
.data-protection th, .data-protection td { padding: 10px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-protection th { width: 32%; color: var(--ink); font-weight: 700; }

/* Envío */
.reg-submit { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.reg-submit .btn { min-width: 240px; }
.recaptcha-note { font-size: 11px; color: var(--ink-2); }
.recaptcha-note a { color: inherit; }
.reg-alert { margin-bottom: 20px; }
.error_message, .failure_msg, .change_pass_msg { display: none; margin-bottom: 20px; padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.error_message, .failure_msg { background: #fdecef; color: #9b1238; }
.change_pass_msg { background: #e3f6ef; color: #0b5d43; }
.reg-warning { padding: 14px 16px; border-radius: 12px; background: #fdecef; color: #9b1238; font-size: 14px; font-weight: 600; margin-bottom: 24px; }

/* Capa de "procesando" y de éxito */
.success_overlay { display: none; position: fixed; inset: 0; background: rgba(0, 31, 28, .6); z-index: 9998; }
.success_msg_main { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; width: calc(100% - 32px); max-width: 440px; background: var(--white); border-radius: 24px; padding: 36px 32px; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); text-align: center; }
.success_msg_main h2 { font-size: 24px; font-weight: 800; margin-top: 18px; }
.success_msg_main p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.success_msg_processing, .success_msg_done { display: none; }
.success-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: #e3f6ef; color: #0b7a55; }
.success-icon svg { width: 32px; height: 32px; }
.spinner { width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; border: 4px solid var(--teal-50); border-top-color: var(--teal-700); animation: reg-spin .8s linear infinite; }
@keyframes reg-spin { to { transform: rotate(360deg); } }
#redirect_message_main { display: none; margin-top: 14px; font-size: 13px; color: var(--ink-2); }

@media (max-width: 960px) {
    .reg-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "aside" "form"; }
    .reg-layout.aside-last { grid-template-areas: "form" "aside"; }
    .reg-aside { position: static; }
    .reg-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .header-note { display: none; }
    .reg-hero { padding: 36px 0 100px; }
    .reg-card { padding: 24px 20px; border-radius: 20px; }
    .reg-grid, .reg-grid.three { grid-template-columns: minmax(0, 1fr); }
    .reg-submit .btn { width: 100%; }
    .data-protection th, .data-protection td { display: block; width: 100%; border-top: 0; padding: 6px 16px; }
    .data-protection tr { display: block; border-top: 1px solid var(--line); padding: 6px 0; }
}
