/**
 * Reviews / Testimonials page styles.
 *
 * Feature "Reviews / Testimonials page" — US-001 (layout) + US-002 (empty
 * state, star animation, card hover polish, CTA band). Scoped under
 * .reviews-page so component classes can never leak onto the header nav or
 * other pages. Uses the theme design tokens defined in responsive.css and
 * falls back to sensible values if that stylesheet is ever absent.
 *
 * Static page — no JavaScript. Star fills and card entrances are pure CSS and
 * are neutralised under prefers-reduced-motion.
 */

.reviews-page {
	background: var(--mytheme-bg, #f5f7fa);
	color: var(--mytheme-ink, #16202c);
}

.reviews-page .site-container {
	width: 100%;
	max-width: var(--mytheme-maxw, 1100px);
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ---- Hero / summary --------------------------------------------------- */

.reviews-hero {
	background:
		linear-gradient(135deg, rgba(16, 32, 44, 0.94), rgba(16, 32, 44, 0.82)),
		radial-gradient(circle at 85% 15%, rgba(200, 40, 30, 0.35), transparent 55%);
	color: #fff;
	padding-block: clamp(3rem, 7vw, 5.5rem);
	text-align: center;
}

.reviews-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}

.reviews-hero__eyebrow {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #ffd7d3;
}

.reviews-hero__title {
	margin: 0;
	font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.reviews-hero__subtitle {
	margin: 0;
	max-width: 46rem;
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
	color: rgba(255, 255, 255, 0.86);
}

.reviews-summary {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1rem;
	padding: 0.85rem 1.4rem;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--mytheme-radius, 12px);
	backdrop-filter: blur(4px);
}

.reviews-summary__score {
	font-size: 2.5rem;
	font-weight: 800;
	line-height: 1;
}

.reviews-summary__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
}

.reviews-summary__count {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.85);
}

/* ---- Star rating (partial-fill, supports half stars) ------------------ */

.reviews-page .rc-stars {
	position: relative;
	display: inline-block;
	white-space: nowrap;
	font-size: 1.125rem;
	line-height: 1;
	letter-spacing: 0.1em;
}

.reviews-page .rc-stars__track {
	color: rgba(120, 130, 145, 0.45);
}

.reviews-page .rc-stars__fill {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	overflow: hidden;
	color: #f4b400;
	/* Reveal the pre-sized fill left-to-right on load; the inline width holds
	   the true rating so the final state is always accurate. */
	animation: reviews-star-fill var(--mytheme-duration, 220ms) 220ms var(--mytheme-ease, ease-out) both;
}

.reviews-summary__stars {
	font-size: 1.5rem;
}

@keyframes reviews-star-fill {
	from {
		clip-path: inset(0 100% 0 0);
	}
	to {
		clip-path: inset(0 0 0 0);
	}
}

/* ---- Reviews grid ----------------------------------------------------- */

.reviews-list {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.reviews-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1rem, 2.5vw, 1.75rem);
}

@media (max-width: 900px) {
	.reviews-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.reviews-grid {
		grid-template-columns: 1fr;
	}
}

