/* ========================================================
   === LOGIN INSTITUCIONAL con animación + CARRUSEL 5 IMG ===
   ======================================================== */

/* ===== Tokens ===== */
:root {
    --navy: #0b2545;
    --azul: #00a7e1;
    --azul-400: #2fb7ef;
    --borde: rgba(11,46,91,.12);
    --e-out: cubic-bezier(.22,.61,.36,1);
    --e-soft: cubic-bezier(.16,.84,.44,1);
    --dur-fast: .28s;
    --dur-med: .50s;
    --dur-slow: .80s;
    --stagger: 80ms;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-y: hidden;
    font-family: "Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

/* ===== TAKE-OFF ANIMATION ===== */
.fx-takeoff {
    opacity: 0;
    transform: translateY(40px) scale(.96);
    filter: blur(2px);
    transition: opacity 1s var(--e-soft), transform 1s var(--e-soft), filter 1s var(--e-soft);
}

html.fx .fx-takeoff {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* ===== SCRAMBLE PIECES ===== */
.fx-piece {
    opacity: 0;
    transform: translateY(30px) rotateX(25deg) rotateY(-15deg) scale(.92);
    transition: opacity .7s var(--e-out), transform .7s var(--e-out);
}

html.fx .fx-piece {
    opacity: 1;
    transform: none;
}

/* ===== Layout ===== */
.login-container {
    min-height: 100svh;
    display: flex;
    width: 100%;
}

/* ========================================================
   === CARRUSEL DE 5 IMÁGENES (sin parpadeo) ===
   ======================================================== */

.login-image {
    flex: 0 0 50%;
    min-height: 100svh;
    position: relative;
    overflow: hidden;
    clip-path: inset(0 12% 0 0);
    opacity: 0;
    transform: translateX(-20px) scale(1.08);
    transition: opacity 1s var(--e-soft) .1s, transform 1s var(--e-soft) .1s, clip-path 1s var(--e-soft) .1s;
}

html.fx .login-image {
    opacity: 1;
    transform: translateX(0) scale(1);
    clip-path: inset(0 0 0 0);
}

/* Capa de brillo suave opcional */
.login-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 0, rgba(255,255,255,.22) 0, transparent 55%);
    pointer-events: none;
}

/* Cada slide es una capa distinta, solo animamos opacidad */
.carousel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: carouselFade 30s infinite;
}

/* Imágenes (5) con delays para escalonar */
.slide-1 {
    background-image: url('https://zeus.mxamro.com/images/carousel/plane1.jpg');
    animation-delay: 0s;
}

.slide-2 {
    background-image: url('https://zeus.mxamro.com/images/carousel/plane2.jpg');
    animation-delay: 6s;
}

.slide-3 {
    background-image: url('https://zeus.mxamro.com/images/carousel/plane3.jpg');
    animation-delay: 12s;
}

.slide-4 {
    background-image: url('https://zeus.mxamro.com/images/carousel/plane4.jpg');
    animation-delay: 18s;
}

.slide-5 {
    background-image: url('https://zeus.mxamro.com/images/carousel/plane5.jpg');
    animation-delay: 24s;
}

/* 
   Ciclo de 30s:
   - 0%   → opacidad 0
   - 5%   → sube a 1 (fade in)
   - 20%  → se mantiene en 1
   - 25%  → baja a 0 (fade out)
   - 100% → se mantiene en 0
   Con el delay de cada slide, quedan encadenadas sin parpadeo.
*/
@keyframes carouselFade {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    20% {
        opacity: 1;
    }

    25% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* ===== Columna del formulario ===== */
.login-form-col {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ===== Card ===== */
.login-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--borde);
    padding: 30px 28px;
    box-shadow: 0 18px 34px rgba(11,46,91,.14);
}

    /* ===== Título centrado ===== */
    .login-card h2 {
        width: 100%;
        text-align: center;
        margin-bottom: 18px;
        font-weight: 800;
        color: var(--navy);
    }

/* ===== Logo ===== */
.login-logo {
    width: 160px;
    margin: 0 auto 10px;
    display: block;
}

/* ===== Inputs ===== */
.form-group {
    margin-bottom: 14px;
}

.form-control {
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(11,46,91,.18);
    background: #fff;
    padding: .4rem .6rem;
    width: 100%;
}

    .form-control.has-eye {
        padding-right: 40px;
    }

/* Wrapper del input para posicionar el ojo */
.input-wrapper {
    position: relative;
}

/* ===== Botón ojo (NEGRO) ===== */
.btn-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    opacity: .95;
    transition: transform .15s var(--e-out), opacity .15s var(--e-out);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8Z'/><circle cx='12' cy='12' r='3'/></svg>");
}

    .btn-eye:hover {
        opacity: 1;
        transform: translateY(-50%) scale(1.05);
    }

    /* Estado cuando la contraseña está visible (ojo tachado) */
    .btn-eye.on {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.94 17.94A10.94 10.94 0 0 1 12 20C5 20 1 12 1 12a21.8 21.8 0 0 1 5.06-6.94'/><path d='M9.9 4.24A10.94 10.94 0 0 1 12 4c7 0 11 8 11 8a21.82 21.82 0 0 1-3.87 5.15'/><path d='M9.88 9.88a3 3 0 0 0 4.24 4.24'/><line x1='3' y1='3' x2='21' y2='21'/></svg>");
    }

/* ===== Botón principal ===== */
.button {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: .7rem 1rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg,var(--azul),var(--azul-400));
}

/* Helpers */
.helper {
    text-align: center;
    margin-top: 10px;
}

.helptext {
    text-align: right;
    font-size: .82rem;
    color: #64748b;
}

/* ===== Mobile ===== */
@media (max-width:991px) {
    .login-image {
        display: none;
    }
}
