/* Styles for content-masonry-gallery-opoverride.php (Masonry Gallery). */

.masonry-link{
  display: block;
  overflow: hidden;
}
.masonry-image{
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}
.masonry-link:hover .masonry-image{
  transform: scale(1.05);
}


/* =====  Squares layout: every photo cropped square  ======== */

.gallery-squares {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-squares-3 {
  grid-template-columns: repeat(3, 1fr);
}
.gallery-squares-5 {
  grid-template-columns: repeat(5, 1fr);
}
.gallery-squares figure {
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  background-color: #112233;
}
.gallery-squares img,
.gallery-web img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery-squares figure:hover img {
  transform: scale(1.04);
}


/* =====  Web layout: first image wide, the rest tall and faded at the bottom  ======== */

.gallery-web {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr;
  gap: 16px;
  align-items: start;
}
.gallery-web figure {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
}
.gallery-web-main {
  background-color: #0d0d0c;
}
.gallery-web-main img {
  height: auto;
}
.gallery-web .gallery-tile {
  position: relative;
  height: 520px;
  background-color: #000000;
}
.gallery-web .gallery-tile img {
  height: auto;
  object-fit: initial;
}
/* Fade into the section background (Paper) */
.gallery-web .gallery-tile:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(rgba(233, 227, 215, 0), #e9e3d7);
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
  .gallery-squares,
  .gallery-squares-3,
  .gallery-squares-5 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gallery-web {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-web-main {
    grid-column: 1 / -1;
  }
  .gallery-web .gallery-tile {
    height: 340px;
  }
}


/* =====  Columns layout: photos keep their shape, CSS columns (no script)  ======== */

.gallery-columns {
  columns: 3;
  column-gap: 16px;
}
.gallery-columns-2 {
  columns: 2;
}
.gallery-columns-4 {
  columns: 4;
}
.gallery-columns figure {
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 2px;
  break-inside: avoid;
  background-color: #dddddd;
}
.gallery-columns img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery-columns figure:hover img {
  transform: scale(1.03);
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
  .gallery-columns,
  .gallery-columns-4 {
    columns: 2;
    column-gap: 10px;
  }
  .gallery-columns figure {
    margin-bottom: 10px;
  }
}
