/* Container for the gallery */
.gallery {
    display: flex;
    flex-wrap: wrap;
    /* Allows the images to wrap onto the next line */
    justify-content: space-around;
    /* Space between the images */
    gap: 20px;
    /* Vertical and horizontal spacing between images */
    padding: 20px;
}

/* Styling for individual image containers */
.gallery figure {
    margin: 0;
    padding: 0;
    text-align: center;
    width: 200px;
    /* Width of each image container */
    border: 3px solid #ccc;
    /* Border around the image */
    border-radius: 8px;
    /* Rounded corners for the images */
    overflow: hidden;
    /* Ensures that any overflowing content is clipped */
    box-sizing: border-box;
    /* Includes padding and borders in the element's width/height */
}

/* Image styling */
.gallery img {
    width: 100%;
    /* Makes the image fill the container */
    /* % is a fluid container for flexbox wrap to work, px would be a fixed container */
    height: auto;
    /* Maintains the aspect ratio */
    border-radius: 8px;
    /* Rounded corners for the images */
    display: block;
    /* Ensures images don’t have bottom margin */
}

/* Caption styling */
figcaption {
    background-color: #f7f7f7;
    padding: 10px;
    font-size: 1em;
    color: #333;
    font-family: 'Arial', sans-serif;
    text-align: center;
}