/*
  =============================================================================
  login.css — Estilos de la página de inicio de sesión (producción)
  Pautas:
    - [SRP]  Estilos exclusivos de la vista de login (estructura, formulario y visual).
    - [KEEP] No se modifican colores, tamaños, ni comportamiento visual/original.
    - [DRY]  Variables CSS en :root y organización por secciones con comentarios.
    - [A11Y] Mantiene focos/contrastes definidos por el diseño existente.
  Fuente original: :contentReference[oaicite:0]{index=0}
  =============================================================================
*/

/* =========================
   Variables de color / tema
   ========================= */
:root {
    --primary-dark: #8f141b;
    --primary: #b4121a;
    --primary-light: #f8d7da;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --background: #f8f9fa;
    --white: #ffffff;
    --border: #dee2e6;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Oculta el botón de mostrar contraseña en IE/Edge heredados */
input[type="password"]::-ms-reveal {
  display: none;
}

/* =========================
   Estructura principal
   ========================= */
.login-page .header {
    display: none;
}

.login-page .wrapper {
    width: 100%;
    max-width: none;
    height: calc(100vh - 70px); /* Altura total menos el header */
    margin-top: 70px;           /* Espacio para el header */
}

.login-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* =========================
   Sección visual con video
   ========================= */
.login-visual {
    flex: 1;
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
    height: 100%;
}

.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: 0;
}

.visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.university-branding {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: center;
    max-width: 500px;
}

.university-branding h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.university-branding p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* =========================
   Sección del formulario
   ========================= */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--background);
    height: 100%;
}

.form-container {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out;
}

.logo-mobile {
    text-align: center;
    margin-bottom: 1.5rem;
    display: block;
}

.logo-mobile img {
    height: 70px;
}

h2 {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2rem;
}

/* =========================
   Elementos del formulario
   ========================= */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i:first-of-type {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 2;
}

.input-with-icon .form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.input-with-icon .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(180, 18, 26, 0.15);
}

/* Toggle de visibilidad de contraseña (posición y estados) */
.password-toggle i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-light);
    z-index: 2;
    transition: color 0.3s ease;
}

.password-toggle:hover i,
.password-toggle.active i {
    color: var(--primary-dark);
}

/* =========================
   Opciones del formulario
   ========================= */
.form-options {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.recover-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 2rem;
}

.recover-link:hover {
    color: var(--primary-dark);
}

.recover-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.recover-link:hover::after {
    transform: scaleX(1);
}

/* =========================
   Botón de login
   ========================= */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(180, 18, 26, 0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(180, 18, 26, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

a.btn-login {
    text-decoration: none;
}

/* =========================
   Animaciones
   ========================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   Responsive
   ========================= */
@media (min-width: 992px) {
    .login-visual {
        display: flex;
    }
    
    .logo-mobile {
        display: none;
    }
}

@media (max-width: 768px) {
    .form-container {
        padding: 2rem;
    }
    
    .login-form-section {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .form-container {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}
