.pfg-gallery {
	--pfg-gap: 15px;
	display: flex;
	flex-direction: column;
	gap: var(--pfg-gap);
}
/* Columns stretch to the height of the tallest one. Images in a shorter
   column grow evenly to fill the leftover space and are cropped slightly
   (object-fit: cover), so every column ends level and the gap above the
   next full-width image matches the gaps between images. */
.pfg-masonry {
	display: flex;
	align-items: stretch;
	gap: var(--pfg-gap);
}
.pfg-col {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--pfg-gap);
}
.pfg-col .pfg-item {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}
.pfg-gallery .pfg-col .pfg-img {
	height: 100%;
	object-fit: cover;
	object-position: center;
}
@media (max-width: 600px) {
	.pfg-gallery {
		--pfg-gap: var(--pfg-gap-mobile);
	}
}
.pfg-item {
	display: block;
	margin: 0;
	padding: 0;
	line-height: 0;
}
.pfg-gallery .pfg-img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}
.pfg-has-lightbox .pfg-item {
	cursor: zoom-in;
}
.pfg-has-lightbox .pfg-item:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Lightbox */
.pfg-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
	opacity: 0;
	transition: opacity 0.2s ease;
	touch-action: pan-y;
}
.pfg-lb.is-open {
	opacity: 1;
}
.pfg-lb[hidden] {
	display: none;
}
.pfg-lb-figure {
	margin: 0;
	max-width: 92vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.pfg-lb-img {
	display: block;
	max-width: 92vw;
	max-height: 86vh;
	width: auto;
	height: auto;
	object-fit: contain;
	user-select: none;
}
.pfg-lb-caption {
	color: #eee;
	font-size: 14px;
	line-height: 1.4;
	margin-top: 10px;
	text-align: center;
}
.pfg-lb-caption:empty {
	display: none;
}
.pfg-lb button {
	position: absolute;
	background: none;
	border: 0;
	color: #fff;
	cursor: pointer;
	padding: 12px;
	font: 300 40px/1 sans-serif;
	opacity: 0.8;
}
.pfg-lb button:hover,
.pfg-lb button:focus-visible {
	opacity: 1;
}
.pfg-lb-close {
	top: 8px;
	right: 12px;
}
.pfg-lb-prev,
.pfg-lb-next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 56px !important;
}
.pfg-lb-prev {
	left: 8px;
}
.pfg-lb-next {
	right: 8px;
}
.pfg-lb-count {
	position: absolute;
	top: 18px;
	left: 20px;
	color: #ccc;
	font: 13px/1 sans-serif;
}
@media (max-width: 600px) {
	.pfg-lb-prev,
	.pfg-lb-next {
		display: none;
	}
}
