/* GALLERY MODULE (gallery-section.css) 
   Supports both image and video gallery items.
   Videos autoplay muted and loop; hover behavior matches images.
*/

.gallery-wrapper {
  width: 100%;
  padding: 4rem 2rem;
  z-index: var(--z-content);
  position: relative;
}

.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
  column-count: 1;
  column-gap: 1.5rem;
}

/* Responsive Breakpoints */
@media (min-width: 600px) {
  .gallery-container {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .gallery-container {
    column-count: 3;
  }
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 1.5rem;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  break-inside: avoid;
  cursor: pointer;
}

/* Shared media styles — images and videos behave identically */
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

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

/* Hover Overlay */
.gallery-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;

  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover .gallery-info {
  opacity: 1;
}

.gallery-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.gallery-meta {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.5;
  transform: translateY(10px);
  transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-title,
.gallery-item:hover .gallery-meta {
  transform: translateY(0);
}