/* Lazy YouTube gallery */
.gs-yt-gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin: 0 auto;
	max-width: 100%;
}

.gs-yt-gallery.gs-yt-cols-1 .gs-yt-item {
	flex-basis: 100%;
	max-width: 100%;
}

.gs-yt-gallery.gs-yt-cols-2 .gs-yt-item {
	flex-basis: calc((100% - 20px) / 2);
	max-width: calc((100% - 20px) / 2);
}

.gs-yt-gallery.gs-yt-cols-3 .gs-yt-item {
	flex-basis: calc((100% - 40px) / 3);
	max-width: calc((100% - 40px) / 3);
}

.gs-yt-gallery.gs-yt-cols-4 .gs-yt-item {
	flex-basis: calc((100% - 60px) / 4);
	max-width: calc((100% - 60px) / 4);
}

.gs-yt-item {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
}

.gs-yt-trigger {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.gs-yt-trigger picture,
.gs-yt-trigger img {
	display: block;
	width: 100%;
	height: 100%;
}

.gs-yt-trigger img {
	object-fit: cover;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

.gs-yt-trigger:hover img {
	transform: scale(1.04);
	opacity: 0.85;
}

.gs-yt-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	border: 2px solid rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	transform: translate(-50%, -50%);
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.gs-yt-play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent #fff;
	transform: translate(-40%, -50%);
}

.gs-yt-trigger:hover .gs-yt-play,
.gs-yt-trigger:focus-visible .gs-yt-play {
	background: #ba822f;
	border-color: #ba822f;
	transform: translate(-50%, -50%) scale(1.08);
}

.gs-yt-iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

@media screen and (max-width: 64em) {
	.gs-yt-gallery.gs-yt-cols-3 .gs-yt-item,
	.gs-yt-gallery.gs-yt-cols-4 .gs-yt-item {
		flex-basis: calc((100% - 20px) / 2);
		max-width: calc((100% - 20px) / 2);
	}
}

@media screen and (max-width: 40em) {
	.gs-yt-gallery.gs-yt-cols-2 .gs-yt-item,
	.gs-yt-gallery.gs-yt-cols-3 .gs-yt-item,
	.gs-yt-gallery.gs-yt-cols-4 .gs-yt-item {
		flex-basis: 100%;
		max-width: 100%;
	}
}
