/**
 * HD Testimonials - draggable scroll-snap carousel.
 */

.hd-t-carousel {
	display: flex;
	gap: 30px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 10px 4px 200px;
	cursor: grab;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.hd-t-carousel::-webkit-scrollbar {
	display: none;
}
.hd-t-carousel.hd-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

.hd-t-item {
	flex: 0 0 calc((100% - (var(--hd-t-cols, 3) - 1) * 30px) / var(--hd-t-cols, 3));
	scroll-snap-align: start;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 4px 22px rgba(16, 42, 67, 0.08);
	padding: 30px 26px 0;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.hd-t-carousel.hd-dragging .hd-t-item {
	pointer-events: none;
}

.hd-t-icon {
	color: #27c4e5;
	font-size: 24px;
	line-height: 1;
	margin-bottom: 12px;
}
.hd-t-text {
	font-size: 15px;
	line-height: 1.65;
	color: #546e7a;
	margin: 0 0 18px;
	display: -webkit-box;
	-webkit-line-clamp: 7;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* perfect circle avatar with a blue border, hanging half below the card */
.hd-t-avatar {
	position: relative;
	display: block;
	width: 336px;
	max-width: 92%;
	height: auto;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	border: 4px solid #16add0;
	overflow: hidden;
	margin: auto auto max(-168px, -46%); /* half the rendered circle: 92% width / 2 */
	flex: 0 0 auto;
	box-shadow: 0 10px 24px rgba(16, 42, 67, 0.18);
}
.hd-t-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 33%; /* faces sit ~2/3 up the source photos */
	display: block;
}
/* name inset near the bottom of the photo */
.hd-t-carousel .hd-t-avatar h4.hd-t-who {
	position: absolute;
	left: 12%;
	right: 12%;
	bottom: 34px;
	text-align: center;
	color: #fff !important;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}

.hd-t-carousel h4.hd-t-who {
	font-size: 15px !important;
	font-weight: 600;
	letter-spacing: 0.4px;
	color: #666 !important;
	margin: 0;
}

/* reviewer credit under the quote */
.hd-t-credit {
	display: block;
	font-size: 13px;
	font-style: italic;
	color: #78909c;
	margin: -8px 0 18px;
}

@media (max-width: 980px) {
	.hd-t-carousel { --hd-t-cols: 2; }
}
@media (max-width: 640px) {
	.hd-t-carousel { --hd-t-cols: 1; }
}

/* faint light-blue overlay on the photo when hovering the card or the photo */
.hd-t-avatar:after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(39, 196, 229, 0.28);
	opacity: 0;
	transition: opacity .25s ease;
	pointer-events: none;
	z-index: 1;
}
.hd-t-item:hover .hd-t-avatar:after {
	opacity: 1;
}
.hd-t-carousel .hd-t-avatar h4.hd-t-who {
	z-index: 2; /* name stays above the overlay */
}

/* grid layout (dedicated testimonials page): no scroll, wrap in rows;
   the hanging avatars need vertical room between rows */
.hd-t-grid {
	display: grid;
	grid-template-columns: repeat(var(--hd-t-cols, 3), 1fr);
	overflow: visible;
	scroll-snap-type: none;
	cursor: default;
	row-gap: 210px;
	column-gap: 30px;
	padding-bottom: 210px;
}
.hd-t-grid .hd-t-item {
	flex: none;
}
@media (max-width: 980px) {
	.hd-t-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.hd-t-grid { grid-template-columns: 1fr; }
}

/* grid page: breathing room from the band edges; border-box keeps the
   padding internal so the grid stays centered with no right overflow */
.hd-t-grid {
	box-sizing: border-box;
	width: 100%;
	padding-left: 34px;
	padding-right: 34px;
}

/* shuffled grids stay invisible until the client-side reorder finishes */
.hd-t-carousel[data-random="1"] {
	opacity: 0;
}
.hd-t-carousel[data-random="1"].hd-t-ready {
	opacity: 1 !important;
	/* no transition: a fade here can wedge at frame zero when the reveal
	   lands in the element's first style pass; instant is also fastest */
}

.hd-t-item--hidden {
	display: none;
}

/* agent filter bar */
.hd-t-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0 0 44px;
}
.hd-t-filter__btn {
	padding: 8px 24px;
	border: 1px solid #16add0;
	border-radius: 6px;
	background: #fff;
	color: #16add0;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all .2s ease;
}
.hd-t-filter__btn:hover,
.hd-t-filter__btn.is-active {
	background: #16add0;
	color: #fff;
}

/* grid blowout guard: let tracks shrink below item min-content */
.hd-t-grid .hd-t-item {
	min-width: 0;
	max-width: 100%;
}
.hd-t-grid .hd-t-avatar {
	max-width: min(336px, 92%);
}
