/**
 * HTPLaw Testimonials widget.
 *
 * Measured from the 4x Figma export (design px, section top = 0 at y3566,
 * height 641): white band. Centred eyebrow (centre 58.5) and heading 43/50
 * (−3%, box at 81). Cards at 173: 3 columns with 20px gaps, 395px tall,
 * #0f2a3f, 6px radius. Inside a card: quote mark 50×36 at (27, 42) (cut
 * from the export, used as a mask so its colour follows the text colour);
 * quote Inter 17/23 −3% white at 148, 24px left / ~22px right padding;
 * 46px round photo at 319; name and role Source Serif 4 400 15/20 −3%
 * white, 17px right of the photo; 30px bottom padding. Bottom padding 73.
 *
 * Not in Figma: initials circle when there's no photo, optional disclaimer,
 * one centred column (max 560px) below 900px.
 */

.htplaw-tm {
	--_bg: var(--htplaw-tm-bg, var(--htplaw-color-surface));
	--_card-bg: var(--htplaw-tm-card-bg, var(--htplaw-color-secondary));
	--_card-text: var(--htplaw-tm-card-text, #ffffff);

	padding-top: var(--htplaw-tm-pad-top, 48px);
	padding-bottom: var(--htplaw-tm-pad-bottom, 73px);
	background: var(--_bg);
	text-align: center;
}

.htplaw-tm__eyebrow {
	margin-bottom: 12px;
	text-transform: uppercase;
}

.htplaw-tm__title {
	margin-bottom: 42px;
}

.htplaw-tm__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

.htplaw-tm__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 395px;
	margin: 0;
	padding: 42px 22px 30px 24px;
	border-radius: var(--htplaw-radius);
	background: var(--_card-bg);
	color: var(--_card-text);
}

.htplaw-tm__mark {
	display: block;
	width: 50px;
	height: 36px;
	margin-left: 3px;
	background: currentColor;
	-webkit-mask: url("../../images/quote-mark@4x.png") no-repeat 0 0 / 100% 100%;
	mask: url("../../images/quote-mark@4x.png") no-repeat 0 0 / 100% 100%;
}

.htplaw-tm__quote {
	margin: 70px 0 0;
	padding: 0;
	border: 0;
	font-family: var(--htplaw-font-body);
	font-size: 17px;
	font-style: normal;
	letter-spacing: -.03em;
	line-height: 23px;
}

.htplaw-tm__quote p {
	margin: 0;
	color: inherit;
}

/* Hello Elementor styles figcaption #333 italic; the card sets its own. */
.htplaw-tm__person {
	display: flex;
	align-items: center;
	gap: 17px;
	margin-top: auto;
	padding-top: 33px;
	color: inherit;
	font-style: normal;
}

.htplaw-tm__photo {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	object-fit: cover;
}

.htplaw-tm__photo--initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--htplaw-color-on-dark);
	color: var(--_card-bg);
	font-family: var(--htplaw-font-heading);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .02em;
}

.htplaw-tm__meta {
	display: flex;
	flex-direction: column;
	font-family: var(--htplaw-font-heading);
	font-size: 15px;
	font-weight: 400;
	letter-spacing: -.03em;
	line-height: 20px;
}

.htplaw-tm__name {
	font-style: normal;
}

.htplaw-tm__disclaimer {
	max-width: 760px;
	margin: 24px auto 0;
	color: var(--htplaw-color-secondary);
	font-family: var(--htplaw-font-body);
	font-size: 13px;
	line-height: 1.5;
}

/* Three columns hold down to 900px; below that one centred column, so a
   third card never sits alone on a two-column row. */
@media (max-width: 900px) {
	.htplaw-tm {
		padding-top: var(--htplaw-tm-pad-top, 56px);
		padding-bottom: var(--htplaw-tm-pad-bottom, 56px);
	}

	.htplaw-tm__list {
		grid-template-columns: minmax(0, 560px);
		justify-content: center;
	}

	.htplaw-tm__card {
		min-height: 0;
	}

	.htplaw-tm__quote {
		margin-top: 32px;
	}
}

/* Mobile spacing: section padding is capped at the shared mobile token
   (variables.css), so large desktop values set in Elementor don't carry
   over to tablets and phones; smaller custom values are kept. */
@media (max-width: 900px) {
	.htplaw-tm {
		padding-top: min(var(--htplaw-tm-pad-top, var(--htplaw-space-section)), var(--htplaw-space-section));
		padding-bottom: min(var(--htplaw-tm-pad-bottom, var(--htplaw-space-section)), var(--htplaw-space-section));
	}
}
