/* ==============================
   VARIABLES Y RESETEO BÁSICO
============================== */
:root {
    --color-principal: #ffdf00;
    --color-secundario: #0e49be;
    --color-hover-secundario: #012b7d;
    --color-borde: #ddd;
    --color-fondo: #fff;
    --color-texto: #3d3d3d;
    --color-gris: #999;
    --sombra: 0 4px 10px rgba(0, 0, 0, 0.1);
    --radio: 12px;
    --transicion: 0.2s ease;
}


/* ==============================
   CONTENEDOR PRINCIPAL
============================== */
.contenedorLogin {
    background: var(--color-fondo);
    border: 1px solid var(--color-borde);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    width: 90%;
    max-width: 420px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 2rem auto 0 auto;
}

/* ==============================
   LOGO SUPERIOR
============================== */
.imagenLogo {
    background-image: url(../../imagenes/Logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
}

/* ==============================
   FORMULARIO
============================== */
form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    align-items: center;
}

.cartas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ==============================
   CAMPOS DE TEXTO
============================== */
.correo input,
.password input {
    width: 100%;
    max-width: 300px;
    padding: 0.7rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--color-borde);
    background-color: #fafafa;
    font-size: 1rem;
    transition: border var(--transicion);
}

.correo input:focus,
.password input:focus {
    border-color: var(--color-principal);
    outline: none;
}

/* ==============================
   ENLACE DE CONTRASEÑA
============================== */
.contenedorLogin form p {
    font-size: 0.9rem;
    color: var(--color-gris);
    text-align: right;
    cursor: pointer;
    transition: color var(--transicion);
    margin-right: 1.5rem;
    align-self: flex-end;
}

.contenedorLogin form p:hover {
    color: var(--color-texto);
}
.error h2{
    font-size: 14px;
    font-weight: 200;
    color: red;
    align-self: flex-start;
}

/* ==============================
   BOTONES
============================== */
#btnSesion,
#btnRegistro {
    width: 100%;
    max-width: 280px;
    height: 45px;
    border: none;
    border-radius: 40px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transicion), transform var(--transicion);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Botón de iniciar sesión */
#btnSesion {
    background-color: var(--color-principal);
    color: #000;
}

#btnSesion:hover {
    background-color: #f5d700;
    transform: translateY(-2px);
}

/* Botón de registro */
#btnRegistro {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-secundario);
    color: white;
    margin-top: 0.8rem;
    text-decoration: none;
}

#btnRegistro:hover {
    background-color: var(--color-hover-secundario);
    transform: translateY(-2px);
}

/* ==============================
   RESPONSIVIDAD
============================== */

/* Tablets (<= 768px) */
@media screen and (max-width: 768px) {
    .contenedorLogin {
        padding: 1.5rem;
        max-width: 360px;
    }

    .imagenLogo {
        width: 150px;
        height: 150px;
    }

    .correo input,
    .password input {
        max-width: 260px;
        font-size: 0.95rem;
    }
}

/* Móviles pequeños (<= 480px) */
@media screen and (max-width: 480px) {
    .contenedorLogin {
        width: 95%;
        border-radius: 10px;
        padding: 1rem;
    }

    .imagenLogo {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }

    form {
        gap: 0.8rem;
    }

    #btnSesion,
    #btnRegistro {
        max-width: 240px;
        font-size: 1rem;
    }

    .contenedorLogin form p {
        text-align: center;
        margin: 0 auto;
        width: 100%;
    }
}