

.custom-gallery-layout.grid {
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: var(--gap);
}

.custom-gallery-layout.masonry {
    gap: var(--gap);
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
}

.custom-gallery-layout.masonry .column {
    gap: var(--gap);
    display: flex;
    flex-direction: column;
}

.custom-gallery-layout.justified {
    --min-height: 190px;
}

.custom-gallery-layout.justified {
    display: flex;
    flex-wrap: wrap;
    grid-gap: var(--gap);
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-gallery-layout.justified > * {
    flex-grow: calc(var(--width) * (100000 / var(--height)));
    flex-basis: calc(var(--min-height) * (var(--width) / var(--height)));
    aspect-ratio: var(--width) / var(--height);
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-gallery-layout.justified > * > img {
    position: absolute;
    width: 100%;
    height: 100%;
}

.custom-gallery-layout.justified::after {
    content: " ";
    flex-grow: 1000000000;
    background: var(--last-row-background);
}

.custom-gallery-item {
    position: relative;
    overflow: hidden;
    display: flex;
}

.custom-gallery-item:not(.active) {
    display: none;
}

.custom-gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.custom-gallery-item .gallery-item {
    display: flex;
}

.gallery-item::before {
    content: "";
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    position: absolute;
    background-color: rgba(0, 0, 0, 0); /* Default overlay color */
    opacity: 0; /* Default opacity */
    transition: all 0.3s;
}
.gallery-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: var(--titles-container-justify-content, center);
    margin-bottom: 20px;
}
.gallery-filter-bar a[role="button"] {
    --space-between: 10px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    padding: 7px 14px;
    transition: all 0.3s;
    color: var(--galleries-title-color-normal);
}
.gallery-filter-bar a[role="button"]:hover,
.gallery-filter-bar a[role="button"]:focus,
.gallery-filter-bar a[role="button"].active {
    color: var(--galleries-title-color-hover);
}