@import url('./base/variables.css');

/* ==========================================================
   CONTROL GLOBAL Y ELIMINACIÓN DE SCROLL
   ========================================================== */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body.body-login {
    background-color: #121212;
    background-image: linear-gradient(135deg, rgba(15, 15, 15, 0.75), rgba(30, 30, 30, 0.85)), 
        var(--bg-imagen-actual, url('/frontend/Assets/img/Graduacion.jpg'));
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    padding: 10px;
    transition: background-image 1.2s ease-in-out;
}

.pantalla-laptop {
    width: 100%;
    max-width: 1100px;
    height: 100%;
    max-height: 650px;
    background: transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: space-between;
}

/* Encabezado fijo arriba */
.encabezado {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    width: 100%;
    flex-shrink: 0;
}

.instituto {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo {
    width: 55px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.contenido {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 30px;
    padding: 10px;
    width: 100%;
}

.contacto {
    flex: 1.2;
    display: flex;
    align-items: center;
}

.contacto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 35px;
    width: 100%;
    max-width: 520px;
}

.item-contacto {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.item-contacto i {
    font-size: 1rem;
    background: #7D8B6D;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    min-width: 45px;
    min-height: 45px;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.item-contacto div {
    display: flex;
    flex-direction: column;
}

.titulo-contacto {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
    opacity: 0.95;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dato-contacto {
    font-size: 0.9rem;
    color: #f1f5f9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.lado-derecho {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
}

.contenedor {
    background: var(--color-amarillo-institucional);
    width: 100%;
    max-width: 360px;
    padding: 28px 25px;
    border-radius: 22px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contenedor h1 {
    color: #59451d;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.subtitulo {
    color: #59451d;
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.grupo-input {
    margin-bottom: 15px;
}

.grupo-input label {
    display: block;
    color: #59451d;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.caja-input {
    background: #ffffff;
    border-radius: 22px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 42px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.caja-input i {
    color: #a68546;
    margin-right: 10px;
    font-size: 0.9rem;
}

.caja-input input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.85rem;
    color: #333;
    background: transparent;
}

.caja-input input::placeholder {
    color: #b0b0b0;
}

.zona-botones {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
}

.olvido a {
    color: #59451d;
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: 700;
}

.olvido a:hover {
    text-decoration: underline;
}

.lado-derecho .boton {
    background-color: #E97339;
    color: #ffffff;
    border: none;
    padding: 10px 26px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(122, 98, 54, 0.4);
    transition: transform 0.2s, background-color 0.2s;
    width: auto;
}

.lado-derecho .boton:hover {
    transform: scale(1.05);
    background-color: #59451d;
}

#togglePassword:hover {
    color: #7a6236 !important;
    transform: scale(1.1);
    transition: all 0.2s;
}

/* ==========================================================
   MEDIA QUERIES PARA DISPOSITIVOS MÓVILES Y PANTALLAS PEQUEÑAS
   ========================================================== */
@media (max-width: 900px) {
    html, body {
        overflow: hidden !important;
    }

    body.body-login {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
        align-items: center;
        justify-content: center;
        padding: 5px;
    }

    .pantalla-laptop {
        height: 100%;
        max-height: 100%;
        /* Centra todo el contenido verticalmente en la pantalla del celular */
        justify-content: center; 
        align-items: center;
        gap: 15px;
    }

    .encabezado {
        justify-content: center;
        flex-direction: row;
        text-align: center;
        padding: 0;
        margin-bottom: 0;
        width: 100%;
    }

    .instituto {
        font-size: 0.75rem;
    }

    .logo {
        width: 30px;
    }

    .contenido {
        flex-direction: column;
        /* Distribuye los elementos (formulario y contactos) de forma equilibrada al centro */
        justify-content: center;
        align-items: center;
        gap: 15px;
        padding: 0;
        width: 100%;
        flex: unset;
    }

    .contacto {
        align-items: center;
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .lado-derecho {
        align-items: center;
        /* Centra el recuadro amarillo horizontalmente */
        align-items: center; 
        order: 1;
        width: 100%;
    }

    .contenedor {
        max-width: 320px;
        padding: 16px 18px;
        border-radius: 18px;
    }

    .contenedor h1 {
        font-size: 1.3rem;
        margin-bottom: 0;
    }

    .grupo-input {
        margin-bottom: 10px;
    }

    .grupo-input label {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }

    .caja-input {
        height: 38px;
        padding: 0 12px;
    }

    .caja-input input {
        font-size: 0.8rem;
    }

    .zona-botones {
        margin-top: 12px;
    }

    .lado-derecho .boton {
        width: auto;
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    .contacto-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px 12px;
        max-width: 320px;
    }
    
    .item-contacto {
        gap: 8px;
    }

    .item-contacto i {
        min-width: 30px;
        min-height: 30px;
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }

    .titulo-contacto {
        font-size: 0.65rem;
    }

    .dato-contacto {
        font-size: 0.7rem;
    }
}