/* Loaded only for pages 20660 and 20766. No changes to gallery content. */
.mfc-pilot-gallery .gallery {
  margin: 0;
  padding-block: clamp(28px, 4vw, 44px);
}

.mfc-pilot-gallery .gallery > .wrap {
  width: min(1140px, calc(100% - 40px));
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

/* A gallery pasted inside the existing content container must not shrink again. */
.mfc-pilot-gallery .mfc-container .gallery > .wrap {
  width: 100%;
}

.mfc-pilot-gallery .gallery .h2 {
  margin: 0 0 24px;
  color: var(--mfc-ink);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.18;
}

.mfc-pilot-gallery .gallery ul.fourColumns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mfc-pilot-gallery .gallery ul.fourColumns > li:nth-child(n) {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.mfc-pilot-gallery .gallery ul.fourColumns > li > a {
  display: block;
}

.mfc-pilot-gallery .gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.mfc-pilot-gallery .gallery .allgalleries {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 48px;
  margin: 24px 0 0;
  cursor: pointer;
}

@media (max-width: 900px) {
  .mfc-pilot-gallery .gallery ul.fourColumns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .mfc-pilot-gallery .gallery > .wrap {
    width: calc(100% - 28px);
  }

  .mfc-pilot-gallery .gallery ul.fourColumns {
    gap: 12px;
  }
}
