/**
 * Testimonials module (shortcode + homepage slider).
 */

.njcms-testimonials {
	--njcms-tst-gap: 1rem;
	--njcms-tst-text: #eef4ff;
	--njcms-tst-muted: #d7e2f4;
	--njcms-tst-heading: #ffffff;
	--njcms-tst-slider-max: 980px;
	margin-block: var(--njcms-space-2xl, 2rem);
}

.njcms-testimonials,
.njcms-testimonials * {
	box-sizing: border-box;
}

.njcms-testimonials__container {
	width: min(100% - 2rem, var(--njcms-tst-slider-max));
	margin-inline: auto;
}

.njcms-testimonials__header {
	display: grid;
	gap: 0.35rem;
	margin-bottom: 1rem;
	text-align: left;
}

.njcms-testimonials__heading {
	margin: 0 0 1.2rem;
	font-size: clamp(1.4rem, 2.2vw, 1.95rem);
	line-height: 1.2;
	color: #14325c;
}

.njcms-testimonials__header .njcms-testimonials__heading {
	margin-bottom: 0;
}

.njcms-testimonials__empty {
	margin: 0;
	color: #dce8fc;
}

.njcms-testimonials:not(.njcms-testimonials--slider) .njcms-testimonials__empty {
	color: #445770;
}

.njcms-testimonials__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--njcms-tst-muted, #5c6980);
}

/* Cards / grid layouts (non-slider) */
.njcms-testimonials__grid {
	display: grid;
	gap: var(--njcms-tst-gap);
}

.njcms-testimonials__grid--cols-1 { grid-template-columns: 1fr; }
.njcms-testimonials__grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.njcms-testimonials__grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.njcms-testimonials__grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 782px) {
	.njcms-testimonials__grid--cols-3,
	.njcms-testimonials__grid--cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.njcms-testimonials__grid--cols-2,
	.njcms-testimonials__grid--cols-3,
	.njcms-testimonials__grid--cols-4 {
		grid-template-columns: 1fr;
	}
}

.njcms-testimonials__card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.25rem;
	border-radius: var(--njcms-radius-lg, 0.75rem);
	border: 1px solid rgba(20, 50, 92, 0.12);
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.njcms-testimonials__photo {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
}

.njcms-testimonials__quote {
	margin: 0;
	font-size: 1rem;
	line-height: 1.55;
	border-left: 4px solid rgba(20, 50, 92, 0.18);
	padding-left: 0.85rem;
}

.njcms-testimonials__quote p {
	margin: 0;
}

.njcms-testimonials__cite {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-style: normal;
	font-size: 0.9rem;
}

.njcms-testimonials__name {
	text-decoration: none;
	color: var(--njcms-color-primary, #14325c);
	font-weight: 600;
	font-style: normal;
}

.njcms-testimonials__name a {
	text-decoration: none;
	color: inherit;
	font-weight: inherit;
}

.njcms-testimonials__name a:hover,
.njcms-testimonials__name a:focus {
	text-decoration: underline;
	outline: none;
}

.njcms-testimonials__name a:focus-visible,
.njcms-testimonials__more-link:focus-visible {
	outline: 2px solid var(--njcms-color-accent, #012169);
	outline-offset: 2px;
}

.njcms-testimonials__role,
.njcms-testimonials__org {
	color: #5c6570;
}

/* Slider — full-band homepage treatment */
.njcms-testimonials--slider {
	position: relative;
	margin-block: 0;
	margin-inline: calc(50% - 50vw);
	max-width: none;
	width: 100vw;
	padding: clamp(2.75rem, 8vw, 5rem) 0;
	background: radial-gradient(120% 100% at 15% -10%, rgba(90, 120, 180, 0.14) 0%, transparent 45%),
		linear-gradient(175deg, #070f1f 0%, #0f1f36 42%, #0b1830 100%);
	overflow-x: clip;
	overflow-y: visible;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.njcms-testimonials--slider .njcms-testimonials__container {
	position: relative;
	z-index: 1;
	max-width: var(--njcms-tst-slider-max);
}

.njcms-testimonials--slider .njcms-testimonials__heading {
	color: var(--njcms-tst-heading);
	text-shadow: 0 1px 22px rgba(0, 0, 0, 0.2);
}

.njcms-testimonials--slider .njcms-testimonials__eyebrow {
	color: #3b4167;
	text-shadow: none;
}

.njcms-testimonials--slider .njcms-testimonials__header {
	margin-bottom: clamp(1.15rem, 2.8vw, 1.85rem);
}

.njcms-testimonials__slider {
	display: flex;
	flex-direction: column;
	gap: clamp(1.15rem, 2.8vw, 1.65rem);
	width: 100%;
	overflow: visible;
	position: relative;
}

.njcms-testimonials__viewport {
	width: 100%;
	overflow: hidden;
	flex: 1 1 auto;
}

.njcms-testimonials__slider-controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 3.5rem;
	flex-wrap: nowrap;
	position: relative;
	z-index: 3;
	inset: auto;
	transform: none;
	pointer-events: auto;
	margin-top: 0.35rem;
}

.njcms-testimonials__slider-controls button {
	flex-shrink: 0;
}

.njcms-testimonials__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.95);
	cursor: pointer;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	line-height: 0;
	padding: 0;
}

.njcms-testimonials__btn:hover {
	background: rgba(255, 255, 255, 0.13);
	border-color: rgba(255, 255, 255, 0.82);
	transform: translateY(-1px);
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.njcms-testimonials__btn:active {
	transform: translateY(0);
}

.njcms-testimonials__btn svg {
	display: block;
}

.njcms-testimonials__btn:disabled,
.njcms-testimonials__btn[aria-disabled="true"] {
	opacity: 0.42;
	transform: none;
	cursor: not-allowed;
	box-shadow: none;
}

.njcms-testimonials__track {
	display: flex;
	gap: var(--njcms-tst-gap);
	width: 100%;
	transition: transform 0.32s ease;
	will-change: transform;
	align-items: stretch;
}

.njcms-testimonials__slide {
	flex: 0 0 100%;
	min-width: 0;
	padding: 0;
	box-sizing: border-box;
}

.njcms-testimonials__slide-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: auto;
	padding: 1.35rem clamp(1.15rem, 3vw, 1.75rem) 1.25rem;
	margin: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(15, 32, 55, 0.45) 100%);
	border: 1px solid rgba(255, 255, 255, 0.085);
	border-radius: 22px;
	box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 26px 50px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	box-sizing: border-box;
}

