/* ==========================================================
   ERNST TREDER GMBH — Modernes Layout V2 (CSS-Teil)
   Farbwelt nach Firmenlogo:
     Treder-Blau  #0099ff
     Blau dunkel  #0077cc (fuer Verlaeufe/Hover)
     Schwarz      #111111
     Weiss        #ffffff
   Rot bleibt nur dem Notdienst vorbehalten.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@700;800&display=swap');

/* Schutz gegen automatischen Dunkelmodus der Handy-Browser:
   diese Seite ist bewusst hell und soll nicht umgefaerbt werden */
:root {
	color-scheme: light only;
}
html {
	background: #f2f8fd;
}

body {
	margin: 0;
	padding: 0;
	background: #f2f8fd; /* hauchzartes Blauweiss */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	color: #1d2229;
}

/* Farbvariable des Baukastens bleibt nutzbar */
.altcolor {
	background-color: #dadada;
}

/* ---------- Grundgeruest ---------- */

div#container {
	margin: 0 auto;
	width: 100%;
	max-width: 1060px;
	background: transparent;
	background-image: none;
	padding: 0 16px 40px;
	box-sizing: border-box;
}

.c { clear: both; }
br.c { display: block; clear: both; }

/* ---------- Notdienst-Leiste ---------- */

a#notruf {
	display: block;
	margin: 16px 0;
	background: #d32f2f;
	color: #ffffff;
	text-decoration: none;
	text-align: center;
	padding: 12px 18px;
	border-radius: 12px;
	font-size: 15.5px;
	box-shadow: 0 4px 14px rgba(211, 47, 47, 0.3);
}
a#notruf strong { font-size: 17px; letter-spacing: 0.3px; }
a#notruf .notruf-puls {
	display: inline-block;
	width: 9px; height: 9px;
	background: #fff;
	border-radius: 50%;
	margin-right: 10px;
	vertical-align: 2px;
	animation: treder-puls 1.8s infinite;
}
@keyframes treder-puls {
	0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
	70%  { box-shadow: 0 0 0 9px rgba(255,255,255,0); }
	100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
@media (prefers-reduced-motion: reduce) {
	a#notruf .notruf-puls { animation: none; }
	#herojahr { animation: none; }
}

/* ---------- Markenzeile mit Logo ---------- */

div#brandbar {
	background: #ffffff;
	border: 1px solid #d8e8f5;
	border-radius: 16px;
	padding: 14px 22px;
	margin-bottom: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
img#brandlogo {
	display: block;
	height: 76px;
	width: auto;
	border-radius: 10px;
}
div#brandbar .brand { display: flex; align-items: center; gap: 0; }
div#brandbar .brand-text {
	display: flex;
	flex-direction: column;
	margin-left: 20px;
	padding-left: 20px;
	border-left: 3px solid #0099ff;   /* blaue Trennlinie zum Logo */
}
div#brandbar .brand-name {
	font-family: "Bricolage Grotesque", Arial, sans-serif;
	font-weight: 800;
	font-size: 23px;
	letter-spacing: -0.3px;
	color: #111111;                   /* Schwarz wie der Logo-Schriftzug */
	line-height: 1.15;
}
div#brandbar .brand-sub {
	margin-top: 3px;
	font-size: 12.5px;
	color: #0099ff;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	white-space: nowrap;
}
.brand-claim {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: #0099ff;
}

/* ---------- Navigation: Treder-Blau, klebt beim Scrollen oben ---------- */

div#navigation {
	margin: 0 0 14px;
	padding: 8px;
	background: #0099ff;
	border-radius: 16px;
	box-shadow: 0 4px 14px rgba(0, 153, 255, 0.25);
	position: sticky;
	position: -webkit-sticky;
	top: 10px;
	z-index: 90;
}

