/**
 * Portal overrides on top of archive theme CSS.
 * Keeps layout fixes out of Frame/assets.html inline <style>.
 */

#hauptinhalt img {
	max-width: 100%;
	height: auto;
}

#hauptinhalt .ba-slider > img {
	max-width: none;
	width: 100%;
	height: auto;
}

#hauptinhalt .ba-slider .resize img {
	max-width: none;
	height: 100%;
	width: auto !important;
}

#hauptinhalt .c-element:has(table),
#hauptinhalt .c-col:has(table) {
	max-width: 100%;
	overflow-x: auto;
}

/* Hero banners sit under the absolute header. Other pages keep the stylesheet offset. */
body:not(.start) #hauptinhalt:has(#highlight) {
	padding-top: 0 !important;
}

/* Text pages without their own container stay in the content column. */
#hauptinhalt:not(:has(.container)):not(:has(#c-page)):not(:has(#highlight)) {
	box-sizing: border-box;
	width: min(1140px, 100%);
	margin-inline: auto;
}

#hauptinhalt:not(:has(#c-page)):not(:has(.container)) h1:not(.highlight-title) {
	text-align: center;
	text-transform: uppercase;
	font-weight: 900;
}

#hauptinhalt .txt_xl,
#hauptinhalt p.bold {
	font-size: 1.35rem;
	font-weight: 700;
	margin-top: 1.75rem;
}

#hauptinhalt .margin-oben-xl {
	margin-top: 2rem;
}

#hauptinhalt .margin-unten-0 {
	margin-bottom: 0;
}

#hauptinhalt ul.list-lines {
	margin-left: 1.25rem;
}

/* Bootstrap .row negative gutters must not pull bare page titles under previous media. */
#hauptinhalt > h1.title,
#hauptinhalt section.pt-0 > .container > h1.title,
#hauptinhalt .container > h1.title:first-child {
	position: relative;
	z-index: 1;
	clear: both;
	margin-left: 0;
	margin-right: 0;
	max-width: 100%;
}

#hauptinhalt .row > h1.title,
#hauptinhalt .c-row > h1.title {
	margin-left: 0;
	margin-right: 0;
	padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
	padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
	width: 100%;
	max-width: 100%;
}

@media (max-width: 1200px) {
	#hauptinhalt:not(:has(.container)):not(:has(#c-page)):not(:has(#highlight)) {
		width: 100%;
		padding-left: 30px;
		padding-right: 30px;
	}
}

@media (max-width: 480px) {
	#hauptinhalt:not(:has(.container)):not(:has(#c-page)):not(:has(#highlight)) {
		padding-left: 25px;
		padding-right: 25px;
	}
}

@media (max-width: 767px) {
	#hauptinhalt {
		padding-right: 2.4rem;
	}
}
