/* ==========================================================================
   DeshipOS — Testimonials widget
   Eyebrow + heading + responsive card grid (slider on mobile) with dots.
   Depends on assets/css/base.css for design tokens.
   ========================================================================== */

.deshipos-testimonials {
	--dte-brand:   var(--dew-brand, #16A34A);
	--dte-text:    var(--dew-ink, #0F172A);
	--dte-muted:   var(--dew-muted, #475569);
	--dte-faint:   var(--dew-faint, #94A3B8);
	--dte-border:  var(--dew-divider, #E2E8F0);
	--dte-bg:      #FFFFFF;
	--dte-card-bg: #FFFFFF;
	--dte-star-on:  #16A34A;
	--dte-star-off: #E2E8F0;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 80px 20px;
	background: var(--dte-bg);
	overflow: hidden;
}
.deshipos-testimonials *,
.deshipos-testimonials *::before,
.deshipos-testimonials *::after { box-sizing: border-box; }

.deshipos-testimonials__inner {
	max-width: 1200px;
	margin: 0 auto;
	min-width: 0;
}

/* ----- Header ----- */
.deshipos-testimonials__head {
	text-align: center;
	margin: 0 auto 48px;
	max-width: 760px;
}

.deshipos-testimonials__eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--dte-brand);
	margin-bottom: 12px;
}

.deshipos-testimonials__heading {
	margin: 0;
	font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: var(--dew-tracking-tight);
	color: var(--dte-text);
}

/* ----- Slider wrapper ----- */
.deshipos-testimonials__slider {
	position: relative;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

/* ----- Track (flex scroll-snap carousel on all sizes) ----- */
.deshipos-testimonials__track {
	--cols: 3;
	--gap: 24px;
	display: flex;
	flex-wrap: nowrap;
	gap: var(--gap);
	align-items: stretch;
	min-width: 0;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
}
.deshipos-testimonials__track::-webkit-scrollbar { display: none; }

/* ----- Card ----- */
.deshipos-testimonials__card {
	flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
	max-width: calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
	background: var(--dte-card-bg);
	border: 1px solid var(--dte-border);
	border-radius: 18px;
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
	overflow: hidden;
	scroll-snap-align: start;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 8px 24px rgba(15, 23, 42, .04);
	transition:
		transform var(--dew-dur-base, 220ms) var(--dew-ease-out, ease),
		box-shadow var(--dew-dur-base, 220ms) var(--dew-ease-out, ease);
}
.deshipos-testimonials__card:hover {
	/* transform: translateY(-3px); */
	box-shadow: 0 4px 10px -2px rgba(15, 23, 42, .06), 0 18px 32px -8px rgba(15, 23, 42, .10);
}

/* ----- Quote ----- */
.deshipos-testimonials__quote-mark {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 3rem;
	line-height: .6;
	color: var(--dte-brand);
	display: block;
	margin-top: -4px;
}

.deshipos-testimonials__quote {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--dte-muted);
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* ----- Footer (person + stars) ----- */
.deshipos-testimonials__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.deshipos-testimonials__person {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1 1 auto;
}

.deshipos-testimonials__avatar {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
	background: var(--dte-border);
}

.deshipos-testimonials__avatar--placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: #FFFFFF;
	background: var(--dte-brand);
	text-transform: uppercase;
	font-size: .9375rem;
}

.deshipos-testimonials__person-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.deshipos-testimonials__name {
	font-size: .9375rem;
	font-weight: 700;
	color: var(--dte-text);
	line-height: 1.3;
	letter-spacing: var(--dew-tracking-snug);
	overflow-wrap: anywhere;
	word-break: break-word;
}

.deshipos-testimonials__role {
	font-size: .75rem;
	color: var(--dte-faint);
	line-height: 1.3;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* ----- Stars ----- */
.deshipos-testimonials__stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
}
.deshipos-testimonials__star {
	width: 16px;
	height: 16px;
	display: block;
}
.deshipos-testimonials__star--on  { color: var(--dte-star-on); }
.deshipos-testimonials__star--off { color: var(--dte-star-off); }

/* ----- Dots ----- */
.deshipos-testimonials__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 32px;
}

.deshipos-testimonials__dot {
	appearance: none;
	border: 0;
	padding: 0;
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: #CBD5E1;
	cursor: pointer;
	transition:
		background var(--dew-dur-fast, 120ms) var(--dew-ease-out, ease),
		transform var(--dew-dur-fast, 120ms) var(--dew-ease-out, ease),
		width var(--dew-dur-base, 220ms) var(--dew-ease-out, ease);
}
.deshipos-testimonials__dot:hover {
	transform: scale(1.15);
}
.deshipos-testimonials__dot.is-active {
	background: var(--dte-brand);
	width: 24px;
}
.deshipos-testimonials__dot:focus-visible {
	outline: 2px solid var(--dte-brand);
	outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet — 2 cards per view */
@media (max-width: 960px) {
	.deshipos-testimonials {
		padding: 64px 18px;
	}
	.deshipos-testimonials__head {
		margin-bottom: 36px;
	}
	.deshipos-testimonials__track {
		--cols: 2;
		--gap: 18px;
	}
	.deshipos-testimonials__card {
		padding: 26px;
		gap: 14px;
	}
}

/* Mobile — 1 card per view */
@media (max-width: 640px) {
	.deshipos-testimonials {
		padding: 48px 16px;
	}
	.deshipos-testimonials__head {
		margin-bottom: 28px;
	}
	.deshipos-testimonials__heading {
		font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
	}
	.deshipos-testimonials__track {
		--cols: 1;
		--gap: 16px;
	}
	.deshipos-testimonials__card {
		padding: 24px;
		gap: 12px;
	}
	.deshipos-testimonials__quote-mark { font-size: 2.5rem; }
	.deshipos-testimonials__quote      { font-size: .9375rem; }
	.deshipos-testimonials__dots       { margin-top: 24px; }
}

/* Very small phones — slightly tighter card */
@media (max-width: 380px) {
	.deshipos-testimonials__footer {
		gap: 10px;
	}
	.deshipos-testimonials__stars { gap: 1px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.deshipos-testimonials__card,
	.deshipos-testimonials__dot,
	.deshipos-testimonials__track {
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.deshipos-testimonials__card:hover { transform: none; }
}
