/* QC Cover Slider - hard-coded replacement for the Slider Revolution "cover" slider. */

.qcs {
	--qcs-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);      /* Power3.easeOut   */
	--qcs-ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);  /* Power3.easeInOut */
	--qcs-fade: 300ms;

	position: relative;
	width: 100%;
	max-width: 1280px;
	margin-inline: auto;
	aspect-ratio: 1280 / 600;
	overflow: hidden;
	background: #e7e7e7;
}

/* Fallback for engines without aspect-ratio. */
@supports not (aspect-ratio: 1 / 1) {
	.qcs {
		height: 0;
		padding-bottom: 46.875%; /* 600 / 1280 */
	}
}

.qcs__viewport {
	position: absolute;
	inset: 0;
}

.qcs__slide {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background-color: var(--qcs-bg, transparent);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--qcs-fade) var(--qcs-ease-in-out), visibility 0s linear var(--qcs-fade);
}

.qcs__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--qcs-fade) var(--qcs-ease-in-out), visibility 0s;
}

/* Slide background: behaves like Slider Revolution's bg_fit:cover / center center. */
.qcs__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* ---- Layers ------------------------------------------------------------- */
/* Positions and sizes arrive as percentages of the 1280x600 design grid, so the
   whole composition scales as one unit. */
.qcs__layer {
	position: absolute;
	left: var(--qcs-l);
	top: var(--qcs-t);
	width: var(--qcs-w);
	height: var(--qcs-h);
	z-index: var(--qcs-z, 1);
	opacity: 0;
}

/* <picture> is only a container for the WebP <source>; it must not introduce
   a layout box of its own between the layer and its image. */
.qcs__slide > picture,
.qcs__layer > picture {
	display: contents;
}

.qcs__layer img {
	display: block;
	width: 100%;
	height: 100%;
	/* 'fill' mirrors how Slider Revolution stretches a layer image into its box.
	   Every source here matches its box aspect ratio, so nothing distorts. */
	object-fit: fill;
}

/* Entrance animations run only on the active slide. */
.qcs__slide.is-active > .qcs__layer {
	animation-duration: var(--qcs-speed, 600ms);
	animation-delay: var(--qcs-delay, 0ms);
	animation-fill-mode: both;
	animation-timing-function: var(--qcs-ease-in-out);
}

.qcs__slide.is-active > .qcs__layer[data-ease="out"] {
	animation-timing-function: var(--qcs-ease-out);
}

.qcs__slide.is-active > .qcs__layer[data-anim="fade"] {
	animation-name: qcs-fade-in;
}

/* Masked reveal: the box wipes open while its image slides in from the right. */
.qcs__layer[data-anim="wipe"] {
	overflow: hidden;
}

.qcs__slide.is-active > .qcs__layer[data-anim="wipe"] {
	animation-name: qcs-wipe-box;
}

.qcs__slide.is-active > .qcs__layer[data-anim="wipe"] img {
	animation: qcs-wipe-img var(--qcs-speed, 600ms) var(--qcs-ease-out) var(--qcs-delay, 0ms) both;
}

@keyframes qcs-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes qcs-wipe-box {
	from { opacity: 1; transform: translateX(-100%); }
	to   { opacity: 1; transform: translateX(0); }
}

@keyframes qcs-wipe-img {
	from { transform: translateX(175%); }
	to   { transform: translateX(0); }
}

/* ---- Controls ----------------------------------------------------------- */
.qcs__controls {
	position: absolute;
	z-index: 100;
	right: 16px;
	bottom: 14px;
	display: flex;
	align-items: center;
	gap: 14px;
}

.qcs__dots {
	display: flex;
	align-items: center;
	gap: 8px;
}

.qcs__dot,
.qcs__toggle {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.qcs__dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.28);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
	transition: background 200ms linear, transform 200ms var(--qcs-ease-out);
}

.qcs__dot:hover { background: rgba(0, 0, 0, 0.5); }

.qcs__dot.is-active {
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
	transform: scale(1.15);
}

.qcs__toggle {
	position: relative;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.28);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
	transition: background 200ms linear;
}

.qcs__toggle:hover { background: rgba(0, 0, 0, 0.5); }

.qcs__toggle-pause,
.qcs__toggle-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.qcs__toggle-pause {
	width: 7px;
	height: 8px;
	border-left: 2.5px solid #fff;
	border-right: 2.5px solid #fff;
}

.qcs__toggle-play {
	display: none;
	width: 0;
	height: 0;
	margin-left: 1px;
	border-top: 4.5px solid transparent;
	border-bottom: 4.5px solid transparent;
	border-left: 7px solid #fff;
}

.qcs.is-paused .qcs__toggle-pause { display: none; }
.qcs.is-paused .qcs__toggle-play  { display: block; }

.qcs__dot:focus-visible,
.qcs__toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.qcs__controls { right: 10px; bottom: 9px; gap: 10px; }
	.qcs__dot { width: 9px; height: 9px; }
	.qcs__toggle { width: 19px; height: 19px; }
}

/* ---- Reduced motion ----------------------------------------------------- */
/* Show every layer immediately and stop the cross-fade; the script also stops
   auto-rotation so nothing moves on its own. */
@media (prefers-reduced-motion: reduce) {
	.qcs__slide,
	.qcs__slide.is-active { transition: none; }

	.qcs__layer { opacity: 1; }

	.qcs__slide.is-active > .qcs__layer,
	.qcs__slide.is-active > .qcs__layer[data-anim="wipe"] img {
		animation: none !important;
		opacity: 1;
		transform: none;
	}
}
