/* Arch photo gallery section (sections/gallery.php). Figma: Facilities 83:375, Parties 83:463. */
.pe-gallery {
	--pe-gallery-gap: 2rem; /* 32px between photos at 1440 */

	/* 80px above, 88px below at 1440. */
	padding-block: clamp(3rem, 5.56vw, 5rem) clamp(3rem, 6.11vw, 5.5rem);
	text-align: center;
}

/* Parties: the gallery follows the text band, so Figma leaves only 40px above it.
   (Not after the aqua wave band on Our Facilities: that one keeps the full 80px.) */
.pe-text-band:not(.pe-text-band--waves) + .pe-gallery {
	padding-top: clamp(1.5rem, 2.78vw, 2.5rem);
}

.pe-gallery__heading {
	margin-bottom: clamp(1.5rem, 2.78vw, 2.5rem); /* 40px */
}

/* 27.2px / 39.5px at 1440 (a little smaller than .pe-lead). */
.pe-gallery__intro {
	margin: 0 0 clamp(1.5rem, 2.78vw, 2.5rem);
	font-size: var(--pe-text-intro);
	line-height: 1.45;
}

/* Three per row; a short last row is centred, like the heading. */
.pe-gallery__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--pe-gallery-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.pe-gallery__item {
	flex: 0 0 calc((100% - var(--pe-gallery-gap) * 2) / 3);
	min-width: 0;
}

/* Parties photos are 402 × 340 (Facilities 402 × 300, .pe-arch--gallery), with 90px
   under them instead of 88. */
.pe-gallery--tall {
	padding-bottom: clamp(3rem, 6.25vw, 5.625rem);
}

.pe-gallery--tall .pe-gallery__photo {
	aspect-ratio: 402 / 340;
}

@media (max-width: 1023px) {
	.pe-gallery {
		--pe-gallery-gap: 1.25rem;
	}
}

@media (max-width: 767px) {
	.pe-gallery__item {
		flex-basis: calc((100% - var(--pe-gallery-gap)) / 2);
	}
}

@media (max-width: 479px) {
	.pe-gallery__item {
		flex-basis: 100%;
	}
}
