/* ISBR Video Testimonials v1.0.0 */

.isbr-vt {
	--isbr-red: #c8102e;
	--isbr-red-rgb: 200, 16, 46;
	--isbr-accent: #ffb547;  /* designation text, as in the mockup */
	--isbr-radius: 14px;
	--gap: 20px;
	--per-view: var(--pv-desktop, 4);
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	min-height: 0;
}

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

/* ---------- Track (native scroll-snap, no library) ---------- */
.isbr-vt .isbr-vt__track {
	display: flex;
	align-items: flex-start;
	height: auto;
	max-height: none;
	overflow-y: hidden;
	gap: var(--gap);
	margin: 0;
	padding: 10px 0 18px; /* room for the hover lift + shadow */
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.isbr-vt .isbr-vt__track::-webkit-scrollbar { display: none; }

.isbr-vt .isbr-vt__slide {
	display: block !important;
	height: auto !important;
	max-height: none !important;
	flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	scroll-snap-align: start;
}
.isbr-vt .isbr-vt__slide::before,
.isbr-vt .isbr-vt__slide::marker { content: none; } /* themes that add list bullets */

/* ---------- Card ---------- */
.isbr-vt .isbr-vt__card {
	/* Height comes from padding (a % of the card's width), so the 3:4 shape holds
	   even if a theme or Elementor style overrides height or aspect-ratio. */
	position: relative !important;
	display: block !important;
	float: none;
	width: 100% !important;
	height: 0 !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 0 0 133.333% 0 !important;
	margin: 0 !important;
	aspect-ratio: auto !important;
	border-radius: var(--isbr-radius);
	overflow: hidden;
	isolation: isolate;
	background: #1c1c1e;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
	transform: translateZ(0); /* keeps rounded corners clipping the video in Safari */
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
	-webkit-tap-highlight-color: transparent;
	outline: none;
}
/* Red ring drawn inside the card so the scroller never clips it */
.isbr-vt .isbr-vt__card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: inherit;
	box-shadow: inset 0 0 0 0 var(--isbr-red);
	transition: box-shadow .3s;
	pointer-events: none;
}
.isbr-vt .isbr-vt__card:focus-visible::after {
	box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--isbr-red);
}

/* Layers */
.isbr-vt .isbr-vt__media,
.isbr-vt .isbr-vt__poster,
.isbr-vt .isbr-vt__preview,
.isbr-vt .isbr-vt__shade,
.isbr-vt .isbr-vt__overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.isbr-vt .isbr-vt__media { z-index: 0; display: block; }
.isbr-vt .isbr-vt__poster,
.isbr-vt .isbr-vt__preview {
	display: block;
	max-width: none;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
}
.isbr-vt .isbr-vt__poster { transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.isbr-vt .isbr-vt__preview { opacity: 0; transition: opacity .45s ease; }
.isbr-vt .isbr-vt__card.is-previewing .isbr-vt__preview { opacity: 1; }

.isbr-vt .isbr-vt__shade {
	z-index: 1;
	display: block;
	background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .62) 30%, rgba(0, 0, 0, 0) 60%);
}
.isbr-vt .isbr-vt__overlay {
	z-index: 2;
	display: block;
	opacity: 0;
	background: linear-gradient(to top,
		rgba(var(--isbr-red-rgb), .96) 0%,
		rgba(var(--isbr-red-rgb), .6) 40%,
		rgba(var(--isbr-red-rgb), .12) 100%);
	transition: opacity .4s ease;
}
.isbr-vt .isbr-vt__card:focus-visible .isbr-vt__overlay { opacity: 1; }

/* Play button: compact, bottom-right, clear of the student's face.
   On hover it expands into a "Watch" pill. */
