/* Container extras: background media (slideshow / video) and per-container
   content-width overrides (Full Width / Boxed). */

/* ── Content width ──────────────────────────────────────────────────────
 * "Full Width" breaks a container out of its parent's max-width constraint
 * to span the full viewport, using the standard negative-margin technique
 * (safe here — base.css already sets `overflow-x: hidden` on the body, so
 * this can never cause a horizontal scrollbar). "Boxed" just re-centers the
 * container at a custom max-width (set inline, since it's a free-form
 * per-instance value) regardless of how wide its parent is. */

.craftor-container--width-full {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc( 50% - 50vw );
	margin-right: calc( 50% - 50vw );
}

.craftor-container--width-boxed {
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/* Container background media (slideshow / video) — an absolutely positioned
   layer behind the container's real children, which get lifted onto their
   own stacking-context layer on top. */

.craftor-container__bg-media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.craftor-container__bg-media .swiper,
.craftor-container__bg-media .swiper-wrapper,
.craftor-container__bg-media .swiper-slide {
	height: 100%;
	width: 100%;
}

.craftor-container__bg-slide {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.craftor-container__bg-slide--kenburns {
	animation: craftor-container-kenburns 9s ease-in-out infinite alternate;
}

@keyframes craftor-container-kenburns {
	from { transform: scale( 1 ); }
	to   { transform: scale( 1.12 ); }
}

.craftor-container__bg-media video,
.craftor-container__bg-media iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	min-width: 100%;
	min-height: 100%;
	width: auto;
	height: auto;
	transform: translate( -50%, -50% );
	object-fit: cover;
	pointer-events: none;
	border: none;
}

.craftor-container__bg-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.craftor-container__bg-content {
	position: relative;
	z-index: 2;
	width: 100%;
}

@media ( prefers-reduced-motion: reduce ) {
	.craftor-container__bg-slide--kenburns {
		animation: none;
	}
}
