@import url('../base.css');

#login {
    width: 100%;
    max-width: 782px;
    margin-top: 1rem;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: center;
    align-content: center;
    border: 0.1rem solid #F25135;
    border-radius: 1rem;
    box-shadow: 0 0 1rem 0.5rem rgba(0, 0, 0, 0.1);
}

#card-image-login {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    gap: 1rem;
    color: white;
}

#card-image-login > picture > img {
    object-fit: cover;
    border-radius: 1rem;
}

#content-login{
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    gap: 1rem;
}

#content-login h1 {
    font-size: 2.75rem;
}

#content-login h1 span {
    color: orangered;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#login-form label {
    font-size: 1rem;
    font-weight: bold;
}

#login-form input {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
}

#login-form button {
    background-color: orangered;
    color: white;
    font-size: 1rem;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: orangered 0.3s ease-in-out;
}

#login-form button:hover {
    background-color: #d84315;
}


.forgot-password {
    text-align: right;
    margin-bottom: 1rem;
}

.forgot-password a {
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password a:hover {
    color: orangered;
}

.register-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.register-link a {
    color: orangered;
    text-decoration: none;
    font-weight: bold;
}

.register-link a:hover {
    text-decoration: underline;
}


/* Volver al home */
#back-to-home {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    z-index: 9;
}


#back-to-home .back-link svg {
    width: 2rem;
    height: 2rem;
    fill: var(--botones);    
}

#back-to-home .back-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transition: background-color 0.3s ease-in-out;
    border: 0.1rem solid white;
}

#back-to-home .back-link:hover {
    background-color: rgba(0, 0, 0, 0.2);
    border: 0.1rem solid var(--botones);
}

/* Responsive para celulares */
@media (max-width: 768px) {
    #login {
        width: 90%;
        flex-direction: column;
        padding: 1rem;
    }

    #card-image-login {
       display: none;
    }

    #card-image-login > picture > img {
        width: 100%; 
        max-width: 350px; 
        height: auto;
    }

    #content-login {
        width: 100%;
        text-align: center;
        padding: 1.5rem;
    }

    #login-form {
        width: 100%;
        padding: 0 1rem; 
    }

    #login-form input {
        width: 100%;
    }

    #login-form button {
        width: 100%;
    }

    .forgot-password,
    .register-link {
        text-align: center;
    }

    #back-to-home {
        margin-top: 1rem;
    }

    .back-link {
        width: 100%;
        display: inline-block;
        text-align: center;
    }
}


/* Responsive para tablets */
@media (min-width: 769px) and (max-width: 1100px) {
    #login {
        width: 90%;
        flex-direction: column;
        padding: 2rem;
    }

    #card-image-login {
        display: none;
    }

    #card-image-login > picture > img {
        width: 100%;
        max-width: 450px; 
        height: auto;
        border-radius: 1rem;
    }

    #content-login {
        width: 100%;
        text-align: center;
        padding: 2rem;
    }

    #login-form {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    #login-form input {
        width: 100%;
    }

    #login-form button {
        width: 100%;
    }

    .forgot-password,
    .register-link {
        text-align: center;
    }

    #back-to-home {
        margin-top: 1rem;
    }

    .back-link {
        display: inline-block;
        text-align: center;
        width: 100%;
        max-width: 300px;
    }
}