/* Borotet Hero Carousel — front end.
 * All colours come from CSS variables set inline from the theme palette.
 */
.btc-carousel {
	--btc-pad: clamp(1.5rem, 5vw, 4.5rem);
	position: relative;
	overflow: hidden;
	isolation: isolate;
	height: var(--btc-h, 620px);
	color: var(--btc-text, #fff);
	background: var(--btc-ov, #1e293b);
	font-family: inherit;
	margin-block: 0;
}
.btc-carousel.alignfull { width: 100%; max-width: none; }
.btc-carousel *,
.btc-carousel *::before,
.btc-carousel *::after { box-sizing: border-box; }

.btc-viewport { position: relative; height: 100%; overflow: hidden; touch-action: pan-y; }
.btc-track { position: relative; height: 100%; }
.btc-slide { position: relative; width: 100%; height: 100%; overflow: hidden; }

.btc-media,
.btc-media .btc-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

/* ---------- Transitions ---------- */
.btc-anim-slide .btc-track {
	display: flex;
	transition: transform var(--btc-speed) cubic-bezier(.65, 0, .35, 1);
	will-change: transform;
}
.btc-anim-slide .btc-slide { flex: 0 0 100%; }

.btc-anim-fade .btc-slide,
.btc-anim-zoom .btc-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--btc-speed) ease, visibility 0s linear var(--btc-speed);
}
.btc-anim-fade .btc-slide.is-active,
.btc-anim-zoom .btc-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
	transition: opacity var(--btc-speed) ease, visibility 0s;
}

.btc-anim-zoom .btc-img {
	transform: scale(1);
	transition: transform 0s linear var(--btc-speed);
}
.btc-anim-zoom .btc-slide.is-active .btc-img {
	transform: scale(1.06);
	transition: transform calc(var(--btc-interval) + var(--btc-speed) * 2) linear;
}

/* ---------- Overlay ---------- */
.btc-overlay {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 1;
	background: var(--btc-ov);
	opacity: var(--btc-ov-opacity, .75);
	pointer-events: none;
}
.btc-pos-left .btc-overlay   { left: 0;  width: var(--btc-ov-w); }
.btc-pos-right .btc-overlay  { right: 0; width: var(--btc-ov-w); }
.btc-pos-center .btc-overlay,
.btc-pos-full .btc-overlay   { left: 0; right: 0; }

