.angie-masonry-grid-98f877cd {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 200px;
    gap: 15px; /* Default gap, controlled by Elementor */
    grid-auto-flow: dense;
    width: 100%;
}

.angie-masonry-item-98f877cd {
    position: relative;
    overflow: hidden;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.angie-masonry-item-98f877cd img,
.angie-masonry-item-98f877cd video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Size Ratios */
.angie-masonry-item-98f877cd.size-1x1 {
    grid-column: span 1;
    grid-row: span 1;
}

.angie-masonry-item-98f877cd.size-2x1 {
    grid-column: span 2;
    grid-row: span 1;
}

.angie-masonry-item-98f877cd.size-1x2 {
    grid-column: span 1;
    grid-row: span 2;
}

.angie-masonry-item-98f877cd.size-2x2 {
    grid-column: span 2;
    grid-row: span 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .angie-masonry-grid-98f877cd {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-auto-rows: 150px;
    }
    
    .angie-masonry-item-98f877cd.size-2x1,
    .angie-masonry-item-98f877cd.size-2x2 {
        grid-column: span 1; /* Stack on mobile if too small */
    }
}