.gallery-grid {
  columns: 4;
  column-gap: 25px;
}

.gallery-card {
  break-inside: avoid;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.gallery-card img,
.gallery-card video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.gallery-card:hover img,
.gallery-card:hover video {
  transform: scale(1.05);
}

/* video play icon */

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-overlay i {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  color: #000;
}

/* responsive */

@media (max-width: 1200px) {
  .gallery-grid {
    columns: 3;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    columns: 1;
  }
}

.gallery-modal {
  display: none;

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.85);

  z-index: 99999;

  align-items: center;

  justify-content: center;
}

.gallery-modal.active {
  display: flex;
}

.gallery-modal-content {
  position: relative;

  max-width: 90%;

  max-height: 90%;
}

#galleryViewer img,
#galleryViewer video {
  max-width: 90vw;

  max-height: 85vh;

  border-radius: 15px;
}

.gallery-close {
  position: absolute;

  top: -40px;

  right: 0;

  background: none;

  border: none;

  color: white;

  font-size: 40px;
}

.gallery-prev,
.gallery-next {
  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  background: white;

  border: none;

  width: 50px;

  height: 50px;

  border-radius: 50%;
}

.gallery-prev {
  left: -70px;
}

.gallery-next {
  right: -70px;
}
