/* =============================================
   FONDO Y CONTENEDOR PRINCIPAL
   ============================================= */
.fondo-login {
    position: relative;
    overflow: hidden;
    background-image: url('/images/fondo-llave.svg');
    background-size: cover;
    background-color: rgba(255, 255, 255, 0.6);
    min-height: 100vh;
    padding: 40px 20px;
}

.container-login {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    max-width: 1170px;
    width: 100%;
    margin: 130px auto 100px;
    padding: 0 30px;
}

/** 
Selector de idioma en la esquina superior derecha
*/

.lang-switch {
    border: 2px solid var(--gobmx-guinda)!important;
    color: var(--gobmx-guinda)!important;
    font-weight: bold!important;
}
/* =============================================
   LEFT SECTION: Logo y Título
   ============================================= */
.left-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0 30px 30px 0;
}

.logo-prs {
    height: 65px;
    margin-bottom: 32px;
}

.titulo-portal {
    font-size: 24px;
    color: #333;
    font-family: "Noto Sans", sans-serif;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.375;
    text-align: left;
}

.nombre-portal {
    color: #a57f2c;
    font-size: 36px;
    font-weight: 700;
    font-family: "Patria", "Segoe UI", sans-serif;
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.left-security-note {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 12px;
    color: #666;
    line-height: 1.6;
}

/* =============================================
   RIGHT SECTION: Login Box
   ============================================= */
.box-login {
    width: 520px;
    flex-shrink: 0;
}

.right-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 36px 32px;
}

.llavemx-logo {
    height: 52px;
    margin: 0 auto 24px;
    display: block;
}

/* =============================================
   SELECTOR DE AUTENTICACIÓN
   ============================================= */
.acciones {
    width: 100%;
}

.acciones > p {
    font-weight: 500;
    text-align: center;
    font-size: 16px;
    margin: 0 0 20px 0;
    color: #333;
}

.opciones {
    text-align: center;
    margin-bottom: 20px;
}

.opciones label {
    color: #333;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    white-space: nowrap;
}

.opciones input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--prs-wine);
    vertical-align: bottom;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.separador {
    display: inline-block;
    color: #ddd;
    margin: 0 8px;
}

.acciones hr {
    color: #ddd;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-top: none;
}

/* =============================================
   AUTH SECTIONS
   ============================================= */
.auth-section {
    width: 100%;
}

.method-section {
    display: none;
}

.method-section.active {
    display: block;
}

/* Form labels e inputs */
.login-form-group {
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.login-form-group input {
    display: block;
    font-size: 15px;
    width: 100%;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 14px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form-group input:focus {
    outline: none;
    border-color: var(--prs-wine);
    box-shadow: 0 0 0 3px rgba(97, 18, 50, 0.1);
}

.small-help {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    line-height: 1.5;
}

/* Términos */
.terminos {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

.terminos a {
    color: var(--prs-wine);
    text-decoration: underline;
}

.terminos a:hover {
    color: var(--prs-wine);
    opacity: 0.8;
}

/* =============================================
   BOTONES
   ============================================= */
.botones-container {
    display: flex;
    gap: 12px;
    width: 100%;
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: "Noto Sans", sans-serif;
    background-color: var(--prs-wine);
    color: #fff;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.login-button:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(97, 18, 50, 0.4);
    color: #fff;
    text-decoration: none;
}

.login-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.login-button:focus {
    outline: none;
}

.login-button-secondary {
    background-color: transparent;
    color: var(--prs-wine);
    border: 2px solid var(--prs-wine);
}

.login-button-secondary:hover:not(:disabled) {
    background-color: var(--prs-wine);
    color: #fff;
    box-shadow: 0 4px 12px rgba(97, 18, 50, 0.4);
}

/* reCAPTCHA wrapper */
.reCAPTCHA-wrapper {
    margin-bottom: 20px;
}

.button-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    background-color: var(--prs-wine);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: "Noto Sans", sans-serif;
    transition: all 0.2s;
}

.btn-search:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(97, 18, 50, 0.4);
}

.btn-search:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.loader {
    display: none;
}

.loader.show {
    display: inline-block;
}

.loader img {
    width: 36px;
    height: 36px;
}

/* =============================================
   ALERTAS DE ERROR
   ============================================= */
.error-alert {
    display: none;
    background-color: #fde5e5;
    border-left: 4px solid #d32f2f;
    color: #d32f2f;
    padding: 14px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.error-alert.show {
    display: block;
}

.error-code {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1040px) {
    .container-login {
        flex-direction: column;
        align-items: center;
        max-width: 600px;
        gap: 40px;
        margin: 60px auto 80px;
    }

    .left-section {
        width: 100%;
        padding: 0;
    }

    .box-login {
        max-width: 540px;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .container-login {
        margin: 40px auto;
        padding: 0 15px;
    }

    .nombre-portal {
        font-size: 26px;
    }

    .titulo-portal {
        font-size: 18px;
    }

    .right-section {
        padding: 24px 20px;
    }

    .botones-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .fondo-login {
        padding: 20px 10px;
    }

    .nombre-portal {
        font-size: 22px;
    }

    .logo-prs {
        height: 48px;
    }

    .right-section {
        padding: 20px 16px;
    }

    .login-button,
    .btn-search {
        padding: 10px;
        font-size: 14px;
    }
}

/* =============================================
   LANDING: opciones dentro del right-section
   ============================================= */
.landing-option {
    margin-bottom: 4px;
}

.landing-option__title {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
}

.landing-option__desc {
    font-size: 16px;
    color: #545454;
    margin-bottom: 14px;
    line-height: 1.5;
}

.landing-option--minor .landing-option__desc {
    margin-bottom: 8px;
    font-size: 16px;
}

.landing-option__link {
    font-size: 16px;
    color: var(--prs-wine);
    text-decoration: none;
    font-weight: 500;
}

.landing-option__link:hover {
    text-decoration: underline;
    color: var(--prs-wine);
}

/* Botón primario alineado con paleta GobMX */
.btn-prs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    font-family: "Noto Sans", sans-serif;
    background-color: var(--prs-wine);
    color: #fff;
    text-decoration: none;
    transition: box-shadow 0.2s;
    cursor: pointer;
}

.btn-prs:hover {
    box-shadow: 0 4px 12px rgba(97, 18, 50, 0.4);
    color: var(--prs-wine);
    text-decoration: none;
}

/* LANDING: links en la columna izquierda */
.landing-left-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.landing-left-link {
    font-size: 16px;
    color: var(--prs-wine);
    text-decoration: none;
    font-weight: 500;
}

.landing-left-link:hover {
    text-decoration: underline;
    color: var(--prs-wine);
}
