.cvs {
	--cvs-bg: #12326E;
	--cvs-hero-overlay: #000000CC;
	--cvs-label: #00AFD7;
	--cvs-muted: #CEEAFA;
	--cvs-card-width: 284px;
	--cvs-card-gap: 18px;
	--cvs-card-radius: 12px;
	--cvs-card-scale: 1;
	--cvs-card-height: calc(var(--cvs-card-width) * var(--cvs-card-scale) * 1.5);
	--cvs-card-width-expanded: calc(var(--cvs-card-height) * 16 / 9);
	--cvs-focus-ring: #FFFFFF;
	--cvs-hero-title: #FFFFFF;
	--cvs-hero-play-bg: #FFFFFF;
	--cvs-hero-play-text: #12326E;
	--cvs-hero-cta-text: #FFFFFF;
	--cvs-hero-cta-border: #FFFFFF;

	position: relative;
	background: var(--cvs-bg);
	color: #FFFFFF;
	overflow: hidden;
}

/*
 * This widget is a deliberately self-contained, dark "shelf" component that
 * must not inherit the site's generic theme/kit defaults for buttons,
 * headings or images (those are tuned for light-background page content and
 * fight with this component — e.g. a global navy button style rendering
 * invisible over this widget's own navy background). The !important uses
 * below are a deliberate boundary around this widget, not a code smell.
 */

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

.cvs img {
	max-width: 100%;
	display: block;
}

.cvs button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

.cvs :focus-visible {
	outline: 3px solid var(--cvs-focus-ring);
	outline-offset: 2px;
}

/* ---------- Hero ---------- */

.cvs-hero {
	position: relative;
	min-height: 60vh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.cvs-hero__bg,
.cvs-hero__bg img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
}

.cvs-hero__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--cvs-hero-overlay) 0%, transparent 70%);
}

.cvs-hero__fade {
	position: absolute;
	inset: auto 0 0 0;
	height: 30%;
	background: linear-gradient(180deg, transparent 0%, var(--cvs-bg) 100%);
}

.cvs-hero__content {
	position: relative;
	z-index: 1;
	padding: 48px;
	max-width: 640px;
}

.cvs-hero__role {
	font-size: clamp(28px, 4vw, 48px);
	font-weight: 700;
	margin: 0;
	line-height: 1.1;
	color: var(--cvs-hero-title) !important;
}

.cvs-hero__person {
	font-size: clamp(16px, 2vw, 22px);
	font-weight: 400;
	color: var(--cvs-muted) !important;
	margin: 4px 0 0;
}

.cvs-hero__blurb {
	margin: 16px 0 0;
	color: var(--cvs-muted);
	max-width: 52ch;
}

.cvs-hero__actions {
	display: flex;
	gap: 16px;
	margin-top: 24px;
	flex-wrap: wrap;
}

.cvs-hero__play {
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 600;
	background: var(--cvs-hero-play-bg) !important;
	color: var(--cvs-hero-play-text) !important;
}

.cvs-hero__cta {
	padding: 12px 24px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	background: transparent !important;
	border: 2px solid var(--cvs-hero-cta-border) !important;
	color: var(--cvs-hero-cta-text) !important;
}

/* ---------- Shelves ---------- */

.cvs__shelves {
	position: relative;
	z-index: 1;
	padding: 8px 48px 48px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.cvs-shelf__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 16px;
}

.cvs-shelf__title {
	font-size: 22px;
	font-weight: 600;
	margin: 0;
	color: #FFFFFF !important;
}

.cvs-shelf__count {
	color: var(--cvs-muted);
	font-size: 14px;
}

.cvs-shelf__nav {
	margin-left: auto;
	display: flex;
	gap: 8px;
}

/* Same design language as the homepage's cimspa-career-card-slider arrows —
   circular button, real SVG chevron, not a CSS-border triangle — but
   recolored for this widget's solid dark-navy background. The homepage's
   literal white-circle/navy-icon combination sits on a light section there;
   transplanted here it read as a stark disconnected sticker rather than an
   integrated control, so this is a frosted-glass adaptation of the same
   pattern instead of a literal color copy. */
.cvs-shelf__arrow {
	width: 40px;
	height: 40px;
	border-radius: 50% !important;
	border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
	background: rgba(255, 255, 255, 0.14) !important;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #FFFFFF !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: border-color 0.15s, opacity 0.15s;
}

