/* Apex Testimonials — Google-style review slider */

.apex-testimonials {
	--apex-card-bg: #ffffff;
	--apex-text: #333333;
	--apex-muted: #5f6368;
	--apex-gap: 1rem;
	--apex-avatar: #6b46c1;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: transparent;
	padding: 2rem 1rem 2.5rem;
	border-radius: 8px;
	box-sizing: border-box;
}

.apex-testimonials *,
.apex-testimonials *::before,
.apex-testimonials *::after {
	box-sizing: inherit;
}

.apex-testimonials--empty {
	padding: 1.5rem;
	text-align: center;
	color: var(--apex-muted);
}

.apex-testimonials__inner {
	display: flex;
	align-items: stretch;
	gap: 0.35rem;
	max-width: 1100px;
	margin: 0 auto;
}

@media (min-width: 992px) {
	.apex-testimonials {
		padding: 2.75rem 1.5rem 3.25rem;
		--apex-gap: 1.25rem;
	}

	.apex-testimonials__inner {
		max-width: 1340px;
		gap: 0.5rem;
	}

	.apex-card {
		padding: 1.35rem 1.35rem 1.15rem;
		min-height: 268px;
		border-radius: 12px;
		box-shadow:
			0 -2px 10px rgba(0, 0, 0, 0.045),
			0 3px 12px rgba(0, 0, 0, 0.065),
			0 1px 4px rgba(0, 0, 0, 0.04);
	}

	.apex-card__avatar {
		width: 50px;
		height: 50px;
		font-size: 0.9rem;
	}

	.apex-card__name {
		font-size: 1.0625rem;
	}

	.apex-card__text {
		font-size: 0.98rem;
		line-height: 1.55;
		-webkit-line-clamp: 6;
	}

	.apex-star {
		font-size: 1.05rem;
	}

	.apex-testimonials__arrow {
		width: 48px;
		height: 48px;
		font-size: 1.45rem;
	}
}

.apex-testimonials__viewport {
	flex: 1;
	overflow: hidden;
	min-width: 0;
	position: relative;
	/* Room inside clip rect so card shadows show top & bottom */
	padding: 18px 10px;
}

@media (min-width: 992px) {
	.apex-testimonials__viewport {
		padding: 22px 12px;
	}
}

/* Horizontal drag / swipe (JS toggles --pannable when multiple slides) */
.apex-testimonials__viewport--pannable {
	cursor: grab;
	touch-action: none;
}

.apex-testimonials__viewport--pannable.is-dragging {
	cursor: grabbing;
}

.apex-testimonials__viewport--pannable.is-dragging .apex-testimonials__track {
	user-select: none;
}

.apex-testimonials__track {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: var(--apex-gap);
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.apex-testimonials__slide {
	flex-shrink: 0;
	margin: 0;
	padding: 0;
}

/* Card */
.apex-card {
	background: var(--apex-card-bg);
	border-radius: 10px;
	box-shadow:
		0 -2px 8px rgba(0, 0, 0, 0.04),
		0 2px 10px rgba(0, 0, 0, 0.06),
		0 1px 3px rgba(0, 0, 0, 0.04);
	padding: 1.15rem 1.15rem 1rem;
	min-height: 220px;
	display: flex;
	flex-direction: column;
	height: 100%;
	transform: translateY(0);
	transition:
		box-shadow 0.32s ease,
		transform 0.32s ease;
}

@media (hover: hover) {
	.apex-card:hover,
	.apex-card:focus-within {
		box-shadow:
			0 -1px 10px rgba(0, 0, 0, 0.035),
			0 5px 16px rgba(0, 0, 0, 0.065),
			0 2px 6px rgba(0, 0, 0, 0.045);
		transform: translateY(-2px);
	}
}

@media (hover: hover) and (prefers-reduced-motion: reduce) {
	.apex-card:hover,
	.apex-card:focus-within {
		transform: translateY(0);
		transition-duration: 0.2s;
	}
}

@media (min-width: 992px) and (hover: hover) {
	.apex-card:hover,
	.apex-card:focus-within {
		box-shadow:
			0 -2px 12px rgba(0, 0, 0, 0.038),
			0 6px 18px rgba(0, 0, 0, 0.07),
			0 2px 8px rgba(0, 0, 0, 0.048);
	}
}

.apex-card__header {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin-bottom: 0.65rem;
}

.apex-card__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--apex-avatar);
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	letter-spacing: 0.02em;
}

.apex-card__meta {
	min-width: 0;
	flex: 1;
}

