@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --palm-primary: #006837;
    --palm-dark: #004d29;
    --palm-gold: #b88317;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --bg-light: #ffffff;
    --input-bg: #f8fafc;
}

body, html {
    height: 100%;
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow: hidden;
    background: var(--bg-light);
}

/* --- LAYOUT PRINCIPAL --- */
.split-screen {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* --- NUEVA ANIMACIÓN DE FLOTACIÓN --- */
@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); } /* Sube 12px */
    100% { transform: translateY(0px); } /* Baja de nuevo */
}

.animate-floating {
    /* Animación infinita, suave, de 3 segundos */
    animation: floating 3.5s ease-in-out infinite;
}

/* --- COLUMNA IZQUIERDA (CONTENEDOR) --- */
.image-pane {
    flex: 1.4;
    position: relative; /* Necesario para posicionar los hijos absolutos */
    display: flex;
    align-items: flex-end;
    padding: 80px 60px;
    overflow: hidden;
    /* IMPORTANTE: Quitamos el background url de aquí porque ahora son dinámicos */
    background-color: #002814; /* Color de fondo por si tarda en cargar la imagen */
}

/* --- NUEVO: ESTILOS DEL SLIDER --- */
.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Nivel más bajo */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    
    /* Efecto de transición suave (Cross-fade) */
    opacity: 0;
    transition: opacity 1.5s ease-in-out; 
    
    /* Opcional: Un pequeño efecto de zoom lento para más elegancia */
    transform: scale(1.05); 
    transition: opacity 1.5s ease-in-out, transform 6s linear;
}

.slide.active {
    opacity: 1;
    transform: scale(1); /* Vuelve al tamaño normal mientras se muestra */
    z-index: 0;
}

/* --- OVERLAY DEGRADADO (Tu código original ajustado) --- */
.image-pane::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0, 40, 20, 0.95) 0%, rgba(0, 104, 55, 0.3) 100%);
    z-index: 1; /* Encima de las imágenes */
    pointer-events: none; /* Permite clicks a través si fuera necesario */
}

/* --- CONTENIDO DE TEXTO --- */
.overlay-content {
    position: relative;
    z-index: 2; /* Encima del degradado y las imágenes */
    color: #fff; /* Aseguramos que el texto sea blanco */
    width: 100%;
}

.overlay-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 550px;
}

.overlay-content h1 {
    font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 25px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.overlay-content p {
    font-size: 1.25rem; font-weight: 300; opacity: 0.95; 
    border-left: 4px solid var(--palm-gold); /* Línea dorada a la izquierda */
    padding-left: 25px; margin-left: 5px;
    line-height: 1.5;
}


/* --- COLUMNA DERECHA (FORMULARIO) --- */
.form-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px;
    background: #fff;
    z-index: 10;
}

/* Tarjeta Flotante del Formulario */
.login-card-floating {
    width: 100%;
    max-width: 420px; /* Un poco más ancho */
    padding: 45px;
    background: white;
    border-radius: 24px;
    /* Sombra suave para efecto flotante */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06); 
}

/* Encabezado del formulario */
.brand-header { text-align: center; margin-bottom: 40px; }
.logo-main { width: 90px; margin-bottom: 20px; /* Se le aplica animate-floating en el HTML */ }
.brand-header h2 { 
    font-weight: 800; color: var(--palm-primary); margin: 0; font-size: 2rem; letter-spacing: -0.5px;
}
.brand-header p { color: var(--text-gray); font-size: 1rem; margin-top: 8px; }

/* Inputs Modernos */
.input-group-modern {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: 0.3s;
    overflow: hidden;
}

.input-group-modern:focus-within {
    border-color: var(--palm-primary);
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 104, 55, 0.08);
    transform: translateY(-2px);
}

.input-icon {
    padding-left: 18px; color: var(--palm-gold); font-size: 1.2rem;
}

.form-floating > .form-control {
    background: transparent; border: none; height: 58px; box-shadow: none !important; padding-left: 15px; font-size: 1rem;
}
.form-floating > label { padding-left: 15px; color: #94a3b8; }

.btn-reveal {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #cbd5e1; cursor: pointer; transition: 0.3s;
}
.btn-reveal:hover { color: var(--palm-primary); }

/* Enlaces y Acciones */
.actions-row {
    display: flex; justify-content: flex-end; margin-bottom: 30px;
}
.forgot-link {
    color: var(--text-gray); font-size: 0.9rem; text-decoration: none; font-weight: 500; transition: 0.2s;
}
.forgot-link:hover { color: var(--palm-gold); text-decoration: underline; }

/* Botón Principal */
.btn-gradient {
    width: 100%;
    background: linear-gradient(135deg, var(--palm-primary), #00381e);
    color: white; border: none; padding: 16px; border-radius: 12px; font-weight: 700; font-size: 1.05rem;
    display: flex; justify-content: center; align-items: center; gap: 10px;
    transition: 0.3s; box-shadow: 0 10px 20px rgba(0, 104, 55, 0.2); letter-spacing: 0.5px;
}

.btn-gradient:hover {
    transform: translateY(-3px); box-shadow: 0 15px 35px rgba(0, 104, 55, 0.3);
}

/* Alerta de Error */
.alert-custom {
    background: #fff0f0; border-left: 4px solid #e11d48; color: #be123c;
    padding: 14px; border-radius: 8px; font-size: 0.95rem; margin-bottom: 25px;
    display: flex; align-items: center; gap: 10px;
}

/* Copyright (Pie de página DERECHO) */
.footer-copy {
    position: absolute; bottom: 25px; font-size: 0.75rem; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}

/* --- ANIMACIONES DE ENTRADA (Stagger) --- */
.animate-stagger { opacity: 0; animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; } .delay-3 { animation-delay: 0.3s; } .delay-4 { animation-delay: 0.4s; } .delay-5 { animation-delay: 0.5s; }

.slide-up { animation: fadeInUp 1.2s ease-out forwards; opacity: 0; transform: translateY(50px); }

/* Responsive */
@media (max-width: 992px) {
    .split-screen { flex-direction: column; }
    .image-pane { display: none; } /* Ocultar imagen en móvil */
    .form-pane { width: 100%; padding: 20px; background: var(--bg-light); }
    .login-card-floating { box-shadow: none; border: none; padding: 10px; background: transparent; }
    .footer-copy { position: relative; bottom: auto; margin-top: 40px; text-align: center; }
}