/* styles.css - Versión Definitiva (PC Anclado al piso / Móvil pegado al logo) */

body {
    margin: 0;
    padding: 0;
    height: 100vh; 
    width: 100vw;
    position: relative; 
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    background-color: #0f172a; 
    background-image: url('/INICIO_FLEX/frontend/fhlex.png'); 
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden; 

    /* 📱 CONFIGURACIÓN PARA CELULARES */
    background-size: 180% auto !important; 
    background-position: center top !important; 
}

/* 💻 CONFIGURACIÓN ESTRICTA PARA PC Y TABLETS */
@media (min-width: 768px) {
    body {
        background-size: cover !important;
        /* Valor negativo (-12vh) empuja la imagen hacia arriba fuera de la pantalla */
        background-position: center -12vh !important; 
    }

    .login-container {
        /* 🚀 EXCLUSIVO PARA PC: Anula la posición superior de celulares */
        top: auto !important; 
        
        /* 🚀 Clava la caja casi rozando el borde inferior (PERFECTO EN PC) */
        bottom: 2px !important; 
        
        /* Reduce agresivamente el padding vertical para que la caja sea más "bajita" */
        padding: 10px 20px !important;
    }

    .input-group {
        /* Reduce la separación entre campos al mínimo vital */
        margin-bottom: 8px !important;
    }

    /* Compactamos los textos y campos exclusivamente en PC para ahorrar altura */
    label {
        font-size: 0.75rem !important;
        margin-bottom: 3px !important;
    }

    input {
        padding: 8px 12px !important;
        font-size: 0.9rem !important;
    }

    button#btn-ingresar {
        padding: 10px !important;
        margin-top: 5px !important;
        font-size: 0.95rem !important;
    }
}

/* --- CABECERA Y BOTONES SUPERIORES --- */
.main-header {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

.nav-button {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 20px; 
    text-decoration: none;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

.nav-button.red-outline {
    color: #ff4d4d;
    border-color: rgba(255, 77, 77, 0.4);
}

.nav-button.red-outline:hover {
    background-color: rgba(255, 77, 77, 0.1);
    border-color: #ff4d4d;
}

/* --- CONTENEDOR DE LOGIN (Base para celulares) --- */
.login-container {
    position: absolute;
    /* 🚀 EXCLUSIVO CELULARES: Lo posicionamos desde arriba para pegarlo al logo */
    top: 42vh; 
    /* 🚀 Liberamos el anclaje inferior en celulares */
    bottom: auto; 
    
    left: 50%;
    transform: translateX(-50%); 
    margin: 0 !important; 
    
    width: 90%;
    max-width: 320px;
    background: rgba(15, 23, 42, 0.85); 
    padding: 18px 22px; 
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    z-index: 10;
}

.input-group {
    margin-bottom: 14px; 
    text-align: left;
}

label {
    display: block;
    color: #94a3b8; 
    margin-bottom: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3); 
    color: white; 
    transition: border 0.3s ease;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: #2563eb;
}

button#btn-ingresar {
    margin-top: 10px;
    width: 100%;
    padding: 14px;
    background: #2563eb; 
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

button#btn-ingresar:hover {
    background: #1d4ed8;
}

#errorMsg {
    color: #ef4444; 
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- MODAL DE CONTACTO --- */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.contact-modal.hidden {
    display: none;
}

.contact-content {
    background-color: #1e293b;
    color: white;
    padding: 30px;
    border-radius: 12px;
    position: relative;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-contact {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #94a3b8;
}

.contact-link {
    display: block;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    margin-bottom: 20px;
}