﻿/* =========================================================
   LOGIN ASCENDUM
   Ruta:
   Content/css/Home/Login.css
========================================================= */

:root {
    --ascendum-teal: #003f4a;
    --ascendum-teal-dark: #002b33;
    --ascendum-teal-light: #0b6975;
    --ascendum-graphite: #2f373b;
    --ascendum-gray: #68757b;
    --ascendum-silver: #aeb8bc;
    --ascendum-light: #f1f4f5;
    --ascendum-white: #ffffff;
}

/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    font-family: "Poppins", sans-serif;
    color: var(--ascendum-graphite);
    background-image: url("../../images/AscendumWallpaper.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

/* =========================================================
   CONTENEDOR PRINCIPAL
========================================================= */

.screen-layout {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
}

    /*
   Oscurecimiento ligero en los extremos.
   Ayuda a leer el título y separa visualmente la tarjeta.
*/
    .screen-layout::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: linear-gradient( 90deg, rgba(0, 48, 57, 0.38) 0%, rgba(0, 48, 57, 0.10) 42%, rgba(0, 48, 57, 0.05) 64%, rgba(0, 43, 51, 0.28) 100% );
    }

/* Los elementos anteriores ya no son necesarios */

.background-image,
.overlay {
    display: none;
}

/* =========================================================
   PANEL IZQUIERDO
========================================================= */

.left-panel {
    position: relative;
    width: 64%;
    min-height: 100vh;
    min-height: 100svh;
}

/* =========================================================
   TÍTULO
========================================================= */

.left-content {
    position: absolute;
    top: clamp(70px, 12vh, 125px);
    left: clamp(40px, 5.2vw, 85px);
    z-index: 2;
    width: calc(100% - 80px);
    max-width: 780px;
    color: var(--ascendum-white);
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.5);
}

    .left-content h1 {
        position: relative;
        display: inline-block;
        margin: 0;
        padding-bottom: 15px;
        font-family: "Poppins", sans-serif;
        font-size: clamp(42px, 4.6vw, 72px);
        font-weight: 300;
        line-height: 1.08;
        letter-spacing: -2px;
        white-space: nowrap;
    }

        .left-content h1 span {
            font-weight: 700;
        }

    /* Línea decorativa Ascendum */
    .left-content h1 {
        --linea-principal: clamp(125px, 9vw, 165px);
        --linea-secundaria: clamp(35px, 3vw, 55px);
    }

        /* Tramo principal en verde petróleo */
        .left-content h1::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: var(--linea-principal);
            height: 5px;
            background: var(--ascendum-teal);
            border-radius: 20px 0 0 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
        }

        /* Tramo secundario en gris metálico */
        .left-content h1::before {
            content: "";
            position: absolute;
            left: var(--linea-principal);
            bottom: 0;
            width: var(--linea-secundaria);
            height: 2px;
            background: var(--ascendum-silver);
            border-radius: 0 20px 20px 0;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
        }

/* =========================================================
   LOGO EIKOS
========================================================= */

.top-logo {
    position: absolute;
    left: clamp(40px, 5.2vw, 85px);
    bottom: clamp(30px, 5vh, 58px);
    top: auto;
    z-index: 3;
}

    .top-logo img {
        display: block;
        width: clamp(130px, 12vw, 190px);
        height: auto;
        object-fit: contain;
        filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.45));
        padding-bottom: 10px;
    }

/* =========================================================
   PANEL DERECHO
========================================================= */

.right-panel {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36%;
    min-width: 430px;
    min-height: 100vh;
    min-height: 100svh;
    padding: 35px 50px 35px 20px;
}

#formLogin {
    width: 100%;
    max-width: 390px;
}

/* =========================================================
   CONTENEDOR DEL LOGIN
========================================================= */

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* =========================================================
   TARJETA
========================================================= */

.login-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: clamp(640px, 78vh, 720px);
    padding: 52px 30px 46px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    box-shadow: 0 24px 60px rgba(0, 48, 57, 0.25), 0 5px 15px rgba(0, 0, 0, 0.1);
}

    /* Ancho uniforme de los elementos internos */

    .login-card input[type="text"],
    .login-card input[type="password"],
    .login-card .captcha-container {
        width: 100%;
        max-width: 320px;
    }

.btn-login {
    width: 100%;
    max-width: 320px;
}


/* =========================================================
   LOGO ASCENDUM
========================================================= */

.login-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 26px;
}

.login-brand-logo {
    display: block;
    width: 210px;
    max-width: 90%;
    max-height: 105px;
    object-fit: contain;
}

/* =========================================================
   SUBTÍTULO
========================================================= */

