/* =====================================================
   LAYOUT 1: Dos Columnas (Imagen izquierda + Formulario derecha)
   Basado en el diseño original de Educam con mejoras responsivas
   ===================================================== */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: #fff;
    min-height: 100%;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    padding: 10px 16px;
    background: #0b1a3f;
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
    transition: top 0.2s ease, box-shadow 0.2s ease;
    z-index: 4;
}

.skip-link:focus {
    top: 18px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
    outline: none;
}

/* ===================== FONDO / BACKGROUND ===================== */
.blob-a, .blob-b {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: .85;
}

.blob-a {
    width: 520px;
    height: 520px;
    left: -170px;
    top: -160px;
    background: radial-gradient(60% 60% at 50% 50%, #5f6ad6 0%, #4c5ac4 45%, #3a49ad 70%, transparent 71%);
    border-radius: 50%;
}

.blob-b {
    width: 460px;
    height: 460px;
    right: -160px;
    bottom: -140px;
    background: radial-gradient(60% 60% at 50% 50%, #c099d8 0%, #b084cc 45%, #9a6fbf 70%, transparent 71%);
    border-radius: 50%;
}

body.has-custom-bg .blob-a,
body.has-custom-bg .blob-b {
    display: none;
}

body.has-custom-bg {
    background: transparent;
}

.wrapper {
    position: relative;
    z-index: 1;
}

.frame {
    max-width: 968px;
    width: 100%;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 3.6vw, 36px);
}

.frame > .shell {
    width: 100%;
}

/* ===================== LOGOTIPO EDUCAM ===================== */
.brand-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    justify-content: flex-end;
    padding: 14px 24px 0;
    pointer-events: none;
    z-index: 2;
}

.site-logo {
    height: 58px;
    pointer-events: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ===================== TARJETA / COMPOSICIÓN ===================== */
.shell {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-wrap: nowrap;
    box-shadow: 0 26px 60px rgba(16, 28, 76, .22);
    background: rgba(15, 27, 71, 0.32);
    backdrop-filter: blur(4px);
}

body.has-custom-bg .shell {
    box-shadow: 0 26px 60px rgba(16, 28, 76, .45);
    background: rgba(8, 16, 46, 0.55);
}

.left-photo {
    flex: 0 0 46%;
    position: relative;
    background: #cfd8ff;
}

.left-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 32, 74, 0.25), rgba(37, 21, 59, 0.55));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.left-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.right-panel {
    flex: 1 1 0;
    position: relative;
    background: linear-gradient(180deg, var(--panelTop) 0%, var(--panelMid) 55%, var(--panelBottom) 100%);
    color: #fff;
}

.right-inner {
    padding: clamp(34px, 4vw, 48px) clamp(20px, 3vw, 36px) clamp(28px, 4vw, 40px);
    max-width: 624px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    gap: 12px;
}

.welcome-wrapper {
    display: grid;
    gap: 8px;
}

.welcome {
    font-weight: 800;
    font-size: clamp(2.2rem, 4.3vw, 4rem);
    line-height: 1.05;
    margin: 6px 0 28px;
    letter-spacing: -0.5px;
}

.instructions {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: -12px 0 22px;
}

.form-label {
    font-weight: 700;
    color: var(--link);
    margin-bottom: 6px;
}

.form-control {
    background: var(--field);
    border: 0;
    height: 48px;
    border-radius: 14px;
    font-weight: 600;
    padding: 0 16px;
    color: #1a2753;
}

.form-control::placeholder {
    color: #7b88a8;
}

.form-control:focus {
    background: var(--field);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.password-field__wrapper {
    display: flex;
    align-items: stretch;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--field);
}

.password-field__input {
    background: transparent;
    border: none;
    padding-right: 0;
}

.password-field__input:focus {
    box-shadow: none;
}

.password-field__wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.password-toggle {
    border: 0;
    background: transparent;
    color: var(--link);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.16);
}

.password-toggle:focus,
.password-toggle:focus-visible {
    outline: none;
}

.password-toggle__icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.password-toggle__icon--off {
    display: none;
}

.password-toggle.is-visible .password-toggle__icon--on {
    display: none;
}

.password-toggle.is-visible .password-toggle__icon--off {
    display: inline;
}

.hint {
    color: var(--link);
    font-size: .85rem;
    text-decoration: none;
    font-weight: 600;
}

.hint:hover {
    color: #fff;
}

.btn-access {
    background: var(--btn);
    border: 0;
    height: 52px;
    border-radius: 18px;
    font-weight: 900;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: #fff;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-access:hover,
.btn-access:focus {
    background: var(--btnHover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-access:active {
    transform: translateY(0);
}

.copyright {
    color: #d1dcff;
    font-size: .9rem;
    text-align: center;
    margin-top: 22px;
    line-height: 1.6;
}

.vendor {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.vendor img {
    height: 32px;
    width: auto;
}

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.inputs .row {
    margin-bottom: 6px;
}

.alert {
    border-radius: 14px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1399.98px) {
    .frame {
        max-width: 880px;
    }
}

@media (max-width: 1199.98px) {
    .brand-header {
        padding: 12px 18px 0;
    }

    .site-logo {
        height: 52px;
    }

    .welcome {
        font-size: clamp(2rem, 4vw, 3.2rem);
    }
}

@media (max-width: 991.98px) {
    body {
        background: linear-gradient(180deg, rgba(26, 41, 97, 0.92), rgba(12, 20, 54, 0.9));
    }

    .brand-header {
        position: static;
        justify-content: center;
        padding: 12px 0 0;
        pointer-events: auto;
    }

    .frame {
        margin: 0 auto;
        gap: clamp(20px, 6vw, 32px);
    }

    .shell {
        flex-direction: column;
        border-radius: 26px;
    }

    .left-photo {
        flex-basis: auto;
        min-height: 240px;
    }

    .left-photo::after {
        opacity: 1;
    }

    .right-inner {
        max-width: 720px;
        padding: clamp(32px, 6vw, 40px) clamp(20px, 6vw, 32px) clamp(26px, 6vw, 32px);
    }

    .welcome {
        text-align: center;
    }

    .instructions {
        text-align: center;
    }

    .hint {
        text-align: center;
        display: inline-block;
        width: 100%;
    }

    .site-logo {
        display: block;
        margin: 0 auto 18px;
        height: 46px;
        opacity: 0.92;
    }
}

@media (max-width: 767.98px) {
    .wrapper {
        align-items: flex-start !important;
    }

    .frame {
        padding: 0;
        align-items: stretch;
    }

    .right-inner {
        padding: 30px clamp(18px, 6vw, 32px) 26px;
    }

    .welcome {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
    }

    .instructions {
        font-size: 0.95rem;
    }
}

@media (max-width: 575.98px) {
    .left-photo {
        min-height: 200px;
    }

    .frame {
        padding-inline: 0;
    }

    .shell {
        border-radius: 22px;
    }

    .right-inner {
        padding: 26px 20px 24px;
    }

    .password-toggle {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .welcome {
        font-size: clamp(1.7rem, 9vw, 2.2rem);
    }

    .btn-access {
        border-radius: 16px;
        height: 50px;
    }
}

@media (max-width: 420px) {
    .password-toggle {
        padding: 0 10px;
    }
}

@media (max-width: 360px) {
    .right-inner {
        padding: 22px 16px 20px;
    }

    .form-control {
        height: 46px;
    }
}

@media (min-width: 1400px) {
    .right-inner {
        padding: clamp(40px, 3vw, 52px) clamp(24px, 2.6vw, 44px) clamp(32px, 3vw, 46px);
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}
