/**
 * Dark Testimonial Card widget.
 *
 * Specificity note: base rules use two class levels (e.g.
 * `.tmt-testimonial-card .x`) so they beat theme/kit rules like
 * `.elementor-kit-N blockquote` or `.container p`, while staying below the
 * three-class selectors Elementor generates from the panel controls - those
 * must keep winning.
 */

.tmt-testimonial-card {
	background-color: #1d3446;
	padding: 48px;
	border-radius: 8px;
}

/*
 * Structural reset for the single-card wrapper and the slider root: neither
 * carries its own visual styling. Both fill the width of whatever column,
 * container or section they are placed in - matching how every other widget
 * in this theme behaves - rather than capping their own width. A Max Width
 * control (Style > Container) is available for anyone who wants a narrower,
 * centred card instead.
 */
.tmt-testimonial-card-single,
.tmt-testimonial-card-slider {
	display: block;
	width: 100%;
}

/* Header --------------------------------------------------------------------
 * A caption above the card (single) or above the whole slider (multiple), so
 * the selector targets the class directly rather than nesting it under
 * .tmt-testimonial-card. Block-level and full width so it never overlaps or
 * clips against the card below it. */

.tmt-testimonial-card__header {
	display: block;
	margin: 0 0 16px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #1d3446;
}

/* Quote --------------------------------------------------------------------
 * Icon sits to the left of the text in a flex row; on narrow cards it can
 * still wrap onto its own line above the quote because the row is allowed to
 * wrap, so a very small container never clips the icon against the text. */

.tmt-testimonial-card .tmt-testimonial-card__quote-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

.tmt-testimonial-card .tmt-testimonial-card__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-inline-end: 20px;
	font-size: 48px;
	line-height: 1;
	color: #e4572e;
}

.tmt-testimonial-card .tmt-testimonial-card__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.tmt-testimonial-card .tmt-testimonial-card__icon i {
	font-size: inherit;
	line-height: 1;
}

/*
 * Default look from the approved design: a large typographic quote mark, not
 * an icon font glyph, so it always renders even if the site never loads
 * Font Awesome (or whichever icon library a custom Icon control picks).
 */
.tmt-testimonial-card .tmt-testimonial-card__icon--text {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.6em;
	font-weight: 700;
	line-height: 0.6;
}

.tmt-testimonial-card .tmt-testimonial-card__quote {
	flex: 1 1 260px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: 18px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.6;
	color: #e8eef2;
}

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

.tmt-testimonial-card .tmt-testimonial-card__author {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

.tmt-testimonial-card .tmt-testimonial-card__accent-line {
	display: block;
	width: 40px;
	height: 2px;
	margin-block: 24px;
	background-color: #e4572e;
}

.tmt-testimonial-card .tmt-testimonial-card__author-name {
	margin: 0 0 4px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: #fff;
}

.tmt-testimonial-card .tmt-testimonial-card__author-title {
	margin: 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #8fa3b0;
}

/* Slider skeleton -------------------------------------------------------------
 * Only present when 2+ testimonials are added; a single testimonial renders
 * without any of this. Mirrors the Quote Slider widget's engine (quotes.js /
 * quotes.css) but namespaced to this widget's own markup. */

.tmt-testimonial-card-slider {
	--tmt-tc-speed: 500ms;
	--tmt-tc-dot: rgba(255, 255, 255, 0.3);
	--tmt-tc-dot-active: #e4572e;
	--tmt-tc-dot-size: 8px;

	position: relative;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__stage {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	cursor: grab;
	touch-action: pan-y;
}

.tmt-testimonial-card-slider.is-dragging .tmt-testimonial-card__viewport {
	cursor: grabbing;
	user-select: none;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__track {
	display: flex;
	align-items: stretch;
	/*
	 * Structural invariant, not cosmetics: the move is
	 * `translate3d(-N * 100%)` of this element's width, and each slide is
	 * `flex: 0 0 100%` of its content box. Any padding, border or gap here
	 * makes the step and the slide pitch disagree - see quotes.css for the
	 * full explanation of why this must stay bare.
	 */
	padding: 0;
	border-width: 0;
	gap: 0;
	will-change: transform;
	transition: transform var(--tmt-tc-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.tmt-testimonial-card-slider .tmt-testimonial-card__track.is-instant {
	transition: none;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__slide {
	flex: 0 0 100%;
	min-width: 0;
	opacity: 1;
	transition: opacity 0s linear var(--tmt-tc-speed);
}

.tmt-testimonial-card-slider .tmt-testimonial-card__slide:not(.is-current) {
	opacity: 0;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__slide.is-current {
	transition-delay: 0s;
}

/* Fade effect: all slides share one grid cell, no track transform needed. */

.tmt-testimonial-card-slider--fade .tmt-testimonial-card__track {
	display: grid;
	grid-template-areas: "slide";
	transform: none !important;
	transition: none;
	will-change: auto;
}

.tmt-testimonial-card-slider--fade .tmt-testimonial-card__slide {
	grid-area: slide;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--tmt-tc-speed) ease;
	transition-delay: 0s;
}

.tmt-testimonial-card-slider--fade .tmt-testimonial-card__slide.is-current {
	opacity: 1;
	pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
	.tmt-testimonial-card-slider .tmt-testimonial-card__track {
		transition-duration: 1ms;
	}

	.tmt-testimonial-card-slider--fade .tmt-testimonial-card__slide {
		transition-duration: 1ms;
	}
}

/* Arrows ------------------------------------------------------------------- */

.tmt-testimonial-card-slider button.tmt-testimonial-card__arrow,
.tmt-testimonial-card-slider button.tmt-testimonial-card__arrow:hover,
.tmt-testimonial-card-slider button.tmt-testimonial-card__arrow:focus,
.tmt-testimonial-card-slider button.tmt-testimonial-card__arrow:active {
	min-width: 0;
	min-height: 0;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	font-family: inherit;
	font-weight: 400;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	-webkit-appearance: none;
	appearance: none;
}

.tmt-testimonial-card-slider button.tmt-testimonial-card__arrow {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 15px;
	cursor: pointer;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__arrow svg {
	display: block;
	width: 1em;
	height: 1em;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__arrow:focus {
	outline: none;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__arrow:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__arrow[disabled] {
	opacity: 0.35;
	cursor: default;
}

.tmt-testimonial-card-slider .tmt-testimonial-card__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Dots ----------------------------------------------------------------------- */

.tmt-testimonial-card-slider .tmt-testimonial-card__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
}

.tmt-testimonial-card-slider button.tmt-testimonial-card__dot,
.tmt-testimonial-card-slider button.tmt-testimonial-card__dot:hover,
.tmt-testimonial-card-slider button.tmt-testimonial-card__dot:focus,
.tmt-testimonial-card-slider button.tmt-testimonial-card__dot:active {
	min-width: 0;
	min-height: 0;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.tmt-testimonial-card-slider button.tmt-testimonial-card__dot {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: var(--tmt-tc-dot-size);
	height: var(--tmt-tc-dot-size);
	border-radius: 999px;
	background-color: var(--tmt-tc-dot);
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.tmt-testimonial-card-slider button.tmt-testimonial-card__dot.is-current {
	background-color: var(--tmt-tc-dot-active);
	transform: scale(1.25);
}

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

@media (max-width: 480px) {
	.tmt-testimonial-card {
		padding: 32px 24px;
	}

	.tmt-testimonial-card .tmt-testimonial-card__icon {
		font-size: 36px;
	}

	.tmt-testimonial-card-slider .tmt-testimonial-card__arrow {
		width: 32px;
		height: 32px;
	}
}
