/**
 * SNIPPET — append to assets/css/style.css (small and fully scoped to
 * .testimonial-* classes, so no separate file/conditional enqueue needed).
 *
 * Written without the original iframe sizing rule in front of me: check
 * what style.css currently gives `.testimonial-item iframe` (height /
 * aspect-ratio) and set `.testimonial-thumb` below to the same ratio so
 * the cards keep the original proportions. 16/9 is the assumption here.
 */

.testimonial-item {
	position: relative;
	margin-bottom: 24px;
}

.testimonial-play {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	overflow: hidden;
}

.testimonial-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover; /* crops YouTube's letterboxed hqdefault fallback */
	transition: transform 0.4s ease;
}

.testimonial-play:hover .testimonial-thumb,
.testimonial-play:focus-visible .testimonial-thumb {
	transform: scale(1.04);
}

/* Play button drawn in CSS (no icon asset): circle = ::before, triangle = ::after */
.testimonial-play::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 68px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 2px solid #fff;
	background: rgba(0, 0, 0, 0.55);
	transition: background 0.3s ease, transform 0.3s ease;
}

.testimonial-play::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-35%, -50%);
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent #fff;
}

.testimonial-play:hover::before,
.testimonial-play:focus-visible::before {
	background: rgba(0, 0, 0, 0.8);
	transform: translate(-50%, -50%) scale(1.08);
}

/* Modal */
.testimonial-modal .modal-content {
	position: relative;
	background: #000;
	border: 0;
	border-radius: 0;
}

.testimonial-modal-close {
	position: absolute;
	top: -44px;
	right: 0;
	z-index: 2;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.testimonial-modal-frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 767px) {
	.testimonial-play::before {
		width: 56px;
		height: 56px;
	}
}
