/* Aluna Scientist Testimonials — compact ticker over the existing hero gradient. */

.ast-ticker-wrap {
	--ast-h: 92px;
	--ast-h-m: 104px;
	--ast-photo: 52px;
	--ast-photo-m: 46px;
	--ast-font: 13px;
	--ast-font-m: 12px;
	--ast-gap: 48px;
	--ast-item-w: 520px;
	--ast-item-w-m: 340px;
	--ast-bg-alpha: 0;
	--ast-cur-h: var(--ast-h);
	--ast-cur-photo: var(--ast-photo);
	--ast-cur-font: var(--ast-font);
	--ast-cur-w: var(--ast-item-w);
	container-type: inline-size;
	container-name: ast;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

/* Auto placement: held back until the script moves it into the banner. */
.ast-ticker-wrap[data-ast-target]:not([data-ast-target=""]):not(.ast-placed) {
	display: none;
}

/* Inside the banner: overlay its top padding so the hero height is unchanged. */
.ast-ticker-wrap.ast-in-hero {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 3;
}

/* Fallback when the banner is not found: stand-alone strip with a similar gradient. */
.ast-ticker-wrap.ast-standalone {
	background: linear-gradient(100deg, #1a1a9e 0%, #2433c4 55%, #2f5fd8 100%);
}

.ast-ticker {
	position: relative;
	display: flex;
	align-items: center;
	height: var(--ast-cur-h);
	background: rgba(6, 14, 82, var(--ast-bg-alpha));
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	color: #fff;
	font-family: inherit;
	font-size: var(--ast-cur-font);
	line-height: 1.42;
	text-align: left;
	overflow: hidden;
	box-sizing: border-box;
}

.ast-viewport {
	flex: 1 1 auto;
	height: 100%;
	overflow: hidden;
	outline: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.ast-viewport:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.ast-track {
	display: flex;
	width: max-content;
	height: 100%;
	animation: ast-scroll var(--ast-duration, 120s) linear infinite;
	will-change: transform;
}

.ast-list {
	display: flex;
	align-items: center;
	gap: var(--ast-gap);
	margin: 0;
	padding: 0 calc(var(--ast-gap) / 2);
	list-style: none;
}

@keyframes ast-scroll {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

.ast-ticker.is-paused .ast-track,
.ast-ticker.ast-hover-pause:hover .ast-track,
.ast-ticker:focus-within .ast-track {
	animation-play-state: paused;
}

.ast-item {
	display: flex;
	align-items: center;
	gap: 14px;
	width: var(--ast-cur-w);
	margin: 0;
	padding: 0;
	flex: none;
}

.ast-item + .ast-item {
	position: relative;
}

.ast-item + .ast-item::before {
	content: "";
	position: absolute;
	left: calc(var(--ast-gap) / -2);
	top: 18%;
	bottom: 18%;
	width: 1px;
	background: rgba(255, 255, 255, 0.16);
}

.ast-photo {
	flex: none;
	width: var(--ast-cur-photo) !important;
	height: var(--ast-cur-photo) !important;
	max-width: none;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.12);
}

.ast-photo--initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: calc(var(--ast-cur-photo) * 0.34);
	letter-spacing: 0.02em;
	color: #fff;
}

.ast-body {
	margin: 0;
	min-width: 0;
}

/* Themes often style blockquote heavily (Onum: 24px / 42px); neutralise it inside the ticker. */
.ast-ticker-wrap .ast-quote {
	position: static !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	font: inherit !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	quotes: none;
}

.ast-ticker-wrap .ast-quote::before,
.ast-ticker-wrap .ast-quote::after {
	content: none !important;
	display: none !important;
}

.ast-ticker-wrap .ast-quote p {
	margin: 0 0 3px !important;
	padding: 0 !important;
	color: rgba(255, 255, 255, 0.96);
	font: inherit !important;
	font-style: normal !important;
}

.ast-quote p::before { content: "\201C"; }
.ast-quote p::after  { content: "\201D"; }

.ast-meta {
	display: block;
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.86em;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ast-name {
	color: #fff;
	font-weight: 600;
}

.ast-sep {
	margin: 0 0.4em;
	opacity: 0.6;
}

.ast-badge {
	display: inline-block;
	margin-left: 0.35em;
	padding: 0 0.5em;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 999px;
	font-size: 0.85em;
	line-height: 1.5;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
}

.ast-badge--draft {
	border-color: #ffc56a;
	color: #ffc56a;
}

.ast-toggle {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0 12px 0 4px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	line-height: 0;
	transition: background 0.2s;
}

.ast-toggle:hover,
.ast-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.ast-toggle svg { fill: currentColor; }
.ast-toggle .ast-ico-play { display: none; }
.ast-ticker.is-paused .ast-toggle .ast-ico-play { display: block; }
.ast-ticker.is-paused .ast-toggle .ast-ico-pause { display: none; }

/* Mobile sizes follow the ticker's own width, so the admin preview matches phones. */
@container ast (max-width: 767px) {
	.ast-ticker-wrap > .ast-ticker {
		--ast-cur-h: var(--ast-h-m);
		--ast-cur-photo: var(--ast-photo-m);
		--ast-cur-font: var(--ast-font-m);
		--ast-cur-w: var(--ast-item-w-m);
	}
	.ast-item { gap: 10px; }
	.ast-toggle { margin-right: 8px; }
	.ast-viewport {
		-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
		mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
	}
}

@media (min-width: 768px) {
	.ast-ticker-wrap.ast-hide-desktop { display: none !important; }
}

@media (max-width: 767px) {
	.ast-ticker-wrap.ast-hide-mobile { display: none !important; }
}

/* Reduced motion: no auto-scroll; visitors swipe or scroll sideways instead. */
@media (prefers-reduced-motion: reduce) {
	.ast-track { animation: none; }
	.ast-list--clone { display: none; }
	.ast-viewport {
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-mask-image: none;
		mask-image: none;
	}
	.ast-item { scroll-snap-align: start; }
	.ast-toggle { display: none; }
}

/* ---------- Institution logo ticker (white area below the banner) ---------- */

.ast-logos-wrap {
	--ast-logo-h: 48px;
	--ast-logo-h-m: 32px;
	--ast-cur-logo-h: var(--ast-logo-h);
	--ast-gap: 72px;
}

/* Fills the white section and centres the logos vertically in it. */
.ast-logos-wrap.ast-in-hero {
	top: 0;
	bottom: 0;
	z-index: 2;
}

.ast-logos-wrap.ast-standalone {
	background: none;
}

.ast-ticker-wrap > .ast-ticker.ast-logos {
	height: 100%;
	min-height: calc(var(--ast-cur-logo-h) + 32px);
	background: none;
	border: 0;
	color: #1b1491;
}

.ast-logos .ast-list {
	gap: var(--ast-gap);
}

.ast-logo-item {
	display: flex;
	flex: none;
	align-items: center;
	margin: 0;
	padding: 0;
}

.ast-logos .ast-item + .ast-item::before,
.ast-logo-item::before {
	content: none;
}

.ast-logo {
	display: block;
	width: auto !important;
	height: var(--ast-cur-logo-h) !important;
	max-width: none !important;
	object-fit: contain;
	border-radius: 0;
	box-shadow: none;
	transition: filter 0.3s, opacity 0.3s;
}

.ast-logos.is-gray .ast-logo {
	filter: grayscale(1);
	opacity: 0.7;
}

.ast-logos.is-gray .ast-logo-item:hover .ast-logo {
	filter: none;
	opacity: 1;
}

.ast-logos .ast-toggle {
	width: 24px;
	height: 24px;
	border-color: rgba(27, 20, 145, 0.25);
	background: rgba(27, 20, 145, 0.04);
	color: #1b1491;
	opacity: 0.6;
}

.ast-logos .ast-toggle:hover,
.ast-logos .ast-toggle:focus-visible {
	background: rgba(27, 20, 145, 0.1);
	outline-color: #1b1491;
	opacity: 1;
}

.ast-logos .ast-viewport:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(27, 20, 145, 0.4);
}

@container ast (max-width: 767px) {
	.ast-ticker-wrap > .ast-ticker.ast-logos {
		--ast-cur-logo-h: var(--ast-logo-h-m);
	}
	.ast-logos .ast-list {
		gap: calc(var(--ast-gap) * 0.6);
	}
}
