/* Base and Global Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4; /* Optional: background color for better contrast */
}

header, footer {
    background-color: #333;
    color: white;
    text-align: center;
}

footer {
    padding: 1rem 0;
}

/* Gallery Layout */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Creates a responsive grid layout */
    gap: 10px; /* Space between items */
    padding: 20px; /* Padding around the gallery */
    margin: auto; /* Centers the gallery */
}

.gallery-item {
    overflow: hidden;
    position: relative;
    border-radius: 8px; /* Optional: adds rounded corners to gallery items */
    background: #fff; /* White background for consistency in image sizes */
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images cover the area without distorting aspect ratio */
    transition: transform 0.3s ease;
    backface-visibility: hidden;
}

.gallery-item:hover img {
    transform: scale(1.1); /* Slightly enlarges the image on hover */
}

/* Media Queries for Responsive Adjustments */
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr); /* Two columns for medium screens */
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr; /* One column for small screens */
    }
}
