/* Bio-Lec Shorts Carousel */

.blsc {
	--blsc-accent: #f57c0e;
	--blsc-accent-hi: #d96a05;
	--blsc-accent-ink: #ffffff;
	--blsc-fg: inherit;
	--blsc-muted: #6b7280;
	--blsc-line: #e4e4e7;
	--blsc-surface: #ffffff;
	--blsc-card-shadow: 0 2px 6px rgba(17, 17, 17, 0.06), 0 10px 24px rgba(17, 17, 17, 0.08);
	--blsc-card-shadow-hi: 0 4px 10px rgba(17, 17, 17, 0.08), 0 18px 38px rgba(17, 17, 17, 0.14);
	--blsc-radius: 14px;

	position: relative;
	margin: 2.5rem 0;
	padding: 0;
	background: transparent;
	color: var(--blsc-fg);
	font-family: inherit;
	box-sizing: border-box;
}

.blsc *,
.blsc *::before,
.blsc *::after { box-sizing: border-box; }

.blsc-heading {
	margin: 0 0 20px;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.25;
	color: inherit;
}

/* ---------- shared card media ---------- */

.blsc-media {
	position: relative;
	aspect-ratio: 9 / 16;
	width: 100%;
	height: 100%;
	border-radius: var(--blsc-radius);
	border: 1px solid var(--blsc-line);
	background-color: var(--blsc-surface);
	box-shadow: var(--blsc-card-shadow);
	overflow: hidden;
	display: block;
	transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.blsc-card:hover .blsc-media,
.blsc-card:focus-visible .blsc-media {
	box-shadow: var(--blsc-card-shadow-hi);
	transform: translateY(-2px);
}

.blsc-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: inherit;
}

.blsc-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.74) 100%);
}

.blsc-tag {
	position: absolute;
	top: 10px;
	left: 10px;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.82);
}

.blsc-dur {
	position: absolute;
	right: 10px;
	bottom: 10px;
	font-size: 11px;
	line-height: 1;
	padding: 4px 7px;
	border-radius: 5px;
	background: rgba(0, 0, 0, 0.62);
	color: #fff;
}

.blsc-title {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 32px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.25;
	text-align: left;
	color: #fff;
	text-wrap: pretty;
}

.blsc-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 54px;
	height: 54px;
	margin: -27px 0 0 -27px;
	border-radius: 50%;
	background: var(--blsc-accent);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transform: scale(0.9);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.blsc-play::after {
	content: "";
	position: absolute;
	left: 21px;
	top: 17px;
	border-left: 15px solid var(--blsc-accent-ink);
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
}

.blsc-card:hover .blsc-play,
.blsc-card:focus-visible .blsc-play,
.blsc-flow-card.is-active .blsc-play,
.blsc-deck-card.is-active:hover .blsc-play {
	opacity: 1;
	transform: scale(1);
}

/* ---------- buttons ---------- */

.blsc button { font-family: inherit; }

.blsc-card,
.blsc-flow-card,
.blsc-deck-card {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	width: 100%;
	color: inherit;
	appearance: none;
}

.blsc-nav {
	display: flex;
	gap: 8px;
	margin-top: 14px;
}

.blsc-nav--center { justify-content: center; }

.blsc-arrow {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: var(--blsc-accent);
	color: var(--blsc-accent-ink);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(245, 124, 14, 0.32);
	transition: background 0.18s ease, box-shadow 0.18s ease;
}

.blsc-arrow:hover {
	background: var(--blsc-accent-hi);
	box-shadow: 0 4px 12px rgba(245, 124, 14, 0.42);
}

.blsc-arrow[disabled] {
	opacity: 0.4;
	cursor: default;
	box-shadow: none;
}

