/*
 * Barrierefreiheit (WCAG 2.1 AA) – Ergänzungen zu den Website-Stylesheets
 * Wird nach template_0_*.css geladen (TypoScript includeCSS._200).
 */

/* Sprunglink: erst bei Tastatur-Fokus sichtbar */
.skip-link {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.skip-link:focus {
	position: fixed;
	left: 16px;
	top: 16px;
	width: auto;
	height: auto;
	z-index: 100000;
	padding: 12px 20px;
	background: #ffffff;
	color: #1a1a1a;
	font-weight: bold;
	text-decoration: underline;
	border: 3px solid #1a1a1a;
	border-radius: 4px;
}

/* Sichtbarer Tastatur-Fokus für alle bedienbaren Elemente */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
	outline: 3px solid #1a1a1a !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #ffffff !important;
}
main:focus {
	outline: none;
}

/* Buttons der Werkzeugleiste sehen aus wie vorher (bisher <a>) */
.utility-bar button.contrast-button,
.utility-bar button.print-button,
button.alm_navi_toggle {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: inherit;
}

/* Kachel mit einem Link, die trotzdem vollflächig klickbar ist */
.a11y-card {
	position: relative;
}
.a11y-card .a11y-card-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Pause-Knopf für automatisch laufende Slider */
.a11y-slider-pause {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 5;
	width: 40px;
	height: 40px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #ffffff;
	cursor: pointer;
}

/* Werkzeugleiste: Buttons so groß wie zuvor die Links */
.utility-bar .utility-bar-icon button {
	display: inline-block;
	height: 25px;
	line-height: 0;
}
.utility-bar .utility-bar-icon button img {
	height: 25px;
}
#search_box button.searchbox_toggle {
	background: none;
	border: 0;
	padding: 0;
}

/* Formulare: Beschriftungen nur optisch ausblenden (Theme nutzt display:none),
   damit Screenreader sie weiter vorlesen – v. a. bei Auswahlfeldern ohne Platzhalter */
form .t_text .control-label,
form .t_textarea .control-label,
form.ce_form label.control-label {
	display: block !important;
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ===== Kontrastansicht (Umschalter in der Werkzeugleiste, body.high-contrast) =====
   Ergänzt die Theme-Regeln, damit alle Texte mind. 4,5:1 erreichen (WCAG 1.4.3). */
body.high-contrast .row_content a,
body.high-contrast .row_content a *:not(img) {
	color: #ffffff !important;
	background-color: #000000 !important;
}
body.high-contrast .alm_navi .megamenu_1 > a,
body.high-contrast .alm_navi .alm_navi_1 > li > a[style*="background"] {
	color: #ffffff !important;
	background-color: #000000 !important;
}
body.high-contrast .skip-link:focus {
	color: #ffffff;
	background: #000000;
	border-color: #ffffff;
}
/* Ismaning: graue Bereichsleiste */
body.high-contrast header .container.submenu-service-container {
	background-color: #000000 !important;
}
body.high-contrast header .container.submenu-service-container a {
	color: #ffffff !important;
}
/* Seiten ohne weiße Inhaltsfläche (z. B. 404, "Formular gesendet") */
body.high-contrast .row_content {
	background-color: #ffffff;
}

/* Blätter-Links der News: Mindestgröße 24 x 24 px (WCAG 2.5.8) */
.f3-widget-paginator > li > a,
.pagination > li > a {
	min-width: 24px;
	min-height: 24px;
	text-align: center;
}

/* Bereichsleiste (Mega-Menü): öffnet sich auch bei Tastatur-Fokus, nicht nur bei Maus-Hover */
.submenu-service .navi_service > ul > li:focus-within ul.alm_navi_service_2 {
	display: block;
}

/* Umbruch bei 320 px (WCAG 1.4.10): Inhalte dürfen nicht breiter als der Bildschirm werden */
main img,
main video,
main iframe {
	max-width: 100%;
}
main img {
	height: auto;
}
main select,
main input,
main textarea {
	max-width: 100%;
}
/* Lange deutsche Wörter (z. B. "Veranstaltungskalender") umbrechen statt abschneiden */
@media (max-width: 767px) {
	main h1, main h2, main h3, main h4, main h5, main h6 {
		overflow-wrap: break-word;
		hyphens: auto;
	}
}
.f3-widget-paginator > li > a,
.pagination > li > a {
	min-width: 26px;
	margin-left: 0;
}

/* Fußzeile: der Navigationsbereich (nav) um die Rechtliches-Links steht wie zuvor in einer Zeile mit dem Copyright */
@media (min-width: 768px) {
	footer.footer .row_footer_2 .container .row_footer_2_1 > nav,
	footer.footer .row_footer_2 .container .row_footer_2_1 > nav > div {
		display: inline-block;
	}
}

/* Umbruch bei 320 px: Kalenderbilder sind im Design fest 280 px breit – auf schmalen Bildschirmen auf Spaltenbreite begrenzen.
   (Bewusst gezielt; eine allgemeine img-Regel mit !important hat Größenvorgaben des Designs überschrieben.) */
@media (max-width: 767px) {
	.nbh-acc .nbh-acc-image img {
		max-width: 100% !important;
		height: auto;
	}
}
