.masonry {
    column-count: 1;
    column-gap: 1.5rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .masonry {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry {
        column-count: 3;
    }
}

@media (min-width: 1536px) {
    .masonry {
        column-count: 4;
    }
}