.sfg-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 16px;
}

.sfg-gallery-item {
	margin: 0;
}

.sfg-gallery-open {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.sfg-gallery-open img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: opacity .2s ease;
}

.sfg-gallery-open:hover img,
.sfg-gallery-open:focus img {
	opacity: .82;
}

.sfg-gallery-item figcaption {
	padding: 7px 0;
	font-size: .9em;
}

.sfg-gallery-item figcaption span {
	display: block;
}

.sfg-lightbox[hidden] {
	display: none;
}

.sfg-lightbox {
	position: fixed;
	z-index: 99999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 50px 70px;
	background: rgba(0, 0, 0, .9);
}

.sfg-lightbox img {
	max-width: 100%;
	max-height: calc(100vh - 120px);
	object-fit: contain;
}

.sfg-lightbox button {
	position: absolute;
	border: 0;
	color: #fff;
	background: transparent;
	cursor: pointer;
	font-size: 42px;
	line-height: 1;
}

.sfg-lightbox-close {
	top: 18px;
	right: 24px;
}

.sfg-lightbox-prev {
	left: 20px;
}

.sfg-lightbox-next {
	right: 20px;
}

.sfg-lightbox-caption {
	position: absolute;
	right: 20px;
	bottom: 16px;
	left: 20px;
	color: #fff;
	text-align: center;
}

body.sfg-lightbox-open {
	overflow: hidden;
}

.sfg-cover-image {
	display: block;
	max-width: 100%;
	height: auto;
}

.sfg-post-thumbnail {
	max-width: 100%;
	height: auto;
}