.apex-card__title-row {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.apex-card__name {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	color: var(--apex-text);
	line-height: 1.25;
}

.apex-verified-svg {
	display: block;
	flex-shrink: 0;
}

.apex-card__stars {
	margin-top: 0.25rem;
	line-height: 1;
}

.apex-star {
	color: #e0e0e0;
	font-size: 1rem;
	margin-right: 1px;
}

.apex-star--on {
	color: #fbbc04;
}

.apex-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.apex-card__text {
	margin: 0 0 0.75rem;
	color: var(--apex-muted);
	font-size: 0.92rem;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

.apex-card__footer {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-top: auto;
	gap: 0.5rem;
}

.apex-card__readmore {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-weight: 700;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-decoration: underline;
	text-transform: uppercase;
	color: #111111;
	font-family: inherit;
}

.apex-card__readmore:hover,
.apex-card__readmore:focus-visible {
	color: #000000;
	outline: none;
	text-decoration-thickness: 2px;
}

.apex-google-svg {
	display: block;
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	opacity: 0.95;
}

/* Arrows — high contrast + clear hover / active states */
.apex-testimonials__arrow {
	flex-shrink: 0;
	align-self: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 50%;
	background: #ffffff;
	color: #3c4043;
	cursor: pointer;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
	transition:
		color 0.2s ease,
		background 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.apex-testimonials__arrow:focus {
	outline: none;
}

.apex-testimonials__arrow:focus-visible {
	outline: 2px solid rgba(236, 28, 36, 0.65);
	outline-offset: 3px;
}

.apex-testimonials__arrow:hover {
	color: #ffffff;
	background: #ec1c24;
	border-color: rgba(236, 28, 36, 0.75);
	box-shadow: 0 6px 16px rgba(236, 28, 36, 0.38), 0 2px 6px rgba(0, 0, 0, 0.12);
	transform: scale(1.06);
}

.apex-testimonials__arrow:active {
	transform: scale(0.96);
	box-shadow: 0 2px 8px rgba(236, 28, 36, 0.35);
}

.apex-testimonials__arrow span {
	position: relative;
	top: -1px;
	pointer-events: none;
}

/* Dots */
.apex-testimonials__dots {
	display: flex;
	justify-content: center;
	gap: 0.45rem;
	margin-top: 1.25rem;
}

.apex-testimonials__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: #cfd3db;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.apex-testimonials__dot:hover,
.apex-testimonials__dot:focus-visible {
	background: #9aa0a8;
	outline: none;
}

.apex-testimonials__dot.is-active {
	background: #5f6368;
	transform: scale(1.1);
}

/* Modal */
body.apex-modal-open {
	overflow: hidden;
}

.apex-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: apexFadeIn 0.2s ease;
}

.apex-modal-backdrop[hidden] {
	display: none !important;
}

@keyframes apexFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.apex-modal {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	max-width: 560px;
	width: 100%;
	max-height: min(85vh, 640px);
	overflow: auto;
	position: relative;
	padding: 1.35rem 1.35rem 1.25rem;
	animation: apexPopIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes apexPopIn {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.apex-modal__close {
	position: absolute;
	top: 0.65rem;
	right: 0.65rem;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.06);
	cursor: pointer;
	font-size: 1.35rem;
	line-height: 1;
	color: #5f6368;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.apex-modal__close:focus {
	outline: none;
}

.apex-modal__close:focus-visible {
	outline: 2px solid rgba(107, 70, 193, 0.55);
	outline-offset: 2px;
}

.apex-modal__close:hover {
	background: rgba(0, 0, 0, 0.11);
}

.apex-modal__close:active {
	background: rgba(0, 0, 0, 0.14);
}

.apex-modal__header {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
	padding-right: 2rem;
	margin-bottom: 1rem;
}

.apex-modal__avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--apex-avatar);
	color: #fff;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.apex-modal__title-row {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.apex-modal__name {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--apex-text);
}

.apex-modal__stars .apex-star {
	font-size: 1.1rem;
}

.wp-content-reset {
	color: var(--apex-muted);
	font-size: 0.95rem;
	line-height: 1.65;
}

.wp-content-reset > *:first-child {
	margin-top: 0;
}

.wp-content-reset > *:last-child {
	margin-bottom: 0;
}

@media (max-width: 991px) {
	.apex-testimonials__inner {
		gap: 0.35rem;
	}

	.apex-testimonials__arrow {
		width: 40px;
		height: 40px;
		font-size: 1.25rem;
	}

	.apex-card {
		min-height: 200px;
	}

	.apex-card__text {
		-webkit-line-clamp: 6;
	}
}

@media (max-width: 480px) {
	.apex-testimonials {
		padding: 1.25rem 0.5rem 2rem;
	}
}
