/* Banner carousel: clip od prvního paintu, i během Owl init. */
body.home {
	--ck-banner-carousel-max-h: calc(100vw / 2 * 500 / 328 + 16px);
}

@media only screen and (min-width: 480px) {
	body.home {
		--ck-banner-carousel-max-h: calc(100vw / 4 * 500 / 328 + 16px);
	}
}

@media only screen and (min-width: 768px) {
	body.home {
		--ck-banner-carousel-max-h: calc(100vw / 2 * 500 / 328 + 16px);
	}
}

@media only screen and (min-width: 960px) {
	body.home {
		--ck-banner-carousel-max-h: calc(100vw / 6 * 500 / 328 + 16px);
	}
}

body.home .vcex-image-carousel.wpex-carousel,
body.home .ck-carousel-clip {
	--wpex-carousel-gap: 10px;
	--wpex-carousel-columns: 2;
	--ck-carousel-aspect: 328 / 500;
	overflow: hidden !important;
	max-width: 100% !important;
	max-height: var(--ck-banner-carousel-max-h) !important;
	contain: paint;
	clip-path: inset(0);
	box-sizing: border-box !important;
}

@media only screen and (min-width: 480px) {
	body.home .vcex-image-carousel.wpex-carousel,
	body.home .ck-carousel-clip {
		--wpex-carousel-columns: 4;
	}
}

@media only screen and (min-width: 768px) {
	body.home .vcex-image-carousel.wpex-carousel,
	body.home .ck-carousel-clip {
		--wpex-carousel-columns: 2;
	}
}

@media only screen and (min-width: 960px) {
	body.home .vcex-image-carousel.wpex-carousel,
	body.home .ck-carousel-clip {
		--wpex-carousel-columns: 6;
	}
}

body.home .wpex-vc-full-width-row:has(.vcex-image-carousel),
body.home .wpex-vc-full-width-row:has(.ck-carousel-clip) {
	overflow: hidden !important;
	max-height: calc(var(--ck-banner-carousel-max-h) + 24px) !important;
}

body.home .vcex-image-carousel.wpex-carousel:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)),
body.home .ck-carousel-clip:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) {
	display: grid !important;
	grid-template-columns: repeat(var(--wpex-carousel-columns), minmax(0, 1fr));
	grid-template-rows: minmax(0, 1fr);
	grid-auto-rows: 0;
	grid-auto-flow: row;
	column-gap: var(--wpex-carousel-gap) !important;
	row-gap: 0 !important;
	align-items: stretch !important;
	width: 100% !important;
}

body.home .vcex-image-carousel.wpex-carousel:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide,
body.home .ck-carousel-clip:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide {
	display: none !important;
	min-width: 0 !important;
	max-width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	overflow: hidden !important;
	aspect-ratio: var(--ck-carousel-aspect) !important;
}

body.home .vcex-image-carousel.wpex-carousel:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(-n + 2),
body.home .ck-carousel-clip:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(-n + 2) {
	display: flex !important;
	flex-direction: column !important;
}

@media only screen and (min-width: 480px) {
	body.home .vcex-image-carousel.wpex-carousel:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(-n + 4),
	body.home .ck-carousel-clip:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(-n + 4) {
		display: flex !important;
		flex-direction: column !important;
	}
}

@media only screen and (min-width: 768px) {
	body.home .vcex-image-carousel.wpex-carousel:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(n + 3),
	body.home .ck-carousel-clip:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(n + 3) {
		display: none !important;
	}

	body.home .vcex-image-carousel.wpex-carousel:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(-n + 2),
	body.home .ck-carousel-clip:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(-n + 2) {
		display: flex !important;
		flex-direction: column !important;
	}
}

@media only screen and (min-width: 960px) {
	body.home .vcex-image-carousel.wpex-carousel:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(-n + 6),
	body.home .ck-carousel-clip:not(:has(.wpex-carousel__stage-outer)):not(:has(.owl-stage-outer)) > .wpex-carousel-slide:nth-child(-n + 6) {
		display: flex !important;
		flex-direction: column !important;
	}
}

body.home .vcex-image-carousel img,
body.home .ck-carousel-clip img {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	vertical-align: top !important;
}

body.home .vcex-image-carousel .wpex-carousel-entry-media,
body.home .vcex-image-carousel .wpex-carousel-entry-img,
body.home .ck-carousel-clip .wpex-carousel-entry-media,
body.home .ck-carousel-clip .wpex-carousel-entry-img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	overflow: hidden !important;
}
