.custom-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Default center alignment */
}

.custom-gallery.left {
    justify-content: flex-start;
}

.custom-gallery.right {
    justify-content: flex-end;
}

.custom-gallery.grid img {
    width: 100%; /* Adjust as needed */
}

.custom-gallery.masonry a {
    width: calc(33.333% - 10px); /* Example for 3 columns */
    margin: 5px;
}

.custom-gallery.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Adjust based on your needs */
    gap: 10px; /* Space between images */
}

.custom-gallery.grid img {
    width: 100%;
    height: auto;
    display: block;
}

.custom-gallery.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px; /* Space between images */
}

.custom-gallery.grid a {
    display: block; /* Allow the anchor to behave as a block */
    overflow: hidden; /* Hide overflow for images */
}

.custom-gallery.grid img {
    width: 100%; /* Ensure images are responsive */
    height: 200px; /* Set a fixed height */
    object-fit: cover; /* Maintain aspect ratio and cover the area */
    display: block;
}