.login-subtitle {
    width: 100%;
    margin-bottom: 28px;
    color: var(--ascendum-gray);
    font-family: "Poppins", sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 1.8px;
    text-align: center;
    text-transform: uppercase;
}

    /* Detalle inferior del subtítulo */

    .login-subtitle::after {
        content: "";
        display: block;
        width: 42px;
        height: 3px;
        margin: 13px auto 0;
        border-radius: 10px;
        background: var(--ascendum-teal-light);
    }

/* =========================================================
   CAMPOS
========================================================= */

.login-card input[type="text"],
.login-card input[type="password"] {
    display: block;
    height: 54px;
    margin: 0 auto 15px;
    padding: 0 18px;
    border: 1px solid rgba(0, 63, 74, 0.44);
    border-radius: 13px;
    outline: none;
    background: var(--ascendum-light);
    color: var(--ascendum-graphite);
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 400;
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

    .login-card input[type="text"]:hover,
    .login-card input[type="password"]:hover {
        border-color: var(--ascendum-teal);
        background: #ffffff;
    }

    .login-card input[type="text"]:focus,
    .login-card input[type="password"]:focus {
        border-color: var(--ascendum-teal-light);
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(11, 105, 117, 0.15), 0 6px 15px rgba(0, 63, 74, 0.10);
    }

.login-card input::placeholder {
    color: #748086;
    opacity: 1;
}

/* Evitar colores automáticos del navegador */

.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ascendum-graphite);
    -webkit-box-shadow: 0 0 0 1000px var(--ascendum-light) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* =========================================================
   CAPTCHA
========================================================= */

.captcha-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    margin-top: 2px;
}

.g-recaptcha {
    transform: scale(1);
    transform-origin: center center;
}

/* =========================================================
   BOTÓN
========================================================= */

.btn-login {
    position: relative;
    display: block;
    height: 54px;
    margin: 20px auto 0;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient( 135deg, var(--ascendum-teal) 0%, var(--ascendum-teal-dark) 55%, var(--ascendum-graphite) 100% );
    color: var(--ascendum-white);
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 0 9px 20px rgba(0, 63, 74, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

    .btn-login:hover,
    .btn-login:focus {
        outline: none;
        transform: translateY(-2px);
        background: linear-gradient( 135deg, var(--ascendum-teal-light) 0%, var(--ascendum-teal) 50%, var(--ascendum-teal-dark) 100% );
        box-shadow: 0 13px 26px rgba(11, 105, 117, 0.30);
    }

    .btn-login:active {
        transform: translateY(0);
        box-shadow: 0 5px 12px rgba(0, 43, 51, 0.28);
    }

/* =========================================================
   LAPTOPS Y PANTALLAS MEDIANAS
========================================================= */

@media (max-width: 1200px) {

    .left-panel {
        width: 58%;
    }

    .right-panel {
        /*width: 42%;*/
        min-width: 390px;
        padding: 30px 10px 30px 10px;
    }

    .left-content h1 {
        font-size: clamp(38px, 4.4vw, 56px);
    }

    #formLogin {
        max-width: 375px;
    }

    .login-card {
        min-height: clamp(600px, 76vh, 670px);
        padding: 44px 28px 38px;
    }

    .login-brand-logo {
        width: 185px;
    }
}

/* =========================================================
   TABLET
   La fotografía se muestra como una sección independiente
   para conservar visible el automóvil.
========================================================= */

@media (max-width: 900px) {

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

    body {
        background: #e8edef;
        background-image: none;
        background-attachment: scroll;
    }

    .screen-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        background: #e8edef;
    }

        .screen-layout::before {
            display: none;
        }

    /*
       HERO DE LA FOTOGRAFÍA

       El panel izquierdo deja de cubrir toda la pantalla y se
       convierte en una cabecera. De esta manera la tarjeta ya
       no tapa el automóvil.
    */
    .left-panel {
        position: relative;
        inset: auto;
        flex: 0 0 auto;
        width: 100%;
        min-height: clamp(390px, 50svh, 520px);
        pointer-events: auto;
        background-image: linear-gradient( 180deg, rgba(0, 48, 57, 0.44) 0%, rgba(0, 48, 57, 0.06) 48%, rgba(0, 43, 51, 0.46) 100% ), url("../../images/AscendumWallpaper.png");
        background-repeat: no-repeat;
        background-size: cover;
        /*
           El primer valor controla el movimiento horizontal.
           Un valor bajo prioriza la zona izquierda, donde está
           ubicado el automóvil.
        */
        background-position: 20% center;
    }

    .left-content {
        top: 28px;
        left: 28px;
        width: calc(100% - 56px);
        max-width: none;
    }

        .left-content h1 {
            --linea-principal: clamp(85px, 21vw, 115px);
            --linea-secundaria: clamp(25px, 7vw, 38px);
            padding-bottom: 15px;
            font-size: clamp(30px, 6vw, 44px);
            letter-spacing: -1px;
            white-space: normal;
        }

            .left-content h1::after {
                height: 4px;
            }

            .left-content h1::before {
                bottom: 1px;
                height: 2px;
            }

    /*
       Se mueve Eikos a la zona derecha para no cubrir el carro.
    */
    .top-logo {
        top: auto;
        right: 26px;
        bottom: 58px;
        left: auto;
        padding: 7px 10px;
        border-radius: 12px;
    }

        .top-logo img {
            width: 112px;
            padding-bottom: 0;
        }

    /*
       La tarjeta se superpone únicamente unos píxeles sobre
       la fotografía. El automóvil continúa visible.
    */
    .right-panel {
        position: relative;
        z-index: 3;
        flex: 0 0 auto;
        align-items: flex-start;
        width: 100%;
        min-width: 0;
        min-height: auto;
        margin-top: -42px;
        padding: 0 22px 38px;
        background: linear-gradient( 180deg, transparent 0, transparent 42px, #e8edef 42px, #f5f7f7 100% );
    }

    #formLogin {
        width: 100%;
        max-width: 410px;
        margin: 0 auto;
    }

    .login-card {
        width: 100%;
        min-height: 0;
        padding: 44px 30px 38px;
        border-radius: 32px;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 24px 55px rgba(0, 63, 74, 0.18), 0 8px 20px rgba(16, 24, 32, 0.10);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }
}

