/* Use the same content edges as the home and service pages. */
main:has(> .moments-page) {
  --mck-moments-gutter: max(6%, calc((100% - 1400px) / 2));
}

main:has(> .moments-page) > section {
  padding-inline: var(--mck-moments-gutter);
}

main:has(> .moments-page) > .page-intro {
  max-width: none;
  padding-block: clamp(28px, 4vh, 52px) clamp(23px, 3vh, 38px);
}

main:has(> .moments-page) > .page-intro .eyebrow {
  margin-bottom: 13px;
}

main:has(> .moments-page) > .page-intro h1 {
  font-size: clamp(32px, 4.65vw, 58px);
  margin-bottom: 15px;
  line-height: 1.12;
  text-wrap: balance;
}

main:has(> .moments-page) > .page-intro h1 br {
  display: none;
}

main:has(> .moments-page) > .page-intro > p:last-child {
  max-width: 70ch;
  margin-bottom: 0;
}

.moments-page .gallery-filters {
  margin: 0 0 8px;
  padding-top: 20px;
  gap: 8px;
}

.moments-page .gallery-result-count {
  margin-bottom: 16px;
}

.moments-page .mck-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(16px, 2.2vw, 32px);
  row-gap: clamp(24px, 3vw, 44px);
}

.moments-page .mck-gallery .mck-moment:is(:first-child, :last-child, article) {
  display: flex;
  flex-direction: column;
  grid-column: auto;
  min-width: 0;
}

.moments-page .mck-gallery .mck-moment[hidden] {
  display: none !important;
}

.moments-page .mck-gallery .mck-moment:is(:first-child, :last-child, article) .gallery-open {
  min-height: 0;
  aspect-ratio: 16 / 10;
  background: #080808;
}

.moments-page .mck-gallery .mck-moment:is(:first-child, :last-child, article) .gallery-open .moment-photo {
  display: block;
  width: 100%;
  height: 100% !important;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto !important;
  object-fit: contain;
  object-position: center;
  background: #080808;
  transform: none;
}

.moments-page .mck-gallery .mck-moment:is(:first-child, :last-child, article) .mck-moment-content {
  justify-content: flex-start;
  padding: 14px 0 0;
}

.moments-page .mck-moment .moment-source-label {
  display: none;
}

.moments-page .mck-moment h2.semantic-card-title {
  font-size: clamp(20px, 2vw, 26px);
  margin-bottom: 7px;
}

.moments-page .mck-moment .moment-description {
  margin-bottom: 8px;
}

@media (max-width: 700px) {
  .moments-page .mck-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* CMS publications group their photographs in a single gallery card. */
.moments-page .mck-gallery article.mck-moment[data-mck-cms] {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 48px);
  align-items: center;
}

.moments-page .mck-gallery article.mck-moment[data-mck-cms] .mck-moment-content {
  padding: 0;
}

.moments-page .mck-gallery article.mck-moment[data-mck-cms] .moment-cover {
  aspect-ratio: 4 / 3;
}

.moment-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.moments-page .mck-gallery article.mck-moment[data-mck-cms] .moment-thumbnails .gallery-open {
  aspect-ratio: 4 / 3;
}

@media (min-width: 701px) {
  .moment-thumbnails {
    order: 1;
  }
}

@media (max-width: 700px) {
  .moments-page .mck-gallery article.mck-moment[data-mck-cms] {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .moment-thumbnails {
    margin-top: 0;
    margin-bottom: 16px;
  }
}
/* Separate each published project and each individual archive entry. */
.moments-page .mck-gallery article.mck-moment[data-moment],
.moments-page .mck-gallery article.mck-moment[data-moment]:hover {
  padding-bottom: 18px;
  border-bottom: 1px solid rgb(194 165 112 / 28%);
}
