body {
    min-height: 100vh;
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
}

.shape h1 {
    color: #fefae0;
    font-family: Amita;
    margin: 20px auto;
    width: 450px;
    font-size: 3rem;
    text-align: center;
    border-bottom: 10px double #bc6c25;
}

/* For images and container */
.shape img {
    width: 450px;
    height: 300px;
    margin: 20px;
    border: 10px solid #f0f0ed;
    border-radius: 8px;
    transition-duration: 1s;
}

.shape img:hover {
    border: 5px solid #fff;
    -webkit-transform: scale(1.1);
    -ms-transform: scale(1.1);
    transform: scale(1.1);
    -webkit-filter: none;
    filter: none;
}

.shape {
    display: flex;
    flex-wrap: wrap;
    margin: 10px;
    justify-content: center;
    align-items: center;
}

.shape figcaption {
    position: relative;
    color: #bc6c25;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Media Query for Tablets */
@media (max-width: 768px) {
    .shape h1 {
        width: 100%; /* Make h1 full width on smaller screens */
        font-size: 2.5rem;
        margin: 10px 0;
    }

    .shape img {
        width: 300px; /* Reduce image size for tablets */
        height: 200px;
    }

    .shape {
        justify-content: space-around;
    }
}

/* Media Query for Mobile Devices */
@media (max-width: 480px) {
    .shape h1 {
        width: 100%;
        font-size: 2rem;
        margin: 10px 0;
    }

    .shape img {
        width: 250px; /* Further reduce image size for mobiles */
        height: 170px;
        margin: 10px;
    }

    .shape {
        justify-content: center;
        flex-direction: column; /* Stack images and text vertically */
    }

    .shape figcaption {
        font-size: 1rem;
    }
}

/* Media Query for Laptops */
@media (max-width: 1024px) {
    .shape h1 {
        width: 80%; /* Adjust width to be more flexible on laptops */
        font-size: 2.8rem;
        margin: 15px auto;
    }

    .shape img {
        width: 400px; /* Slightly smaller images for laptops */
        height: 250px;
    }
}
