/* Gallery container using CSS Grid */
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Creates columns that adjust in number based on the container's width */
    grid-gap: 20px; /* Space between thumbnails */
    justify-content: center; /* Center the grid within the gallery */
    padding: 20px; /* Padding around the entire grid */
}

.thumbnail {
    width: 150px; /* Larger thumbnail size */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove any inline behaviors */
    margin: 0 auto; /* Center images within their grid cell if they don't take up the full width */
}

/* Keep the modal styles unchanged */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