.cvs-shelf__arrow svg {
	pointer-events: none;
}

.cvs-shelf__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.cvs-shelf__viewport {
	position: relative;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}

.cvs-shelf__track {
	display: flex;
	align-items: flex-end;
	gap: var(--cvs-card-gap);
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 8px 32px 16px;
	scrollbar-width: none;
}

.cvs-shelf__track::-webkit-scrollbar {
	display: none;
}

/* ---------- Cards ---------- */

/*
 * The card's own box (.cvs-card) is a fixed height at all times — only its
 * WIDTH changes on expand (via flex-basis). The role/person/occupation
 * caption is an absolutely-positioned overlay bottom-anchored to that fixed
 * box, so revealing more of it only covers more of the image; it can never
 * grow the card taller.
 */
.cvs-card {
	position: relative;
	flex: 0 0 calc(var(--cvs-card-width) * var(--cvs-card-scale));
	height: var(--cvs-card-height);
	border-radius: var(--cvs-card-radius);
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
	transition: flex-basis 280ms ease-out;
}

.cvs-card__trigger {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	padding: 0;
	text-align: left;
}

.cvs-card__img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center;
}

.cvs-card__play-icon {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
}

.cvs-card__play-icon::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 55%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 8px 0 8px 14px;
	border-color: transparent transparent transparent #FFFFFF;
}

.cvs-card__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 32px 14px 12px;
	background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 75%);
	/* Lets clicks over the caption's plain text fall through to the button
	   underneath; .cvs-card__reveal re-enables itself for its own links. */
	pointer-events: none;
}

.cvs-card__role {
	margin: 0;
	font-weight: 600;
	color: var(--cvs-label);
}

.cvs-card__details {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 280ms ease-out, opacity 200ms ease-out;
}

.cvs-card__person {
	margin: 4px 0 0;
	color: var(--cvs-muted);
	font-size: 14px;
}

.cvs-card__reveal {
	margin-top: 8px;
	pointer-events: auto;
}

.cvs-card.is-expanded {
	flex-basis: var(--cvs-card-width-expanded);
}

.cvs-card.is-expanded .cvs-card__details {
	max-height: 140px;
	opacity: 1;
}

.cvs-card__occupations-label {
	color: var(--cvs-muted);
	font-size: 13px;
	margin: 0 0 6px;
}

.cvs-pill {
	display: inline-block;
	background: #FFFFFF;
	color: var(--cvs-bg);
	font-size: 13px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	text-decoration: none;
	margin: 0 6px 6px 0;
}

/*
 * Touch devices: portrait-only, smaller, and never expand. There's no hover
 * to trigger a reveal, tapping a card plays it rather than expanding it, and
 * occupation/job links remain reachable via the modal after that tap — so
 * unlike a mouse/keyboard shelf, nothing here needs the expanded state at
 * all. Smaller cards (70% scale) also mean more shelves are visible at once.
 */
@media (hover: none) {
	.cvs {
		--cvs-card-scale: 0.7;
	}

	.cvs-card.is-expanded {
		flex-basis: calc(var(--cvs-card-width) * var(--cvs-card-scale));
	}

	.cvs-card__details {
		max-height: 0 !important;
		opacity: 0 !important;
	}
}

/* ---------- Modal ---------- */

.cvs-modal-open {
	overflow: hidden;
}

.cvs-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cvs-modal[hidden] {
	display: none;
}

.cvs-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.cvs-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(1000px, 92vw);
	background: var(--cvs-bg);
	border-radius: 12px;
	padding: 24px;
	max-height: 90vh;
	overflow-y: auto;
}

.cvs-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #FFFFFF;
	font-size: 22px;
	line-height: 1;
}

.cvs-modal__title {
	font-size: 18px;
	margin: 0 40px 16px 0;
	color: #FFFFFF !important;
}

.cvs-modal__player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.cvs-modal__player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.cvs-modal__occupations {
	margin-top: 16px;
}

.cvs-modal__occupations-label {
	color: var(--cvs-muted);
	font-size: 14px;
	margin: 0 0 8px;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.cvs-card,
	.cvs-card__details,
	.cvs-shelf__track {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
