body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    height: 250px; /* Fixed height for the images */
    width: 100%; /* Make sure it takes up the full width of its container */
}

.gallery-item img {
    width: 100%;
    height: 100%; /* Ensures images fill the container height */
    object-fit: cover; /* Keeps the aspect ratio intact while covering the container */
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(0.8);
}

/* Add responsiveness */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Adjust for smaller screens */
    }
}
