/* dont-nerd-me.de – neues Design (Vorschau über ?neu=1). Ersetzt style.css und mobile.css. */
:root {
	--bg: #f3f6fb;
	--card: #ffffff;
	--text: #1c2733;
	--muted: #66768a;
	--accent: #0a74d9;
	--accent-soft: #e8f2fd;
	--line: #e2e8f0;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

#container { max-width: 1080px; margin: 0 auto; padding: 0 16px 40px; }

/* Kopf */
#container-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 4px 24px;
	padding: 28px 4px 14px;
}
#container-name { font-size: clamp(28px, 4.2vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
#container-name span { color: var(--accent); }
#container-slogan { color: var(--muted); font-style: italic; font-size: 17px; }
#container-slogan span { color: var(--accent); }

/* Menü + Bild */
#container-eyecatcher { display: flex; flex-direction: column; gap: 14px; }
#cssmenu {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	position: relative;
	z-index: 20;
}
#cssmenu ul, #cssmenu li { list-style: none; margin: 0; padding: 0; }
#cssmenu > ul { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; }
#cssmenu li { position: relative; }
#cssmenu a {
	display: block;
	padding: 10px 16px;
	border-radius: 9px;
	color: var(--text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background .15s, color .15s;
}
#cssmenu li:hover > a, #cssmenu a:focus-visible { background: var(--accent-soft); color: var(--accent); }
#cssmenu ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	padding: 6px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
#cssmenu li:hover > ul, #cssmenu li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
#cssmenu ul ul ul { top: -7px; left: 100%; }
#cssmenu ul ul a { font-weight: 500; font-size: 15px; }
#cssmenu li.has-sub > a::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	opacity: .55;
}
#cssmenu ul ul li.has-sub > a::after { transform: rotate(-45deg); float: right; margin-top: 5px; }

#container-eyecatcher > a { display: block; }
#container-eyecatcher > a > img {
	display: block;
	width: 100%;
	height: clamp(110px, 17vw, 190px);
	object-fit: cover;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

/* Inhalt: zwei Spalten, auf schmalen Bildschirmen eine */
#container-content {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 0 22px;
	align-items: start;
	margin-top: 22px;
}
#container-content > *:not(#content):not(#border):not(#content_big) { grid-column: 1 / -1; }
#container-content > #content:not(:has(+ #border)) { grid-column: 1 / -1; }
#container-content > #content_big { grid-column: 1 / -1; }
#content, #content_big, #border { float: none; width: auto; margin: 0; }
/* nur die Abstandhalter zwischen den Karten ausblenden, nicht die Zeilenumbrüche im Inhalt */
#content > br, #border > br { display: none; }

/* Aufklapp-Karten (Fremdwort, Zitat, Land, …) */
.popup {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin: 0 0 16px;
	overflow: hidden;
	color: var(--text);
}
.popup-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px 4px;
	background: none;
	border: 0;
	color: var(--accent);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
}
.popup-head-img { display: none; }
.popup:has(.sub) .popup-head { cursor: pointer; }
.popup:has(.sub) .popup-head::after {
	content: "";
	flex: none;
	width: 8px;
	height: 8px;
	margin-right: 4px;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: translateY(-2px) rotate(45deg);
	transition: transform .2s;
}
.popup:has(.sub.active) .popup-head::after { transform: translateY(2px) rotate(-135deg); }
.popup:has(.sub) { cursor: pointer; }
.content { padding: 2px 18px 16px; font-size: 18px; font-weight: 600; line-height: 1.4; }
.sub {
	margin: 0 18px;
	padding: 12px 0 16px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 16px;
	cursor: default;
}
.sub b { color: var(--text); }
.sub table { border-collapse: collapse; }
.sub td { padding: 4px 12px 4px 0; vertical-align: top; }
.sub img[alt$="Karte"] { height: auto; }
#pic .content { padding-top: 6px; }
#pic input[type=image] { width: 100%; max-width: 100%; height: auto; border-radius: 10px; display: block; }

