/* --- FONDO ANIMADO (Tu base actual) --- */
.bg-flat {
    background: linear-gradient(-45deg, #113872, #004AAD, #141581, #003F7D, #0061e0);
    background-size: 200% 200%;
    animation: backgroundMove 10s ease infinite;
    overflow: hidden;
}

@keyframes backgroundMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- TARJETA INSTITUCIONAL PREMIUM --- */
.login-card {
    max-width: 420px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 0.75rem !important;
    /* Bordes más sobrios para un look profesional */
    border: none !important;
    /* Línea superior distintiva en tono Guinda */
    border-top: 6px solid #2f9ee7 !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.login-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3) !important;
}

/* --- TIPOGRAFÍA Y TÍTULOS --- */
.login-card h1 {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    font-weight: 700;
    color: #212529;
}

.float-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

/* --- INPUTS PLANOS PREMIUM --- */
.flat-input {
    border: 1px solid #dee2e6 !important;
    border-radius: 0.5rem !important;
    background-color: #f8f9fa !important;
    padding: 1rem 0.75rem !important;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

.flat-input:focus {
    background-color: #ffffff !important;
    border-color: #221a8b !important;
    box-shadow: 0 0 0 4px rgba(26, 28, 139, 0.1) !important;
    outline: none;
}

/* --- BOTÓN PRINCIPAL (btn-morena) --- */
.btn-morena {
    background-color: #1c1a8b;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 0.75rem !important;
    border-radius: 0.5rem !important;
    /* Coincide con los inputs para simetría */
    transition: all 0.3s ease;
}

.btn-morena:hover {
    background-color: #241263;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 26, 139, 0.3);
}

.btn-morena:active {
    transform: scale(0.97);
}

/* --- BOTÓN SECUNDARIO / OUTLINE --- */
.btn-outline-secondary {
    border: 2px solid #dee2e6 !important;
    color: #6c757d !important;
    font-weight: 500;
    border-radius: 0.5rem !important;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa !important;
    border-color: #ced4da !important;
    color: #495057 !important;
}

/* --- AJUSTES FORM FLOATING --- */
.form-floating>label {
    padding-left: 1rem;
    color: #6c757d;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: #8B1A2A;
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
}

/* ===== FONDO FUSIONADO ===== */
.fondo-fusionado {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: flex;
    background-color: #0f0a3c;
    overflow: hidden;
}

.foto {
    flex: 1;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* CONTENEDOR DE CADA BLOQUE */
.foto {
    position: relative;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* VIDEO COMO FONDO */
.foto video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
}

/* IZQUIERDA */
.f1 {
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
}

/* CENTRO */
.f2 {
    margin-left: -10%;
    margin-right: -10%;
    z-index: 2;
    -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 15%,
            black 85%,
            transparent 100%);
    mask-image: linear-gradient(to right,
            transparent 0%,
            black 15%,
            black 85%,
            transparent 100%);
}

/* DERECHA */
.f3 {
    -webkit-mask-image: linear-gradient(to left, black 85%, transparent 100%);
    mask-image: linear-gradient(to left, black 85%, transparent 100%);
}

/* CAPA DE COLOR */
.capa-roja {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(23, 28, 100, 0.75),
            rgba(15, 16, 74, 0.85));
    z-index: 3;
    pointer-events: none;
}

/* LOGIN SIEMPRE ARRIBA */
.login-wrapper {
    position: relative;
    z-index: 5;
}

.f1 video {
    object-fit: cover;
    object-position: center 1%;
}


.f2 video {
    object-position: center 1%;
}


.logo-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-bg {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(13, 110, 253, 0.95) 0%,
        rgba(13, 110, 253, 0.75) 30%,
        rgba(13, 110, 253, 0.45) 55%,
        rgba(13, 110, 253, 0.18) 75%,
        rgba(13, 110, 253, 0.02) 90%
    );
    filter: blur(8px);
    z-index: 0;
    pointer-events: none;

    /* --- Nueva animación --- */
    animation: pulse-glow 3s infinite ease-in-out;
}

.logo-img {
    max-height: 100px;
    width: auto;
    position: relative;
    z-index: 2;
}

/* Definición de la animación de pulso */
@keyframes pulse-glow {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        /* Crece un poco */
        opacity: 1;
        /* Se vuelve más intenso */
    }

    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
}