/*
 * SpireTech Testimonial Ticker - frontend styles.
 *
 * Fonts: deliberately NOT importing Inter/Blinker here. This inherits
 * whatever font-family the surrounding theme has already set (Inter for
 * body, per SpireTech's site), and the .spiretech-name class falls back to
 * Blinker only if that's not already the inherited heading font - adjust
 * the font-family stacks below if the theme's font-loading setup needs
 * something more specific.
 *
 * v0.3: grew the card and the wave graphic by the same 40px, so the wave
 * covers more of the card from the bottom up while the quote text area
 * above it stays exactly the same size. This gives the badge/name/
 * industry/date cluster real room to sit fully on the colored wave
 * instead of floating above it in the white card background, which was
 * the actual complaint - moving the cluster down without more room to
 * move into just meant running out of space before reaching safety.
 *
 * v0.26.0: added the prev/next arrow layout. .spiretech-ticker-stage wraps
 * the viewport and the two arrow buttons. On desktop/tablet,
 * .spiretech-ticker-arrows uses display:contents so its two buttons
 * become direct flex items of the stage (ordered prev, viewport, next) -
 * that's what lets the arrows sit outside the card frame, in the stage's
 * own side margins, rather than overlapping the cards. Below the 480px
 * breakpoint, .spiretech-ticker-arrows becomes a real flex row of its own
 * (both arrows side by side) placed under the viewport instead.
 */

.spiretech-ticker-stage {
	display: flex;
	align-items: center;
	gap: 6px;
}

.spiretech-ticker-viewport {
	overflow: hidden;
	width: 100%;
	min-width: 0;
	order: 2;
	flex: 1;
	-webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
	mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
}

.spiretech-ticker-arrows {
	display: contents;
}

.spiretech-ticker-prev {
	order: 1;
}

.spiretech-ticker-next {
	order: 3;
}

.spiretech-ticker-arrow {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	color: #7A8592;
}

.spiretech-ticker-arrow:hover {
	color: #072C66;
}

.spiretech-ticker-arrow svg {
	width: 26px;
	height: 26px;
}

@media (max-width: 480px) {
	.spiretech-ticker-stage {
		flex-direction: column;
		gap: 0;
	}

	.spiretech-ticker-viewport {
		order: 1;
		width: 100%;
	}

	.spiretech-ticker-arrows {
		display: flex;
		order: 2;
		justify-content: center;
		gap: 28px;
		margin-top: 10px;
	}

	.spiretech-ticker-prev,
	.spiretech-ticker-next {
		order: 0;
	}
}

.spiretech-ticker-track {
	display: flex;
	gap: 18px;
	width: max-content;
}

@keyframes spiretech-ticker-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

.spiretech-ticker-anim {
	animation-name: spiretech-ticker-scroll;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.spiretech-ticker-anim:hover,
.spiretech-ticker-anim.spiretech-paused {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	.spiretech-ticker-anim {
		animation: none;
	}
}

.spiretech-wave-card {
	position: relative;
	width: 220px;
	height: 385px;
	flex-shrink: 0;
	background: #fff;
	border: 1px solid #E9EDF1;
	border-radius: 14px;
	overflow: hidden;
}

.spiretech-wave-card.spiretech-expanded {
	height: auto;
	width: 260px;
}

.spiretech-card-content {
	padding: 20px 18px 200px;
}

.spiretech-quote-icon svg {
	width: 39px;
	height: 39px;
}

.spiretech-quote-text {
	font-size: 13px;
	line-height: 1.6;
	color: #373737;
	margin: 10px 0 0;
}

.spiretech-clamp {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.spiretech-read-more {
	background: none;
	border: none;
	padding: 0;
	margin-top: 8px;
	display: none;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}

.spiretech-read-more.spiretech-visible {
	display: block;
}

.spiretech-wave {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 190px;
}

.spiretech-badge {
	position: absolute !important;
	bottom: 68px !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	width: 52px !important;
	height: 52px !important;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #fff;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box;
	line-height: 1 !important;
}

.spiretech-badge svg {
	width: 22px !important;
	height: 22px !important;
	max-width: 22px !important;
	max-height: 22px !important;
	display: block !important;
	flex-shrink: 0;
}

/*
 * All three text lines below also get a soft dark text-shadow, as a
 * second line of defense so legibility never depends purely on precise
 * wave geometry.
 *
 * v0.10: Divi's own global typography rules for <p> tags (line-height,
 * margin-bottom) have higher CSS specificity than a single class
 * selector like .spiretech-name, and were winning that fight - eating
 * into the badge/text gap invisibly (never visible in "view source",
 * since it's a computed-style conflict, not a caching problem). Every
 * property below that this layout actually depends on is now
 * !important so nothing from the surrounding theme can shift it.
 */
.spiretech-name {
	font-family: 'Blinker', inherit, sans-serif;
	font-weight: 700 !important;
	font-size: 14px !important;
	line-height: 1.2 !important;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	margin: 0 !important;
	padding: 0 !important;
	text-align: center !important;
	position: absolute !important;
	bottom: 38px !important;
	left: 0 !important;
	right: 0 !important;
}

.spiretech-industry {
	font-size: 11px !important;
	line-height: 1.2 !important;
	color: rgba(255, 255, 255, 0.85);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	text-align: center !important;
	margin: 0 !important;
	padding: 0 !important;
	position: absolute !important;
	bottom: 23px !important;
	left: 0 !important;
	right: 0 !important;
}

.spiretech-date {
	font-size: 13px !important;
	line-height: 1.2 !important;
	font-weight: 300 !important;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.92);
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	text-align: center !important;
	margin: 0 !important;
	padding: 0 !important;
	position: absolute !important;
	bottom: 6px !important;
	left: 0 !important;
	right: 0 !important;
}

/*
 * Visual Builder preview only (see assets/js/vb-module.js). Never shown on
 * the live site - real cards use the rules above instead.
 */
.spiretech-vb-preview-note {
	font: 11px/1.4 sans-serif;
	color: #888;
	padding: 6px 2px 10px;
}

.spiretech-vb-sample-track {
	display: flex;
	gap: 18px;
	overflow-x: auto;
}

.spiretech-vb-sample-wave {
	height: 60px;
}

.spiretech-vb-sample-card .spiretech-name {
	position: static;
	padding: 10px 0 14px;
}
