/**
 * BRO Electrical — Testimonials page (page-testimonials.php).
 * Editorial review layout: varied hierarchy via typography/spacing,
 * not a rigid grid of identical cards. No boxed cards, no shadows.
 */

.bro-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.bro-testimonials section {
	padding: var(--bro-section-spacing) 0;
}

/* More noticeable text reveal than the site-wide default (was 18px /
   700ms) — scoped to this page only via the .bro-testimonials ancestor,
   so no other page is affected. Still the same shared .bro-reveal-fade
   mechanism/observer, just stronger parameters here. */
.bro-js .bro-testimonials .bro-reveal-fade {
	transform: translateY(26px);
	transition-duration: 650ms;
}

/* Explicit override so this page's higher-specificity rule above can
   never fight the shared reduced-motion rule (defined in another
   stylesheet) on cross-file cascade order/specificity. */
@media (prefers-reduced-motion: reduce) {
	.bro-testimonials .bro-reveal-fade {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

.bro-testimonials__hero,
.bro-testimonials__pair,
.bro-testimonials__featured-block {
	background: var(--bro-white);
}

.bro-testimonials__pair--alt {
	background: var(--bro-offwhite);
}

.bro-testimonials__trust {
	background: var(--bro-offwhite);
}

.bro-testimonials__featured-block--dark {
	background: var(--bro-charcoal);
}

.bro-testimonials__cta {
	background: var(--bro-charcoal);
	text-align: center;
}

/* ---- Hero / intro ---- */

.bro-testimonials__heading {
	font-size: var(--bro-text-hero);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	color: var(--bro-text-on-light);
	max-width: 20ch;
	margin: 0 0 1.5rem;
}

.bro-testimonials__lead {
	font-size: var(--bro-text-lg);
	line-height: 1.6;
	color: var(--bro-text-muted-on-light);
	max-width: 60ch;
	margin: 0 0 1.25rem;
}

.bro-testimonials__note {
	font-family: var(--bro-font-display);
	font-size: var(--bro-text-sm);
	font-weight: 600;
	color: var(--bro-text-on-light);
	margin: 0;
}

.bro-testimonials__heading.bro-reveal-fade {
	transition-delay: 150ms;
}

.bro-testimonials__lead.bro-reveal-fade {
	transition-delay: 300ms;
}

.bro-testimonials__note.bro-reveal-fade {
	transition-delay: 450ms;
}

/* ---- Shared review meta ---- */

.bro-review__stars {
	display: inline-block;
	color: var(--bro-orange);
	letter-spacing: 0.15em;
	font-size: var(--bro-text-sm);
	margin: 0 0 0.85rem;
}

.bro-review__source {
	font-family: var(--bro-font-display);
	font-size: var(--bro-text-xs);
	font-weight: 700;
	letter-spacing: var(--bro-tracking-label);
	text-transform: uppercase;
	color: var(--bro-text-muted-on-light);
	margin: 0 0 0.5em;
}

.bro-review__attribution {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.75em;
	margin-top: 1.5rem;
}

/* Attribution follows slightly after the quotation. */
.bro-review__attribution.bro-reveal-fade {
	transition-delay: 150ms;
}

.bro-review__name {
	font-family: var(--bro-font-display);
	font-weight: 700;
	color: var(--bro-text-on-light);
}

.bro-review__descriptor {
	font-size: var(--bro-text-sm);
	color: var(--bro-text-muted-on-light);
}

.bro-review__badge {
	font-family: var(--bro-font-display);
	font-size: var(--bro-text-xs);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bro-orange);
	border: 1px solid var(--bro-orange);
	border-radius: var(--bro-radius-sm);
	padding: 0.2em 0.6em;
}

/* ---- Featured reviews (large pull-quote treatment) ---- */

.bro-review--featured {
	position: relative;
	max-width: 52rem;
	transition: transform var(--bro-transition-base);
}

.bro-review--featured::before {
	content: '\201C';
	display: block;
	font-family: var(--bro-font-display);
	font-size: clamp(4rem, 9vw, 7rem);
	line-height: 1;
	color: var(--bro-orange);
	opacity: 0.35;
	margin: 0 0 -0.5rem;
	transition: opacity var(--bro-transition-base);
}

/* Quote-mark entrance + hairline draw, tied to the quote-block's own
   scroll reveal via :has(). Wrapped in @supports so browsers without
   :has() simply keep the always-visible resting state (no JS/browser
   feature is required for the content to appear). */
@supports selector(:has(*)) {
	.bro-js .bro-review--featured::before {
		opacity: 0;
		transform: translateY(8px) scale(0.92);
		transition: opacity 550ms var(--bro-ease), transform 550ms var(--bro-ease);
	}

	.bro-js .bro-review--featured:has(.bro-review__quote-block.is-visible)::before {
		opacity: 0.35;
		transform: translateY(0) scale(1);
	}

	.bro-js .bro-review--support::before {
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 550ms var(--bro-ease);
	}

	.bro-js .bro-review--support:has(.bro-review__quote-block.is-visible)::before {
		transform: scaleX(1);
	}

	.bro-review-pair > .bro-review--support:nth-child(2)::before {
		transition-delay: 150ms;
	}

	/* Higher-specificity hover override — the reveal rule above also
	   matches once a review has entered view, so the plain :hover rule
	   in the hover media block needs :has() repeated here to win. */
	@media (hover: hover) and (pointer: fine) {
		.bro-js .bro-review--featured:has(.bro-review__quote-block.is-visible):hover::before {
			opacity: 0.55;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.bro-review--featured::before {
		opacity: 0.35 !important;
		transform: none !important;
		transition: none !important;
	}

	.bro-review--support::before {
		transform: none !important;
		transition: none !important;
	}
}

@media (hover: hover) and (pointer: fine) {
	.bro-review--featured:hover,
	.bro-review--featured.is-visible:hover {
		transform: translateY(-2px);
	}

	.bro-review--featured:hover::before,
	.bro-review--featured.is-visible:hover::before {
		opacity: 0.55;
	}

	.bro-review--featured:hover .bro-review__descriptor {
		color: var(--bro-orange);
	}

	.bro-review--support:hover::before {
		background: var(--bro-orange);
	}
}

.bro-review--featured .bro-review__quote p {
	font-family: var(--bro-font-display);
	font-size: var(--bro-text-h3);
	font-weight: 500;
	line-height: 1.45;
	margin: 0 0 1.1rem;
}

.bro-review--featured .bro-review__quote p:last-child {
	margin-bottom: 0;
}

.bro-testimonials__featured-block .bro-review__quote p,
.bro-testimonials__featured-block .bro-review__source,
.bro-testimonials__featured-block .bro-review__name {
	color: var(--bro-text-on-light);
}

.bro-testimonials__featured-block .bro-review__descriptor {
	color: var(--bro-text-muted-on-light);
}

.bro-testimonials__featured-block--dark .bro-review__quote p,
.bro-testimonials__featured-block--dark .bro-review__name {
	color: var(--bro-white);
}

.bro-testimonials__featured-block--dark .bro-review__source,
.bro-testimonials__featured-block--dark .bro-review__descriptor {
	color: var(--bro-text-muted-on-dark);
}

/* ---- Supporting reviews (compact, paired) ---- */

.bro-review-pair {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(2.5rem, 5vw, 4rem);
}

.bro-review--support {
	flex: 1 1 320px;
	max-width: 36rem;
}

.bro-review--support::before {
	content: '';
	display: block;
	height: 1px;
	background: var(--bro-border-on-light);
	margin: 0 0 1.75rem;
}

.bro-review--support .bro-review__quote p {
	font-size: var(--bro-text-base);
	line-height: 1.65;
	color: var(--bro-text-muted-on-light);
	margin: 0 0 1rem;
}

.bro-review--support .bro-review__quote p:last-child {
	margin-bottom: 0;
}

.bro-review--support .bro-review__attribution {
	margin-top: 1.1rem;
}

.bro-review--support .bro-review__name {
	font-size: var(--bro-text-sm);
}

.bro-review--support .bro-review__descriptor {
	font-size: var(--bro-text-xs);
}

.bro-review-pair > .bro-review--support:nth-child(2) .bro-review__quote-block.bro-reveal-fade {
	transition-delay: 150ms;
}

.bro-review-pair > .bro-review--support:nth-child(2) .bro-review__attribution.bro-reveal-fade {
	transition-delay: 300ms;
}

/* ---- Mid-page trust statement ---- */

.bro-testimonials__trust {
	text-align: center;
}

.bro-testimonials__trust-heading {
	font-size: var(--bro-text-h2);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.005em;
	text-transform: uppercase;
	color: var(--bro-text-on-light);
	max-width: 24ch;
	margin: 0 auto 1.25rem;
}

.bro-testimonials__trust p {
	font-size: var(--bro-text-base);
	line-height: 1.65;
	color: var(--bro-text-muted-on-light);
	max-width: 50ch;
	margin: 0 auto;
}

.bro-testimonials__trust p.bro-reveal-fade {
	transition-delay: 150ms;
}

/* ---- Final CTA ---- */

.bro-testimonials__cta-heading {
	font-size: var(--bro-text-h1);
	font-weight: 800;
	line-height: 1.15;
	text-transform: uppercase;
	color: var(--bro-white);
	max-width: 22ch;
	margin: 0 auto 1.5rem;
}

.bro-testimonials__cta p {
	font-size: var(--bro-text-base);
	line-height: 1.65;
	color: var(--bro-text-muted-on-dark);
	max-width: 52ch;
	margin: 0 auto clamp(2rem, 4vw, 2.75rem);
}

.bro-testimonials__cta p.bro-reveal-fade {
	transition-delay: 150ms;
}

.bro-testimonials__cta-actions a.bro-reveal-fade:nth-child(1) {
	transition-delay: 300ms;
}

.bro-testimonials__cta-actions a.bro-reveal-fade:nth-child(2) {
	transition-delay: 450ms;
}

.bro-testimonials__cta-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

.bro-testimonials__cta-actions .bro-icon-arrow {
	width: 14px;
	height: 14px;
	transition: transform var(--bro-transition-base);
}

@media (hover: hover) and (pointer: fine) {
	.bro-testimonials__cta-actions a:hover .bro-icon-arrow,
	.bro-testimonials__cta-actions a:focus-visible .bro-icon-arrow {
		transform: translateX(4px);
	}
}

.bro-testimonials__cta-actions a:focus-visible .bro-icon-arrow {
	transform: translateX(4px);
}

@media (max-width: 600px) {
	.bro-testimonials__cta-actions {
		flex-direction: column;
	}

	.bro-testimonials__cta-actions .bro-btn {
		width: 100%;
	}
}
