/* BCU Carousel - front end
   Per-instance values arrive as inline custom properties from the shortcode. */

.bcucar {
	position: relative;
	--cards: var(--cards-d, 2);
	--gap: var(--gap-d, 20px);
	--card-h: var(--card-h-d, 380px);
	--navy: #010035;
	--red: #C51D1D;
	--gold: #F6D28C;
	font-family: "Manrope", sans-serif;
}

.bcucar-track {
	display: flex;
	gap: var(--gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.bcucar-track::-webkit-scrollbar { display: none; }

.bcucar-card {
	position: relative;
	flex: 0 0 calc((100% - (var(--cards) - 1) * var(--gap)) / var(--cards));
	scroll-snap-align: start;
	height: var(--card-h);
	border-radius: 12px;
	overflow: hidden;
	isolation: isolate;
	background: var(--navy);
}

.bcucar-card .bcucar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .6s ease;
}

.bcucar-card:hover .bcucar-img { transform: scale(1.06); }

.bcucar-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(1,0,53,.88) 0%, rgba(1,0,53,.45) 45%, rgba(1,0,53,.05) 100%);
}

.bcucar-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 24px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}

.bcucar-title {
	font-family: "Amaranth", sans-serif;
	font-weight: 700;
	color: #fff;
	font-size: 22px;
	line-height: 1.25;
	margin: 0;
}

/* Only the icon is a link - the card itself is not clickable. */
.bcucar-go {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1.5px solid rgba(255,255,255,.75);
	background: rgba(255,255,255,.12);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	cursor: pointer;
	transition: background .3s, border-color .3s, transform .3s;
}

.bcucar-go svg {
	width: 20px !important;
	height: 20px !important;
	flex: 0 0 auto;
	stroke: #fff;
}

.bcucar-go:hover,
.bcucar-go:focus-visible {
	background: var(--red);
	border-color: var(--red);
	transform: scale(1.08);
}

.bcucar-go:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 3px;
}

.bcucar-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	background: #fff;
	box-shadow: 0 4px 18px rgba(1,0,53,.22);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background .25s;
}

.bcucar-nav svg {
	width: 18px !important;
	height: 18px !important;
	flex: 0 0 auto;
	stroke: var(--navy);
	transition: stroke .25s;
}

.bcucar-nav:hover { background: var(--navy); }
.bcucar-nav:hover svg { stroke: #fff; }
.bcucar-nav[hidden] { display: none; }

.bcucar-prev { left: 14px; }
.bcucar-next { right: 14px; }

.bcucar-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}

.bcucar-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(1,0,53,.22);
	cursor: pointer;
	transition: width .25s, background .25s, border-radius .25s;
}

.bcucar-dot.is-active {
	background: var(--red);
	width: 26px;
	border-radius: 6px;
}

@media (max-width: 1024px) {
	.bcucar {
		--cards: var(--cards-t, 2);
		--card-h: var(--card-h-t, 340px);
	}
	.bcucar-title { font-size: 20px; }
}

@media (max-width: 767px) {
	.bcucar {
		--cards: var(--cards-m, 1);
		--gap: var(--gap-m, 14px);
		--card-h: var(--card-h-m, 300px);
		padding: 0 16px;
	}
	.bcucar-card { border-radius: 10px; }
	.bcucar-title { font-size: 18px; }
	.bcucar-nav { display: none; }
	.bcucar-body { padding: 18px; gap: 12px; }
	.bcucar-go { width: 42px; height: 42px; }
	.bcucar-go svg { width: 18px !important; height: 18px !important; }
	.bcucar-dots { margin-top: 16px; }
}

@media (max-width: 380px) {
	.bcucar { padding: 0 12px; }
	.bcucar-title { font-size: 16.5px; }
}

@media (prefers-reduced-motion: reduce) {
	.bcucar-track { scroll-behavior: auto; }
	.bcucar-card .bcucar-img { transition: none; }
	.bcucar-card:hover .bcucar-img { transform: none; }
}
