/*
Theme Name: MPU-Gurus
Theme URI: https://www.mpu-gurus.de
Author: Fahrschule Runnersdrive
Author URI: https://www.runnersdrive.de
Description: Schlankes, datenschutzfreundliches Theme für die MPU-Vorbereitung von MPU-Gurus in Bamberg. Lokale Schriften, keine externen Dienste, kein Tracking, barrierearme Grundstruktur, eigenes Kontaktformular mit Einwilligung nach Art. 9 DSGVO und ein Einrichtungs-Assistent, der alle Seiten mit überarbeiteten Texten anlegt.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mpu-gurus
*/

/* ---------- Farben, Schriften, Maße ---------- */
:root {
	--mg-ink: #13313a;      /* Tinte: Kopfbereich, Überschriften */
	--mg-fichte: #1f5a4e;   /* Fichte: Links, Akzente */
	--mg-nebel: #e4ece8;    /* Nebel: ruhige Flächen */
	--mg-papier: #f9faf8;   /* Papier: Seitenhintergrund */
	--mg-signal: #f0b429;   /* Signal: Fahrbahnmarkierung, Buttons */
	--mg-text: #1b2a2e;
	--mg-muted: #4a5c60;
	--mg-line: #c9d6d1;
	--mg-font-head: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
	--mg-font-body: "Atkinson Hyperlegible", Verdana, Arial, sans-serif;
	--mg-wrap: 72rem;
	--mg-gap: clamp(1.25rem, 4vw, 2.5rem);
	--mg-marking: repeating-linear-gradient(90deg, var(--mg-signal) 0 3rem, transparent 3rem 5rem);
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--mg-papier);
	color: var(--mg-text);
	font: 1.125rem/1.65 var(--mg-font-body);
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--mg-fichte); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--mg-ink); text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--mg-signal); outline-offset: 2px; box-shadow: 0 0 0 2px var(--mg-ink); }

h1, h2, h3, h4 { font-family: var(--mg-font-head); color: var(--mg-ink); line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 1.2rem + 5vw, 4.5rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1.1em; }

.mg-wrap { max-width: var(--mg-wrap); margin-inline: auto; padding-inline: var(--mg-gap); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.mg-skip {
	position: absolute; left: 1rem; top: -10rem; z-index: 100;
	background: var(--mg-signal); color: var(--mg-ink); font-weight: 700;
	padding: .75rem 1rem; border-radius: .4rem;
}
.mg-skip:focus { top: 1rem; }
.mg-main:focus { outline: none; }

/* ---------- Buttons ---------- */
.mg-btn {
	display: inline-flex; align-items: center; justify-content: center;
	font: 700 1.05rem/1.2 var(--mg-font-body);
	background: var(--mg-signal); color: var(--mg-ink);
	border: 2px solid var(--mg-signal); border-radius: .45rem;
	padding: .85rem 1.3rem; text-decoration: none; cursor: pointer;
}
.mg-btn:hover { background: #ffc94d; border-color: #ffc94d; color: var(--mg-ink); }
.mg-btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.mg-btn--ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); border-color: currentColor; color: inherit; }
.mg-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; margin: 1.75rem 0 1rem; }
.mg-termin { display: inline-flex; flex-direction: column; gap: .35rem; }
.mg-ext-note { font-size: .8rem; line-height: 1.4; max-width: 19rem; opacity: .9; }

