.asg-video-carousel {
	--asg-video-columns: 6;
	--asg-video-gap: 8px;
	--asg-video-ratio: 0.5625;
	--asg-video-radius: 0px;
	--asg-video-eyebrow: #C9A227;
	--asg-video-heading: #5A1614;
	--asg-video-arrow: #7B1E1E;
	--asg-video-play: #C1202A;
	--asg-video-play-size: 62px;

	position: relative;
	box-sizing: border-box;
}

.asg-video-carousel *,
.asg-video-carousel *::before,
.asg-video-carousel *::after {
	box-sizing: border-box;
}

/* ---- Heading row ---- */

.asg-video-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin: 0 0 28px;
}

.asg-video-eyebrow {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 500;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--asg-video-eyebrow);
}

.asg-video-heading {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(30px, 3.4vw, 46px);
	line-height: 1.1;
	font-weight: 400;
	letter-spacing: -.01em;
	color: var(--asg-video-heading);
}

.asg-video-arrows {
	display: flex;
	gap: 12px;
	flex: 0 0 auto;
}

.asg-video-arrow {
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--asg-video-arrow);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .2s ease, transform .2s ease;
}

.asg-video-arrow svg {
	width: 18px;
	height: 18px;
	display: block;
}

.asg-video-arrow:hover {
	transform: scale(1.06);
}

.asg-video-arrow[disabled] {
	opacity: .32;
	cursor: default;
	transform: none;
}

/* ---- Card row ---- */

.asg-video-track {
	display: flex;
	gap: var(--asg-video-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 2px;
}

.asg-video-track::-webkit-scrollbar {
	display: none;
}

.asg-video-card {
	/* Each card takes an equal share of the row, minus its share of the
	   gaps, so exactly --asg-video-columns cards fill the width. */
	flex: 0 0 calc((100% - (var(--asg-video-columns) - 1) * var(--asg-video-gap)) / var(--asg-video-columns));
	position: relative;
	aspect-ratio: var(--asg-video-ratio);
	scroll-snap-align: start;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--asg-video-radius);
	overflow: hidden;
	background: #2a1010;
	cursor: pointer;
	display: block;
	text-align: left;
	font: inherit;
	color: inherit;
	-webkit-appearance: none;
	appearance: none;
}

/* Fallback for browsers without aspect-ratio (older Safari): pad the
   card to the same shape using the ratio as a percentage. */
@supports not (aspect-ratio: 1) {
	.asg-video-card::before {
		content: "";
		display: block;
		padding-top: calc(100% / var(--asg-video-ratio));
	}
}

.asg-video-thumb,
.asg-video-scrim {
	position: absolute;
	inset: 0;
	display: block;
}

/* Elementor's frontend stylesheet contains `.elementor img { height:auto;
   max-width:100% }` at specificity (0,1,1), which beats a single-class
   rule like `.asg-video-img` (0,1,0). Without this the thumbnail renders
   at its natural aspect ratio - full width, short - leaving the card's
   background exposed as a flat block under it. Same fix the Category
   Tile widget already needed; absolute positioning plus !important so a
   CSS optimizer re-ordering the files can't reintroduce it either. */
.asg-video-carousel .asg-video-thumb .asg-video-img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	min-height: 0;
	margin: 0;
	padding: 0;
	border-radius: 0;
	display: block;
	object-fit: cover !important;
	object-position: center !important;
	transition: transform .5s ease;
}

.asg-video-carousel .asg-video-thumb .asg-video-img--empty {
	background: linear-gradient(160deg, #3a1414, #1d0a0a);
}

.asg-video-card:hover .asg-video-img {
	transform: scale(1.04);
}

.asg-video-scrim {
	background: linear-gradient(to bottom,
		rgba(0, 0, 0, .28) 0%,
		rgba(0, 0, 0, 0) 32%,
		rgba(0, 0, 0, 0) 46%,
		rgba(0, 0, 0, .62) 100%);
	pointer-events: none;
}

.asg-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: var(--asg-video-play-size);
	height: var(--asg-video-play-size);
	margin: calc(var(--asg-video-play-size) / -2) 0 0 calc(var(--asg-video-play-size) / -2);
	border-radius: 50%;
	background: var(--asg-video-play);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: transform .25s ease, background-color .25s ease;
}

.asg-video-play svg {
	width: 46%;
	height: 46%;
	display: block;
	/* Optical centring - a triangle's visual centre sits left of its box. */
	margin-left: 6%;
}

