body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f8f8f8;
    color: #333;
}

.img-container {
    width: 90%;
    margin: 0 auto;
    background-color: #f4f4f4;
    margin-top: 50px;
}

.img-container h2 {
    text-align: center;
    text-transform: capitalize;
    padding: 20px 0;
    font-size: 30px;
}

.img-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Default 3 images per row */
    gap: 20px;
    justify-items: center;
}

.img-container .img {
    width: 100%;
    max-width: 400px;
    height: 300px;
    background-color: white;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.img img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.img .overlay {
    position: absolute;
    bottom: -100%; /* Start hidden below the image */
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    transition: bottom 0.4s ease-in-out; /* Smooth upward animation */
}

.img:hover img {
    transform: scale(1.05);
}

.img:hover .overlay {
    bottom: 0; /* Move overlay to cover the image */
}

/* Responsive Tablet View */
@media (max-width: 1024px) {
    .img-box {
        grid-template-columns: repeat(2, 1fr); /* 2 images per row */
    }
}

/* Responsive Mobile View */
@media (max-width: 768px) {
    .img-box {
        grid-template-columns: 1fr; /* 1 image per row */
    }

    .img-container {
        width: 95%;
    }
}