/* ---------- Kopfbereich ---------- */
.mg-header { background: var(--mg-ink); border-bottom: 1px solid rgba(255, 255, 255, .14); }
.mg-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding-block: .9rem; }
.mg-brand { order: 0; }
.mg-brand__text { font: 800 1.45rem/1 var(--mg-font-head); color: #fff; text-decoration: none; letter-spacing: -.02em; }
.mg-brand .custom-logo { display: block; max-height: 3.5rem; width: auto; }
.mg-nav { order: 1; margin-left: auto; }
.mg-header__tel {
	order: 2; white-space: nowrap; text-decoration: none; font-weight: 700;
	background: var(--mg-signal); color: var(--mg-ink); padding: .55rem .9rem; border-radius: .4rem;
}
.mg-header__tel:hover { background: #ffc94d; color: var(--mg-ink); }
.mg-nav-toggle { display: none; }

.mg-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; }
.mg-menu li { position: relative; }
.mg-menu a {
	display: inline-block; padding: .35rem 0; color: #fff;
	font-weight: 700; font-size: 1rem; text-decoration: none; border-bottom: 3px solid transparent;
}
.mg-menu a:hover,
.mg-menu .current-menu-item > a,
.mg-menu .current-menu-ancestor > a,
.mg-menu .current_page_item > a,
.mg-menu .current_page_ancestor > a { border-bottom-color: var(--mg-signal); }
.mg-menu .sub-menu {
	display: none; position: absolute; top: 100%; left: -1rem; z-index: 20; min-width: 17rem;
	list-style: none; margin: 0; padding: .5rem 1rem; background: var(--mg-ink); border: 1px solid rgba(255, 255, 255, .18);
}
.mg-menu li:hover > .sub-menu,
.mg-menu li:focus-within > .sub-menu { display: block; }
.mg-menu .sub-menu a { font-weight: 400; display: block; }

@media (max-width: 62rem) {
	.mg-header__tel { order: 1; margin-left: auto; }
	.mg-nav { order: 3; flex-basis: 100%; margin-left: 0; }
	.js .mg-nav-toggle {
		display: inline-flex; order: 2; font: 700 1rem/1 var(--mg-font-body); color: #fff;
		background: transparent; border: 2px solid #fff; border-radius: .4rem; padding: .55rem .8rem; cursor: pointer;
	}
	.js .mg-nav { display: none; }
	.js .mg-nav.is-open { display: block; }
	.mg-menu { flex-direction: column; gap: 0; padding-block: .5rem; }
	.mg-menu a { padding: .6rem 0; }
	.mg-menu .sub-menu { display: block; position: static; border: 0; padding: 0 0 0 1rem; min-width: 0; background: none; }
}
@media (max-width: 26rem) {
	.mg-header__tel { font-size: .95rem; padding: .5rem .7rem; }
}

/* ---------- Startseite ---------- */
.mg-hero {
	position: relative; background: var(--mg-ink); color: #e9f0ed;
	padding-block: clamp(3.5rem, 8vw, 7rem) clamp(5rem, 10vw, 8.5rem);
}
.mg-hero::after { /* Fahrbahnmarkierung */
	content: ""; position: absolute; left: 0; right: 0; bottom: 2rem; height: 6px; background: var(--mg-marking);
}
.mg-hero h1 { color: #fff; max-width: 18ch; text-wrap: balance; }
.mg-hero a:not(.mg-btn) { color: #fff; }
.mg-lead { font-size: clamp(1.2rem, 1rem + .6vw, 1.45rem); line-height: 1.55; max-width: 38rem; color: #d3e0db; }
.mg-hero-note { font-size: .95rem; color: #b9ccc6; margin: 0; }

.mg-section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.mg-section--nebel { background: var(--mg-nebel); }
.mg-intro { max-width: 40rem; color: var(--mg-muted); margin-bottom: 2rem; }

.mg-topics {
	list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2.5rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.mg-topics a { display: block; height: 100%; padding: 1.2rem 0 1.5rem; border-top: 2px solid var(--mg-ink); color: var(--mg-text); text-decoration: none; }
.mg-topics a:hover { border-top-color: var(--mg-fichte); color: var(--mg-text); }
.mg-topics strong { display: block; margin-bottom: .25rem; font: 600 1.35rem/1.2 var(--mg-font-head); color: var(--mg-ink); }
.mg-topics a:hover strong { text-decoration: underline; text-decoration-color: var(--mg-signal); text-decoration-thickness: .15em; text-underline-offset: .2em; }
.mg-topics span { color: var(--mg-muted); }

.mg-route { list-style: none; counter-reset: mg; position: relative; max-width: 46rem; margin: 2.25rem 0 1.5rem; padding: 0; }
.mg-route::before { /* dieselbe Markierung, senkrecht */
	content: ""; position: absolute; left: 1.35rem; top: .5rem; bottom: 1.5rem; width: 6px; margin-left: -3px;
	background: repeating-linear-gradient(180deg, var(--mg-signal) 0 2.2rem, transparent 2.2rem 3.6rem);
}
.mg-route li { counter-increment: mg; position: relative; padding: 0 0 2.25rem 4.5rem; }
.mg-route li::before {
	content: counter(mg); position: absolute; left: 0; top: -.15rem; width: 2.7rem; height: 2.7rem;
	display: grid; place-items: center; border-radius: 50%; background: var(--mg-ink); color: #fff;
	font: 800 1.2rem/1 var(--mg-font-head); box-shadow: 0 0 0 5px var(--mg-nebel);
}
.mg-route h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.mg-route p { margin: 0; max-width: 36rem; }

.mg-split { display: grid; gap: 1rem 4rem; }
@media (min-width: 56rem) { .mg-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.mg-honest { list-style: none; margin: 0; padding: 0; }
.mg-honest li { padding: 1.1rem 0; border-bottom: 1px solid var(--mg-line); }
.mg-honest li:first-child { padding-top: 0; }
.mg-honest strong { display: block; margin-bottom: .2rem; font: 600 1.2rem/1.3 var(--mg-font-head); color: var(--mg-ink); }

.mg-people { display: grid; gap: 2rem 3rem; margin-block: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.mg-person h3 { margin-bottom: .35rem; }
.mg-person p { margin: 0 0 .6rem; }

.mg-cta { background: var(--mg-ink); color: #e9f0ed; padding-block: clamp(3.5rem, 7vw, 6rem); }
.mg-cta h2 { color: #fff; }
.mg-cta p { max-width: 38rem; }
.mg-cta a:not(.mg-btn) { color: #fff; }
.mg-cta address { font-style: normal; color: #b9ccc6; margin-top: 1.5rem; }

/* ---------- Unterseiten ---------- */
.mg-page__head { background: var(--mg-nebel); padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.mg-page__head h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); max-width: 22ch; margin: 0; }
.mg-crumb { font-size: .95rem; margin: 0 0 .6rem; }

.mg-prose { max-width: 44rem; padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }
.mg-prose h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-top: 2.2em; }
.mg-prose h3 { margin-top: 1.7em; }
.mg-prose > :first-child { margin-top: 0; }
.mg-prose ul, .mg-prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.mg-prose li { margin-bottom: .4em; }
.mg-prose figure { margin: 0 0 1.5rem; }
.mg-prose .wp-block-table { overflow-x: auto; }
.mg-prose table { border-collapse: collapse; width: 100%; }
.mg-prose th, .mg-prose td { text-align: left; vertical-align: top; padding: .75rem .6rem .75rem 0; border-bottom: 1px solid var(--mg-line); }
.mg-prose th { font-family: var(--mg-font-head); font-weight: 600; color: var(--mg-ink); }
.mg-prose address { font-style: normal; }

.mg-box { background: var(--mg-nebel); border-left: 6px solid var(--mg-fichte); padding: 1.1rem 1.3rem; margin: 1.75rem 0; }
.mg-box > :last-child { margin-bottom: 0; }
.mg-linklist { list-style: none; padding: 0 !important; }
.mg-linklist li { border-top: 1px solid var(--mg-line); margin: 0 !important; }
.mg-linklist a { display: block; padding: .8rem 0; font-weight: 700; }

/* Platzhalter, die vor dem Livegang ersetzt werden müssen */
mark.mg-todo { background: #ffe58a; color: #3a2a00; padding: .05em .3em; border-radius: .2em; font-weight: 700; }

/* ---------- Kontaktformular ---------- */
.mg-form { display: grid; gap: 1.1rem; max-width: 36rem; margin-block: 1.5rem 2rem; }
.mg-form label { display: block; font-weight: 700; margin-bottom: .35rem; }
.mg-form .mg-optional { font-weight: 400; color: var(--mg-muted); }
.mg-form input[type="text"], .mg-form input[type="email"], .mg-form input[type="tel"], .mg-form textarea {
	width: 100%; font: inherit; color: var(--mg-text); background: #fff;
	padding: .75rem .85rem; border: 2px solid #8fa39d; border-radius: .4rem;
}
.mg-form textarea { min-height: 9rem; resize: vertical; }
.mg-check { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; }
.mg-check input { width: 1.3rem; height: 1.3rem; margin: .2rem 0 0; accent-color: var(--mg-fichte); }
.mg-check label { font-weight: 400; margin: 0; }
.mg-hint { font-size: .95rem; color: var(--mg-muted); margin: .35rem 0 0; }
.mg-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mg-notice { padding: 1rem 1.2rem; border-left: 6px solid; font-weight: 700; margin-block: 1.5rem; }
.mg-notice--ok { background: #ddefe3; border-color: var(--mg-fichte); }
.mg-notice--err { background: #fbe3df; border-color: #a33b2b; }

/* ---------- Fußbereich ---------- */
.mg-footer { background: #0e252c; color: #c9d8d3; font-size: 1rem; padding-block: 3.5rem 2rem; }
.mg-footer__grid { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.mg-footer h2 { font-size: 1.05rem; font-weight: 600; color: #fff; letter-spacing: 0; margin-bottom: .7rem; }
.mg-footer a { color: #fff; }
.mg-footer ul { list-style: none; margin: 0; padding: 0; }
.mg-footer li { margin-bottom: .4rem; }
.mg-footer address { font-style: normal; }
.mg-footer__bottom {
	display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, .15); font-size: .9rem;
}

/* ---------- Sonstiges ---------- */
.mg-list-item { padding-block: 1.5rem; border-bottom: 1px solid var(--mg-line); }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }

@media print {
	.mg-header, .mg-footer, .mg-hero::after, .mg-route::before { display: none; }
	body { background: #fff; }
}
