/*
 * Photo gallery page (paragraph--gallery.html.twig).
 * Attached only when the gallery paragraph itself renders - see
 * attach_library('linoor_subtheme/gallery-page') in that template.
 */

.gallery-page__lede {
  font-family: Hind, sans-serif;
  font-size: 18px;
  color: #687b80;
  margin: 4px 0 32px;
}

body.dark-mode .gallery-page__lede {
  color: #b2c6c9;
}

.gallery-page__grid.equal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.gallery-page__item {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
}

.gallery-page__item--hidden {
  display: none;
}

.gallery-page__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

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

.gallery-page__item .equal-grid__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, transparent, rgba(10, 14, 17, .82));
  color: #fff;
  font-family: Teko, sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 17px;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-page__item img {
    transition: none;
  }
}

.gallery-page__load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 36px;
  margin-bottom: 60px;
}

/* No bottom space at all otherwise - once "Load more" is clicked through
 * to exhaustion the button removes itself, so the grid needs its own
 * padding rather than relying on the button's margin. */
.gallery-page__grid.equal-grid {
  margin-bottom: 60px;
}

@media (max-width: 767px) {
  .gallery-page__load-more-wrap {
    margin-bottom: 40px;
  }

  .gallery-page__grid.equal-grid {
    margin-bottom: 40px;
  }
}

.gallery-page__load-more {
  font-family: Teko, sans-serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 18px;
  color: #fff;
  background: #377dff;
  border: none;
  padding: 13px 32px;
  cursor: pointer;
  transition: background .15s ease;
}

.gallery-page__load-more:hover {
  background: #2860cc;
}

.gallery-page__load-more:focus-visible {
  outline: 2px solid #17353d;
  outline-offset: 2px;
}

body.dark-mode .gallery-page__load-more:focus-visible {
  outline-color: #eef8f9;
}
