/*
 * Anpassungen für den Neubau: Lato lokal statt Google Fonts, Elementor-Container verhalten sich wie die alten
 * TYPO3-Blöcke (section > div#c… > article > div#c…), damit css/alt-*.css unverändert gilt.
 */

@font-face {
	font-family: 'Lato';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url(../fonts/lato-latin-300-normal.woff2) format('woff2');
}

@font-face {
	font-family: 'Lato';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/lato-latin-400-normal.woff2) format('woff2');
}

@font-face {
	font-family: 'Lato';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(../fonts/lato-latin-700-normal.woff2) format('woff2');
}

/*
 * Container ohne Elementor-Flex, -Abstände und -Breiten: die alten Regeln bestimmen das Layout. Nur Variablen,
 * keine Eigenschaften – so gewinnen die alten Regeln auch bei geringerer Spezifität (z. B. #c97 { display:flex }).
 */
#content .elementor .e-con {
	--display: block;
	--flex-direction: row;
	--align-items: normal;
	--align-content: normal;
	--justify-content: normal;
	--container-widget-width: auto;
	--position: static;
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--gap: 0px;
	--row-gap: 0px;
	--column-gap: 0px;
	--width: auto;
	--content-width: none;
	--margin-top: 0px;
	--margin-bottom: 0px;
	--container-max-width: none;
	--flex-wrap: nowrap;
	--z-index: auto;
	--overflow: visible;
}

#content .elementor .e-con-inner {
	display: contents;
}

/*
 * Elementor begrenzt Bilder auf die Breite des Elternelements; TYPO3 nicht (z. B. Visitenkarte in der Tabelle
 * von c8, Partner-Logos). Gleiche Spezifität wie Elementors Regel, damit die alten Regeln weiter gewinnen.
 */
.elementor img {
	max-width: none;
}

/* Elementor gibt Widgets position:relative; bei TYPO3 waren die div#c… statisch (Bezug für absolute Kinder) */
#content .elementor .elementor-element {
	--widgets-spacing: 0px;
}

body:not(.elementor-editor-active) #content .elementor .elementor-widget {
	position: static;
}

/* Diashow (js/nagel.js) wie Cycle2: erste Zeile als unsichtbarer Platzhalter für die Höhe, Bilder übereinander */
.article.slideshow .nagel-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity .5s, visibility 0s .5s;
}

.article.slideshow .nagel-slide.aktiv {
	opacity: 1;
	visibility: visible;
	z-index: 1;
	transition: opacity .5s;
}

.article.slideshow .nagel-sentinel {
	visibility: hidden;
}

/* Im Elementor-Editor läuft js/nagel.js nicht: dort nur das erste Bild der Diashow zeigen */
.elementor-editor-active .article.slideshow .csc-textpic-imagerow:not(:first-child) {
	display: none;
}

/* Cycle2 nahm die Bildzeilen aus .csc-textpic-imagewrap heraus, dadurch galt der Abstand unter dem Bild nicht */
.article.slideshow div.csc-textpic .csc-textpic-imagewrap .csc-textpic-image {
	margin-bottom: 0;
}

/* Pfeil nach oben: TYPO3 hatte style="display:block" und blendete per jQuery ein/aus */
a.back-to-top {
	display: none;
	text-decoration: none;
}

a.back-to-top.sichtbar {
	display: block;
}

/* Menü-Schalter per Tastatur erreichbar */
#btn .navicon {
	cursor: pointer;
}

/* Spamschutz der Formulare (inc/formulare.php) */
.nagel-hp {
	position: absolute !important;
	left: -99999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.powermail_message_ok,
.powermail_message_error,
.powermail_error {
	display: block;
	padding: 6px 10px;
	margin: 0 0 10px;
}

.powermail_message_ok {
	border: 1px solid #3c763d;
	color: #3c763d;
	background: #dff0d8;
}

.powermail_message_error,
.powermail_error {
	color: #a94442;
}

.powermail_message_error {
	border: 1px solid #a94442;
	background: #f2dede;
}

.powermail_fieldwrap_error input,
.powermail_fieldwrap_error textarea {
	border-color: #a94442;
}

/* Google Maps erst nach Klick (Zwei-Klick, js/nagel.js) */
/* inline-block mit overflow:hidden steht wie das alte iframe auf der Grundlinie (gleicher Abstand darunter) */
.nagel-karte {
	position: relative;
	display: inline-block;
	vertical-align: baseline;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	background: #e5e3df;
	text-align: center;
}

.nagel-karte .nagel-karte-hinweis {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
}

.nagel-karte iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.nagel-karte-hinweis {
	max-width: 420px;
	padding: 20px;
	font-size: 14px;
	color: #333;
}

.nagel-karte-laden {
	margin-top: 10px;
	padding: 8px 20px;
	border: 0;
	background: #e60f14;
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/*
 * Korrekturen für schmale Bildschirme (Fehler der alten Seite, auf Wunsch behoben 06.11.2026): sonst war die Seite
 * auf dem Handy breiter als der Bildschirm und der Menüknopf lag außerhalb.
 * - Impressum: „Zurück zur Startseite“ stand fest bei left:80 % und ragte bis 600 px Breite hinaus.
 * - Bewerbungsformular: Beschriftung 140 px + Feld 300 px nebeneinander passten unter 480 px nicht.
 * - Datenschutz: die Überschrift „DATENSCHUTZERKLÄRUNG“ (45 px) passte nicht in die Zeile; lange Adressen
 *   (www.bfdi.bund.de/…) brechen um.
 */
@media screen and (max-width: 834px) {
	/*
	 * Wie auf dem Desktop fest stehend, aber rechtsbündig direkt unter der Kopfleiste (90 px) und mit deren Farbe:
	 * auf dem Handy gibt es keinen freien Rand, sonst liefe der Link beim Scrollen über den Text.
	 */
	#content .elementor .back-to-home {
		left: auto;
		right: 15px;
		top: 90px;
		padding: 4px 12px 6px;
		font-size: 15px;
		background: rgba(38, 50, 56, .95);
		border-radius: 0 0 4px 4px;
	}

	section#section-impressum .back-to-home p {
		padding: 0;
		margin: 0;
	}

	section#section-impressum h1 {
		font-size: clamp(20px, 6.5vw, 45px);
	}

	#section-impressum h1,
	#section-impressum p,
	#section-impressum a {
		overflow-wrap: anywhere;
	}
}

@media screen and (max-width: 480px) {
	.newform fieldset label {
		display: block;
		width: auto;
		text-align: left;
	}

	.newform fieldset input,
	.newform fieldset textarea {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	.newform fieldset input[type="checkbox"] {
		width: auto;
	}

	.newform fieldset .powermail_check_inner label {
		display: inline;
		width: auto;
	}

	#powermail_field_marker {
		margin-left: 0;
	}

	#powermail_fieldwrap_16 > label:nth-child(1) {
		top: 0;
	}
}