ul.mainNav1 {
	margin: 0;
	padding: 0;
	list-style: none;
	background: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
ul.mainNav1 li { width: auto; }
ul.mainNav1 li a {
	display: block;
	width: auto;
	padding: 11px 20px;
	font-weight: 700;
	font-size: 16.5px;
	color: #ffffff;
	text-align: center;
	text-decoration: none;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.14) !important;   /* sichtbarer Button */
	border: 1px solid rgba(255, 255, 255, 0.35);
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
ul.mainNav1 li a:hover {
	background: rgba(255, 255, 255, 0.3) !important;
	border-color: rgba(255, 255, 255, 0.7);
	color: #ffffff;
	transform: translateY(-1px);
}
ul.mainNav1 li a.current {
	background: #ffffff !important;   /* wie die weisse Logo-Box */
	border-color: #ffffff;
	color: #0099ff;
	box-shadow: 0 3px 10px rgba(0, 60, 110, 0.25);
}
ul.mainNav1 li a:active {
	transform: translateY(1px) scale(0.98);   /* fuehlbarer "Klick" */
}

/* Unterebenen */
ul.mainNav2, ul.mainNav3 {
	margin: 6px 0 0;
	padding: 6px;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 10px;
}
ul.mainNav2 li, ul.mainNav3 li { width: auto; }
ul.mainNav2 li a, ul.mainNav3 li a {
	display: block;
	width: auto;
	padding: 8px 16px;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	text-decoration: none;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.12) !important;
	border: 1px solid rgba(255, 255, 255, 0.28);
}
ul.mainNav2 li a:hover, ul.mainNav3 li a:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.22) !important;
}
ul.mainNav2 li a.current, ul.mainNav3 li a.current {
	color: #0099ff;
	background: #ffffff !important;
}

/* ---------- Blaues Kopfband mit 1867-Wasserzeichen ---------- */

div#heroband {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #0099ff 0%, #0077cc 100%);
	border-radius: 16px;
	padding: 46px 34px;
	margin-bottom: 14px;
	min-height: 90px;
	display: flex;
	align-items: center;
}
span#herojahr {
	position: absolute;
	right: -8px;
	top: 50%;
	transform: translateY(-50%);
	font-family: "Bricolage Grotesque", Arial, sans-serif;
	font-weight: 800;
	font-size: clamp(110px, 22vw, 190px);
	line-height: 1;
	color: rgba(255, 255, 255, 0.16);
	user-select: none;
	pointer-events: none;
}
span#herojahr small {
	display: inline-block;
	font-size: 0.22em;              /* klein im Verhaeltnis zur Jahreszahl */
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	vertical-align: 0.5em;          /* sitzt oben an der Zahl */
	margin-right: 0.15em;
}
.heroband-text { position: relative; z-index: 1; }
.heroband-titel {
	display: block;
	font-family: "Bricolage Grotesque", Arial, sans-serif;
	font-weight: 800;
	font-size: clamp(26px, 5vw, 40px);
	letter-spacing: -0.5px;
	color: #ffffff;
	line-height: 1.15;
}
.heroband-sub {
	display: block;
	margin-top: 6px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, 0.85);
	text-transform: uppercase;
}

/* ---------- Inhalt ---------- */

div#content {
	width: 100%;
	float: none;
	background: #ffffff;
	border: 1px solid #d8e8f5;
	border-radius: 16px;
	box-sizing: border-box;
}
div#content div.gutter {
	padding: 44px 56px 52px;
}

div#content h1, div#content h2, div#content h3 {
	color: #111111;
	line-height: 1.2;
	letter-spacing: -0.3px;
	font-family: "Bricolage Grotesque", Arial, sans-serif;
}
div#content h1 { font-size: 34px; font-weight: 800; margin: 0 0 18px; }
div#content h2 { font-size: 25px; font-weight: 800; margin: 34px 0 12px; }
div#content h3 { font-size: 19px; font-weight: 700; margin: 26px 0 10px; }
div#content p  { margin: 0 0 16px; }
div#content a  { color: #0084dd; }
div#content a:hover { color: #111111; }

