/*
 * Footer logos ([wartegg_logos] / wartegg_hotel_logos_html()) – matches the
 * w23 theme (Gotham, türkis).
 *
 * Every logo gets the same visual area: PHP sets --wl-f = √(width/height),
 * the image is --wl-base · --wl-f wide.
 *
 * Desktop: the groups share the full width, each under its own line (the
 * heading's bottom border), so the lines bracket the groups; logos are
 * spread over their group, a single logo sits at the right end. Untitled
 * groups get an empty heading, i.e. just the line.
 *
 * Mobile: one row per group that scrolls sideways when it doesn't fit,
 * edge to edge, with fades on the sides that have more (classes set by
 * logos.js).
 */

body .wartegg-logos {
	--wl-base: 76px; /* Wartegg_Hotel_Logos::BASE */
	--wl-gap: 2.25rem;
	--wl-accent: rgb(62, 175, 147);
	--wl-muted: #8c8c8c;
	--wl-fade: 2.5rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 2.5rem 3rem;
	margin-top: 2em;
	padding: calc(1em + 18px) 0 2em; /* +18px = what the smaller logos gave back */
	text-align: left;
}
body.kultur .wartegg-logos {
	--wl-accent: #4c0508; /* @rot_dunkel, like the theme's other footer lines */
}
body .wartegg-logos.is-inline {
	margin-top: 0;
}

body .wartegg-logos .wl-group {
	flex: 1 1 auto;
	min-width: 0;
}

body .wartegg-logos .wl-title {
	margin: 0 0 1.5rem;
	padding-bottom: .7rem;
	border-bottom: 1px solid var(--wl-accent);
	font-family: 'Gotham SSm A', 'Gotham SSm B', Helvetica, Arial, sans-serif;
	font-size: .68rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wl-muted);
}

body .wartegg-logos .wl-list {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wl-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
body .wartegg-logos .wl-group.is-single .wl-list {
	justify-content: flex-end;
}

body .wartegg-logos .wl-item {
	flex: none;
	margin: 0;
	padding: 0;
}
body .wartegg-logos .wl-item::before {
	content: none;
}

body .wartegg-logos .wl-link {
	display: block;
	border-radius: 4px;
	outline-offset: 6px;
}
body .wartegg-logos a.wl-link:focus-visible {
	outline: 2px solid var(--wl-accent);
}

body .wartegg-logos .wl-img {
	display: block;
	width: calc(var(--wl-base) * var(--wl-f, 1));
	max-width: none;
	height: auto;
	max-height: calc(var(--wl-base) * 1.15);
	object-fit: contain;
	transition: transform .25s ease;
}
@media (hover: hover) {
	body .wartegg-logos a.wl-link:hover .wl-img {
		transform: translateY(-3px);
	}
}

body .wartegg-logos .wl-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (min-width: 1400px) {
	body .wartegg-logos {
		--wl-base: 84px;
		--wl-gap: 2.75rem;
	}
}

/* Mobile: one sideways-scrolling row per group */
@media (max-width: 767px) {
	body .wartegg-logos {
		--wl-base: 62px;
		--wl-gap: 1.75rem;
		--wl-bleed: 2.5vw; /* side gutter of the 95vw footer */
		display: block;
		text-align: left;
	}
	body .wartegg-logos .wl-group + .wl-group {
		margin-top: 1.75rem;
	}
	body .wartegg-logos .wl-title {
		margin-bottom: .8rem;
	}
	body .wartegg-logos .wl-list,
	body .wartegg-logos .wl-group.is-single .wl-list {
		justify-content: flex-start;
		/* Full viewport width, content still aligned with the footer. */
		margin-inline: calc(-1 * var(--wl-bleed));
		padding: .5rem 0 .5rem var(--wl-bleed);
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x proximity;
		scroll-padding-inline: var(--wl-bleed);
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	body .wartegg-logos .wl-list::-webkit-scrollbar {
		display: none;
	}
	body .wartegg-logos .wl-item {
		scroll-snap-align: start;
	}
	/* Right gutter on the item: end padding of flex scrollers is unreliable. */
	body .wartegg-logos .wl-item:last-child {
		padding-right: var(--wl-bleed);
	}

	body .wartegg-logos .wl-list.has-more-end {
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--wl-fade)), transparent);
		mask-image: linear-gradient(to right, #000 calc(100% - var(--wl-fade)), transparent);
	}
	body .wartegg-logos .wl-list.has-more-start {
		-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--wl-fade));
		mask-image: linear-gradient(to right, transparent, #000 var(--wl-fade));
	}
	body .wartegg-logos .wl-list.has-more-start.has-more-end {
		-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--wl-fade), #000 calc(100% - var(--wl-fade)), transparent);
		mask-image: linear-gradient(to right, transparent, #000 var(--wl-fade), #000 calc(100% - var(--wl-fade)), transparent);
	}
}

@media (prefers-reduced-motion: reduce) {
	body .wartegg-logos .wl-img {
		transition: none;
	}
}
