 
/* =========================================================
   GALLERY SECTION
========================================================= */

.section--dark {
  position: relative;
  background: #1c1210;
  color: #fff8ee;
}


/* =========================================================
   GALLERY HEADER
========================================================= */

.section--dark .section-head {
  margin-bottom: 40px;
}

.section--dark .section-head h2 {
  color: #fff8ee;
}


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

.gallery-grid {
  display: grid;

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

  grid-auto-rows: 250px;

  gap: 18px;

  width: 100%;
}


/* =========================================================
   GALLERY ITEM
========================================================= */

.gallery-grid figure {
  position: relative;

  width: 100%;
  height: 100%;

  margin: 0;

  overflow: hidden;

  background: #2b1b17;

  border-radius: 16px;

  cursor: pointer;

  isolation: isolate;
}


/* =========================================================
   IMAGE
========================================================= */

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

  display: block;

  object-fit: cover;

  transition:
    transform 0.6s ease,
    filter 0.6s ease;
}


/* =========================================================
   DARK OVERLAY
========================================================= */

.gallery-grid figure::before {
  content: "";

  position: absolute;

  inset: 0;

  z-index: 1;

  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.22) 45%,
      rgba(0, 0, 0, 0) 75%
    );

  opacity: 0.9;

  transition:
    opacity 0.4s ease;
}


/* =========================================================
   CAPTION
========================================================= */

.gallery-grid figure::after {
  content: attr(data-caption);

  position: absolute;

  left: 20px;
  right: 20px;
  bottom: 18px;

  z-index: 2;

  color: #fff8ee;

  font-size: 14px;
  font-weight: 700;

  line-height: 1.35;

  letter-spacing: 0.01em;

  transform: translateY(8px);

  opacity: 0;

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}


/* =========================================================
   HOVER
========================================================= */

.gallery-grid figure:hover img {
  transform: scale(1.08);

  filter: saturate(1.08);
}

.gallery-grid figure:hover::before {
  opacity: 1;
}

.gallery-grid figure:hover::after {
  opacity: 1;

  transform: translateY(0);
}


/* =========================================================
   FEATURED FIRST IMAGE
========================================================= */

.gallery-grid figure:first-child {
  grid-column: span 2;
  grid-row: span 2;
}


/* =========================================================
   SECOND IMAGE
========================================================= */

.gallery-grid figure:nth-child(2) {
  grid-column: span 1;
}


/* =========================================================
   THIRD IMAGE
========================================================= */

.gallery-grid figure:nth-child(3) {
  grid-column: span 1;
}


/* =========================================================
   FOURTH IMAGE
========================================================= */

.gallery-grid figure:nth-child(4) {
  grid-column: span 1;
}


/* =========================================================
   FIFTH IMAGE
========================================================= */

.gallery-grid figure:nth-child(5) {
  grid-column: span 1;
}


/* =========================================================
   SIXTH IMAGE
========================================================= */

.gallery-grid figure:nth-child(6) {
  grid-column: span 2;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

  .gallery-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));

    grid-auto-rows: 230px;

    gap: 16px;
  }

  .gallery-grid figure:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery-grid figure:nth-child(6) {
    grid-column: span 1;
  }

}


/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 750px) {

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

    grid-auto-rows: 220px;

    gap: 15px;
  }

  .gallery-grid figure:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  .gallery-grid figure:nth-child(6) {
    grid-column: span 2;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 550px) {

  .section--dark .section-head {
    margin-bottom: 30px;
  }

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

    grid-auto-rows: 250px;

    gap: 14px;
  }

  .gallery-grid figure:first-child,
  .gallery-grid figure:nth-child(2),
  .gallery-grid figure:nth-child(3),
  .gallery-grid figure:nth-child(4),
  .gallery-grid figure:nth-child(5),
  .gallery-grid figure:nth-child(6) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-grid figure::after {
    opacity: 1;

    transform: translateY(0);

    left: 18px;
    right: 18px;
    bottom: 16px;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

  .gallery-grid {
    grid-auto-rows: 220px;
  }

  .gallery-grid figure::after {
    font-size: 13px;
  }

}
