body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #EBFAE8;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.Tarjeta {
    display:flex;
    flex-direction: row;
    width: 100%;
    max-width: 920px;
    min-height: 550px;
    height: auto;
    background-color: #F8FAFC;
    border-radius: 30px;
    box-shadow: 10px 10px 25px rgba(14, 61, 49, 0.15);
    overflow: hidden;
}   

.Fondo {
    width: 50%;
    display: flex;
    flex-direction: column-reverse;
    position: relative;
    overflow: hidden;    
    }

.Fondo::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../Resources/Fondo\ 2.jpg');
    background-repeat: no-repeat;
    background-size:cover;
    background-position: center;
    z-index: 1;

    animation: movimientoSuave 20s ease-in-out infinite alternate;
}

.Fondo::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(235,250,232, 0.1) 0%, rgba(0, 106, 78, 0.15) 100%);
    z-index: 1;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.Frase {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    font-weight: 800;
    color: #256c51;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    text-transform: capitalize;
    padding: 10px 7px;
    position: relative;
    z-index: 2;
    opacity: 0;

    animation: entradaFrase 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.4s;
}

.Login {
    width: 50%;
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 40px;
    box-sizing: border-box;
}


.Logo{
    font-family: "Montserrat" , Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #006a4e;
    letter-spacing: 4px;
    font-size: clamp(1.35rem , 2.5vw, 1.65rem);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
    justify-content: center;
}   

.Logo img{
    width: clamp(55px, 6vw, 65px);
    height: auto;
}

#Formulario {
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 340px;
}

#Bienvenida{
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #333;
    margin-bottom: 5px;
    text-align: center;
}

.Campo{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    border: none;
    padding: 0;
    margin: 0;
}

.Campo label {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgb(96, 96, 96);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.Campo:has(input:focus) label{
    color: #006a4e;
    transform: translateY(-3px);
}

.Campo input {
    width: 100%;
    padding: 14px 16px;
    box-sizing: border-box;
    border: none;
    border-bottom: rgb(180, 180, 180) 2px solid;
    border-radius: 8px 8px 0 0;
    background-color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.Campo input:focus{
    outline: none;
    border-bottom-color: #006a4e;
    background-color: #eef2f6;
}

.Campo input:user-invalid{
    border-bottom-color: #d32f2f;
    background-color: #fff5f5;
}

.Campo:has(input:user-invalid) label {
    color: #d32f2f;
}

#Formulario a {
    color: #006a4e;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    text-decoration: none;
    margin-top: 10px;
    position: relative;
    padding-bottom: 2px;
}

#Formulario a::after{
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #006a4e;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

#Formulario a:hover::after{
    transform: scaleX(1);
    transform-origin: bottom left;
}

#Ingresar {
    color: white;
    background-color: #006a4e;
    margin-top: 15px;
    padding: 12px 0;
    width: 100%;
    max-width: 220px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    box-shadow: 0 4px 10px rgba(0, 106, 48, 0.15);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#Ingresar:hover{
    background-color: #004d38;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 106, 48, 0.25);
}

#Ingresar:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 106, 48, 0.15);
}

#Ingresar:focus-visible,
#Formulario a:focus-visible {
    outline: 3px solid #256c51;
    outline-offset: 4px;
}


@keyframes movimientoSuave {
    0% {
        transform: scale(1);
        background-position: center;
    }
    100% {
        transform: scale(1.12);
        background-position: 52% 48%;
    }

}

@keyframes movimientoSuaveMovil {
    0%{
        transform: scale(1);
        background-position: 50% 70%;
    }
    100%{
        transform: scale(1.1);
        background-position: 53% 68%;
    }
    
}

@keyframes entradaFrase {
    from{
        opacity: 0;
        transform: translateY(30px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {

    .Tarjeta {
        max-width: 1024px;
        min-height: 500px;
    }

    .Login {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    body{
        padding: 0;
    }

    .Tarjeta{
        display: flex;
        flex-direction: column;
        background-color: #F8FAFC;
        box-shadow: none;
        border-radius: 0;
        overflow: hidden;
        width: 100vw;
        min-height: 100vh;
    }

    .Fondo{
        width: 100%;
        height: 38vh;
        min-height: 220px;
    }

    .Fondo::before{
        animation: movimientoSuaveMovil 20s ease-in-out infinite alternate;
    }

    

    .Frase{
        display: none;
    }

    .Login{
        width: 100%;
        flex-grow: 1;
        margin: -40px auto 0 auto;
        background-color: #F8FAFC;
        border-radius: 40px 40px 0 0;
        box-shadow: 0 -10px 25px rgba(14, 61, 49, 0.15);
        padding: 35px 25px;
        position: relative;
        z-index: 10;
    }

    #Formulario {
        width: 100%;
        padding: 0;
        max-width: 100%;
    }

    .Logo {
        font-size: 1.375rem;
        margin-bottom: 15px;
    }

    .Logo img {
        width: 55px;
    }

    #Ingresar{
        max-width: 100%;
    }
}

