/*Allianz > De tu lado > Landing de Registro*/
:root {
    --alz-navy:    #003781;
    --alz-blue:    #0057a8;
    --alz-cyan:    #00b5cc;
    --alz-magenta: #c8256c;
    --text-dark:   #222;
    --text-mid:    #555;
    --input-bd:    #c8cdd6;
    --red-req:     #d0021b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Poppins', sans-serif;
}

.landing-wrap {
    display: flex;
    align-items: flex-start; /* clave para que sticky funcione */
    min-height: 100vh;
}

.hero-panel {
    flex: 0 0 50%;
    max-width: 50%;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.hero-panel picture,
.hero-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.form-panel {
    flex: 0 0 50%;
    max-width: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 3.5rem 4rem;
    min-height: 100vh;
}

.form-inner {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 3rem;
    border: 1px solid #ebebeb;
    border-radius: 1.5rem;
    box-shadow: 0 0 16px 0 #ebebeb;
}

/* Título */
.form-heading {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--alz-navy);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.form-subheading {
    font-size: 0.9rem;
    color: var(--text-mid);
    margin-bottom: 1.6rem;
}

/* Labels */
.form-inner .form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.req { color: var(--red-req); margin-left: 2px; }

/* Inputs */
.form-inner .form-control {
    border: 1px solid var(--input-bd);
    border-radius: 4px;
    font-size: 0.875rem;
    padding: 0.45rem 0.75rem;
    height: 40px;
    color: var(--text-dark);
    transition: border-color .2s, box-shadow .2s;
}

.form-inner .form-control:focus {
    border-color: var(--alz-blue);
    box-shadow: 0 0 0 3px rgba(0, 87, 168, 0.12);
    outline: none;
}

/* Checkbox privacidad */
.privacy-block {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.25rem;
    margin-bottom: 1.4rem;
}

.privacy-block input[type="checkbox"] {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin-top: 3px;
    accent-color: var(--alz-navy);
    cursor: pointer;
}

.privacy-text {
    font-size: 0.78rem;
    color: var(--text-mid);
    line-height: 1.5;
}

.privacy-text a {
    color: var(--alz-blue);
    text-decoration: underline;
}

.privacy-text a:hover { color: var(--alz-navy); }

/* Botón CTA */
.btn-registrar {
    display: block;
    width: 100%;
    background: var(--alz-navy);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.btn-registrar:hover  { background: var(--alz-blue); }
.btn-registrar:active { transform: scale(0.99); }

/* ════════════════════════════════════════════════════════════════
   MENSAJES DE ERROR DE VALIDACIÓN
   ──────────────────────────────────────────────────────────────── */
.field-error-message {
    color: var(--red-req);
    font-size: 0.78rem;
    margin-top: 4px;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

/* Resalta inputs inválidos solo después del primer intento de submit */
.form-submitted .form-control:invalid {
    border-color: var(--red-req) !important;
    box-shadow: 0 0 0 2px rgba(208, 2, 27, 0.12) !important;
}

/* Alerta general desde el backend (ViewBag.ErrorMessage) */
.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
}

/* ════════════════════════════════════════════════════════════════
   MODAL DE REGISTRO EXITOSO
   ──────────────────────────────────────────────────────────────── */
.modal-exito {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-contenido {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 55, 129, 0.25);
    animation: aparecer 0.3s ease-out;
}

@keyframes aparecer {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-titulo {
    color: var(--alz-navy);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal-mensaje {
    color: var(--text-mid);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.boton-ingresar {
    background: linear-gradient(to right, var(--alz-blue), var(--alz-cyan));
    color: #fff;
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.25rem;
}

.boton-ingresar:hover {
    background: linear-gradient(to right, var(--alz-navy), var(--alz-blue));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 55, 129, 0.25);
}

/* ════════════════════════════════════════════════════════════════
   LOADER OVERLAY (mientras se procesa el submit)
   ──────────────────────────────────────────────────────────────── */
.loader-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 55, 129, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #ffffff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVO – Bootstrap breakpoints
   ──────────────────────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
    .form-panel   { padding: 2.5rem 2.5rem; }
    .form-heading { font-size: 1.6rem; }
}

/* ── < lg (< 992px): apilamiento vertical ── */
@media (max-width: 991.98px) {

    /* Desactivar sticky en mobile: el hero pasa a ser una banda estática */
    .landing-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-panel {
        position: static;   /* quita el sticky */
        height: 420px;
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    /* En mobile usamos la imagen hero-mobile (ver <picture> en HTML) */
    .hero-panel picture,
    .hero-panel img {
        object-position: center top;
    }

    .form-panel {
        flex: none;
        max-width: 100%;
        width: 100%;
        min-height: unset;
        padding: 2rem 1.5rem 3rem;
        align-items: flex-start;
    }

    .form-inner {
        max-width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .form-heading { font-size: 1.5rem; }

    /* Modal ligeramente más compacto en mobile */
    .modal-contenido { padding: 2rem 1.5rem; }
    .modal-titulo    { font-size: 1.3rem; }
    .modal-mensaje   { font-size: 0.88rem; }
}

/* ── sm / xs (< 576px) ── */
@media (max-width: 575.98px) {
    .hero-panel {
        height: auto;
        position: absolute;
    }
    .form-panel {
        top: 350px;
        position: relative;
        max-width: 92vw;
        margin: 0 auto;
        border-radius: 16px;
    }
    .form-heading    { font-size: 1.35rem; }
    .form-subheading { font-size: 0.85rem; }
}