/* Stav Logo Marquee
 *
 * Marquee defaults match the Merit reference: 44px-tall logos capped at 133px
 * wide, 88px apart, linear infinite scroll, no fade, no pause.
 * Gallery defaults take the McCombs reference's filter tabs and 32px gaps, but
 * with uniform logo boxes instead of a justified layout.
 */
.stav-lm {
	--stav-lm-height: 44px;
	--stav-lm-gap: 88px;
	--stav-lm-logo-max-w: 133px;
	--stav-lm-duration: 50s;
	--stav-lm-opacity: 1;
	--stav-lm-hover-opacity: var(--stav-lm-opacity);
	--stav-lm-fade: 0px;
	--stav-lm-tint: #ffffff;
	/* Gallery */
	--stav-lm-row-gap: 32px;
	--stav-lm-col-gap: 32px;
	--stav-lm-cols: 5;
	--stav-lm-grid-align: center;
	position: relative;
	width: 100%;
}

/* ---------- Shared logo item ---------- */
.stav-lm__item {
	flex: 0 0 auto;
	box-sizing: content-box;
	height: var(--stav-lm-height);
	display: flex;
	align-items: center;
	justify-content: center;
}

.stav-lm__link {
	display: flex;
	align-items: center;
	height: 100%;
}

.stav-lm__logo {
	display: block;
	height: 100%;
	opacity: var(--stav-lm-opacity);
	transition: opacity .3s ease;
}

.stav-lm--balanced .stav-lm__logo {
	height: calc(100% * var(--stav-lm-scale, 1));
}

.stav-lm__item:hover .stav-lm__logo {
	opacity: var(--stav-lm-hover-opacity);
}

.stav-lm .stav-lm__img {
	display: block;
	height: 100%;
	width: auto;
	max-width: var(--stav-lm-logo-max-w);
	max-height: none;
	object-fit: contain;
	margin: 0;
	border: 0;
	box-shadow: none;
	border-radius: 0;
	user-select: none;
	-webkit-user-drag: none;
}

/* Recolor: tint the white PNG to any single color via an SVG filter. */
.stav-lm__defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
	pointer-events: none;
}
.stav-lm__flood {
	flood-color: var(--stav-lm-tint);
}
.stav-lm--tint .stav-lm__img,
.stav-lm-color-tint .stav-lm__img {
	filter: var(--stav-lm-filter);
}

/* ---------- Marquee ---------- */
.stav-lm--marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--stav-lm-fade), #000 calc(100% - var(--stav-lm-fade)), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 var(--stav-lm-fade), #000 calc(100% - var(--stav-lm-fade)), transparent 100%);
}

.stav-lm__marquee {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	overflow: visible;
}

.stav-lm__track {
	display: flex;
	flex: 0 0 auto;
	animation: stav-lm-marquee var(--stav-lm-duration) linear infinite;
	will-change: transform;
}

.stav-lm[data-direction="right"] .stav-lm__track {
	animation-direction: reverse;
}

.stav-lm[data-pause="1"]:hover .stav-lm__track {
	animation-play-state: paused;
}

.stav-lm__list {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: flex-start;
	margin: 0;
	padding: 0;
}

.stav-lm--marquee .stav-lm__item {
	padding: 0 calc(var(--stav-lm-gap) / 2);
}

@keyframes stav-lm-marquee {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* ---------- Gallery: filters ---------- */
.stav-lm__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 10px;
	margin: 0 0 20px;
	padding: 0;
}

.stav-lm .stav-lm__filter {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	margin: 0;
	padding: 7px 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: normal;
	text-transform: uppercase;
	color: #1f3a61;
	transition: color .3s ease;
}

.stav-lm .stav-lm__filter:hover,
.stav-lm .stav-lm__filter:focus {
	background: transparent;
	box-shadow: none;
	color: #779b81;
}

.stav-lm .stav-lm__filter:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.stav-lm .stav-lm__filter.is-active {
	color: #779b81;
}

/* Optional active underline (color set in the widget; transparent by default). */
.stav-lm .stav-lm__filter::after {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 0;
	height: var(--stav-lm-line-h, 2px);
	background: var(--stav-lm-line, transparent);
	transform: scaleX(0);
	transition: transform .3s ease;
}
.stav-lm .stav-lm__filter.is-active::after {
	transform: scaleX(1);
}

/* ---------- Gallery: grid ---------- */
.stav-lm__grid {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--stav-lm-grid-align);
	gap: var(--stav-lm-row-gap) var(--stav-lm-col-gap);
}

.stav-lm--columns .stav-lm__grid {
	display: grid;
	grid-template-columns: repeat(var(--stav-lm-cols), minmax(0, 1fr));
	justify-items: center;
}

.stav-lm--columns .stav-lm__item {
	width: 100%;
	box-sizing: border-box;
}

.stav-lm--columns .stav-lm__link,
.stav-lm--columns .stav-lm__logo {
	max-width: 100%;
	min-width: 0;
}

.stav-lm--columns .stav-lm__img {
	max-width: min(100%, var(--stav-lm-logo-max-w));
}

.stav-lm--gallery .stav-lm__item {
	transition: opacity .3s ease, transform .3s ease;
}

.stav-lm--gallery .stav-lm__item.is-leaving,
.stav-lm--gallery .stav-lm__item.is-entering {
	opacity: 0;
	transform: scale(.92);
}

.stav-lm--gallery .stav-lm__item[hidden] {
	display: none;
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
	.stav-lm .stav-lm__track {
		animation-duration: calc(var(--stav-lm-duration) * 4);
	}
	.stav-lm--gallery .stav-lm__item {
		transition: none;
	}
}

.stav-lm-empty {
	padding: 24px;
	border: 1px dashed #c3c4c7;
	text-align: center;
	font-size: 14px;
	color: #787c82;
}