/* Listen-Seiten und Texte: eine weiße Karte */
#content_big, #content:not(:has(.popup)) {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px 26px;
}
#container-content > table, #container-content > form { grid-column: 1 / -1; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
h3, h4 { font-size: 18px; }
#content_big table, #content table, #container-content > table { width: 100%; border-collapse: collapse; }
#content_big td, #content td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
#content_big tr:last-child td, #content tr:last-child td { border-bottom: 0; }
#subnavigation, ul#subnavigation { list-style: none; margin: 0 0 12px; padding: 0; }
#subnavigation li { padding: 3px 0; margin: 0; }
#subnavigation li a { border: 0; color: var(--accent); }

/* Formulare */
input[type=text], input[type=password], input[type=number], select, textarea {
	font: inherit;
	font-size: 16px;
	padding: 8px 12px;
	border: 1px solid #cdd6e2;
	border-radius: 9px;
	background: #fff;
	color: var(--text);
}
input[type=text]:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=submit], input[type=button], button {
	font: inherit;
	font-weight: 600;
	padding: 9px 20px;
	border: 0;
	border-radius: 9px;
	background: var(--accent);
	color: #fff;
	cursor: pointer;
}
input[type=submit]:hover, input[type=button]:hover, button:hover { background: #075fb3; }
iframe { max-width: 100%; border: 0; border-radius: 12px; }

/* Fuß */
#container-footer {
	display: block;
	margin: 28px 0 0;
	padding: 16px 4px 0;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 14px;
	width: auto;
	clear: both;
}
#container-footer a { color: var(--muted); font-weight: 600; padding: 0; }
#footer, #footer-copyright, #footer-meta { width: auto; float: none; padding: 0; margin: 0; font-size: 14px; color: var(--muted); }
#footer-meta:empty { display: none; }

/* Schmale Bildschirme */
@media (max-width: 860px) {
	#container { padding: 0 12px 32px; }
	#container-content { grid-template-columns: minmax(0, 1fr); }
	#container-content > #border { grid-column: 1 / -1; }
	#content_big, #content:not(:has(.popup)) { padding: 16px 16px; }
	#content_big table, #content table { display: block; overflow-x: auto; }
}
/* Menü-Schalter (nur im neuen Design im Kopf eingebaut): auf dem Desktop unsichtbar */
.menubtn { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.menulabel { display: none; }

@media (max-width: 700px) {
	#container-header { padding-top: 20px; }
	#container-eyecatcher { gap: 10px; }
	#container-eyecatcher > a > img { height: 84px; }

	/* Menü: eine schmale Leiste, die per Tipp aufklappt; Ziele dann als Chips */
	#cssmenu { display: block; padding: 0; }
	.menulabel {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 13px 18px;
		font-weight: 700;
		cursor: pointer;
		border-radius: var(--radius);
		-webkit-tap-highlight-color: transparent;
	}
	.menulabel::after {
		content: "";
		width: 8px;
		height: 8px;
		border-right: 2px solid var(--muted);
		border-bottom: 2px solid var(--muted);
		transform: translateY(-2px) rotate(45deg);
		transition: transform .2s;
	}
	.menubtn:checked + .menulabel::after { transform: translateY(2px) rotate(-135deg); }
	.menubtn:focus-visible + .menulabel { outline: 2px solid var(--accent); }

	#cssmenu > ul { display: none; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
	#cssmenu .menubtn:checked ~ ul { display: flex; }
	#cssmenu ul ul, #cssmenu ul ul ul, #cssmenu li { display: contents; }
	#cssmenu li.has-sub > a { display: none; }
	#cssmenu ul ul, #cssmenu ul ul ul { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; background: none; padding: 0; min-width: 0; }
	#cssmenu a, #cssmenu ul ul a {
		padding: 8px 14px;
		border: 1px solid var(--line);
		border-radius: 999px;
		font-size: 14.5px;
		font-weight: 600;
		background: var(--card);
	}
}
