.gallery-section {
  padding: 10px 0 80px;

  background: #fff;
}

.gallery-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 20px;

  margin-top: 50px;
}

.gallery-item {
  overflow: hidden;

  border-radius: 18px;

  cursor: pointer;
}

.gallery-item img {
  width: 100%;

  height: 280px;

  object-fit: cover;

  transition: 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ======================
   MODAL
====================== */

.gallery-modal {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.95);

  display: flex;

  justify-content: center;
  align-items: center;

  opacity: 0;

  visibility: hidden;

  transition: 0.3s;

  z-index: 99999;
}

.gallery-modal.active {
  opacity: 1;

  visibility: visible;
}

.gallery-modal-image {
  max-width: 85vw;

  max-height: 80vh;

  border-radius: 12px;
}

.close-gallery,
.gallery-prev,
.gallery-next {
  position: absolute;

  border: none;

  background: rgba(255, 255, 255, 0.12);

  width: 50px;

  height: 50px;

  border-radius: 50%;

  cursor: pointer;

  color: white;

  font-size: 18px;
}

.close-gallery {
  top: 30px;
  right: 30px;
}

.gallery-prev {
  left: 30px;
}

.gallery-next {
  right: 30px;
}

.gallery-counter {
  position: absolute;

  bottom: 30px;

  color: white;

  font-size: 18px;

  font-weight: 600;
}

@media (max-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);

    gap: 12px;
  }

  .gallery-item img {
    height: 180px;
  }

  .gallery-prev,
  .gallery-next {
    width: 42px;
    height: 42px;
  }

  .gallery-modal-image {
    max-width: 95vw;
  }
}
