/*
Theme Name: DKSB Basis
Theme URI: https://dksb-vs.de/
Author: Christian (ehrenamtlich für den DKSB VS)
Description: Gemeinsames Grundgerüst für die Websites des Deutschen Kinderschutzbunds Ortsverband Villingen-Schwenningen e. V. Nicht direkt aktivieren, sondern über die Child-Themes (dksb-verein, dksb-steppach, dksb-saegebach, dksb-moosbach).
Version: 0.2.3
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: dksb
License: GPL-2.0-or-later
*/

:root {
	--c-text: #1D2330;
	--c-grau: #5A6472;
	--c-akzent: #1D4E89;
	--c-akzent-text: #FFFFFF;
	--c-dunkel: #12345E;
	--c-flaeche: #EEF3F8;
	--c-linie: #E1E6EC;
	--c-fokus: #1D4E89;
	--c-hintergrund: #FFFFFF;
	--f-text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-titel: var(--f-text);
	--radius: 12px;
	--nav-mobil-bg: #FFFFFF;
	--nav-mobil-text: var(--c-text);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 20px; }
body { margin: 0; font-family: var(--f-text); color: var(--c-text); background: var(--c-hintergrund); font-size: 18px; line-height: 1.6; }
img, video { max-width: 100%; height: auto; }
svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--c-fokus); outline-offset: 3px; }
main:focus { outline: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* Barrierefreiheit */
.skip-link { position: absolute; left: 12px; top: -200px; z-index: 1000; background: #FFFFFF; color: #000000; padding: 12px 18px; border-radius: 8px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.skip-link:focus { top: 12px; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* Kopf und Menü */
.site-header { position: relative; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; }
.hauptnav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.hauptnav a { text-decoration: none; }
.nav-toggle { display: none; }
.logo-bild { width: auto; max-height: 64px; }

@media (max-width: 860px) {
	.js .nav-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
	.js .nav-toggle::before { content: ""; width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
	.js .hauptnav[class] .menu { display: none; }
	.js .hauptnav.offen[class] .menu { display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0; top: 100%; background: var(--nav-mobil-bg); color: var(--nav-mobil-text); padding: 6px 22px 14px; border-radius: 0; box-shadow: 0 14px 24px -14px rgba(0,0,0,.35); z-index: 40; }
	.js .hauptnav.offen[class] .menu a { display: block; padding: 12px 0; border: 0; background: none; border-radius: 0; color: inherit; }
	.js .hauptnav.offen[class] .menu li + li { border-top: 1px solid rgba(127,127,127,.25); }
	.js .hauptnav.offen[class] .menu a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
}

/* Unterseiten, Neuigkeiten */
.seite-kopf { background: var(--c-flaeche); padding: 48px 0 40px; }
.seite-kopf h1 { font-family: var(--f-titel); color: var(--c-dunkel); font-size: clamp(32px, 4.4vw, 50px); line-height: 1.1; margin: 0; }
.seite-kopf .meta { margin: 10px 0 0; color: var(--c-grau); }
.inhalt { padding: 40px 0 64px; }
.text { max-width: 72ch; }
.text h2, .text h3, .text h4 { font-family: var(--f-titel); color: var(--c-dunkel); line-height: 1.2; margin: 1.6em 0 .5em; }
.text a { color: var(--c-akzent); text-underline-offset: 3px; }
.text img { border-radius: var(--radius); }
.text figure { margin: 1.5em 0; }
.text figcaption { font-size: 15px; color: var(--c-grau); }
.text blockquote { margin: 1.5em 0; padding-left: 18px; border-left: 4px solid var(--c-akzent); }
.beitragsbild { display: block; border-radius: var(--radius); margin-bottom: 24px; }
.newsliste { max-width: 72ch; }
.newsliste article { padding: 22px 0; border-bottom: 1px solid var(--c-linie); }
.newsliste time { color: var(--c-grau); font-size: 15px; }
.newsliste h2 { font-family: var(--f-titel); color: var(--c-dunkel); font-size: 24px; line-height: 1.25; margin: 4px 0 6px; }
.newsliste h2 a { text-decoration: none; }
.newsliste h2 a:hover { text-decoration: underline; }
.newsliste p { margin: 0; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid var(--c-linie); border-radius: 8px; text-decoration: none; }
.page-numbers.current { background: var(--c-akzent); color: var(--c-akzent-text); border-color: var(--c-akzent); }
.mehr-link { display: inline-block; margin-top: 22px; font-weight: 700; color: var(--c-akzent); text-underline-offset: 4px; }
.demo-hinweis { font-size: 14px; font-style: italic; color: var(--c-grau); margin: 16px 0 0; }
.start-zusatz { padding: 56px 0; }

/* Fuß (Standard für die Krippen) */
.site-footer { background: var(--c-dunkel); color: #FFFFFF; font-size: 15px; padding: 24px 0; }
.site-footer a { color: #FFFFFF; }
.fuss-zeile { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; align-items: center; }
.fuss-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Gutenberg-Grundlagen */
.alignwide { max-width: 1076px; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.traeger { margin: 0; }

/* Untermenüs (Aufklappmenüs) */
.hauptnav .menu > li { position: relative; display: flex; align-items: center; flex-wrap: wrap; }
.hauptnav .sub-menu { list-style: none; margin: 0; padding: 6px 0; display: none; position: absolute; top: 100%; left: 0; min-width: 250px; background: #FFFFFF; color: var(--c-text); border-radius: 10px; box-shadow: 0 16px 32px -14px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.06); z-index: 50; }
.hauptnav .sub-menu li { display: block; }
.hauptnav .sub-menu a { display: block; padding: 10px 18px; border: 0; border-radius: 0; background: none; color: inherit; font-weight: inherit; white-space: normal; line-height: 1.35; }
.hauptnav .sub-menu a:hover, .hauptnav .sub-menu a[aria-current] { background: var(--c-flaeche); text-decoration: underline; text-underline-offset: 4px; }
.hauptnav li.offen > .sub-menu { display: block; }
@media (hover: hover) and (min-width: 861px) {
	.hauptnav .menu > li:hover > .sub-menu { display: block; }
}
.sub-toggle { appearance: none; background: none; border: 0; color: inherit; cursor: pointer; min-width: 28px; min-height: 36px; padding: 0 4px; margin-left: 2px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.sub-toggle::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
li.offen > .sub-toggle::before { transform: translateY(2px) rotate(-135deg); }
@media (max-width: 860px) {
	.js .hauptnav.offen[class] .menu > li > a { flex: 1; }
	.hauptnav .sub-menu { position: static; flex-basis: 100%; min-width: 0; padding: 0 0 8px 16px; background: transparent; color: inherit; box-shadow: none; border-radius: 0; }
	.js .hauptnav.offen[class] .menu .sub-menu a { padding: 9px 0; }
	.js .hauptnav.offen[class] .menu .sub-menu li + li { border-top: 0; }
	.sub-toggle { min-width: 44px; min-height: 44px; }
}

/* Personenkarten (z. B. Vorstandschaft) */
.text .vorstand-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 18px; margin: 1.5em 0; max-width: none; }
.text .vorstand-karte { background: var(--c-flaeche); border-radius: var(--radius); border-top: 4px solid var(--c-akzent); padding: 18px 20px; margin: 0; }
.text .vorstand-karte h3 { margin: 0 0 6px; font-size: 20px; }
.text .vorstand-karte h3 a { text-decoration: none; color: var(--c-dunkel); }
.text .vorstand-karte h3 a:hover { text-decoration: underline; }
.text .vorstand-karte p { margin: 0; font-size: 16px; color: var(--c-grau); }
