.epg-preview-gallery {
	position: relative;
	display: flex;
	flex-direction: column;
}

.epg-preview-gallery__preview {
	display: block;
	line-height: 0;
	position: relative;
	overflow: hidden;
	max-width: 100%;
}

.epg-preview-gallery__preview::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-color: transparent;
	transition: background 0.3s ease, opacity 0.3s ease;
}

.epg-preview-gallery__preview-image {
	display: block;
	width: 100%;
	height: auto;
	transition: opacity 0.3s ease, filter 0.3s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
	transform: scale(1);
	will-change: transform;
	backface-visibility: hidden;
}

.epg-preview-gallery__preview:hover .epg-preview-gallery__preview-image {
	transform: scale(1.05);
}

/*
 * Fit (Fill Container): stay in normal flow and stretch inside Elementor flexbox.
 * Absolute fill collapsed width to 0 in atomic e-flexbox parents.
 */
.elementor-widget-epg-preview-gallery.epg-ratio-fit {
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	align-self: stretch;
	flex: 1 1 auto;
}

.elementor-widget-epg-preview-gallery.epg-ratio-fit > .elementor-widget-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.elementor-widget-epg-preview-gallery.epg-ratio-fit .epg-preview-gallery {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.elementor-widget-epg-preview-gallery.epg-ratio-fit .epg-preview-gallery__preview {
	position: relative;
	display: block;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 0;
	max-width: none;
}

.elementor-widget-epg-preview-gallery.epg-ratio-fit .epg-preview-gallery__preview-image {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	aspect-ratio: auto !important;
	object-fit: cover;
	object-position: center center;
}

.epg-preview-gallery__title {
	position: absolute;
	z-index: 1;
	left: 0;
	width: 100%;
	top: calc(100% + var(--epg-title-spacing, 12px));
	font-size: 1.125rem;
	line-height: 1.4;
	pointer-events: none;
	transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.epg-preview-gallery__hidden-link {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.epg-preview-gallery__empty {
	padding: 20px;
	border: 1px dashed #aaa;
	color: #666;
}

/* Lightbox arrow icons — styled via widget controls on the SVG/i */
.elementor-lightbox .elementor-swiper-button svg,
.elementor-lightbox .elementor-swiper-button i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.3s ease, fill 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Footer: lock layout (no Elementor all-props transition), then fade up */
.elementor-lightbox .elementor-slideshow__footer.epg-lightbox-footer--matched {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	--epg-lightbox-footer-gap: 12px;
	opacity: 0;
	transform: translateY(16px);
	transition: none;
	pointer-events: none;
	will-change: opacity, transform;
}

.elementor-lightbox .elementor-slideshow__footer.epg-lightbox-footer--matched.epg-lightbox-footer--visible {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.4s ease, transform 0.4s ease;
	pointer-events: auto;
}

.elementor-lightbox .swiper.elementor-slideshow--ui-hidden .elementor-slideshow__footer.epg-lightbox-footer--matched.epg-lightbox-footer--visible {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
