/* Site-specific additions kept separate from Template Creator output. */

/* The banner spacer comes first; the menu sits directly below it. */
#logo > .inner {
	display: flex;
	flex-direction: column;
	border-bottom: 0;
}

#logo > .inner > .position-0:not(._menu) {
	order: 1;
	min-height: 200px;
}

#logo > .inner > .position-0._menu {
	order: 2;
	border-top: 1px solid #828422;
}

/* Horizontal desktop navigation with accessible dropdowns. */
#logo .mod-menu {
	display: flex;
	flex-flow: row wrap;
	align-items: stretch;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

#logo .mod-menu > .nav-item {
	display: block;
	position: relative;
	width: auto;
}

#logo .mod-menu > .nav-item > a,
#logo .mod-menu > .nav-item > .mod-menu__toggle-sub {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.55rem 0.9rem;
	box-sizing: border-box;
	border: 0;
	background: transparent;
	color: inherit;
	font-family: Helvetica, sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 20px;
	text-decoration: none;
	text-align: left;
	cursor: pointer;
}

#logo .mod-menu__toggle-sub .icon-chevron-down {
	display: none;
}

#logo .mod-menu .mod-menu__sub {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1000;
	display: none;
	min-width: 18rem;
	margin: 0;
	padding: 0.35rem 0;
	list-style: none;
	background: #151f17;
	border: 1px solid #828422;
}

#logo .mod-menu .mod-menu__sub[aria-hidden="true"] {
	display: none;
}

#logo .mod-menu .mod-menu__sub[aria-hidden="false"],
#logo .mod-menu > .nav-item:hover > .mod-menu__sub,
#logo .mod-menu > .nav-item:focus-within > .mod-menu__sub {
	display: block;
}

#logo .mod-menu__sub .nav-item,
#logo .mod-menu__sub a {
	display: block;
	width: 100%;
	box-sizing: border-box;
}

#logo .mod-menu__sub a {
	padding: 0.45rem 0.8rem;
}

/* Keep the front-page selection gallery close to the navigation. */
.homepage .tck-article-body > p:empty:first-child {
	display: none;
}

#Auswahlgalerie.has-gallery-controls {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) 42px;
	align-items: center;
	gap: 6px;
}

/* Show five images per view and keep the rest horizontally available. */
#Auswahlgalerie > ul {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

#Auswahlgalerie > ul::-webkit-scrollbar {
	display: none;
}

#Auswahlgalerie > ul > li {
	flex: 0 0 calc((100% - 8px) / 5);
	width: calc((100% - 8px) / 5) !important;
	margin: 0 !important;
	scroll-snap-align: start;
}

#Auswahlgalerie .captionplus,
#Auswahlgalerie .sigplus-image,
#Auswahlgalerie .sigplus-preview {
	width: 100% !important;
	max-width: 100%;
	box-sizing: border-box;
}

#Auswahlgalerie .sigplus-preview {
	display: block;
	height: auto !important;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: center top;
}

.gallery-scroll-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 52px;
	padding: 0;
	border: 1px solid #526953;
	border-radius: 6px;
	background: #1d2c20;
	color: #c3e8c6;
	font-family: Helvetica, sans-serif;
	font-size: 36px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gallery-scroll-button:hover,
.gallery-scroll-button:focus-visible {
	background: #2b402e;
	color: #ffffff;
}

.gallery-scroll-button.is-hidden {
	visibility: hidden;
	pointer-events: none;
}

@media screen and (max-width: 758px) {
	#logo .mod-menu {
		display: block;
	}

	#logo .mod-menu > .nav-item {
		width: 100%;
	}

	#logo .mod-menu .mod-menu__sub {
		position: static;
		min-width: 0;
		width: 100%;
		border-right: 0;
		border-left: 0;
	}

	#Auswahlgalerie.has-gallery-controls {
		grid-template-columns: 34px minmax(0, 1fr) 34px;
		gap: 4px;
	}

	#Auswahlgalerie > ul > li {
		flex-basis: calc((100% - 2px) / 2);
		width: calc((100% - 2px) / 2) !important;
	}

	.gallery-scroll-button {
		width: 32px;
		height: 46px;
		font-size: 30px;
	}
}
