/* 1) Kill the Masonry inline hacks and let the container grow */
.blog-masonry-container {
  position: relative !important;
  height: auto !important;
  overflow: visible !important;
}

/* 2) 3-column flex wrap on tablet+ & desktop */
.blog-masonry-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
}

/* 3) Reset each tile, then size it */
.blog-masonry-item {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;

  box-sizing: border-box !important;
  flex: 1 1 calc(33.333% - 20px) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;

  padding: 15px !important;
  background-color: #ffffff !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 5px !important;
  height: auto !important;
  margin: 0 !important;
}

/* 4) Collapse to one column on mobile */
@media (max-width: 767px) {
  .blog-masonry-item {
    flex: 1 1 calc(100% - 20px) !important;
  }
}