/* ----- Mixins ----- */
.gallery {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: var(--gap);
}
.gallery__item {
  min-height: clamp(10em, 15vw, 300px);
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
}
.gallery__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(var(--color-secondary-rgb), 0.5), rgba(var(--color-secondary-rgb), 0.15));
  z-index: 2;
  opacity: 0;
  transition: all 0.25s ease-in-out;
}
.gallery__item:hover::before {
  opacity: 1;
}
.gallery__item:nth-child(8n + 1) {
  grid-column: span 3;
}
.gallery__item:nth-child(8n + 2) {
  grid-column: span 5;
}
.gallery__item:nth-child(8n + 3) {
  grid-column: span 4;
}
.gallery__item:nth-child(8n + 4) {
  grid-column: span 6;
}
.gallery__item:nth-child(8n + 5) {
  grid-column: span 4;
}
.gallery__item:nth-child(8n + 6) {
  grid-column: span 3;
}
.gallery__item:nth-child(8n + 7) {
  grid-column: span 6;
}
.gallery__item:nth-child(8n + 8) {
  grid-column: span 5;
}
.gallery__item--hidden {
  display: none;
}
.gallery__item img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.gallery__more {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-20);
  color: var(--color-white);
  z-index: 2;
  font-family: "Lexend Deca", sans-serif;
  font-weight: var(--semibold);
  font-style: normal;
  font-optical-sizing: auto;
  text-align: center;
  padding: 1em;
}
.gallery__more::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.15));
  z-index: 1;
}
.gallery__more span {
  z-index: 2;
  position: relative;
}
@media screen and (max-width: 860px) {
  .gallery__item:nth-child(8n + 1) {
    grid-column: span 6;
  }
  .gallery__item:nth-child(8n + 2) {
    grid-column: span 12;
  }
  .gallery__item:nth-child(8n + 3) {
    grid-column: span 9;
  }
  .gallery__item:nth-child(8n + 4) {
    grid-column: span 9;
  }
  .gallery__item:nth-child(8n + 5) {
    grid-column: span 12;
  }
  .gallery__item:nth-child(8n + 6) {
    grid-column: span 6;
  }
  .gallery__item:nth-child(8n + 7) {
    grid-column: span 10;
  }
  .gallery__item:nth-child(8n + 8) {
    grid-column: span 8;
  }
}
