/* Scope: the two existing client galleries on the home page only.
 * display:contents removes masonry column boxes, keeping every original link,
 * image, lightbox attribute and the source DOM order. No JavaScript or copies.
 */
body.home :is(#el-08580040, #el-66531e13) .vce-image-masonry-gallery-with-scaleup-list {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px 20px;
    align-items: center;
    margin: 0;
}

body.home :is(#el-08580040, #el-66531e13) .vce-image-masonry-gallery-with-scaleup-column {
    display: contents;
}

body.home :is(#el-08580040, #el-66531e13) .vce-image-masonry-gallery-with-scaleup-item {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 84px;
    margin: 0;
    padding: 8px 0;
}

body.home :is(#el-08580040, #el-66531e13) .vce-image-masonry-gallery-with-scaleup-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

body.home :is(#el-08580040, #el-66531e13) .vce-image-masonry-gallery-with-scaleup-item:focus-visible {
    outline: 2px solid #555;
    outline-offset: 3px;
}

@media (max-width: 1023px) {
    body.home :is(#el-08580040, #el-66531e13) .vce-image-masonry-gallery-with-scaleup-list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.home :is(#el-08580040, #el-66531e13) .vce-image-masonry-gallery-with-scaleup-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 16px;
        box-sizing: border-box;
        padding-inline: 12px;
    }
}

@media (max-width: 479px) {
    body.home :is(#el-08580040, #el-66531e13) .vce-image-masonry-gallery-with-scaleup-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
