/* ==========================================================================
   Testimonials widget  (.aew-testimonials)
   ========================================================================== */

.aew-testimonials {
	--aew-accent: var(--aew-red);   /* control: Brand colour */
	--aew-gutter: 24px;             /* control: Side gap */

	position: relative;
	box-sizing: border-box;
	overflow: hidden;               /* the big quote mark may sit near the edge */
	background-color: #fff;
	color: #111;
	font-family: var(--aew-font);
	-webkit-font-smoothing: antialiased;
}

.aew-testimonials *,
.aew-testimonials *::before,
.aew-testimonials *::after {
	box-sizing: border-box;
}

/* ---- Big faint quote mark ---- */

.aew-testimonials__mark {
	position: absolute;
	top: 70px;
	right: 62px;
	width: 75px;
	height: auto;
	color: #f8f8f8;
	pointer-events: none;
}

.aew-testimonials__inner {
	position: relative;
	width: calc(100% - (var(--aew-gutter) * 2));
	max-width: 1076px;
	margin-inline: auto;
}

/* ---- Heading ---- */

.aew-testimonials__head {
	margin-bottom: 50px;
	text-align: center;
}

.aew-testimonials__eyebrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 0 0 19px;
	font-size: 11.2px;
	font-weight: 700;
	letter-spacing: 1.2px;
	line-height: 1.4;
	text-transform: uppercase;
}

.aew-testimonials__eyebrow-line {
	flex: none;
	display: block;
	width: 35px;
	height: 2px;
	background: var(--aew-accent);
}

.aew-testimonials__eyebrow-text {
	color: var(--aew-accent);
}

/* extra class so the Elementor kit's global h1–h6 styles don't win */
.aew-testimonials .aew-testimonials__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 41.8px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
}

.aew-testimonials__title-text {
	color: #111;
}

.aew-testimonials__title-accent {
	color: var(--aew-accent);
}

/* ---- Slider ---- */

.aew-testimonials__stage {
	max-width: 727px;
	margin-inline: auto;
}

/* every slide sits in the same grid cell → the card is as tall as the longest quote */
.aew-testimonials__slides {
	display: grid;
}

.aew-testimonials__slide {
	grid-area: 1 / 1;
	min-width: 0;
	margin: 0;
	padding: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.aew-testimonials__slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.45s ease, visibility 0s;
}

.aew-testimonials__card {
	height: 100%;
	padding: 44px 36px 45px;
	border: 1px solid #ededed;
	border-left: 5px solid var(--aew-accent);
	background-color: #f9f9f9;
}

.aew-testimonials__icon {
	display: block;
	width: 30px;
	height: auto;
	margin: 0 0 24px;
	color: rgba(200, 16, 46, 0.22);
}

.aew-testimonials__stars {
	display: flex;
	gap: 4px;
	margin: 0 0 18px;
	color: var(--aew-accent);
}

.aew-testimonials__star {
	flex: none;
	width: 12px;
	height: auto;
}

.aew-testimonials__star--off {
	color: #ddd;
}

/* blockquote carries the kit's global styles, so reset what matters */
.aew-testimonials .aew-testimonials__quote {
	margin: 0 0 32px;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 15.8px;
	font-style: italic;
	font-weight: 400;
	line-height: 1.55;
	color: #626262;
}

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

.aew-testimonials__author {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
}

.aew-testimonials__avatar {
	--aew-avatar: 42px;

	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--aew-avatar);
	height: var(--aew-avatar);
	overflow: hidden;
	border: 1px solid #ebebeb;
	background-color: #fff;
	font-size: 12.3px;
	font-weight: 700;
	line-height: 1;
	color: var(--aew-accent);
}

.aew-testimonials__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aew-testimonials__who {
	display: block;
	min-width: 0;
}

.aew-testimonials__name,
.aew-testimonials__role,
.aew-testimonials__company {
	display: block;
}

.aew-testimonials__name {
	font-size: 13.4px;
	font-weight: 700;
	line-height: 1.35;
	color: #111;
}

.aew-testimonials__role {
	font-size: 10.6px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--aew-accent);
}

.aew-testimonials__company {
	font-size: 10.6px;
	line-height: 1.4;
	color: #6b6b6b;
}

/* ---- Dots & arrows ---- */

.aew-testimonials__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 35px;
}

.aew-testimonials__dots {
	display: flex;
	align-items: center;
	gap: 7px;
}

.aew-testimonials .aew-testimonials__dot {
	--aew-dot: 7px;
	--aew-dot-active: 26px;

	flex: none;
	width: var(--aew-dot);
	height: var(--aew-dot);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background-color: #e4e4e4;
	box-shadow: none;
	cursor: pointer;
	transition: width 0.25s ease, background-color 0.25s ease;
}

.aew-testimonials .aew-testimonials__dot.is-active {
	width: var(--aew-dot-active);
	background-color: var(--aew-accent);
}

.aew-testimonials .aew-testimonials__dot:hover:not(.is-active) {
	background-color: #cfcfcf;
}

/* bigger touch target without changing how the dot looks */
.aew-testimonials__dot {
	position: relative;
}

.aew-testimonials__dot::after {
	content: "";
	position: absolute;
	inset: -10px -3px;
}

.aew-testimonials__arrows {
	display: flex;
	gap: 11px;
	margin-left: auto;
}

.aew-testimonials .aew-testimonials__arrow {
	--aew-arrow: 36px;

	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--aew-arrow);
	height: var(--aew-arrow);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid #e8e8e8;
	border-radius: 0;
	background-color: #fff;
	box-shadow: none;
	color: #444;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.aew-testimonials .aew-testimonials__arrow:hover,
.aew-testimonials .aew-testimonials__arrow:focus-visible {
	border-color: var(--aew-accent);
	background-color: var(--aew-accent);
	color: #fff;
}

.aew-testimonials__arrow svg {
	width: 14px;
	height: 14px;
}

.aew-testimonials .aew-testimonials__dot:focus-visible,
.aew-testimonials .aew-testimonials__arrow:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

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

@media (max-width: 1024px) {
	.aew-testimonials__mark {
		width: 56px;
		top: 50px;
		right: 28px;
	}
}

@media (max-width: 600px) {
	.aew-testimonials__mark {
		width: 38px;
		top: 34px;
		right: 14px;
	}

	.aew-testimonials__card {
		padding: 30px 20px 28px;
	}

	.aew-testimonials .aew-testimonials__quote {
		font-size: 14.5px;
	}

	.aew-testimonials__icon {
		margin-bottom: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aew-testimonials__slide,
	.aew-testimonials__slide.is-active,
	.aew-testimonials .aew-testimonials__dot,
	.aew-testimonials .aew-testimonials__arrow {
		transition: none;
	}
}
