/* Video review cards for the Ads White page (#reviews) — ported from the LeadyWaves
   Home Page 2 "Customers" section (assets/css/home-v2.css, section 7).
   Markup: page-templates/template-ads-white.php · JS: assets/js/aw-rev.js */
.aw-rev-wrap {
	--h2-pad: var(--aw-gutter, clamp(16px, 2.1vw, 40px));
	--h2-ink: #0b0b0b;
	--h2-muted: #6b6b6b;
	--h2-ease: cubic-bezier(.22, 1, .36, 1);
	--h2-head: inherit;
	--h2-body: inherit;
	--h2-space: 0px;
	margin-top: clamp(36px, 4vw, 64px);
}
/* ==========================================================================
   7. CUSTOMERS — expanding video cards
   ========================================================================== */
.h2-rev {
	--rv-h: clamp(380px, 36vw, 600px);
	--rv-gap: clamp(10px, 1vw, 16px);
	--rv-grow: 4.2;          /* how much wider the open card is */
	padding: var(--h2-space) 0;
}
.h2-rev__head { text-align: center; margin: 0 auto clamp(36px, 4vw, 64px); padding: 0 var(--h2-pad); }
.h2-rev__heading {
	margin: 0;
	font-family: var(--h2-head) !important;
	font-size: clamp(28px, 3.25vw, 50px);
	line-height: 100%;
	letter-spacing: 0px;
}

.h2-rev__track {
	display: flex;
	gap: var(--rv-gap);
	padding: 0 var(--h2-pad);
}

.h2-rev__card {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	transition: flex-grow .85s var(--h2-ease);
}
.h2-rev__card.is-active { flex-grow: var(--rv-grow); }

.h2-rev__media {
	position: relative;
	height: var(--rv-h);
	border-radius: 14px;
	overflow: hidden;
	background: #ececec;
	cursor: pointer;
	isolation: isolate;
	outline: none;
}
.h2-rev__media:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #111; }

.h2-rev__cover {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(10px) saturate(.75);
	transform: scale(1.12);
	transition: filter .8s var(--h2-ease), transform 1s var(--h2-ease);
}
.h2-rev__card.is-active .h2-rev__cover { filter: none; transform: none; }

.h2-rev__shade {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(255, 255, 255, .38);
	transition: background .7s var(--h2-ease);
	pointer-events: none;
}
.h2-rev__card:not(.is-active) .h2-rev__media:hover .h2-rev__shade { background: rgba(255, 255, 255, .2); }
.h2-rev__card.is-active .h2-rev__shade {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .62) 100%);
}

/* things only the open card shows */
.h2-rev__play,
.h2-rev__logo,
.h2-rev__quote {
	opacity: 0;
	transition: opacity .3s ease, transform .6s var(--h2-ease);
	pointer-events: none;
}
.h2-rev__card.is-active .h2-rev__play,
.h2-rev__card.is-active .h2-rev__logo,
.h2-rev__card.is-active .h2-rev__quote {
	opacity: 1;
	transform: none;
	transition-delay: .4s;
}

.h2-rev__play {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px 8px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	color: #111;
	font-family: var(--h2-body);
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	transform: translateY(-8px);
}
.h2-rev__play svg { width: 13px; height: 13px; }
.h2-rev__card.is-active .h2-rev__media:hover .h2-rev__play { background: #fff; }

.h2-rev__logo {
	position: absolute;
	top: 20px;
	left: 50%;
	z-index: 3;
	width: clamp(52px, 4.4vw, 76px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
	display: grid;
	place-items: center;
	overflow: hidden;
	transform: translate(-50%, -8px);
}
.h2-rev__card.is-active .h2-rev__logo { transform: translate(-50%, 0); }
.h2-rev__logo img { width: 100%; height: 100%; object-fit: cover; }

.h2-rev__quote {
	position: absolute;
	left: clamp(18px, 2vw, 32px);
	right: clamp(18px, 2vw, 32px);
	bottom: clamp(18px, 2vw, 30px);
	z-index: 3;
	margin: 0;
	transform: translateY(12px);
}
.h2-rev__quote p {
	margin: 0;
	max-width: 30em;
	font-family: var(--h2-head);
	font-weight: 500;
	font-size: clamp(18px, 1.6vw, 28px);
	line-height: 1.25;
	color: #fff;
	text-shadow: 0 1px 14px rgba(0, 0, 0, .35);
}

/* the playing video */
.h2-rev__player {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: none;
	background: transparent;
}
.h2-rev__player video,
.h2-rev__player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: contain !important;          /* whole video visible — faces are never cut */
	background: transparent !important;
}
.h2-rev__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 6;
	display: none;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #111;
	cursor: pointer;
	place-items: center;
}
.h2-rev__close svg { width: 18px; height: 18px; }
.h2-rev__sound {
	position: absolute;
	left: 50%;
	bottom: 70px;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px 10px 12px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font-family: var(--h2-body);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	transform: translateX(-50%);
	animation: h2-pulse 2s ease-in-out infinite;
}
.h2-rev__sound[hidden] { display: none; }
.h2-rev__sound svg { width: 18px; height: 18px; }
@keyframes h2-pulse { 50% { transform: translateX(-50%) scale(1.06); } }
.h2-rev__card.is-playing .h2-rev__player { display: block; }

/* while a video plays: the cover behind it turns into a blurred, darker
   backdrop that fills the space beside / above the video */
