/*
 * Widget: Portfolio Gallery
 * Slug: portfolio-gallery
 */

.ws-gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--ws-gallery-columns, 4), 1fr);
  gap: 2px;
  background: #ebebeb;
}

.ws-gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  display: block;
  cursor: default;
}

.ws-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  filter: grayscale(10%);
  display: block;
}

.ws-gallery-item:hover img {
  transform: scale(1.06);
}

/* Version large */
.ws-gallery-item--large {
  grid-column: span 2;
  aspect-ratio: 2/1;
}

/* Version lien lightbox */
a.ws-gallery-item {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

/* Responsive */
@media (max-width: 1024px) {
  .ws-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ws-gallery-item--large {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .ws-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ws-gallery-item--large {
    grid-column: span 2;
  }
}