/* =========================================================
   CELULARES
========================================================= */

@media (max-width: 520px) {

    .left-panel {
        min-height: clamp(330px, 44svh, 410px);
        /*
           18% conserva más de la zona izquierda de la foto.
           Puedes bajarlo a 12% si quieres mover aún más el
           encuadre hacia el automóvil.
        */
        background-position: 18% center;
    }

    .left-content {
        top: 22px;
        left: 20px;
        width: calc(100% - 40px);
    }

        .left-content h1 {
            --linea-principal: min(30vw, 95px);
            --linea-secundaria: min(10vw, 30px);
            padding-bottom: 14px;
            font-size: clamp(25px, 7.4vw, 34px);
            line-height: 1.12;
        }

    .top-logo {
        right: 17px;
        bottom: 52px;
        padding: 6px 8px;
    }

        .top-logo img {
            width: 88px;
        }

    .right-panel {
        margin-top: -36px;
        padding: 0 14px 28px;
        background: linear-gradient( 180deg, transparent 0, transparent 36px, #e8edef 36px, #f5f7f7 100% );
    }

    #formLogin {
        max-width: 390px;
    }

    .login-card {
        min-height: 0;
        padding: 40px 20px 30px;
        border-radius: 26px;
    }

    .login-brand {
        margin-bottom: 20px;
    }

    .login-brand-logo {
        width: 165px;
        max-height: 85px;
    }

    .login-subtitle {
        margin-bottom: 22px;
        font-size: 9px;
        line-height: 1.6;
        letter-spacing: 1.3px;
    }

    .login-card input[type="text"],
    .login-card input[type="password"],
    .login-card .btn-login,
    .login-card .captcha-container {
        width: 100%;
        max-width: 100%;
    }

    .login-card input[type="text"],
    .login-card input[type="password"] {
        height: 51px;
        margin-bottom: 14px;
        padding: 0 15px;
        font-size: 14px;
    }

    .captcha-container {
        min-height: 72px;
        margin-top: 0;
    }

    .g-recaptcha {
        transform: scale(0.88);
        transform-origin: center center;
    }

    .btn-login {
        height: 51px;
        margin-top: 16px;
        font-size: 13px;
    }
}

/* =========================================================
   CELULARES MUY PEQUEÑOS
========================================================= */

@media (max-width: 360px) {

    .left-panel {
        min-height: 310px;
        background-position: 15% center;
    }

    .left-content h1 {
        --linea-principal: 78px;
        --linea-secundaria: 24px;
    }

    .right-panel {
        padding-right: 9px;
        padding-left: 9px;
    }

    .login-card {
        padding-right: 14px;
        padding-left: 14px;
    }

    .g-recaptcha {
        transform: scale(0.80);
    }
}

/* =========================================================
   PANTALLAS CON POCA ALTURA
========================================================= */

@media (min-width: 901px) and (max-height: 720px) {

    .left-content {
        top: 55px;
    }

    .top-logo {
        bottom: 25px;
    }

    .login-card {
        min-height: 500px;
        padding-top: 32px;
        padding-bottom: 28px;
    }

    .login-brand {
        margin-bottom: 18px;
    }

    .login-brand-logo {
        width: 170px;
        max-height: 75px;
    }

    .login-subtitle {
        margin-bottom: 20px;
    }

    .login-card input[type="text"],
    .login-card input[type="password"],
    .btn-login {
        height: 49px;
    }

    .captcha-container {
        min-height: 72px;
    }
}
