.masonry-layout {
    column-gap: 0;
    row-gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(258px, 33.33%));
    display: grid;
}

@media only screen and (max-width: 1023px) {
    .masonry-layout {
        grid-template-columns: repeat(auto-fit, minmax(258px, 50%));
    }
}

@media only screen and (max-width: 767px) {
    .masonry-layout {
        grid-template-columns: repeat(auto-fit, minmax(258px, 100%));
    }
}

.caption-wrapper > div,
.mfp-title {
    height: 15px;
    color: #000000!important;
    font-size: 12px;
    align-items: center;
    line-height: normal;
    font-style: italic;
}

.mfp-bg {
    background: white!important;
    opacity: 1!important;
}

.masonry-item {
    padding: 20px;
}
.title-wrapper {
    display: flex;
}

.mfp-title {
    font-weight: bold;
    padding-right: 5px!important;
}

.caption-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding-right: 10px;
}

.mfp-counter {
    left: 0;
    right: unset!important;
    color: #000000!important;
}

.mfp-bottom-bar {
    padding-bottom: 15px;
    min-height: 55px;
}

.mfp-img {
    margin-top: -70px!important;
}

.mfp-figure:after {
    box-shadow: none !important;
    background: transparent !important;
}

.mfp-close {
    color: #000000!important;
    position: fixed;
    top: 5px!important;
    right: 20px!important;
}

.field--name-field-pages {
    display: grid;
    display: flex;
    align-items: end;
    gap: 50px;
    justify-content: center;
}
