/*
 * Mobile-Version (nur Smartphones)
 * Wird per <link media="screen and (max-width: 767px)"> geladen.
 * Tablets (ab 768px Breite) und Desktop nutzen weiterhin das normale Layout.
 *
 * Typografie wie in screen.css: Schriftgrößen und Textabstände in rem, Zeilenhöhen
 * als Verhältnis. Die Grundgröße (html font-size in screen.css) skaliert alles mit.
 * Kopf, Logo, Burger-Button und Bilder bleiben bewusst in px.
 */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #fff; }

/* Layout: Spalten untereinander statt nebeneinander */
#wrap { width: auto; height: auto; margin: 0; padding: 0 16px; }
.content,
.content .content { width: auto; margin: 0; }
.content { font-size: 0.9375rem; line-height: 1.6; }                       /* 15px / 24px */

.navcol,
.maincol,
.sidebar,
.full,
.content .navcol,
.content .maincol,
.content .sidebar,
.content .full { display: block; float: none; width: auto; padding: 0; }

.subpage { margin: 0; }

/* Link-Unterstreichung auf dem Handy immer 1px (Desktop: rem) */
a { border-bottom-width: 1px; }

/* Lange Wörter, E-Mail-Adressen und Links dürfen umbrechen */
.content { overflow-wrap: break-word; word-wrap: break-word; }

/* Kopf: Logo links, Burger-Button rechts, feine Linie darunter */
.content .navcol { position: relative; padding: 24px 0 8px; border-bottom: 1px solid #ddd; }
.navcol img { display: block; margin: 0; width: 223px; max-width: 100%; height: auto; } /* px: Burger-Position hängt am Logo */

/* Burger-Menü (reines CSS: unsichtbare Checkbox + Label als Button) */
.nav-toggle {
	display: block;
	position: absolute;
	top: 47px;
	right: 0;
	width: 44px;
	height: 44px;
	margin: 0;
	opacity: 0;
}
.nav-burger {
	display: block;
	position: absolute;
	top: 47px;          /* Striche mittig zum Schriftzug "IMKE KÖNIG";
	                       unterer Strich endet auf derselben Linie wie das Logo,
	                       also mit gleichem Abstand (8px) zur grauen Linie */
	right: -9px;        /* Striche bündig mit dem rechten Seitenrand */
	width: 44px;        /* Mindestgröße für Touch-Ziele */
	height: 44px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
	position: absolute;
	left: 9px;
	width: 26px;
	height: 2px;
	background: #d2232a;
	transition: transform .2s ease, background-color .2s ease;
}
.nav-burger span { top: 21px; }
.nav-burger span::before,
.nav-burger span::after { content: ""; left: 0; }
.nav-burger span::before { top: -8px; }
.nav-burger span::after  { top: 8px; }

/* Geöffnet: Striche werden zum X */
.nav-toggle:checked + .nav-burger span { background-color: transparent; }
.nav-toggle:checked + .nav-burger span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle:checked + .nav-burger span::after  { transform: translateY(-8px) rotate(-45deg); }

/* Sichtbarer Fokus bei Tastaturbedienung */
.nav-toggle:focus-visible + .nav-burger { outline: 2px solid #d2232a; outline-offset: -2px; }

@media (prefers-reduced-motion: reduce) {
	.nav-burger span,
	.nav-burger span::before,
	.nav-burger span::after { transition: none; }
}

/* Menüliste: geschlossen ausgeblendet, geöffnet untereinander */
.content .navcol ul { display: none; margin: 16px 0 -8px; padding: 0; list-style: none; } /* -8px: letzte Zeile endet direkt auf der grauen Linie */
.content .navcol .nav-toggle:checked ~ ul { display: block; }
.content .navcol li { font-size: 1rem; line-height: 1.25; padding: 0; margin: 0; border-top: 1px solid #ddd; } /* .content: schlägt die allgemeine Listenregel .content ul li */
.navcol li a { display: block; padding: 12px 0; border-bottom: 0; }
/* Aktuelle Seite (Listeneintrag ohne Link) hervorheben.
   Eigene Regel, damit ältere Browser ohne :has() nur diese ignorieren. */
.content .navcol li:not(:has(a)) { padding: 12px 0; font-weight: bold; color: #333; }

/* Überschriften */
.content h1 { font-size: 1.625rem; line-height: 1.153847; margin: 1.5rem 0 1rem; }   /* 26px / 30px */
.content h2 { font-size: 1.1875rem; line-height: 1.368422; margin: 1.5rem 0 1rem; } /* 19px / 26px */

/* Bilder */
.maincol img,
.maincol img.portrait { display: block; margin: 16px 0 0; max-width: 100%; height: auto; }
.maincol img.portrait { width: 344px; }   /* Bildgrößen auf dem Handy fest in px (Desktop: rem) */

/* Listen */
.content ul { margin: 1rem 0; padding-left: 1.25em; }
.content ul li { margin: 0 0 0.5rem; }
.content dl { margin: 1rem 0; }
.content dt { font-weight: bold; color: #333; }
dd { margin: 0 0 1.25rem; }

/* Trennlinie + "Nach Oben" */
.content hr { margin-top: 2rem; }
.hr { margin-top: 1.5rem; margin-bottom: 0.5rem; height: 20px; background-size: 344px 20px; }

/* Kontakt / Impressum am Seitenende */
.content .sidebar {
	margin-top: 2rem;
	padding: 1.5rem 0 2rem;
	border-top: 1px solid #ddd;
}
address,
.content address { margin: 0; font-size: 0.9375rem; line-height: 1.466667; white-space: normal; } /* 15px / 22px */
.sidebar h3 { font-size: 0.9375rem; line-height: 1.066667; margin: 0 0 0.75rem; } /* 15px / 16px */
.sidebar img.portrait-klein { margin: 0 0 16px; width: 130px; height: 87px; }
.aktuell { width: auto; margin: 0; font-size: 0.9375rem; line-height: 1.466667; } /* 15px / 22px */