.btc-ov-gradient.btc-pos-left .btc-overlay {
	width: min(100%, calc(var(--btc-ov-w) + 25%));
	-webkit-mask-image: linear-gradient(to right, #000 55%, transparent);
	        mask-image: linear-gradient(to right, #000 55%, transparent);
}
.btc-ov-gradient.btc-pos-right .btc-overlay {
	width: min(100%, calc(var(--btc-ov-w) + 25%));
	-webkit-mask-image: linear-gradient(to left, #000 55%, transparent);
	        mask-image: linear-gradient(to left, #000 55%, transparent);
}
.btc-ov-gradient.btc-pos-center .btc-overlay {
	-webkit-mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0, 0, 0, .35) 100%);
	        mask-image: radial-gradient(ellipse at center, #000 35%, rgba(0, 0, 0, .35) 100%);
}
.btc-ov-gradient.btc-pos-full .btc-overlay {
	-webkit-mask-image: linear-gradient(to right, #000 25%, rgba(0, 0, 0, .3));
	        mask-image: linear-gradient(to right, #000 25%, rgba(0, 0, 0, .3));
}

/* ---------- Content ---------- */
.btc-content-wrap {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	padding: var(--btc-pad);
	padding-bottom: calc(var(--btc-pad) + 3.75rem); /* room for controls */
}
.btc-pos-left .btc-content-wrap  { left: 0;  width: var(--btc-ov-w); }
.btc-pos-right .btc-content-wrap { right: 0; width: var(--btc-ov-w); }
.btc-pos-full .btc-content-wrap  { left: 0; right: 0; }
.btc-pos-center .btc-content-wrap { left: 0; right: 0; justify-content: center; text-align: center; }

.btc-content { width: 100%; max-width: var(--btc-content-w, 600px); }
.btc-pos-center .btc-content { max-width: calc(var(--btc-content-w, 600px) + 160px); }

.btc-carousel .btc-title {
	margin: 0 0 .5em;
	color: inherit;
	/* Scales smoothly from the mobile size (375px screens) to the desktop size (1440px+). */
	font-size: clamp(
		calc(var(--btc-title-m, 30) * 1px),
		calc(var(--btc-title-m, 30) * 1px + (var(--btc-title, 46) - var(--btc-title-m, 30)) * (100vw - 375px) / 1065),
		calc(var(--btc-title, 46) * 1px)
	);
	font-weight: var(--btc-title-w, 700);
	line-height: 1.15;
	letter-spacing: -.015em;
	text-wrap: balance;
}
.btc-carousel .btc-text {
	margin: 0 0 1.75em;
	color: inherit;
	font-size: clamp(
		calc(var(--btc-p-m, 16) * 1px),
		calc(var(--btc-p-m, 16) * 1px + (var(--btc-p, 18) - var(--btc-p-m, 16)) * (100vw - 375px) / 1065),
		calc(var(--btc-p, 18) * 1px)
	);
	font-weight: var(--btc-p-w, 400);
	line-height: 1.65;
	opacity: .92;
	text-wrap: pretty;
}
.btc-carousel .btc-text a { color: inherit; text-decoration: underline; }
.btc-carousel .btc-actions { margin: 0; }

.btc-no-overlay .btc-title,
.btc-no-overlay .btc-text { text-shadow: 0 2px 16px rgba(0, 0, 0, .55); }

/* ---------- Button ---------- */
.btc-carousel .btc-btn {
	display: inline-flex;
	align-items: center;
	gap: .6em;
	padding: .9em 1.7em;
	border: 2px solid var(--btc-btn-bg);
	background: var(--btc-btn-bg);
	color: var(--btc-btn-text);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: transform .2s ease, filter .2s ease, background-color .2s ease, color .2s ease;
}
.btc-carousel .btc-btn svg { width: 1.1em; height: 1.1em; fill: currentColor; transition: transform .2s ease; }
.btc-carousel .btc-btn:hover,
.btc-carousel .btc-btn:focus-visible { filter: brightness(.92); transform: translateY(-1px); color: var(--btc-btn-text); }
.btc-carousel .btc-btn:hover svg { transform: translateX(3px); }

.btc-btn-outline .btc-btn { background: transparent; color: var(--btc-text); border-color: currentColor; }
.btc-btn-outline .btc-btn:hover,
.btc-btn-outline .btc-btn:focus-visible { background: var(--btc-btn-bg); border-color: var(--btc-btn-bg); color: var(--btc-btn-text); filter: none; }

/* ---------- Content entrance ---------- */
.btc-ca-fade-up .btc-slide .btc-content > *,
.btc-ca-fade-left .btc-slide .btc-content > *,
.btc-ca-zoom-in .btc-slide .btc-content > * { opacity: 0; }

.btc-ca-fade-up   .btc-slide.is-active .btc-content > * { animation: btc-fade-up .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.btc-ca-fade-left .btc-slide.is-active .btc-content > * { animation: btc-fade-left .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.btc-ca-zoom-in   .btc-slide.is-active .btc-content > * { animation: btc-zoom-in .7s cubic-bezier(.2, .7, .2, 1) forwards; }

.btc-slide.is-active .btc-content > :nth-child(1) { animation-delay: calc(var(--btc-speed) * .35); }
.btc-slide.is-active .btc-content > :nth-child(2) { animation-delay: calc(var(--btc-speed) * .35 + .15s); }
.btc-slide.is-active .btc-content > :nth-child(3) { animation-delay: calc(var(--btc-speed) * .35 + .3s); }

@keyframes btc-fade-up   { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes btc-fade-left { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes btc-zoom-in   { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* ---------- Controls ---------- */
.btc-controls {
	position: absolute;
	left: var(--btc-pad);
	right: var(--btc-pad);
	bottom: clamp(1rem, 3vw, 2rem);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	pointer-events: none;
}
.btc-controls > * { pointer-events: auto; }
.btc-pos-right .btc-controls { flex-direction: row-reverse; }
.btc-pos-center .btc-controls { justify-content: center; }
.btc-pos-center .btc-buttons { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

.btc-dots { display: flex; gap: .5rem; }
.btc-carousel .btc-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 2px solid var(--btc-text);
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	opacity: .75;
	transition: width .3s ease, background-color .3s ease, opacity .3s ease;
}
.btc-carousel .btc-dot:hover { opacity: 1; }
.btc-carousel .btc-dot.is-active { width: 28px; background: var(--btc-text); opacity: 1; }

.btc-buttons { display: flex; gap: .5rem; margin-left: auto; }
.btc-pos-right .btc-buttons { margin-left: 0; margin-right: auto; }
.btc-carousel .btc-btn-ctrl {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--btc-text) 45%, transparent);
	border-radius: 999px;
	background: rgba(0, 0, 0, .22);
	color: var(--btc-text);
	cursor: pointer;
	-webkit-backdrop-filter: blur(4px);
	        backdrop-filter: blur(4px);
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btc-carousel .btc-btn-ctrl:hover { background: var(--btc-btn-bg); border-color: var(--btc-btn-bg); color: var(--btc-btn-text); }
.btc-carousel .btc-btn-ctrl:disabled { opacity: .4; cursor: default; }
.btc-carousel .btc-btn-ctrl svg { width: 20px; height: 20px; fill: currentColor; }
.btc-pause .btc-i-play,
.btc-pause.is-paused .btc-i-pause { display: none; }
.btc-pause.is-paused .btc-i-play { display: block; }

.btc-carousel button:focus-visible,
.btc-carousel a:focus-visible { outline: 3px solid var(--btc-btn-bg); outline-offset: 3px; }

.btc-single .btc-controls { display: none; }
.btc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.btc-notice { padding: 1rem; border: 1px dashed currentColor; }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.btc-carousel { height: var(--btc-h-m, 460px); }
	.btc-pos-left .btc-overlay,
	.btc-pos-right .btc-overlay,
	.btc-pos-left .btc-content-wrap,
	.btc-pos-right .btc-content-wrap { left: 0; right: 0; width: 100%; }
	.btc-ov-gradient.btc-pos-left .btc-overlay,
	.btc-ov-gradient.btc-pos-right .btc-overlay {
		width: 100%;
		-webkit-mask-image: linear-gradient(to top, #000 45%, rgba(0, 0, 0, .25));
		        mask-image: linear-gradient(to top, #000 45%, rgba(0, 0, 0, .25));
	}
	.btc-content-wrap { align-items: flex-end; }
	.btc-pos-center .btc-content-wrap { align-items: center; }
	.btc-carousel .btc-btn-ctrl { width: 40px; height: 40px; }
	.btc-pos-right .btc-controls { flex-direction: row; }
	.btc-pos-right .btc-buttons { margin-left: auto; margin-right: 0; }
}

/* ---------- Full-screen height (after mobile rules so it wins) ---------- */
.btc-carousel.btc-h-screen {
	height: calc(var(--btc-vh, 100) * 1vh - var(--btc-offset, 0px));
	min-height: 380px;
}
@supports (height: 1svh) {
	.btc-carousel.btc-h-screen { height: calc(var(--btc-vh, 100) * 1svh - var(--btc-offset, 0px)); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.btc-carousel .btc-track,
	.btc-carousel .btc-slide,
	.btc-carousel .btc-img,
	.btc-carousel .btc-btn { transition: none !important; }
	.btc-carousel .btc-slide.is-active .btc-img { transform: none !important; }
	.btc-carousel .btc-slide .btc-content > * { animation: none !important; opacity: 1 !important; transform: none !important; }
}
