/* assets/css/gallery.css - NUR GALERIE STYLES */

/* ===== WORK GALLERY STYLES ===== */
.work-gallery {
  --gallery-gutter: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: var(--gallery-gutter);
  padding: 0;
  margin: 0;
  list-style: none;
  width: 100%;
  align-items: start;
}

.work-gallery li {
  display: block;
  margin-bottom: var(--gallery-gutter);
  break-inside: avoid;
  position: relative;
  page-break-inside: avoid;
}

.work-gallery .img {
  aspect-ratio: var(--w) / var(--h);
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.work-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== KACHEL-MODUS ===== */
.work-gallery--tiles {
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gallery-gutter);
}

.work-gallery--tiles li {
  margin-bottom: 0;
}

.work-gallery--tiles .img {
  aspect-ratio: 1 / 1;
  background: #f0f0f0;
  overflow: hidden;
}

.work-gallery--tiles img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.5);
  transform-origin: center;
  transition: transform 0.5s ease;
}

.work-gallery--tiles a:hover {
  opacity: 1;
}

.work-gallery--tiles a:hover img {
  transform: scale(.9);
}

@media screen and (max-width: 768px) {
  .work-gallery--tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .work-gallery--tiles {
    grid-template-columns: 1fr;
  }
}

/* Video-Thumbnail Styling */
.video-thumbnail {
  position: relative;
  cursor: pointer;
  background: #000;
}

.video-thumbnail video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0.9);
}

.video-thumbnail .video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
  color: #fff;
}

.video-thumbnail .video-overlay.opacity-1 {
  opacity: 1;
}

.video-thumbnail .video-overlay svg {
  opacity: 0.5;
  transition: opacity 0.3s ease-in-out;
}

.video-thumbnail:hover .video-overlay svg {
  opacity: 1;
}

/* Captions */
.workgrid-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: x-small;
  font-weight: 300;
  color: white;
  line-height: 1.25;
  padding: 0.5em 1em;
  display: block;
  text-align: center;
  background-color: hsla(0, 0%, 0%, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 1s ease;
}

.work-gallery a:hover .workgrid-caption, .work-gallery a:focus + .workgrid-caption {
  opacity: 1;
  
}

.work-gallery a {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.work-gallery.masonry a:hover{
  opacity: 0.8;
}

.no-gallery-message {
  color: var(--color-code-light-grey);
  font-size: x-small;
  text-align: center;
}


/* ===== FANCYBOX STYLES ===== */

.f-caption {
  font-size: small;
  font-weight: 300;
  line-height: 1.25;
  max-width: 80ch;
  color: hsla(0, 0%, 100%, 0.75)
}

.fancybox__carousel {
  padding-top: 1em;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .work-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .work-gallery {
    grid-template-columns: 1fr;
  }
}