div#content ul { padding-left: 0; margin: 0 0 20px; list-style: none; }
div#content ul li {
	position: relative;
	padding: 7px 0 7px 28px;
	border-bottom: 1px dashed #dcebf7;
}
div#content ul li:last-child { border-bottom: none; }
div#content ul li:before {
	content: "";
	position: absolute;
	left: 3px; top: 15px;
	width: 12px; height: 7px;
	border-left: 2.5px solid #0099ff;
	border-bottom: 2.5px solid #0099ff;
	-webkit-transform: rotate(-45deg);
	transform: rotate(-45deg);
}

/* ---------- Ehem. Seitenleiste ---------- */

div#sidebar {
	width: 100%;
	float: none;
	padding: 0;
	margin-top: 14px;
	box-sizing: border-box;
}
div#sidebar_content {
	margin: 0;
	padding: 24px 32px;
	background: #ffffff;
	border: 1px solid #d8e8f5;
	border-radius: 16px;
}
div#sidebar_content:empty { display: none; }
div#jimdobox { margin-bottom: 20px; }

/* ---------- Footer: Schwarz wie der Logo-Schriftzug ---------- */

div#footer {
	width: 100%;
	margin-left: 0;
	margin-top: 14px;
	box-sizing: border-box;
}
div#footer div.gutter {
	float: none;
	width: auto;
	background: #111111;
	color: rgba(255, 255, 255, 0.75);
	border-radius: 16px;
	padding: 22px 32px;
	font-size: 14.5px;
	text-align: center;
}
div#footer a { color: #ffffff; text-decoration: none; }
div#footer a:hover { color: #0099ff; }

/* ---------- Interaktivitaet ---------- */

/* Sanftes Einblenden der Inhalte beim Scrollen (Klassen setzt das Script) */
.einblenden {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}
.einblenden.sichtbar {
	opacity: 1;
	transform: none;
}

/* Bilder im Inhalt: sanfter Zoom beim Drueberfahren */
div#content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
div#content img:hover {
	transform: scale(1.02);
	box-shadow: 0 10px 26px rgba(0, 60, 110, 0.18);
}

/* Notdienst-Leiste reagiert auf die Maus */
a#notruf {
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a#notruf:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(211, 47, 47, 0.4);
}

/* Nach-oben-Button */
a#totop {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 150;
	width: 46px;
	height: 46px;
	background: #0099ff;
	color: #ffffff;
	border-radius: 50%;
	text-align: center;
	line-height: 46px;
	font-size: 20px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 153, 255, 0.4);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
a#totop.zeigen {
	opacity: 1;
	visibility: visible;
	transform: none;
}
a#totop:hover { background: #0077cc; }

@media (prefers-reduced-motion: reduce) {
	.einblenden { opacity: 1; transform: none; transition: none; }
	div#content img, a#notruf, ul.mainNav1 li a { transition: none; }
}

/* ---------- Mobil ---------- */

@media (max-width: 700px) {
	body { font-size: 16px; }
	div#container { padding: 0 10px 30px; }
	div#content div.gutter { padding: 26px 20px 32px; }
	div#content h1 { font-size: 27px; }
	div#content h2 { font-size: 21px; }
	div#brandbar { justify-content: center; }
	img#brandlogo { height: 58px; }
	div#brandbar .brand-text { display: none; }
	.brand-claim { display: none; }
	a#notruf .notruf-text { display: none; }
	/* Menu-Buttons mobil: grosse, gut tippbare Flaechen */
	ul.mainNav1 { gap: 6px; }
	ul.mainNav1 li { flex: 1 1 44%; }               /* zwei Buttons pro Zeile */
	ul.mainNav1 li a { padding: 13px 10px; font-size: 16px; }
	ul.mainNav2 li a, ul.mainNav3 li a { padding: 10px 14px; font-size: 15px; }
	div#navigation { position: static; }             /* mobil nicht kleben, spart Platz */
	a#totop { width: 42px; height: 42px; line-height: 42px; right: 12px; bottom: 12px; }
	div#heroband { padding: 30px 22px; }
}