

.middle {
    width: 100vw;
    min-height: 90vh;
    background-color: var(--main_color_01);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.container {
    width: 90vw;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container .grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.container .grid .form-element {
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center horizontally and vertically */
    margin: 0 auto;
    overflow: hidden;
    background-color: #f0f0f0; /* Optional: Add a light background */
    border: 2px dashed #ccc; /* Visual boundary */
    border-radius: 8px;
}

.container .grid .form-element:hover {
    border-color: #e0b700;
    background-color: rgba(224, 183, 0, 0.1);
}

.container .grid .form-element input {
    display: none;
}

.form-element label {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.form-element img {
    max-width: 100%; /* Ensure image doesn't exceed container width */
    max-height: 100%; /* Ensure image doesn't exceed container height */
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Show full image without cropping */
    border-radius: 6px;
}

.form-element:hover img {
    transform: scale(1.02);
}

.form-element div {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: #162938;
    color: #e0b700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.submit {
    width: 100%;
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.submit input {
    background-color: #162938;
    border: none;
    font-size: 22px;
    border-radius: 5px;
    box-shadow: 2px 2px 5px #162938;
    transition: 0.3s;
    padding: 10px 30px;
    cursor: pointer;
    color: white;
}

.submit .submit-button {
    background-color: #e0b700;
    color: #131313;
}

.submit input:hover {
    background-color: #e0b700;
    color: #131313;
    transform: translateY(-2px);
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
}


   /* Add this to your existing style section */
   .submit input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* This will style the file input when it has an error */
.submit input[type="file"].error {
    border: 2px solid red !important;
}

/* This will style the label when the associated file input has an error */
.submit input[type="file"].error + label {
    border: 2px solid red;
}

.back{
    position: fixed;
    bottom: 50px;
}
.form-element.error {
    border: 2px solid #ff4444;
    padding: 5px;
    border-radius: 5px;
}
.file-error {
    color: #ff4444;
    font-size: 0.8em;
    margin-top: 5px;
}



 


/* Mobile Devices */
@media only screen and (max-width: 480px) {
    .container .grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .container .grid .form-element {
        width: calc(50% - 15px);
        height: 150px;
        margin-bottom: 10px;
    }

    .form-element div {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .submit .submit-button {
        font-size: 16px;
        padding: 8px 20px;
        margin-top: 0px;
    }
}

/* Tablets and Large Phones */
@media only screen and (min-width: 481px) and (max-width: 768px) {
    .container .grid {
        gap: 15px;
    }

    .container .grid .form-element {
        width: calc(33.333% - 20px);
        height: 200px;
    }

    .submit .submit-button {
        font-size: 18px;
        padding: 10px 25px;
    }
}

/* Small Laptops and Tablets */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .container .grid .form-element {
        width: calc(25% - 20px);
        height: 220px;
    }
}

/* Desktops and Large Laptops */
@media only screen and (min-width: 1025px) {
    .container .grid .form-element {
        width: 250px;
        height: 300px;
    }
}