/* Reset default margins and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f4f4f9;
    padding: 40px 20px;
    font-family: sans-serif;
}

/* The Grid Container */
.gallery-container {
    display: grid;
    /* Automatically creates responsive columns */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; /* Spacing between grid items */
    max-width: 1200px;
    margin: 0 auto;
}

/* The Grid Items */
.gallery-item {
    position: relative;
    overflow: hidden; /* Keeps the zoomed image inside the box */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    aspect-ratio: 3 / 2; /* Forces a uniform aspect ratio for all items */
}

/* The Images */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents stretching, crops to fit perfectly */
    display: block;
    transition: transform 0.5s ease; /* Smooth hover transition */
}

/* Subtle Hover Effect */
.gallery-item:hover img {
    transform: scale(1.05); /* Zooms in slightly on hover */
    cursor: pointer;
}