.review-card {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	background: var(--mytheme-surface, #fff);
	border: 1px solid var(--mytheme-border, #e3e8ef);
	border-radius: var(--mytheme-radius, 12px);
	box-shadow: var(--mytheme-shadow, 0 6px 20px rgba(16, 32, 44, 0.08));
	padding: clamp(1.25rem, 3vw, 1.75rem);
	transition:
		transform var(--mytheme-duration, 220ms) var(--mytheme-ease, ease),
		box-shadow var(--mytheme-duration, 220ms) var(--mytheme-ease, ease),
		border-color var(--mytheme-duration, 220ms) var(--mytheme-ease, ease);
	/* Staggered entrance (delay set inline per card via --review-delay). */
	animation: reviews-card-in 420ms var(--mytheme-ease, ease-out) both;
	animation-delay: var(--review-delay, 0ms);
}

.review-card:hover,
.review-card:focus-within {
	transform: translateY(-6px);
	box-shadow: var(--mytheme-shadow-lg, 0 16px 40px rgba(16, 32, 44, 0.14));
	border-color: var(--mytheme-accent, #c8281e);
}

@keyframes reviews-card-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.review-card__top {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.review-card__avatar {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: var(--mytheme-radius-full, 999px);
	overflow: hidden;
	color: #fff;
	font-weight: 700;
	font-size: 1.125rem;
	text-transform: uppercase;
}

.review-card__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.review-card__id {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.review-card__name {
	font-weight: 700;
	color: var(--mytheme-ink, #16202c);
}

.review-card__date {
	font-size: 0.8125rem;
	color: var(--mytheme-muted, #5a6675);
}

.review-card__quote {
	margin: 0;
	color: var(--mytheme-ink, #16202c);
}

.review-card__quote p {
	margin: 0 0 0.6em;
}

.review-card__quote p:last-child {
	margin-bottom: 0;
}

/* ---- Empty state ------------------------------------------------------ */

.reviews-empty {
	max-width: 34rem;
	margin-inline: auto;
	text-align: center;
	background: var(--mytheme-surface, #fff);
	border: 1px solid var(--mytheme-border, #e3e8ef);
	border-radius: var(--mytheme-radius, 12px);
	box-shadow: var(--mytheme-shadow, 0 6px 20px rgba(16, 32, 44, 0.08));
	padding: clamp(2rem, 5vw, 3rem);
}

.reviews-empty__icon {
	display: inline-flex;
	color: var(--mytheme-accent, #c8281e);
}

.reviews-empty__title {
	margin: 0.75rem 0 0.4rem;
	font-size: 1.5rem;
}

.reviews-empty__text {
	margin: 0 0 1.5rem;
	color: var(--mytheme-muted, #5a6675);
	font-size: 1.0625rem;
}

.reviews-empty__actions,
.reviews-cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

/* ---- Buttons ---------------------------------------------------------- */

.reviews-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--mytheme-touch, 44px);
	padding: 0.7rem 1.5rem;
	border-radius: var(--mytheme-radius-sm, 8px);
	font-weight: 700;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition:
		transform var(--mytheme-duration, 220ms) var(--mytheme-ease, ease),
		background var(--mytheme-duration, 220ms) var(--mytheme-ease, ease),
		color var(--mytheme-duration, 220ms) var(--mytheme-ease, ease);
}

.reviews-btn:hover {
	transform: translateY(-2px);
}

.reviews-btn--primary {
	background: var(--mytheme-accent, #c8281e);
	color: #fff;
	border-color: var(--mytheme-accent, #c8281e);
}

.reviews-btn--primary:hover {
	background: var(--mytheme-accent-dark, #a71d15);
	border-color: var(--mytheme-accent-dark, #a71d15);
}

.reviews-btn--ghost {
	background: transparent;
	color: var(--mytheme-accent, #c8281e);
	border-color: var(--mytheme-accent, #c8281e);
}

.reviews-btn--ghost:hover {
	background: var(--mytheme-accent, #c8281e);
	color: #fff;
}

.reviews-btn--ghost-light {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.7);
}

.reviews-btn--ghost-light:hover {
	background: #fff;
	color: var(--mytheme-ink, #16202c);
	border-color: #fff;
}

.reviews-btn:focus-visible {
	outline: 3px solid var(--mytheme-accent, #c8281e);
	outline-offset: 2px;
}

/* ---- Closing CTA band ------------------------------------------------- */

.reviews-cta {
	background:
		linear-gradient(135deg, rgba(16, 32, 44, 0.96), rgba(30, 46, 62, 0.9));
	color: #fff;
	padding-block: clamp(2.75rem, 6vw, 4.5rem);
}

.reviews-cta__inner {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
}

.reviews-cta__heading {
	margin: 0;
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem);
	letter-spacing: -0.01em;
}

.reviews-cta__text {
	margin: 0;
	max-width: 42rem;
	color: rgba(255, 255, 255, 0.86);
	font-size: 1.0625rem;
}

.reviews-cta__actions {
	margin-top: 0.5rem;
}

/* ---- Motion safety ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.review-card,
	.reviews-page .rc-stars__fill {
		animation: none;
	}

	.review-card:hover,
	.review-card:focus-within,
	.reviews-btn:hover {
		transform: none;
	}
}