.blsc-btn {
	border-radius: 999px;
	font-size: 14px;
	padding: 10px 20px;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.blsc-btn--ghost {
	border: 1px solid var(--blsc-accent);
	background: transparent;
	color: var(--blsc-accent);
}

.blsc-btn--ghost:hover {
	background: var(--blsc-accent);
	color: var(--blsc-accent-ink);
}

.blsc-btn--solid {
	border: 1px solid var(--blsc-accent);
	background: var(--blsc-accent);
	color: var(--blsc-accent-ink);
	font-weight: 500;
	box-shadow: 0 2px 8px rgba(245, 124, 14, 0.32);
}

.blsc-btn--solid:hover {
	background: var(--blsc-accent-hi);
	border-color: var(--blsc-accent-hi);
}

.blsc :focus-visible {
	outline: 2px solid var(--blsc-accent);
	outline-offset: 3px;
	border-radius: 8px;
}

/* ---------- 01 snap rail ---------- */

.blsc-rail {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 6px 4px 14px;
	margin: -6px -4px -14px;
	-webkit-overflow-scrolling: touch;
}

.blsc-rail::-webkit-scrollbar { height: 0; }

.blsc-cell {
	flex: 0 0 208px;
	scroll-snap-align: start;
}

.blsc-meta {
	display: flex;
	gap: 8px;
	margin-top: 9px;
	font-size: 12px;
	color: var(--blsc-muted);
}

/* ---------- 02 coverflow ---------- */

.blsc-stage {
	position: relative;
	height: 420px;
	perspective: 1400px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.blsc-flow-card {
	position: absolute;
	width: 210px;
	height: 373px;
	border-radius: 16px;
	transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
	will-change: transform;
}

.blsc-flow-card .blsc-media {
	border-radius: 16px;
	box-shadow: var(--blsc-card-shadow);
}

.blsc-flow-card.is-active .blsc-media {
	box-shadow: var(--blsc-card-shadow-hi);
}

.blsc-flow-label {
	margin: 18px 0 0;
	text-align: center;
	font-size: 13px;
	color: var(--blsc-muted);
}

/* ---------- 03 swipe deck ---------- */

.blsc-deck-grid {
	display: grid;
	grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
	gap: 48px;
	align-items: center;
}

.blsc-deck-stack {
	position: relative;
	height: 480px;
	touch-action: pan-y;
}

.blsc-deck-card {
	position: absolute;
	inset: 0;
	height: 100%;
	border-radius: 18px;
	transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
	will-change: transform;
}

.blsc-deck-card .blsc-media {
	border-radius: 18px;
	box-shadow: var(--blsc-card-shadow);
}

.blsc-deck-card.is-active .blsc-media {
	box-shadow: var(--blsc-card-shadow-hi);
}

.blsc-counter {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: 0.16em;
	color: var(--blsc-accent);
}

.blsc-deck-title {
	margin: 0 0 12px;
	font-size: 2rem;
	line-height: 1.15;
	font-weight: 600;
	color: inherit;
}

.blsc-deck-blurb {
	margin: 0 0 22px;
	max-width: 44ch;
	font-size: 15px;
	line-height: 1.6;
	color: var(--blsc-muted);
}

.blsc-deck-buttons { display: flex; gap: 10px; }

/* ---------- lightbox ---------- */

.blsc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(12, 12, 14, 0.82);
	backdrop-filter: blur(4px);
}

.blsc-lightbox[hidden] { display: none; }

.blsc-lightbox-frame {
	position: relative;
	width: min(420px, 100%);
	aspect-ratio: 9 / 16;
	max-height: 88vh;
	background: #000;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.blsc-lightbox-frame iframe,
.blsc-lightbox-frame video {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	object-fit: contain;
	background: #000;
}

.blsc-lightbox-close {
	position: absolute;
	top: -44px;
	right: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 0;
	background: var(--blsc-accent, #f57c0e);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.blsc-lightbox-close:hover { background: #d96a05; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
	.blsc-deck-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 26px;
	}

	.blsc-deck-stack {
		height: 420px;
		max-width: 260px;
		margin: 0 auto;
	}

	.blsc-stage { height: 340px; }

	.blsc-flow-card {
		width: 168px;
		height: 298px;
	}

	.blsc-cell { flex-basis: 158px; }

	.blsc-deck-title { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
	.blsc-flow-card,
	.blsc-deck-card,
	.blsc-media,
	.blsc-play { transition: none; }

	.blsc-rail { scroll-behavior: auto; }
}

/* ---------- single video (no carousel chrome) ---------- */

.blsc--single {
	display: block;
	width: 100%;
	max-width: var(--blsc-single-width, 340px);
	margin: 0 auto 2.5rem;
}

/* The play badge has no hover to wait for when it is the only thing here. */
.blsc--single .blsc-play {
	opacity: 1;
	transform: scale(1);
}

.blsc--single .blsc-card:hover .blsc-play {
	transform: scale(1.06);
}
