/**
 * DFL Testimonials — grid, or a scroll-snap carousel when there are more cards
 * than fit in a row.
 */

.dfl-tst {
	--dfl-per: 3;
	--dfl-gap: 24px;
	--dfl-card-align: start;
	--dfl-rating-align: center;

	position: relative;
	width: 100%;
}

.dfl-tst *,
.dfl-tst *::before,
.dfl-tst *::after {
	box-sizing: border-box;
}

/* -------------------------------- Header --------------------------------- */

.dfl-tst__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 34px;
}

.dfl-tst__eyebrow {
	margin-bottom: 12px;
	color: #8a8178;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.dfl-tst__heading {
	margin: 0;
	color: #14100b;
	font-size: 40px;
	font-weight: 500;
	line-height: 1.15;
}

.dfl-tst__header-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	color: #14100b;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color 250ms ease, gap 250ms ease;
}

.dfl-tst__header-link.is-underlined span {
	padding-bottom: 3px;
	border-bottom: 1px solid currentColor;
}

.dfl-tst__header-link:hover {
	gap: 12px;
	text-decoration: none;
}

.dfl-tst__header-link i,
.dfl-tst__header-link svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: 1.2em;
	fill: currentColor;
}

/* --------------------------------- Track --------------------------------- */

.dfl-tst--grid .dfl-tst__track {
	display: grid;
	grid-template-columns: repeat(var(--dfl-per, 3), minmax(0, 1fr));
	gap: var(--dfl-gap, 24px);
}

.dfl-tst--slider .dfl-tst__track {
	display: flex;
	gap: var(--dfl-gap, 24px);
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}

.dfl-tst--slider .dfl-tst__track::-webkit-scrollbar {
	display: none;
}

.dfl-tst--slider .dfl-tst__track.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

.dfl-tst--draggable .dfl-tst__track {
	cursor: grab;
}

.dfl-tst--slider .dfl-tst__item {
	flex: 0 0 calc((100% - (var(--dfl-per, 3) - 1) * var(--dfl-gap, 24px)) / var(--dfl-per, 3));
	scroll-snap-align: start;
}

.dfl-tst__item {
	display: flex;
	min-width: 0;
}

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

.dfl-tst__card {
	--dfl-text-gap: 26px;

	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	padding: 36px 32px;
	overflow: hidden;
	border: 1px solid rgba(20, 16, 11, 0.06);
	border-radius: 8px;
	background-color: #f8f6f2;
	text-align: var(--dfl-card-align, start);
	transition: border-color 300ms ease, box-shadow 300ms ease, transform 300ms ease;
}

/* -------------------------------- Quote ---------------------------------- */

.dfl-tst__quote {
	display: flex;
	color: rgba(20, 16, 11, 0.1);
	font-size: 46px;
	line-height: 1;
}

.dfl-tst__quote i,
.dfl-tst__quote svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: currentColor;
}

/* Watermark: pinned to the corner so it never pushes the text down. */
.dfl-tst--quote-corner .dfl-tst__quote {
	position: absolute;
	top: 26px;
	left: 30px;
	z-index: 0;
	margin: 0;
	pointer-events: none;
}

.dfl-tst--quote-corner .dfl-tst__rating,
.dfl-tst--quote-corner .dfl-tst__text,
.dfl-tst--quote-corner .dfl-tst__author {
	position: relative;
	z-index: 1;
}

.dfl-tst--quote-inline .dfl-tst__quote {
	align-self: var(--dfl-card-align, start);
	margin-bottom: 18px;
}

/* -------------------------------- Rating --------------------------------- */

.dfl-tst__rating {
	position: relative;
	display: block;
	align-self: var(--dfl-rating-align, center);
	margin-bottom: 16px;
	font-size: 16px;
	line-height: 1;
	letter-spacing: 2px;
	white-space: nowrap;
}

.dfl-tst__stars {
	display: block;
}

.dfl-tst__stars--empty {
	color: rgba(20, 16, 11, 0.14);
}

.dfl-tst__stars--filled {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--dfl-rating, 0%);
	overflow: hidden;
	color: #e9a13b;
}

/* --------------------------------- Text ---------------------------------- */

.dfl-tst__text {
	margin: 0 0 var(--dfl-text-gap, 26px);
	padding: 0;
	border: 0;
	color: #4a4238;
	font-size: 16px;
	line-height: 1.75;
	quotes: none;
}

.dfl-tst__text p {
	margin: 0;
}

.dfl-tst__text p + p {
	margin-top: 0.8em;
}

.dfl-tst__card > :last-child {
	margin-bottom: 0;
}

/* -------------------------------- Author --------------------------------- */

.dfl-tst__author {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 4px;
	text-align: start;
}

.dfl-tst--author-top .dfl-tst__quote {
	order: 1;
}

.dfl-tst--author-top .dfl-tst__author {
	order: 2;
	margin-top: 0;
	margin-bottom: var(--dfl-text-gap, 26px);
}

.dfl-tst--author-top .dfl-tst__rating {
	order: 3;
}

.dfl-tst--author-top .dfl-tst__text {
	order: 4;
	margin-bottom: 0;
}

.dfl-tst__avatar {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	border: 1px solid rgba(20, 16, 11, 0.1);
	border-radius: 50%;
	object-fit: cover;
}

.dfl-tst__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.dfl-tst__name {
	color: #14100b;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.dfl-tst__role {
	color: #9a9186;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 2px;
	line-height: 1.3;
	text-transform: uppercase;
}

/* ------------------------------ Navigation ------------------------------- */

.dfl-tst__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 32px;
}

.dfl-tst__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	margin: 0;
	border: 1px solid rgba(20, 16, 11, 0.18);
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0);
	color: #14100b;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: color 250ms ease, background-color 250ms ease, border-color 250ms ease, opacity 250ms ease;
}

.dfl-tst__arrow i,
.dfl-tst__arrow svg {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: currentColor;
}

.dfl-tst__arrow.is-disabled {
	opacity: 0.3;
	pointer-events: none;
}

.dfl-tst__bullets {
	display: flex;
	align-items: center;
	gap: 9px;
}

.dfl-tst__bullet {
	width: 8px;
	height: 8px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(20, 16, 11, 0.18);
	cursor: pointer;
	transition: background-color 250ms ease, transform 250ms ease;
}

.dfl-tst__bullet.is-active {
	background-color: #e9a13b;
	transform: scale(1.35);
}

.dfl-tst__bullet[hidden] {
	display: none;
}

.dfl-tst__arrow:focus-visible,
.dfl-tst__bullet:focus-visible,
.dfl-tst__header-link:focus-visible {
	outline: 2px solid #b08d45;
	outline-offset: 3px;
}

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

@media (max-width: 767px) {
	.dfl-tst__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.dfl-tst--arrows-hide-mobile .dfl-tst__arrow {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dfl-tst__card,
	.dfl-tst__arrow,
	.dfl-tst__bullet,
	.dfl-tst__header-link {
		transition-duration: 1ms;
	}
}