.njcms-testimonials__bg-quote {
	position: absolute;
	right: clamp(8%, 13vw, 18%);
	top: 0.4rem;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(4rem, 12vw, 7.75rem);
	line-height: 0.92;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.09);
	user-select: none;
	pointer-events: none;
}

.njcms-testimonials__quote-layout {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: clamp(0.95rem, 2.8vw, 1.65rem);
	min-height: 0;
	flex: 0 1 auto;
}

.njcms-testimonials__accent {
	flex-shrink: 0;
	width: clamp(2.85rem, 7vw, 3.85rem);
	height: clamp(2.85rem, 7vw, 3.85rem);
	background: linear-gradient(145deg, #f8e097 0%, #e4c058 52%, #c8a045 100%);
	border-radius: 10px;
	display: grid;
	place-items: center;
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.42);
	border: none;
	transform: rotate(-6deg);
}

.njcms-testimonials__accent-mark {
	position: relative;
	top: -0.05em;
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 800;
	line-height: 1;
	font-size: clamp(1.35rem, 3vw, 1.9rem);
	color: #fff;
	filter: drop-shadow(0 1px 4px rgba(10, 20, 40, 0.35));
	user-select: none;
}

.njcms-testimonials__body-col {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.njcms-testimonials__quote-layout .njcms-testimonials__body {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	flex: 0 1 auto;
	min-height: 0;
	min-width: 0;
	gap: 0;
}

.njcms-testimonials--slider .njcms-testimonials__quote {
	border-left: 0;
	padding-left: 0;
}

/* .njcms-testimonials__quote::after {
	content: none !important;
} */

.njcms-testimonials__slide .njcms-testimonials__quote {
	margin: 0;
	border: none;
	padding: 0;
	color: var(--njcms-tst-text);
	display: block;
	overflow: visible;
	font-size: clamp(1rem, 1.5vw, 1.165rem);
	line-height: 1.58;
	text-wrap: balance;
}

.njcms-testimonials__slide .njcms-testimonials__quote a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.12em;
	pointer-events: none;
	cursor: default;
}

.njcms-testimonials__slide .njcms-testimonials__quote p {
	margin: 0;
}

.njcms-testimonials__slide .njcms-testimonials__quote p + p {
	margin-top: 0.52em;
}

.njcms-testimonials__more-wrap {
	margin: 0.52rem 0 0;
}

.njcms-testimonials__more-link {
	color: #e8f0ff;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.njcms-testimonials__attribution {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.85rem;
	margin-top: 1.15rem;
	padding-top: 1.15rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.njcms-testimonials__media--slider {
	flex-shrink: 0;
}

.njcms-testimonials__photo--slider {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(255, 255, 255, 0.45);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.njcms-testimonials__slide .njcms-testimonials__cite {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-style: normal;
	font-size: 0.9rem;
	text-align: left;
}

.njcms-testimonials--slider .njcms-testimonials__name {
	color: var(--njcms-tst-heading);
	font-weight: 700;
	font-style: normal;
}

.njcms-testimonials--slider .njcms-testimonials__role,
.njcms-testimonials--slider .njcms-testimonials__org {
	color: var(--njcms-tst-muted);
	line-height: 1.38;
	font-size: 0.8725rem;
}

.njcms-testimonials--reduced .njcms-testimonials__track {
	transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.njcms-testimonials__track {
		transition: none !important;
	}
}

@media (max-width: 767px) {
	.njcms-testimonials--slider {
		padding-inline: 0;
	}

	.njcms-testimonials__container {
		width: min(100% - 1.75rem, var(--njcms-tst-slider-max));
		padding-inline: 0.25rem;
	}

	.njcms-testimonials__slide-inner {
		padding: 1.2rem 1.05rem 1.05rem;
	}

	.njcms-testimonials__quote-layout {
		flex-wrap: nowrap;
	}

	.njcms-testimonials__slider-controls {
		gap: 2.85rem;
	}

	.njcms-testimonials__slide .njcms-testimonials__quote {
		font-size: 0.98rem;
	}
}

@media (max-width: 480px) {
	.njcms-testimonials__quote-layout {
		gap: 0.82rem;
	}

	.njcms-testimonials__accent {
		width: 2.55rem;
		height: 2.55rem;
		border-radius: 8px;
	}
}

@media (max-width: 400px) {
	.njcms-testimonials__slider-controls {
		flex-wrap: wrap;
		gap: 1rem 1.5rem;
		row-gap: 0.75rem;
	}
}