.asg-video-card:hover .asg-video-play {
	transform: scale(1.1);
}

.asg-video-meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 18px 16px 16px;
	display: block;
	pointer-events: none;
}

.asg-video-title {
	display: block;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 18px;
	line-height: 1.25;
	color: #fff;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
}

.asg-video-label {
	display: block;
	margin-top: 5px;
	font-size: 11px;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .78);
	text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
}

.asg-video-card:focus-visible {
	outline: 3px solid var(--asg-video-play);
	outline-offset: 3px;
}

/* ---- Popup player ---- */

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

.asg-video-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.asg-video-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(16, 6, 6, .92);
	animation: asg-video-fade .2s ease;
}

@keyframes asg-video-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.asg-video-modal-inner {
	position: relative;
	z-index: 1;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.asg-video-stage {
	position: relative;
	background: #000;
	overflow: hidden;
	border-radius: 6px;
	line-height: 0;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

/* The stage is sized from the height so a portrait clip never runs off
   the screen; width follows from the shape. */
.asg-video-stage[data-shape="portrait"] {
	height: min(82vh, 860px);
	width: calc(min(82vh, 860px) * 0.5625);
	max-width: 92vw;
}

.asg-video-stage[data-shape="square"] {
	height: min(82vh, 720px);
	width: min(82vh, 720px);
	max-width: 92vw;
}

.asg-video-stage[data-shape="landscape"] {
	width: min(92vw, 1100px);
	height: calc(min(92vw, 1100px) * 0.5625);
	max-height: 82vh;
}

.asg-video-stage iframe,
.asg-video-stage video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}

.asg-video-modal-title {
	order: -1;
	margin: 0;
	max-width: 92vw;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 17px;
	line-height: 1.3;
	color: #f4e6d8;
	text-align: center;
}

.asg-video-close {
	position: absolute;
	top: -46px;
	right: 0;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color .2s ease;
}

.asg-video-close:hover {
	background: rgba(255, 255, 255, .24);
}

.asg-video-close svg {
	width: 18px;
	height: 18px;
	display: block;
}

body.asg-video-modal-open {
	overflow: hidden;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
	.asg-video-head {
		margin-bottom: 22px;
	}

	.asg-video-title {
		font-size: 16px;
	}
}

@media (max-width: 767px) {
	.asg-video-head {
		align-items: flex-start;
		gap: 16px;
	}

	.asg-video-arrow {
		width: 40px;
		height: 40px;
	}

	.asg-video-meta {
		padding: 14px 12px 12px;
	}

	.asg-video-title {
		font-size: 15px;
	}

	.asg-video-label {
		font-size: 10px;
	}

	.asg-video-modal {
		padding: 16px;
	}

	.asg-video-close {
		top: -42px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asg-video-track {
		scroll-behavior: auto;
	}

	.asg-video-img,
	.asg-video-play,
	.asg-video-arrow {
		transition: none;
	}

	.asg-video-card:hover .asg-video-img,
	.asg-video-card:hover .asg-video-play {
		transform: none;
	}

	.asg-video-modal-backdrop {
		animation: none;
	}
}

/* ---- Small phones (iPhone SE / 320-400px) ----
   At 320px the 2-per-view row gives a 140px card, and a caption like
   "The Art of the Counted Thread" wraps to four lines over a play
   button. One card per view keeps the type readable. */

@media (max-width: 400px) {
	.asg-video-carousel {
		--asg-video-columns: 1;
		--asg-video-gap: 10px;
		--asg-video-play-size: 54px;
	}

	.asg-video-heading {
		font-size: 26px;
	}

	.asg-video-eyebrow {
		font-size: 11px;
		letter-spacing: .14em;
	}

	.asg-video-arrow {
		width: 36px;
		height: 36px;
	}

	.asg-video-arrow svg {
		width: 15px;
		height: 15px;
	}

	.asg-video-title {
		font-size: 16px;
	}

	.asg-video-meta {
		padding: 14px 14px 12px;
	}

	/* A single portrait card at full width is very tall, so the popup
	   player needs the full viewport rather than a 16px inset. */
	.asg-video-modal {
		padding: 10px;
	}

	.asg-video-stage[data-shape="portrait"] {
		height: min(76vh, 720px);
		width: calc(min(76vh, 720px) * 0.5625);
		max-width: 96vw;
	}
}
