:root {
	--exegypt-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Shared star rating
   ========================================================================== */
.exegypt-stars {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.exegypt-star {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: #C99638;
	stroke-width: 1.4;
}

.exegypt-star.is-filled {
	fill: #C99638;
}

.exegypt-stars--lg {
	justify-content: center;
	gap: 6px;
}

.exegypt-stars--lg .exegypt-star {
	width: 19px;
	height: 19px;
}

/* ==========================================================================
   Regular testimonial card grid
   ========================================================================== */
.exegypt-testimonials-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	max-width: 1152px;
	margin: 0 auto;
}

.exegypt-testimonial-card {
	background: #fff;
	padding: 32px;
	border-radius: 2px;
	outline: 1px solid rgba(0, 45, 114, 0.08);
	outline-offset: -1px;
	box-shadow: 0 4px 20px rgba(0, 24, 68, 0.05);
}

.exegypt-testimonial-card__quote {
	margin: 20px 0 0;
	color: #001844;
	font-family: Montserrat, sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.53;
}

.exegypt-testimonial-card__quote-mark {
	/* This card has a white background — #C99638 is only 2.66:1 there
	   (fails the 3:1 large-text minimum); this shade clears 5:1. */
	color: #8a6215;
	font-size: 1.5em;
	line-height: 0;
	vertical-align: -0.08em;
}

.exegypt-testimonial-card__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid rgba(0, 45, 114, 0.08);
}

.exegypt-testimonial-card__avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #C99638;
	flex-shrink: 0;
}

.exegypt-testimonial-card__person {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.exegypt-testimonial-card__name {
	color: #001844;
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.exegypt-testimonial-card__program {
	color: #667085;
	font-family: Inter, sans-serif;
	font-size: 12px;
	line-height: 1.5;
}

/* ==========================================================================
   Featured (homepage) testimonials carousel
   ========================================================================== */
.exegypt-featured-testimonials {
	position: relative;
	overflow: hidden;
	padding: clamp(56px, 9vw, 110px) 24px;
	background: linear-gradient(154deg, #001844 0%, #002D72 100%);
}

.exegypt-featured-testimonials__inner {
	position: relative;
	z-index: 2;
	max-width: 900px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.exegypt-featured-testimonials__eyebrow {
	margin: 0;
	color: #C99638;
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2.3px;
	text-transform: uppercase;
}

/* This eyebrow sits on the navy gradient section background (#001844 →
   #002D72), where #C99638 already clears 7:1 — no change needed here.
   .exegypt-testimonial-card__quote-mark below sits on a *white* card, where
   the same gold is only 2.66:1, so that one gets the darker shade. */

.exegypt-featured-testimonials__heading {
	margin: 12px 0 0;
	color: #fff;
	font-family: Montserrat, sans-serif;
	font-weight: 700;
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.5;
	text-wrap: balance;
}

.exegypt-featured-testimonials__stage {
	position: relative;
	width: 100%;
	margin-top: clamp(32px, 5vw, 56px);
}

.exegypt-featured-testimonials__slides {
	position: relative;
	width: 100%;
	max-width: 730px;
	margin: 0 auto;
}

/* Pure CSS crossfade: the inactive slide sits absolutely positioned underneath
   the active one (which sits in-flow to size the container), so switching is
   a single class toggle with no JS-timed choreography to get out of sync. */
.exegypt-featured-testimonials__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.5s var(--exegypt-ease-out), transform 0.5s var(--exegypt-ease-out), visibility 0s 0.5s;
}

.exegypt-featured-testimonials__slide.is-active {
	position: relative;
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity 0.5s var(--exegypt-ease-out), transform 0.5s var(--exegypt-ease-out), visibility 0s;
}

.exegypt-featured-testimonials__quote {
	margin: 24px 0 0;
	color: #fff;
	font-family: Montserrat, sans-serif;
	font-weight: 400;
	font-size: clamp(19px, 2.4vw, 28px);
	line-height: 1.4;
	text-wrap: pretty;
}

.exegypt-featured-testimonials__quote-mark {
	color: #C99638;
}

.exegypt-featured-testimonials__person {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 32px;
}

.exegypt-featured-testimonials__person img {
	width: 53px;
	height: 53px;
	border: 1px solid #C99638;
	object-fit: cover;
	flex-shrink: 0;
}

.exegypt-featured-testimonials__person-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: left;
}

.exegypt-featured-testimonials__name {
	color: #fff;
	font-family: Inter, sans-serif;
	font-weight: 600;
	font-size: 15px;
}

.exegypt-featured-testimonials__program {
	color: rgba(255, 255, 255, 0.6);
	font-family: Inter, sans-serif;
	font-size: 13px;
}

/* Dot navigation */
.exegypt-featured-testimonials__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: clamp(32px, 5vw, 48px);
}

/* The visible dot is a 4px-tall bar, but a 4px-tall click/tap target fails
   WCAG 2.2's 24x24px minimum. The button itself grows to a 24px-tall hit
   area; ::after keeps drawing the same slim bar, centered inside it, so the
   visual is unchanged. */
.exegypt-featured-testimonials__dot {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	transition: width 0.3s var(--exegypt-ease-out);
}

.exegypt-featured-testimonials__dot::after {
	content: "";
	display: block;
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.2);
	transition: background-color 0.3s var(--exegypt-ease-out);
}

.exegypt-featured-testimonials__dot:hover::after {
	background: rgba(255, 255, 255, 0.35);
}

.exegypt-featured-testimonials__dot.is-active {
	width: 40px;
}

.exegypt-featured-testimonials__dot.is-active::after {
	background: #C99638;
}

