/**
 * Estilos para el login del extranet según diseño loginextranet.png
 * Panel izquierdo con imagen, panel derecho con formulario
 */

/* ============================================
   VARIABLES Y CONFIGURACIÓN BASE
   ============================================ */
:root {
    --geofal-orange: #f34d23;
    --geofal-orange-hover: #d43e1a;
    --geofal-blue: #1E3A5F;
    --geofal-turquoise: #4ECDC4;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-primary);
    overflow: hidden;
    position: relative;
    /* Imagen de fondo con overlay oscuro */
    background-image: url('../../assets/geofoto%201%202.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay oscuro sobre la imagen de fondo */
.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Overlay oscuro al 50% */
    z-index: 0;
}

/* ============================================
   CONTENEDOR PRINCIPAL - DOS PANELES
   ============================================ */
.login-container {
    width: 90%;
    max-width: 1000px;
    height: auto;
    max-height: 90vh;
    display: flex;
    background: var(--bg-white);
    gap: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    z-index: 1; /* Asegurar que el contenido esté por encima del overlay */
    box-sizing: border-box;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: auto;
}

/* ============================================
   PANEL IZQUIERDO - CON IMAGEN DE CONSTRUCCIÓN
   ============================================ */
.login-image-panel {
    flex: 0 0 45%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    background: linear-gradient(135deg, #1E3A5F 0%, #2C5282 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 50px 35px;
    border-radius: 0;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

/* Overlay oscuro sobre la imagen - ELIMINADO para mostrar la imagen sin filtro */

/* Imagen de fondo en el panel izquierdo - se aplica desde el HTML inline style */
/* Overlay eliminado para mostrar la imagen sin filtro */

/* Contenido centrado directamente sobre la imagen */
.login-image-content {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: auto 0;
    text-align: center;
}

.login-building-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 1;
    display: block;
    color: white;
    font-weight: 300;
}

.login-image-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
    line-height: 1.4;
}

.login-image-subtitle {
    font-size: 14px;
    opacity: 0.9;
    color: white;
    line-height: 1.5;
    font-weight: 400;
}

/* Iconos de redes sociales en la parte inferior */
.login-social-icons {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
}

/* Iconos solo para desktop (dentro del panel de imagen) */
.login-social-icons-desktop {
    display: flex;
}

/* Iconos solo para móvil (fuera del contenedor) */
.login-social-icons-mobile {
    display: none;
}

.login-social-icons a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    font-size: 18px;
}

.login-social-icons a i {
    font-size: 18px;
    display: inline-block;
    line-height: 1;
}

.login-social-icons a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* ============================================
   PANEL DERECHO - FORMULARIO
   ============================================ */
.login-form-panel {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 40px;
    background: var(--bg-white);
    overflow: hidden;
    border-radius: 0;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* Logo y Branding */
.login-branding {
    text-align: left;
    margin-bottom: 30px;
}

.login-logo-container {
    display: block;
    margin-bottom: 12px;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 220px;
}

.login-logo-img {
    max-width: 220px;
    width: 220px;
    height: auto;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    filter: none !important;
    display: block;
    object-fit: contain;
}

.login-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 400;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
    text-align: left;
}

/* Formulario */
.login-form {
    max-width: 100%;
    margin: 0;
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--geofal-orange);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Botón de envío */
.btn-login {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--geofal-orange);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-login:hover {
    background: var(--geofal-orange-hover);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.copyright {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Alertas */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert i {
    font-size: 16px;
    margin-top: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .login-body {
        padding: 15px;
        align-items: flex-start;
        padding-top: 15px;
    }
    
    .login-body::before {
        background: rgba(0, 0, 0, 0.6); /* Overlay más oscuro en móvil */
    }
    
    .login-container {
        flex-direction: column;
        width: 100%;
        max-width: 450px;
        height: auto;
        min-height: auto;
        margin: auto;
        margin-top: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    /* Ocultar panel de imagen en móvil */
    .login-image-panel {
        display: none;
    }
    
    .login-form-panel {
        flex: 1;
        width: 100%;
        padding: 40px 30px;
        border-radius: 16px;
    }
    
    /* Centrar branding y logo */
    .login-branding {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .login-logo-container {
        display: block;
        margin: 0 auto 12px;
    }
    
    .login-tagline {
        text-align: center;
    }
    
    /* Centrar título */
    .login-title {
        text-align: center;
    }
    
    /* Ocultar iconos de desktop en móvil */
    .login-social-icons-desktop {
        display: none;
    }
    
    /* Mostrar iconos de móvil */
    .login-social-icons-mobile {
        display: flex;
        position: fixed;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        justify-content: center;
        align-items: center;
        gap: 12px;
    }
    
    .login-social-icons-mobile a {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(220, 220, 220, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666;
        text-decoration: none;
        transition: var(--transition);
        backdrop-filter: blur(8px);
        font-size: 16px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
    
    .login-social-icons-mobile a:hover {
        background: rgba(255, 255, 255, 1);
        color: #333;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }
    
    /* Ocultar footer en móvil */
    .login-footer {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-body {
        padding: 15px;
    }
    
    .login-form-panel {
        padding: 35px 25px;
    }
    
    .login-title {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .login-logo-img {
        max-width: 180px;
    }
    
    .login-tagline {
        font-size: 13px;
    }
    
    .login-social-icons-mobile {
        bottom: 20px;
        gap: 10px;
    }
    
    .login-social-icons-mobile a {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}