.h2-rev__card.is-playing .h2-rev__cover {
	filter: blur(28px) brightness(.55) saturate(1.15) !important;
	transform: scale(1.25) !important;
}
.h2-rev__card.is-playing .h2-rev__shade { background: rgba(0, 0, 0, .15); }
.h2-rev__card.is-playing .h2-rev__play,
.h2-rev__card.is-playing .h2-rev__logo { opacity: 0; transition-delay: 0s; }

/* the caption stays on the open card all the time — also while the video plays,
   just above the player controls */
.h2-rev__card.is-playing .h2-rev__quote {
	z-index: 7 !important;
	opacity: 1 !important;
	left: 0;
	right: 0;
	bottom: 0;                    /* the fade runs right down to the bottom edge */
	padding: 90px clamp(18px, 2vw, 32px) clamp(18px, 2vw, 30px);
	background: linear-gradient(0deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
}
.h2-rev__card.is-playing .h2-rev__media { cursor: pointer; }

/* play icon in the middle while the video is paused */
.h2-rev__state {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 6;
	width: 76px;
	height: 76px;
	margin: -38px 0 0 -38px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #111;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	opacity: 0;
	transform: scale(.8);
	transition: opacity .3s ease, transform .4s var(--h2-ease);
	pointer-events: none;
}
.h2-rev__state svg { width: 28px; height: 28px; margin-left: 4px; }
.h2-rev__card.is-paused .h2-rev__state { opacity: 1; transform: none; }
.h2-rev__card.is-playing .h2-rev__quote p { font-size: clamp(16px, 1.3vw, 22px); }
.h2-rev__card.is-playing .h2-rev__sound { top: 18px; bottom: auto; }
.h2-rev__card.is-playing .h2-rev__close { display: grid; }

/* ---- captions: the line being spoken, at the bottom of the playing video ---- */
.h2-rev__cc {
	position: absolute;
	left: clamp(18px, 2vw, 32px);
	right: clamp(18px, 2vw, 32px);
	bottom: clamp(20px, 2.2vw, 34px);
	z-index: 8;
	text-align: center;
	pointer-events: none;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .35s var(--h2-ease);
}
.h2-rev__cc-line {
	display: inline;
	padding: .2em .55em;
	border-radius: 6px;
	background: rgba(0, 0, 0, .72);
	color: #fff;
	font-family: var(--h2-body);
	font-size: clamp(15px, 1.15vw, 20px);
	font-weight: 500;
	line-height: 1.6;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.h2-rev__card.is-playing.has-cc-line .h2-rev__cc { opacity: 1; transform: none; }
.h2-rev.is-cc-off .h2-rev__cc { opacity: 0 !important; }

/* while captions run, the fixed quote steps aside */
.h2-rev:not(.is-cc-off) .h2-rev__card.is-playing.has-cc .h2-rev__quote p {
	opacity: 0;
	transition: opacity .3s ease;
}

/* CC on/off (top-left, only while playing) */
.h2-rev__ccbtn {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 8;
	display: none;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 14px 0 11px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	color: #111;
	font-family: var(--h2-body);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	cursor: pointer;
}
.h2-rev__ccbtn svg { width: 18px; height: 18px; }
.h2-rev__card.is-playing .h2-rev__ccbtn { display: inline-flex; }
.h2-rev__ccbtn[aria-pressed="false"] { background: rgba(0, 0, 0, .5); color: #fff; }
.h2-rev__ccbtn[aria-pressed="false"] span { text-decoration: line-through; }
.h2-rev__ccbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.h2-rev__meta {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding-top: 14px;
	min-width: 0;
}
.h2-rev__name,
.h2-rev__company {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-family: var(--h2-body);
}
.h2-rev__name { font-size: 20px; font-weight: 500; font-family:var(--h2-head); color: var(--h2-ink); }
.h2-rev__company { font-size: 15px; color: var(--h2-muted); }

.h2-rev__nav {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: clamp(24px, 3vw, 40px);
}
.h2-rev__arrow {
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	border: 1px solid #d9d9d9;
	border-radius: 50%;
	background: #fff;
	color: #111;
	cursor: pointer;
	transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.h2-rev__arrow svg { width: 18px; height: 18px; }
.h2-rev__arrow:hover { background: #111; border-color: #111; color: #fff; }


/* phones — swipe slider, every card shows its video */
@media (max-width: 767px) {
	.h2-rev { --rv-h: 480px; }
	.h2-rev__track {
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 2px;
	}
	.h2-rev__track::-webkit-scrollbar { display: none; }
	.h2-rev__card,
	.h2-rev__card.is-active {
		flex: 0 0 84%;
		scroll-snap-align: center;
	}
	.h2-rev__card:not(.is-playing) .h2-rev__cover { filter: none; transform: none; }
	.h2-rev__card .h2-rev__shade { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .65) 100%) !important; }
	.h2-rev__card .h2-rev__play,
	.h2-rev__card .h2-rev__logo,
	.h2-rev__card .h2-rev__quote { opacity: 1; transform: none; transition-delay: 0s; }
	.h2-rev__card .h2-rev__logo { transform: translate(-50%, 0); }
	.h2-rev__card.is-playing .h2-rev__play,
	.h2-rev__card.is-playing .h2-rev__logo { opacity: 0; }
	.h2-rev__quote p { font-size: 19px; }
	.h2-rev__cc { left: 12px; right: 12px; bottom: 16px; }
	.h2-rev__cc-line { font-size: 15px; }
	.h2-rev__ccbtn { height: 36px; top: 12px; left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.h2-rev__card, .h2-rev__cover { transition: none; }
}