.isbr-vt .isbr-vt__play {
	position: absolute;
	z-index: 5;
	right: 14px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	height: 42px;
	min-width: 42px;
	padding: 0 12px 0 13px;
	border-radius: 999px;
	border: 1.5px solid rgba(255, 255, 255, .65);
	background: rgba(255, 255, 255, .14);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	transition: background .3s, border-color .3s, color .3s, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.isbr-vt .isbr-vt__play svg {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	fill: currentColor;
}
.isbr-vt .isbr-vt__play::after {
	content: "Watch";
	max-width: 0;
	margin-left: 0;
	overflow: hidden;
	white-space: nowrap;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1;
	opacity: 0;
	transition: max-width .35s cubic-bezier(.2, .8, .2, 1), margin-left .35s, opacity .25s;
}

/* Text */
.isbr-vt .isbr-vt__meta {
	position: absolute;
	z-index: 4;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 18px 68px 16px 16px; /* right padding keeps text clear of the play button */
	text-align: left;
	line-height: 1.3;
}
.isbr-vt .isbr-vt__name {
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: .005em;
	color: #fff;
}
.isbr-vt .isbr-vt__course {
	font-size: .8rem;
	color: rgba(255, 255, 255, .82);
}
.isbr-vt .isbr-vt__placement {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 10px;
	padding-left: 10px;
	border-left: 3px solid var(--isbr-red);
	transition: border-color .3s;
}
.isbr-vt .isbr-vt__role {
	font-size: .82rem;
	font-weight: 600;
	color: var(--isbr-accent);
	transition: color .3s;
}
.isbr-vt .isbr-vt__company {
	font-size: .76rem;
	color: rgba(255, 255, 255, .8);
}

/* Hover effects only on devices that really hover (no "sticky" hover after a tap) */
@media (hover: hover) and (pointer: fine) {
	.isbr-vt .isbr-vt__card:hover {
		transform: translateY(-4px);
		box-shadow: 0 16px 32px rgba(var(--isbr-red-rgb), .28);
		color: #fff;
	}
	.isbr-vt .isbr-vt__card:hover::after { box-shadow: inset 0 0 0 2px var(--isbr-red); }
	.isbr-vt .isbr-vt__card:hover .isbr-vt__poster { transform: scale(1.06); }
	.isbr-vt .isbr-vt__card:hover .isbr-vt__overlay { opacity: 1; }
	.isbr-vt .isbr-vt__card.is-previewing .isbr-vt__overlay { opacity: .82; } /* let the video show through */
	.isbr-vt .isbr-vt__card:hover .isbr-vt__play {
		background: #fff;
		border-color: #fff;
		color: var(--isbr-red);
	}
	.isbr-vt .isbr-vt__card:hover .isbr-vt__play::after {
		max-width: 60px;
		margin-left: 7px;
		opacity: 1;
	}
	.isbr-vt .isbr-vt__card:hover .isbr-vt__placement { border-left-color: #fff; }
	.isbr-vt .isbr-vt__card:hover .isbr-vt__role { color: #fff; }
}

/* Keyboard focus shows the same expanded pill */
.isbr-vt .isbr-vt__card:focus-visible .isbr-vt__play { background: #fff; border-color: #fff; color: var(--isbr-red); }
.isbr-vt .isbr-vt__card:focus-visible .isbr-vt__play::after { max-width: 60px; margin-left: 7px; opacity: 1; }

/* ---------- Navigation ---------- */
.isbr-vt .isbr-vt__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 4px;
}
.isbr-vt .isbr-vt__nav[hidden] { display: none; }

.isbr-vt .isbr-vt__arrow {
	appearance: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 50%;
	background: #fff;
	color: #222;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s;
}
.isbr-vt .isbr-vt__arrow:hover,
.isbr-vt .isbr-vt__arrow:focus-visible {
	background: var(--isbr-red);
	border-color: var(--isbr-red);
	color: #fff;
}
.isbr-vt .isbr-vt__arrow:focus-visible { outline: 2px solid var(--isbr-red); outline-offset: 2px; }
.isbr-vt .isbr-vt__arrow svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.isbr-vt .isbr-vt__dots { display: flex; align-items: center; gap: 8px; }
.isbr-vt .isbr-vt__dot {
	appearance: none;
	width: 8px;
	height: 8px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(0, 0, 0, .2);
	cursor: pointer;
	transition: width .3s, background .3s;
}
.isbr-vt .isbr-vt__dot:hover { background: rgba(0, 0, 0, .4); }
.isbr-vt .isbr-vt__dot.is-active { width: 26px; background: var(--isbr-red); }
.isbr-vt .isbr-vt__dot:focus-visible { outline: 2px solid var(--isbr-red); outline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.isbr-vt { --per-view: min(var(--pv-desktop, 4), 2.3); --gap: 16px; }
}
@media (max-width: 600px) {
	.isbr-vt { --per-view: min(var(--pv-desktop, 4), 1.3); --gap: 14px; }
	.isbr-vt .isbr-vt__play { height: 38px; min-width: 38px; padding: 0 11px 0 12px; right: 12px; bottom: 14px; }
	.isbr-vt .isbr-vt__meta { padding-right: 60px; }
}

/* ---------- Popup ----------
   The dialog fills the viewport; the close button sits in the viewport corner
   (never clipped) and the frame sizes itself to the video's real shape. */
html.isbr-vt-lock { overflow: hidden; }

.isbr-vt-modal {
	--ar: .5625; /* default 9:16 (portrait) until the video reports its size */
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 72px 16px 20px;
	border: 0;
	background: transparent;
	color: #fff;
	overflow: hidden;
}
.isbr-vt-modal[open] {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
}
.isbr-vt-modal::backdrop {
	background: rgba(12, 12, 14, .88);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.isbr-vt-modal[open]::backdrop { animation: isbr-vt-fade .35s ease; }

.isbr-vt-modal__frame {
	position: relative;
	width: min(100%, 1100px, calc((100vh - 150px) * var(--ar)));
	width: min(100%, 1100px, calc((100dvh - 150px) * var(--ar)));
	aspect-ratio: var(--ar);
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
	transition: width .3s ease;
}
.isbr-vt-modal[open] .isbr-vt-modal__frame { animation: isbr-vt-in .35s cubic-bezier(.2, .8, .2, 1); }

@keyframes isbr-vt-in   { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes isbr-vt-fade { from { opacity: 0; } to { opacity: 1; } }

.isbr-vt-modal__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}
.isbr-vt-modal .isbr-vt-modal__close {
	appearance: none;
	position: absolute;
	z-index: 2;
	top: max(16px, env(safe-area-inset-top));
	right: max(16px, env(safe-area-inset-right));
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #1c1c1e;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
	cursor: pointer;
	transition: background .25s, color .25s, transform .25s;
}
.isbr-vt-modal .isbr-vt-modal__close:hover,
.isbr-vt-modal .isbr-vt-modal__close:focus-visible {
	background: var(--isbr-red, #c8102e);
	color: #fff;
	transform: rotate(90deg);
}
.isbr-vt-modal .isbr-vt-modal__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.isbr-vt-modal__close svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
}
.isbr-vt-modal__caption {
	margin: 0;
	max-width: 90vw;
	font-size: .95rem;
	line-height: 1.4;
	text-align: center;
	color: rgba(255, 255, 255, .88);
}
@media (max-width: 600px) {
	.isbr-vt-modal { padding: 64px 12px 16px; }
	.isbr-vt-modal__frame {
		width: min(100%, calc((100vh - 130px) * var(--ar)));
		width: min(100%, calc((100dvh - 130px) * var(--ar)));
		border-radius: 10px;
	}
	.isbr-vt-modal .isbr-vt-modal__close { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.isbr-vt *, .isbr-vt *::before, .isbr-vt *::after,
	.isbr-vt-modal *, .isbr-vt-modal::backdrop {
		transition-duration: .01ms !important;
		animation: none !important;
	}
	.isbr-vt .isbr-vt__track { scroll-behavior: auto; }
}

/* ---------- Elementor wrapper guard ----------
   Stops the Shortcode widget (and its direct container) from capping the
   carousel's height, whatever the container's mobile settings are. */
.elementor-element:has(> .elementor-shortcode > .isbr-vt),
.elementor-element:has(> .elementor-widget-container > .elementor-shortcode > .isbr-vt) {
	/* A definite full width stops the flex container from sizing this widget
	   from its "natural" width (which is ~0 for a carousel, giving a ~28px height). */
	flex: 1 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	height: auto !important;
	max-height: none !important;
	min-height: 0;
	align-self: stretch;
	contain: none !important;
	content-visibility: visible !important;
	overflow: visible !important;
}
.e-con:has(> .elementor-element > .elementor-shortcode > .isbr-vt),
.e-con-inner:has(> .elementor-element > .elementor-shortcode > .isbr-vt),
.e-con:has(> .elementor-element > .elementor-widget-container > .elementor-shortcode > .isbr-vt),
.e-con-inner:has(> .elementor-element > .elementor-widget-container > .elementor-shortcode > .isbr-vt) {
	height: auto !important;
	max-height: none !important;
	grid-template-rows: auto !important;
	/* "Wrap" makes the browser size the row before the carousel's width is known,
	   which collapses it to ~28px (Elementor: Container > Layout > Wrap = No Wrap). */
	flex-wrap: nowrap !important;
}
