/* masonry */
#section-4 .news-ql ul {
  display: grid;
  /*grid-template-columns: repeat(auto-fill, minmax(calc(40% - 1rem), 1fr));*/
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1px;
  /*grid-column-gap: calc(20% + 2rem);*/
    grid-column-gap: 8%;
  width: 100%;
  grid-row-gap: unset;
  height: max-content;
}

.wp-block-query ul {
    opacity: 0;
    transition: opacity 1s ease;
}

.wp-block-query ul.masonry-ready {
    opacity: 1;
}

#section-4 .news-ql li {
  box-sizing: border-box;
  grid-row: span var(--height);
  position: relative;
  height: fit-content;
  overflow: hidden;
}

/* --- Media Query --- */
@media (max-width: 1279px) and (min-width: 600px) {
#section-4 .news-ql ul {
  grid-template-columns: repeat(2, 1fr);
  /*grid-column-gap: 8%;*/
}
}

@media screen and (max-width: 599px) {
    #section-4 .news-ql ul {
        grid-template-columns: 1fr;
        grid-column-gap: 0;
        grid-auto-rows: unset;
    }
    
    .wp-block-query ul {
        opacity: 1;
    }
}