/* =========================
   GALLERIA
========================= */


/* =========================
   GALLERIA GENERALE
========================= */

.gallery {
  display: flex;

  flex-direction: column;

  gap: 40px;
}

.caption {
  opacity: .7;

  max-width: 700px;
}


/* =========================
   GRID
========================= */

.gallery-grid {
  max-width: 1500px;

  margin: 80px auto;

  padding: 0 4%;

  display: grid;

  grid-template-columns:
    repeat(4,1fr);

  grid-auto-rows: 220px;

  gap: 22px;
}

.gallery-img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  cursor: pointer;

  opacity: 0;

  transform: scale(1.02);

  animation:
    galleryFadeIn .8s ease forwards;

  transition: transform .35s ease;
}

.gallery-img:hover {
  transform: scale(1.02);
}

.gallery-img.large {
  grid-column: span 2;

  grid-row: span 2;
}

.gallery-img.wide {
  grid-column: span 2;
}

.gallery-img.tall {
  grid-row: span 2;
}


@keyframes galleryFadeIn {

  to {
    opacity: 1;

    transform: scale(1);
  }

}


/* =========================
   HERO GALLERIA
========================= */

.gallery-hero {
  position: relative;

  height: 70vh;

  overflow: hidden;
}

.gallery-hero img {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.gallery-hero-overlay {
  position: absolute;

  inset: 0;

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

  z-index: 1;
}

.gallery-hero-content {
  transform: translateX(-40px);

  position: absolute;

  left: 3%;

  bottom: 10%;

  max-width: 650px;

  color: white;

  padding: 35px 55px 35px 45px;

  z-index: 2;
}

.gallery-hero-content::before {
  content: "";

  position: absolute;

  left: -80px;

  top: -25px;
  bottom: -25px;

  width: 160%;

  background:
    linear-gradient(
      to right,
      rgba(0,0,0,.80),
      rgba(0,0,0,.80) 58%,
      rgba(0,0,0,0) 80%
    );

  z-index: -1;

  border-radius: 6px;
}

.gallery-hero-content h1 {
  font-size:
    clamp(4rem,7vw,6rem);

  margin: 0 0 15px;
}

.gallery-hero-content p {
  font-size: 1.2rem;

  line-height: 1.9;
}


/* =========================
   RESPONSIVE GALLERIA
========================= */

@media (max-width: 900px) {

  .gallery-grid {
    grid-template-columns:
      repeat(2,1fr);

    grid-auto-rows: 180px;
  }

  .gallery-img.large,
  .gallery-img.wide,
  .gallery-img.tall {
    grid-column: span 1;

    grid-row: span 1;
  }

  .gallery-hero {
    height: 55vh;
  }

  .gallery-hero-content {
    left: 3%;
    right: 3%;

    max-width:
      calc(100% - 6%);

    padding: 18px 20px;

    transform: none;
  }

  .gallery-hero-content h1 {
    font-size:
      clamp(1.8rem,6.5vw,2.8rem);
  }
}


@media (max-width: 600px) {

  .gallery-grid {
    grid-template-columns: 1fr;
  }

}