.exegypt-featured-testimonials__dot:focus-visible {
	outline: 2px solid #C99638;
	outline-offset: 3px;
}

/* Scattered gallery photos */
.exegypt-featured-testimonials__scatter {
	position: absolute;
	inset: 0;
	visibility: hidden;
	pointer-events: none;
	z-index: 1;
}

.exegypt-featured-testimonials__scatter.is-active {
	visibility: visible;
}

.exegypt-scatter-photo {
	position: absolute;
	width: clamp(190px, 16vw, 240px);
	margin: 0;
	border-radius: 4px;
	overflow: hidden;
	background: #001020;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 30px 60px -12px rgba(0, 0, 0, 0.5);
	outline: 1px solid rgba(255, 255, 255, 0.08);
	outline-offset: -1px;
}

.exegypt-scatter-photo img {
	display: block;
	width: 100%;
	aspect-ratio: 6 / 5;
	object-fit: cover;
}

.exegypt-scatter-photo figcaption {
	padding: 10px 12px;
	color: rgba(255, 255, 255, 0.6);
	font-family: Inter, sans-serif;
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	background: #001020;
}

.exegypt-scatter-photo--1 {
	top: 4%;
	left: 2%;
	transform: rotate(-3deg);
}

.exegypt-scatter-photo--2 {
	bottom: 6%;
	right: 2%;
	transform: rotate(4deg);
}

.exegypt-scatter-photo--3 {
	bottom: 3%;
	left: 6%;
	transform: rotate(-2deg);
}

/* Scroll-triggered zoom-in entrance, gated behind JS-ready + in-view state so
   the photos degrade gracefully (fully visible, no animation) without JS.
   Only the incoming group animates in; the outgoing one is simply hidden via
   the .is-active toggle above, so there's nothing for rapid slide changes to
   race against. */
.exegypt-featured-testimonials.has-js .exegypt-scatter-photo {
	opacity: 0;
	transform: scale(0.6) rotate(var(--exegypt-scatter-rotate, 0deg));
}

.exegypt-featured-testimonials.has-js.is-visible .exegypt-featured-testimonials__scatter.is-active .exegypt-scatter-photo {
	animation: exegyptScatterIn 0.9s var(--exegypt-ease-out) both;
}

.exegypt-featured-testimonials__scatter.is-active .exegypt-scatter-photo--1 { --exegypt-scatter-rotate: -3deg; animation-delay: 0s; }
.exegypt-featured-testimonials__scatter.is-active .exegypt-scatter-photo--2 { --exegypt-scatter-rotate: 4deg; animation-delay: 0.12s; }
.exegypt-featured-testimonials__scatter.is-active .exegypt-scatter-photo--3 { --exegypt-scatter-rotate: -2deg; animation-delay: 0.24s; }

@keyframes exegyptScatterIn {
	from {
		opacity: 0;
		transform: scale(0.6) rotate(calc(var(--exegypt-scatter-rotate, 0deg) * 1.3)) translateY(22px);
	}
	to {
		opacity: 1;
		transform: scale(1) rotate(var(--exegypt-scatter-rotate, 0deg)) translateY(0);
	}
}

.exegypt-featured-testimonials__live {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
	.exegypt-scatter-photo {
		width: clamp(140px, 20vw, 180px);
	}

	.exegypt-scatter-photo--1 {
		top: 0;
		left: 0;
	}

	.exegypt-scatter-photo--2 {
		bottom: 2%;
		right: 0;
	}

	.exegypt-scatter-photo--3 {
		display: none;
	}
}

@media (max-width: 768px) {
	.exegypt-testimonials-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.exegypt-testimonial-card {
		padding: 24px;
	}

	.exegypt-testimonial-card__quote {
		font-size: 16px;
	}

	.exegypt-featured-testimonials__person {
		flex-direction: column;
		gap: 12px;
	}

	.exegypt-featured-testimonials__person-text {
		text-align: center;
	}

	/* The clamp()s above bottom out at 28px/19px regardless of viewport —
	   fine down to tablet, but too large once the section is this narrow. */
	.exegypt-featured-testimonials__eyebrow {
		font-size: 11px;
		letter-spacing: 1.8px;
	}

	.exegypt-featured-testimonials__heading {
		font-size: 22px;
		line-height: 1.3;
	}

	.exegypt-featured-testimonials__quote {
		font-size: 16px;
		line-height: 1.5;
	}

	.exegypt-featured-testimonials__name {
		font-size: 14px;
	}

	.exegypt-featured-testimonials__program {
		font-size: 12px;
	}
}

@media (max-width: 767px) {
	.exegypt-featured-testimonials__scatter {
		display: none !important;
	}
}

@media (max-width: 480px) {
	.exegypt-testimonial-card {
		padding: 18px;
	}

	.exegypt-testimonial-card__quote {
		font-size: 15px;
	}

	.exegypt-testimonial-card__avatar {
		width: 40px;
		height: 40px;
	}

	.exegypt-featured-testimonials {
		padding: 48px 16px;
	}

	.exegypt-featured-testimonials__dots {
		margin-top: 28px;
	}
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.exegypt-featured-testimonials__slide,
	.exegypt-featured-testimonials__slide.is-active {
		transition-duration: 0.01ms !important;
		transform: none !important;
	}

	.exegypt-featured-testimonials.has-js.is-visible .exegypt-featured-testimonials__scatter.is-active .exegypt-scatter-photo {
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
		transform: none !important;
	}

	.exegypt-featured-testimonials.has-js .exegypt-scatter-photo {
		transform: none !important;
	}

	.exegypt-featured-testimonials__dot {
		transition: none;
	}
}
