/* ======================================================
   JRB Elementor-Style Gallery — FINAL CLEAN VERSION
   ====================================================== */

.jrb-elementor-gallery {
  width: 100%;
}

/* ---------- HARD GRID LAYOUT ---------- */

.jrb-elementor-gallery .gallery {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 1024px) {
  .jrb-elementor-gallery .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .jrb-elementor-gallery .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ---------- REMOVE WORDPRESS DEFAULTS ---------- */

.jrb-elementor-gallery .gallery-item,
.jrb-elementor-gallery figure {
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  line-height: 0 !important;
}

/* ---------- FIXED TILE ---------- */

.jrb-elementor-gallery .gallery-icon {
  position: relative;
  width: 100%;
  height: 260px; /* adjust if needed */
  overflow: hidden;
  background: #000;
}

/* Link fills tile */
.jrb-elementor-gallery .gallery-icon a {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- IMAGE NORMALISATION ---------- */

.jrb-elementor-gallery img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.45s ease;
}

/* Hover zoom */
.jrb-elementor-gallery .gallery-item:hover img {
  transform: scale(1.08);
}

/* ---------- OPTIONAL OVERLAY ---------- */

.jrb-elementor-gallery .gallery-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.jrb-elementor-gallery .gallery-item:hover .gallery-icon::after {
  opacity: 1;
}

/* ---------- HIDE CAPTIONS ---------- */

.jrb-elementor-gallery figcaption {
  display: none !important;
}

/* ---------- CURSOR ---------- */

.jrb-elementor-gallery a {
  cursor: zoom-in;
}
