.mgw-gallery {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* ======================
   GRID
====================== */
.mgw-grid {
  display: grid;
  width: 100%;
}

.mgw-grid .mgw-item {
  width: 100%;
  min-width: 0;
}

/* ======================
   MASONRY (CSS COLUMNS)
====================== */
.mgw-masonry {
  column-fill: balance;
  width: 100%;
}

.mgw-masonry .mgw-item {
  break-inside: avoid;
  page-break-inside: avoid;
  width: 100%;
  margin-bottom: 0;
}

.mgw-masonry[style*="column-gap: 0px"] .mgw-item,
.mgw-masonry[style*="column-gap: 0"] .mgw-item {
  margin-bottom: 0 !important;
}

/* ======================
   ITEM BASE
====================== */
.mgw-item {
  display: block;
  width: 100%;
}

.mgw-item a {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* ======================
   IMAGE WRAPPER
====================== */
.elementor-image-wrapper {
  position: relative;
  overflow: hidden;
}

.elementor-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* ======================
   OVERLAY
====================== */
.mgw-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.mgw-item:hover .mgw-overlay {
  opacity: 1;
}

/* ======================
   TITLE BELOW
====================== */
.mgw-title {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* ======================
   HIDDEN LINKS
====================== */
.mgw-hidden {
  display: none !important;
}
