body, html {
    margin: 0;
    padding: 0;
    background-color: #fcf9e8;
    font-family: 'Georgia', serif;
    height: 100%;
    display: flex;
    align-items: center; /*Center content vertically */
    justify-content: center;
}

.container {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    justify-content: center;
    align-items: center;
}

.image-section {
    flex: 1 1 50%; /* Take up half of the container's width on larger screens */
    position: relative;
}

.image-section img {
    max-width: 100%;
    max-height: 70vh; 
    height: auto; 
}

.image-description {
    position: absolute;
    top: -4.5%;
    left: 0; 
    transform: translate(-1%, 10%) rotate(90deg);
    transform-origin: left top;
    font-size: 2.7vh; 
    white-space: nowrap;
}

.login-section {
    flex: 1 1 50%; 
    text-align: center; 
    justify-content: center;
    
}

.login-text {
    text-align: left; 
    margin-bottom: 20px;
    padding-left: 50px;
    font-size: 2.5vh;
}

.form-control {
    display: block;
    width: 80%; 
    margin: 10px auto; 
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc; 
    box-sizing: border-box; 
    background-color: white; 
}

.btn-dark {
    background-color: black;
    color: white; 
    border: none; 
    cursor: pointer; 
    text-align: center; 
    padding: 10px 20px;
    margin-bottom: -7%;
    border-radius: 20px; 
}

.btn-dark:hover {
    background-color: #333;
}

.login-form {
    position: relative; 
}

#button_submit {
    position: absolute; 
    right: 11%; 
    bottom: -20px; 
    width: 30%; 
}

.discover-text {
    width: 100%;
    text-align: right;
    padding: 20px 0;
    font-size: 2.5vh;
}
.alert {
    padding: 10px;
    background-color: #f44336; 
    color: white;
    margin-bottom: 15px; 
    border-radius: 5px; 
    border: 1px solid darkred; 
}

.alert-danger {
    background-color: #f44336; 
}

/* To ensure the error message does not disrupt the form's layout */
#login_form {
    position: relative;
}

.alert {
    width: 80%; 
    margin: 10px auto; 
    text-align: center; 
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        margin-top: 40px;
    }
    .image-section, .search-section {
        flex: 1 1 100%; /* Stack the sections vertically on smaller screens */
    }
    
    .discover-text {
        text-align: right;
        margin-bottom: 0%;
    }
    .image-description {
        font-size: 2vh;
        top: 30vh;
    }
    .form-control {
        width: 90%; 
    }
    #button_submit {
        margin-bottom: -10%;
        right: 35%; 
        width: 35%; 
        text-align: center;
    }
    .login-text {
        padding-left: 0%;
    }    
}

@media (max-width: 530px) {
    .image-description {
        font-size: 2vh;
        top: 17vh;
    }
}

@media (max-width: 440px) {
    .image-description {
        font-size: 1.8vh;
        top: 10vh;
    }
}

@media (max-width: 373px) {
    .image-description {
        font-size: 1.8vh;
        top: 5vh;
    }
    .login-text {
        font-size: 2vh;
    } 
}

@media (max-width: 330px) {
    .image-description {
        font-size: 1.8vh;
        top: -2vh;
    }
    .discover-text {
        font-size: 2vh;
    }
    .login-text {
        font-size: 1.8vh;
    } 
    .form-control {
        margin: 2px;
    }
    #button_submit {
        position: absolute; 
        right: 40%; 
        bottom: -20px; 
        width: 40%; 
    }    
}
@media (max-width: 280px) {
    .image-description {
        font-size: 1.4vh;
        top: -2vh;
    }
    .discover-text {
        font-size: 1.8vh;
    }
    .login-text {
        font-size: 1.3vh;
    } 
}