.image-gallery-section {
  padding: 80px 0;
}

/* Space between cards */
.gallery-column {
  margin-bottom: 30px;
}

/* Card */
.gallery-card {
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* Image wrapper */
.gallery-image-wrapper {
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

/* Gallery image */
.gallery-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-image {
  transform: scale(1.08);
}

/* =========================
   IMAGE POPUP
========================= */

.image-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.92);

  justify-content: center;
  align-items: center;

  padding: 40px;
}

.image-modal.active {
  display: flex;
}

#modalImage {
  max-width: 90%;
  max-height: 85vh;

  width: auto;
  height: auto;

  object-fit: contain;

  animation: zoomImage 0.3s ease;
}

.close-modal {
  position: absolute;

  top: 20px;
  right: 30px;

  color: #ffffff;

  font-size: 45px;
  line-height: 1;

  cursor: pointer;

  z-index: 1000000;
}

@keyframes zoomImage {
  from {
    transform: scale(0.7);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================
   TABLET
========================= */

@media (max-width: 991px) {
  .gallery-image {
    height: 250px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767px) {
  .image-gallery-section {
    padding: 50px 0;
  }

  .gallery-column {
    margin-bottom: 20px;
  }

  .gallery-card {
    padding: 10px;
  }

  .gallery-image {
    height: 230px;
  }

  .image-modal {
    padding: 15px;
  }

  #modalImage {
    max-width: 100%;
    max-height: 80vh;
  }

  .close-modal {
    top: 15px;
    right: 20px;
    font-size: 38px;
  }
}

.gallery-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.gallery-column {
  margin-bottom: 0; /* gap handles spacing now */
}

/* Tablet: 2 per row */
@media (max-width: 991px) {
  .gallery-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Mobile: 1 per row */
@media (max-width: 767px) {
  .gallery-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}
