/* Masonry Gallery Section Styles */
.custom-gallery-section {
  position: relative;
  padding-top: var(--padding-top, 80px);
  padding-right: var(--padding-right, 59px);
  padding-bottom: var(--padding-bottom, 200px);
  padding-left: var(--padding-left, 59px);
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
}

.custom-gallery-container {
  width: 100%;
  max-width:100%;
  margin: 0 auto;
  box-sizing: border-box;
  z-index: 5;
  position: relative;
}

/* Isotope-like Masonry Grid using CSS Columns */
.custom-gallery-masonry-grid {
  column-count: 4;
  column-gap: 30px;
  width: 100%;
  box-sizing: border-box;
}

/* Masonry Grid Card Items */
.custom-gallery-item {
  break-inside: avoid;
  margin-bottom: 30px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
 
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              outline 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  outline: 2px solid transparent;
}

.custom-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Hover Effect: Zoom In & Lift */
.hover-zoom:hover {
  transform: translateY(-4px);
/*   box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.25);
  outline: 2px solid #E7CAF2; /* Accent pink border */ 
}

.hover-zoom:hover img {
  transform: scale(1.03);
}

/* Vector Divider wave shape */
.custom-gallery-vector-divider {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 2;
  pointer-events: none;
}

.custom-gallery-vector-divider img {
  width: 100%;
  height: auto;
  display: block;
}

/* Animation triggers */
@keyframes fadeInUpMasonry {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
}

.animate-on-scroll.visible {
  animation: fadeInUpMasonry 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Responsive Breakpoints (Auto-rearranging columns smoothly like Isotope) */
@media (max-width: 1199px) {
  .custom-gallery-masonry-grid {
    column-count: 3;
    column-gap: 25px;
  }
  .custom-gallery-item {
    margin-bottom: 25px;
  }
}

@media (max-width: 991px) {
  .custom-gallery-section {
    padding-top: var(--padding-top-mob, 60px);
    padding-bottom: var(--padding-bottom-mob, 120px);
    padding-left: var(--padding-left-mob, 30px);
    padding-right: var(--padding-right-mob, 30px);
  }
  .custom-gallery-masonry-grid {
    column-count: 2;
    column-gap: 20px;
  }
  .custom-gallery-item {
    margin-bottom: 20px;
  }
}

@media (max-width: 767px) {
  .custom-gallery-section {
    padding-top: var(--padding-top-mob, 40px);
    padding-bottom: var(--padding-bottom-mob, 80px);
    padding-left: var(--padding-left-mob, 20px);
    padding-right: var(--padding-right-mob, 20px);
  }
  .custom-gallery-masonry-grid {
    column-count: 1;
    column-gap: 15px;
  }
  .custom-gallery-item {
    margin-bottom: 15px;
  }
}
