/* Testimonials Grid — front-end styles */

.tmg-wrap {
	--tmg-accent: #c9963c;
	--tmg-text: #222;
	--tmg-muted: #6b6b6b;
	--tmg-border: #ececec;
	--tmg-card-bg: #fff;
	--tmg-star-off: #dcdcdc;
	--tmg-radius: 8px;
	--tmg-gap: 18px;
	box-sizing: border-box;
	width: 100%;
	color: var(--tmg-text);
	font-size: 15px;
	line-height: 1.55;
}
.tmg-wrap *,
.tmg-wrap *::before,
.tmg-wrap *::after {
	box-sizing: inherit;
}
.tmg-wrap.is-loading .tmg-grid {
	opacity: .55;
	transition: opacity .2s;
}

/* ---- Tabs -------------------------------------------------------------- */

.tmg-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 8px;
	margin: 0 0 22px;
	padding: 0 4px;
	border-bottom: 1px solid var(--tmg-border);
}
.tmg-tab {
	flex: 0 0 auto;
	appearance: none;
	background: none;
	border: 0;
	border-bottom: 2px solid transparent;
	margin: 0 0 -1px;
	padding: 14px 18px 15px;
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--tmg-muted);
	cursor: pointer;
	white-space: nowrap;
	transition: color .15s, border-color .15s;
}
.tmg-tab:hover,
.tmg-tab:focus-visible {
	color: var(--tmg-text);
	outline: none;
}
.tmg-tab:focus-visible {
	box-shadow: inset 0 0 0 2px var(--tmg-accent);
	border-radius: 4px;
}
.tmg-tab.is-active {
	color: var(--tmg-text);
	border-bottom-color: var(--tmg-accent);
}

/* ---- Summary bar --------------------------------------------------------- */

.tmg-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 0;
	margin: 0 0 26px;
	font-size: 13.5px;
	color: var(--tmg-muted);
}
.tmg-summary-rating {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.tmg-summary-avg {
	color: var(--tmg-text);
	font-weight: 500;
}
.tmg-summary-sep {
	display: inline-block;
	width: 1px;
	height: 22px;
	margin: 0 22px;
	background: var(--tmg-border);
}
.tmg-summary .tmg-stars svg {
	width: 17px;
	height: 17px;
}

/* ---- Grid & cards -------------------------------------------------------- */

.tmg-grid {
	display: grid;
	grid-template-columns: repeat(var(--tmg-cols, 3), minmax(0, 1fr));
	gap: var(--tmg-gap);
	margin: 0;
}
.tmg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 240px;
	padding: 20px 24px 20px;
	background: var(--tmg-card-bg);
	border: 1px solid var(--tmg-border);
	border-radius: var(--tmg-radius);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.tmg-quote-mark {
	display: block;
	height: 26px;
	margin: -2px 0 6px -2px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 44px;
	font-weight: 700;
	line-height: 1;
	color: var(--tmg-accent);
	user-select: none;
}
.tmg-text {
	flex: 1 1 auto;
	margin: 0 0 22px;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--tmg-text);
}
.tmg-text p {
	margin: 0 0 .8em;
}
.tmg-text p:last-child {
	margin-bottom: 0;
}
.tmg-foot {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: auto;
}
.tmg-label {
	font-size: 11px;
	letter-spacing: .02em;
	color: var(--tmg-muted);
}
.tmg-dash {
	margin-right: 2px;
}
.tmg-empty {
	grid-column: 1 / -1;
	margin: 30px 0;
	text-align: center;
	color: var(--tmg-muted);
}

/* ---- Stars ---------------------------------------------------------------- */

.tmg-stars {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	line-height: 0;
	white-space: nowrap;
}
.tmg-stars svg {
	width: 15px;
	height: 15px;
	fill: var(--tmg-star-off);
	display: block;
}
.tmg-star.is-on svg {
	fill: var(--tmg-accent);
}
.tmg-stars--frac {
	position: relative;
	display: inline-block;
	gap: 0;
}
.tmg-stars--frac .tmg-stars-base,
.tmg-stars--frac .tmg-stars-fill {
	display: inline-flex;
	gap: 3px;
	white-space: nowrap;
}
.tmg-stars--frac .tmg-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
}
.tmg-stars--frac .tmg-stars-fill svg {
	fill: var(--tmg-accent);
	flex: 0 0 auto;
}

/* ---- Load more ------------------------------------------------------------- */

.tmg-actions {
	margin: 28px 0 0;
	text-align: center;
}
.tmg-more {
	appearance: none;
	display: inline-block;
	min-width: 190px;
	padding: 13px 34px;
	background: transparent;
	border: 1px solid var(--tmg-accent);
	border-radius: 4px;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--tmg-text);
	cursor: pointer;
	transition: background .15s, color .15s;
}
.tmg-more:hover,
.tmg-more:focus-visible {
	background: var(--tmg-accent);
	color: #fff;
	outline: none;
}
.tmg-more:disabled {
	opacity: .6;
	cursor: default;
}
.tmg-more[hidden] {
	display: none;
}

/* ---- Entrance animation for freshly loaded cards ----------------------- */

.tmg-card.tmg-enter {
	animation: tmg-fade-up .35s ease both;
}
@keyframes tmg-fade-up {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.tmg-card.tmg-enter { animation: none; }
}

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

@media (max-width: 900px) {
	.tmg-grid { grid-template-columns: repeat(min(var(--tmg-cols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.tmg-grid { grid-template-columns: minmax(0, 1fr); }
	.tmg-tab { padding: 10px 12px 11px; font-size: 11px; }
	.tmg-card { min-height: 0; }
	.tmg-summary-sep { display: none; }
	.tmg-summary { flex-direction: column; gap: 6px; }
}
