.elg-gallery {
	position: relative;
	display: block;
	max-width: 100%;
}

.elg-gallery__media {
	position: relative;
	display: block;
	overflow: hidden;
	line-height: 0;
	text-decoration: none;
}

.elg-gallery__media img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease;
}

.elg-gallery--zoom .elg-gallery__media:hover img,
.elg-gallery--zoom .elg-gallery__media:focus-visible img {
	transform: scale(1.06);
}

.elg-gallery__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	line-height: 1.4;
	text-align: center;
	transition: opacity 0.3s ease;
}

.elg-gallery--overlay-hover .elg-gallery__overlay {
	opacity: 0;
}

.elg-gallery--overlay-hover .elg-gallery__media:hover .elg-gallery__overlay,
.elg-gallery--overlay-hover .elg-gallery__media:focus-visible .elg-gallery__overlay {
	opacity: 1;
}

.elg-gallery__icon {
	display: inline-flex;
	font-size: 32px;
	line-height: 1;
}

.elg-gallery__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.elg-gallery__media:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Slides 2..n: present in the DOM for the lightbox to collect, never shown. */
.elg-gallery__slides {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.elg-gallery__media img,
	.elg-gallery__overlay {
		transition: none;
	}

	.elg-gallery--zoom .elg-gallery__media:hover img {
		transform: none;
	}
}
