/**
 * Artistics: mobile-specific Elementor background slideshow.
 *
 * The mobile layer is a background-only visual layer. It never contains or
 * duplicates Elementor content, headings, buttons or links.
 */

.artistic-has-mobile-background-slideshow {
	position: relative;
	isolation: isolate;
}

.artistic-mobile-background-slideshow {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	pointer-events: none;
	z-index: -2;
	opacity: 0;
	visibility: hidden;
}

.artistic-mobile-background-slideshow__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background-repeat: no-repeat;
	opacity: 0;
	will-change: opacity;
}

.artistic-mobile-background-slideshow__slide.is-active {
	opacity: 1;
}

.artistic-mobile-background-slideshow-active > .artistic-mobile-background-slideshow {
	opacity: 1;
	visibility: visible;
}

/* Hide only Elementor's native desktop slideshow while the mobile version is active. */
.artistic-mobile-background-slideshow-active > .elementor-background-slideshow {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.artistic-mobile-background-slideshow__slide {
		transition: none !important;
	}
}


/*
 * Irish Dance Party mobile hero — full mobile screen with a very small buffer.
 *
 * A 20px buffer prevents the next section from peeking into the first screen
 * on devices/browsers that report the dynamic viewport a few pixels short.
 * This is intentionally much smaller than the previous 56–90px buffer.
 */
@media only screen and (max-width: 767px) {
	.artistic-has-mobile-background-slideshow,
	.elementor-element[data-artistic-mobile-background-slideshow] {
		--idp-mobile-hero-buffer: 20px;
		--min-height: 100vh !important;
		box-sizing: border-box !important;
		width: 100% !important;
		height: calc(100vh + var(--idp-mobile-hero-buffer, 20px)) !important;
		min-height: calc(100vh + var(--idp-mobile-hero-buffer, 20px)) !important;
		max-height: calc(100vh + var(--idp-mobile-hero-buffer, 20px)) !important;
		overflow: hidden !important;
		margin-bottom: -1px !important; /* cover fractional-pixel seams only */
	}

	/* Modern iOS Safari / Chrome / Android: exactly the current visible screen. */
	@supports (height: 100dvh) {
		.artistic-has-mobile-background-slideshow,
		.elementor-element[data-artistic-mobile-background-slideshow] {
			--min-height: calc(100dvh + var(--idp-mobile-hero-buffer, 20px)) !important;
			height: calc(100dvh + var(--idp-mobile-hero-buffer, 20px)) !important;
			min-height: calc(100dvh + var(--idp-mobile-hero-buffer, 20px)) !important;
			max-height: calc(100dvh + var(--idp-mobile-hero-buffer, 20px)) !important;
		}
	}

	/* The custom mobile slideshow always covers the complete hero container. */
	.artistic-has-mobile-background-slideshow > .artistic-mobile-background-slideshow,
	.elementor-element[data-artistic-mobile-background-slideshow] > .artistic-mobile-background-slideshow {
		position: absolute !important;
		inset: 0 !important;
		width: 100% !important;
		height: 100% !important;
		min-height: 100% !important;
	}

	.artistic-has-mobile-background-slideshow .artistic-mobile-background-slideshow__slide,
	.elementor-element[data-artistic-mobile-background-slideshow] .artistic-mobile-background-slideshow__slide {
		position: absolute !important;
		inset: 0 !important;
		width: 100% !important;
		height: 100% !important;
		min-height: 100% !important;
		background-size: cover !important;
		background-repeat: no-repeat !important;
	}

	/* Keep Elementor's content layer inside the same one-screen hero. */
	.artistic-has-mobile-background-slideshow > .e-con-inner,
	.elementor-element[data-artistic-mobile-background-slideshow] > .e-con-inner {
		height: 100% !important;
		min-height: 100% !important;
		max-height: 100% !important;
		box-sizing: border-box !important;
	}
}
