/*
Theme Name: Maler Seeger
Theme URI: https://maler-seeger.info/
Description: Eigenes Theme für den Maler- & Lackiermeisterbetrieb Seeger in Winterlingen. Schlank, ohne Page-Builder, ohne externe Dienste.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.1
Text Domain: maler-seeger
License: GNU General Public License v2 or later
*/

:root {
	--ms-blau: #0069b4; --ms-blau-dunkel: #00508a; --ms-blau-hell: #e8f2fa;
	--ms-tinte: #1d1d1b; --ms-text: #3d3d3a; --ms-grau: #66665f;
	--ms-papier: #faf8f4; --ms-weiss: #fff; --ms-linie: #e7e3dc; --ms-sand: #f1ece3;
	--ms-radius: 14px; --ms-schatten: 0 10px 30px -12px rgba(29, 29, 27, .25);
	--ms-breite: 1180px;
}

html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
:where(.wp-site-blocks) a:where(:not(.wp-element-button)) { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ms-blau); outline-offset: 2px; }

.ms-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ms-vorzeile, p.ms-vorzeile { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ms-blau); margin: 0 0 12px; }
.ms-einleitung { color: var(--ms-grau); font-size: 1.08rem; max-width: 640px; }
.ms-gedimmt { color: var(--ms-grau); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Knöpfe ---------- */
.wp-element-button, .wp-block-button__link, .ms-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent;
	transition: transform .15s, background-color .15s, color .15s; cursor: pointer; line-height: 1.3;
}
.wp-element-button:hover, .ms-btn:hover { transform: translateY(-2px); }
.ms-btn { padding: 14px 24px; font-size: 1rem; font-family: inherit; }
.ms-btn-primaer, .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--ms-blau); color: #fff; box-shadow: 0 8px 20px -8px rgba(0, 105, 180, .7); }
.ms-btn-primaer:hover, .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: var(--ms-blau-dunkel); color: #fff; }
.ms-btn-rand, .wp-block-button.is-style-outline .wp-block-button__link { border-color: var(--ms-tinte); color: var(--ms-tinte); background: transparent; box-shadow: none; }
.ms-btn-rand:hover, .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--ms-tinte); color: #fff; }
.ms-btn .ms-icon { width: 20px; height: 20px; }
.ms-pfeil .wp-block-button__link::after { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--ms-i-pfeil) center / contain no-repeat; mask: var(--ms-i-pfeil) center / contain no-repeat; }
.ms-telefon .wp-block-button__link::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--ms-i-tel) center / contain no-repeat; mask: var(--ms-i-tel) center / contain no-repeat; }
.ms-hell .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: #fff; color: var(--ms-blau); box-shadow: none; }

/* Symbole als Masken (Farbe kommt aus currentColor / background) */
:root {
	--ms-i-pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
	--ms-i-tel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
	--ms-i-haken: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.1V12a10 10 0 1 1-5.9-9.1M22 4L12 14l-3-3'/%3E%3C/svg%3E");
	--ms-i-rolle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3h13a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM18 5.5h2a1 1 0 0 1 1 1V10a1 1 0 0 1-1 1h-8v3M10 14h4v7h-4z'/%3E%3C/svg%3E");
	--ms-i-haus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8M5 9.5V20a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1V9.5'/%3E%3C/svg%3E");
	--ms-i-tapete: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3h12v18H4zM16 6h4v15h-4M8 7h4M8 11h4M8 15h4'/%3E%3C/svg%3E");
	--ms-i-pinsel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.4 2.6a2 2 0 0 1 2.9 2.9L12 14.8 9.2 12zM9 12.2c-2 0-3.5 1.6-3.5 3.6 0 1.6-1 2.6-2.5 3.2 1 1.3 2.8 2 4.6 2 2.8 0 4.9-2.1 4.9-4.6'/%3E%3C/svg%3E");
	--ms-i-laden: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9M3 9v11h18V9M3 9h18M9 20v-6h6v6'/%3E%3C/svg%3E");
	--ms-i-lack: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1zM8 8V5a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3M6 13h12'/%3E%3C/svg%3E");
	--ms-i-hut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 10L12 5 2 10l10 5 10-5zM6 12v5c3 2 9 2 12 0v-5'/%3E%3C/svg%3E");
	--ms-i-stern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M8.5 13.8L7 22l5-3 5 3-1.5-8.2'/%3E%3C/svg%3E");
}

/* ---------- Kopf ---------- */
.ms-oberleiste { background: var(--ms-tinte); color: #d8d6d0; font-size: .85rem; }
.ms-oberleiste .ms-innen { max-width: var(--ms-breite); margin: 0 auto; padding: 8px 24px; display: flex; justify-content: space-between; gap: 16px; }
.ms-oberleiste a { color: #fff; text-decoration: none; }
.ms-oberleiste a:hover { text-decoration: underline; }
.ms-oberleiste span { display: inline-flex; align-items: center; gap: 6px; margin-right: 20px; }
.ms-oberleiste .ms-icon { width: 16px; height: 16px; }
.ms-kopf { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 244, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.admin-bar .ms-kopf { top: 32px; }
.ms-kopf.gescrollt { border-color: var(--ms-linie); box-shadow: 0 6px 20px -16px rgba(0, 0, 0, .4); }
.ms-kopf .ms-innen { max-width: var(--ms-breite); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 20px; }
.ms-logo img { height: 56px; width: auto; display: block; }
.ms-nav { display: flex; align-items: center; gap: 30px; }
.ms-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.ms-nav ul a { color: var(--ms-tinte); text-decoration: none; font-weight: 600; font-size: .98rem; position: relative; }
.ms-nav ul a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--ms-blau); transition: right .2s; }
.ms-nav ul a:hover::after, .ms-nav .current-menu-item > a::after, .ms-nav .current_page_item > a::after { right: 0; }
.ms-nav .ms-btn { padding: 10px 20px; }
.ms-menueknopf { display: none; background: none; border: 0; padding: 8px; color: var(--ms-tinte); cursor: pointer; }
.ms-menueknopf .ms-icon { width: 28px; height: 28px; }

/* ---------- Abschnitte (Startseite & Seiten) ---------- */
.ms-abschnitt { padding-top: clamp(64px, 9vw, 110px) !important; padding-bottom: clamp(64px, 9vw, 110px) !important; }
.ms-abschnitt-klein { padding-top: clamp(40px, 6vw, 70px) !important; padding-bottom: clamp(40px, 6vw, 70px) !important; }
.ms-weiss { background: var(--ms-weiss); }
.ms-sand { background: var(--ms-sand); }
.ms-kopfzeile { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 44px !important; }
.ms-kopfzeile > * { margin: 0 !important; }
.ms-kopfzeile .ms-einleitung { max-width: 420px; }

/* Bühne */
.ms-buehne { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 80px) !important; padding-bottom: clamp(56px, 8vw, 96px) !important; }
.ms-buehne::before { content: ""; position: absolute; right: -10%; top: -20%; width: 60%; height: 140%; background: var(--ms-blau-hell); border-radius: 50% 0 0 50% / 60% 0 0 60%; z-index: 0; pointer-events: none; }
.ms-buehne > * { position: relative; z-index: 1; }
.ms-buehne .wp-block-columns { gap: 56px; align-items: center; }
.ms-buehne h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.ms-buehne h1 strong { position: relative; white-space: nowrap; z-index: 0; font-weight: inherit; }
.ms-buehne h1 strong::after { content: ""; position: absolute; left: -4%; right: -4%; bottom: .02em; height: .42em; z-index: -1;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 30' preserveAspectRatio='none'%3E%3Cpath d='M4 18c40-9 95-12 150-11s104 4 142 1c-30 6-85 10-140 11S30 22 4 18z' fill='%230069b4' opacity='.28'/%3E%3Cpath d='M10 22c60-6 130-8 200-6 30 1 60 0 85-3' stroke='%230069b4' stroke-width='6' stroke-linecap='round' fill='none' opacity='.45'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.ms-buehne .ms-lead { font-size: 1.18rem; color: var(--ms-grau); max-width: 540px; }
.ms-buehne .wp-block-buttons { margin: 28px 0 30px; gap: 14px; }
.ms-buehne .wp-block-button__link { padding: 14px 24px; }
.ms-buehne .wp-block-image { position: relative; margin: 0; }
.ms-buehne .wp-block-image img { border-radius: 22px; box-shadow: var(--ms-schatten); aspect-ratio: 4 / 3.1; object-fit: cover; width: 100%; }
.ms-buehne .wp-block-image figcaption { position: absolute; left: -26px; bottom: 28px; margin: 0; background: #fff; border-radius: 16px; padding: 14px 18px 14px 72px; box-shadow: var(--ms-schatten); color: var(--ms-grau); font-size: .85rem; text-align: left; line-height: 1.35; max-width: 280px; }
.ms-buehne .wp-block-image figcaption::before { content: ""; position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border-radius: 50%; background: var(--ms-blau); }
.ms-buehne .wp-block-image figcaption::after { content: ""; position: absolute; left: 26px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; background: #fff; -webkit-mask: var(--ms-i-haus) center / contain no-repeat; mask: var(--ms-i-haus) center / contain no-repeat; }
.ms-buehne .wp-block-image figcaption strong { display: block; color: var(--ms-tinte); font-size: 1.15rem; }

/* Listen mit Haken */
ul.ms-haken { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: .92rem; color: var(--ms-tinte); font-weight: 600; }
ul.ms-haken li { display: inline-flex; align-items: center; gap: 8px; }
ul.ms-haken li::before { content: ""; width: 20px; height: 20px; flex: none; background: var(--ms-blau); -webkit-mask: var(--ms-i-haken) center / contain no-repeat; mask: var(--ms-i-haken) center / contain no-repeat; }

/* Leistungskarten */
.ms-karten { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ms-karten.ms-karten-2 { grid-template-columns: repeat(2, 1fr); }
.ms-karte { background: var(--ms-papier); border: 1px solid var(--ms-linie); border-radius: var(--ms-radius); padding: 30px 28px !important; transition: transform .2s, box-shadow .2s, border-color .2s; margin: 0 !important; }
.ms-weiss .ms-karte { background: var(--ms-papier); }
.ms-karte:hover { transform: translateY(-4px); box-shadow: var(--ms-schatten); border-color: transparent; }
.ms-karte h3 { margin: 0 0 8px; }
.ms-karte p { color: var(--ms-grau); margin: 0; font-size: .98rem; }
/* Symbol: hellblaue Kachel (::before) mit blauem Symbol darüber (::after) */
.ms-karte[class*="ms-symbol-"] { position: relative; }
.ms-karte[class*="ms-symbol-"]::before { content: ""; display: block; width: 54px; height: 54px; border-radius: 14px; margin-bottom: 18px; background: var(--ms-blau-hell); }
.ms-karte[class*="ms-symbol-"]::after { content: ""; position: absolute; top: 43px; left: 41px; width: 28px; height: 28px; background: var(--ms-blau); -webkit-mask: var(--ms-symbol) center / contain no-repeat; mask: var(--ms-symbol) center / contain no-repeat; }
.ms-symbol-rolle { --ms-symbol: var(--ms-i-rolle); }
.ms-symbol-haus { --ms-symbol: var(--ms-i-haus); }
.ms-symbol-tapete { --ms-symbol: var(--ms-i-tapete); }
.ms-symbol-pinsel { --ms-symbol: var(--ms-i-pinsel); }
.ms-symbol-laden { --ms-symbol: var(--ms-i-laden); }
.ms-symbol-lack { --ms-symbol: var(--ms-i-lack); }
.ms-symbol-hut { --ms-symbol: var(--ms-i-hut); }
.ms-symbol-stern { --ms-symbol: var(--ms-i-stern); }

/* Bildkarten (Kreativtechniken, Tapeten) */
.ms-bildkarte { background: var(--ms-weiss); border: 1px solid var(--ms-linie); border-radius: var(--ms-radius); overflow: hidden; margin: 0 !important; padding: 0 !important; }
.ms-bildkarte .wp-block-image { margin: 0; }
.ms-bildkarte .wp-block-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.ms-bildkarte h3 { margin: 18px 22px 6px; }
.ms-bildkarte p { margin: 0 22px 22px; color: var(--ms-grau); font-size: .96rem; }

/* Referenzen-Raster (Startseite) */
.ms-ref-teaser .wp-block-post-template { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 260px 260px; gap: 18px; list-style: none; padding: 0; margin: 0; }
.ms-ref-teaser .wp-block-post:first-child { grid-row: span 2; }
.ms-refkarte, .ms-ref-teaser .wp-block-post { position: relative; border-radius: var(--ms-radius); overflow: hidden; background: #2a2a28; margin: 0; }
.ms-ref-teaser .wp-block-post-featured-image { margin: 0; height: 100%; }
.ms-ref-teaser .wp-block-post-featured-image a, .ms-ref-teaser .wp-block-post-featured-image img { display: block; width: 100%; height: 100% !important; object-fit: cover; transition: transform .5s; }
.ms-ref-teaser .wp-block-post:hover img { transform: scale(1.05); }
.ms-ref-teaser .ms-ref-text { position: absolute; inset: auto 0 0 0; padding: 60px 22px 20px !important; margin: 0 !important; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); pointer-events: none; }
.ms-ref-teaser .wp-block-post-title { color: #fff; font-size: 1.2rem; margin: 0; }
.ms-ref-teaser .wp-block-post-title a { color: inherit; text-decoration: none; pointer-events: auto; }
.ms-ref-teaser .wp-block-post-title a::before { content: ""; position: absolute; inset: 0; }
.ms-chips, .ms-ref-teaser .taxonomy-referenz-art { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; font-size: .78rem; }
.ms-ref-teaser .taxonomy-referenz-art a, .ms-ref-teaser .taxonomy-referenz-art { color: #fff; text-decoration: none; }
.ms-ref-teaser .taxonomy-referenz-art a { background: rgba(255, 255, 255, .2); padding: 2px 10px; border-radius: 999px; }
.ms-ref-teaser .wp-block-post-terms__separator { display: none; }

/* Referenzen-Übersicht */
.ms-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 34px; padding: 0; list-style: none; }
.ms-filter a { display: inline-block; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--ms-linie); background: var(--ms-weiss); color: var(--ms-tinte); text-decoration: none; font-weight: 600; font-size: .92rem; }
.ms-filter a:hover { border-color: var(--ms-blau); color: var(--ms-blau); }
.ms-filter a.aktiv { background: var(--ms-blau); border-color: var(--ms-blau); color: #fff; }
.ms-ref-liste .wp-block-post-template { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; list-style: none; padding: 0; margin: 0; }
.ms-ref-liste .wp-block-post { background: var(--ms-weiss); border-radius: var(--ms-radius); overflow: hidden; border: 1px solid var(--ms-linie); transition: transform .2s, box-shadow .2s; position: relative; margin: 0; }
.ms-ref-liste .wp-block-post:hover { transform: translateY(-4px); box-shadow: var(--ms-schatten); }
.ms-ref-liste .wp-block-post-featured-image { margin: 0; }
.ms-ref-liste .wp-block-post-featured-image img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; display: block; }
.ms-ref-liste .ms-ref-text { padding: 18px 22px 22px !important; margin: 0 !important; }
.ms-ref-liste .wp-block-post-title { font-size: 1.15rem; margin: 0; }
.ms-ref-liste .wp-block-post-title a { color: var(--ms-tinte); text-decoration: none; }
.ms-ref-liste .wp-block-post-title a::before { content: ""; position: absolute; inset: 0; }
.ms-ref-liste .taxonomy-referenz-art { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ms-blau); margin: 0 0 6px; }
.ms-ref-liste .taxonomy-referenz-art a { color: inherit; text-decoration: none; position: relative; z-index: 1; }
.ms-ref-liste .wp-block-post-excerpt { color: var(--ms-grau); font-size: .95rem; margin: 8px 0 0; }
.ms-ref-liste .wp-block-post-excerpt__excerpt { margin: 0; }
.wp-block-query-pagination { margin-top: 40px; gap: 10px; }

/* Einzelne Referenz */
.ms-ref-kopfbild img { border-radius: 20px; box-shadow: var(--ms-schatten); width: 100%; max-height: 560px; object-fit: cover; }
.single-referenz .wp-block-gallery { margin-top: 32px; gap: 14px; }
.single-referenz .wp-block-gallery .wp-block-image img { border-radius: 12px; }
.ms-aufruf { background: var(--ms-blau); color: #dbe9f6; border-radius: 22px; padding: clamp(28px, 4vw, 48px) !important; }
.ms-aufruf h2, .ms-aufruf h3 { color: #fff; }
.ms-aufruf .wp-block-buttons { gap: 12px; }
.ms-aufruf .wp-block-button.is-style-outline .wp-block-button__link { border-color: #fff; color: #fff; }
.ms-aufruf .wp-block-button.is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--ms-blau); }
.ms-aufruf .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: #fff; color: var(--ms-blau); box-shadow: none; }

/* Seitenkopf normaler Seiten */
.ms-seitenkopf { background: var(--ms-blau-hell); position: relative; overflow: hidden; padding-top: clamp(48px, 7vw, 90px) !important; padding-bottom: clamp(40px, 6vw, 70px) !important; }
.ms-seitenkopf::after { content: ""; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(0, 105, 180, .07); pointer-events: none; }
.ms-seitenkopf h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0; }
.ms-seitenkopf .wp-block-post-excerpt { color: var(--ms-grau); font-size: 1.12rem; max-width: 680px; margin-top: 14px; }
.ms-seitenkopf .wp-block-post-excerpt__excerpt { margin: 0; }
.ms-inhalt > .wp-block-post-content > :first-child { margin-top: 0; }
.ms-inhalt .wp-block-post-content h2 { margin-top: 1.6em; }
.ms-inhalt .wp-block-post-content > .alignfull:first-child { margin-top: calc(-1 * clamp(48px, 7vw, 80px)); }
.ms-inhalt .wp-block-image img { border-radius: 14px; }

/* Über uns */
.ms-bildpaar { position: relative; padding: 0 40px 40px 0 !important; }
.ms-bildpaar .wp-block-image { margin: 0; }
.ms-bildpaar .wp-block-image img { border-radius: 18px; box-shadow: var(--ms-schatten); width: 100%; }
.ms-bildpaar .wp-block-image + .wp-block-image { position: absolute; right: 0; bottom: 0; width: 46%; }
.ms-bildpaar .wp-block-image + .wp-block-image img { border: 6px solid var(--ms-sand); }
ol.ms-punkte { list-style: none; counter-reset: ms; padding: 0; margin: 26px 0 0; display: grid; gap: 18px; }
ol.ms-punkte li { counter-increment: ms; position: relative; padding-left: 52px; color: var(--ms-grau); font-size: .97rem; }
ol.ms-punkte li::before { content: counter(ms); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--ms-blau); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
ol.ms-punkte li strong { color: var(--ms-tinte); display: block; font-size: 1rem; }

/* Ausbildung */
.ms-ausbildung-karte { background: var(--ms-blau); color: #dbe9f6; border-radius: 26px; padding: clamp(32px, 5vw, 60px) !important; position: relative; overflow: hidden; }
.ms-ausbildung-karte::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .08); pointer-events: none; }
.ms-ausbildung-karte .wp-block-columns { gap: 40px; align-items: center; position: relative; z-index: 1; }
.ms-ausbildung-karte h2 { color: #fff; }
.ms-ausbildung-karte .ms-vorzeile { color: #9fd0ff; }
.ms-ausbildung-karte ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ms-ausbildung-karte li { background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 14px 18px 14px 50px; color: #fff; font-weight: 600; position: relative; }
.ms-ausbildung-karte li::before { content: ""; position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; background: #fff; -webkit-mask: var(--ms-i-haken) center / contain no-repeat; mask: var(--ms-i-haken) center / contain no-repeat; }

/* ---------- Kontakt ---------- */
.ms-kontakt .wp-block-columns { gap: 56px; }
.ms-kontaktliste { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 18px; }
.ms-kontaktliste li { display: flex; gap: 16px; align-items: flex-start; }
.ms-kontaktliste .ms-symbol { width: 46px; height: 46px; border-radius: 12px; background: var(--ms-blau-hell); color: var(--ms-blau); display: grid; place-items: center; flex: none; }
.ms-kontaktliste small { display: block; color: var(--ms-grau); font-size: .85rem; }
.ms-kontaktliste a, .ms-kontaktliste b { color: var(--ms-tinte); font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.ms-kontaktliste a:hover { color: var(--ms-blau); }
.ms-karte-platz { border-radius: var(--ms-radius); overflow: hidden; border: 1px solid var(--ms-linie); background: linear-gradient(135deg, #e3eef7, #f3efe8); aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--ms-grau); font-size: .9rem; }
.ms-karte-platz iframe { width: 100%; height: 100%; border: 0; display: block; }
.ms-karte-platz.geladen { padding: 0; }
.ms-karte-platz button { margin-top: 10px; }
form.ms-anfrage { background: var(--ms-weiss); border-radius: 20px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--ms-schatten); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form.ms-anfrage h3 { grid-column: 1 / -1; font-size: 1.4rem; margin: 0; }
.ms-feld { display: grid; gap: 6px; }
.ms-feld.breit { grid-column: 1 / -1; }
.ms-feld label { font-size: .88rem; font-weight: 600; color: var(--ms-tinte); }
.ms-feld input, .ms-feld select, .ms-feld textarea { font: inherit; font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--ms-linie); border-radius: 10px; background: var(--ms-papier); color: var(--ms-tinte); width: 100%; box-sizing: border-box; }
.ms-feld input:focus, .ms-feld select:focus, .ms-feld textarea:focus { outline: none; border-color: var(--ms-blau); background: #fff; box-shadow: 0 0 0 4px var(--ms-blau-hell); }
.ms-feld textarea { min-height: 130px; resize: vertical; }
.ms-zustimmung { grid-column: 1 / -1; display: flex; gap: 10px; font-size: .85rem; color: var(--ms-grau); align-items: flex-start; }
.ms-zustimmung input { margin-top: 4px; accent-color: var(--ms-blau); width: 18px; height: 18px; flex: none; }
form.ms-anfrage .ms-btn { grid-column: 1 / -1; }
.ms-honig { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ms-meldung { grid-column: 1 / -1; border-radius: 10px; padding: 14px 16px; font-weight: 600; }
.ms-meldung.ok { background: #e9f6ee; color: #1e6b3a; }
.ms-meldung.fehler { background: #fdecec; color: #9b1c1c; }

/* Impressum-Angaben */
.ms-angaben { background: var(--ms-weiss); border: 1px solid var(--ms-linie); border-radius: var(--ms-radius); padding: 24px 28px; }
.ms-angaben dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 0; }
.ms-angaben dt { color: var(--ms-grau); }
.ms-angaben dd { margin: 0; color: var(--ms-tinte); }

/* ---------- Fuß ---------- */
.ms-fuss { background: var(--ms-tinte); color: #b9b7b0; padding: 64px 0 28px; font-size: .95rem; }
.ms-fuss .ms-innen { max-width: var(--ms-breite); margin: 0 auto; padding: 0 24px; }
.ms-fuss .ms-spalten { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.ms-fuss h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.ms-fuss a { color: #e6e4de; text-decoration: none; }
.ms-fuss a:hover { color: #fff; text-decoration: underline; }
.ms-fuss ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ms-fuss-logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; }
.ms-fuss-logo img { height: 48px; width: auto; display: block; }
.ms-unterzeile { border-top: 1px solid #3a3a37; margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }
.ms-schnell { display: none; }

/* ---------- Mobil ---------- */
@media (max-width: 980px) {
	.ms-buehne .wp-block-columns, .ms-kontakt .wp-block-columns, .ms-ausbildung-karte .wp-block-columns, .ms-zweispaltig .wp-block-columns { flex-wrap: wrap !important; }
	.ms-buehne .wp-block-column, .ms-kontakt .wp-block-column, .ms-ausbildung-karte .wp-block-column, .ms-zweispaltig .wp-block-column { flex-basis: 100% !important; }
	.ms-buehne::before { width: 100%; height: 55%; top: auto; bottom: -10%; right: -30%; }
	.ms-karten { grid-template-columns: 1fr 1fr; }
	.ms-ref-teaser .wp-block-post-template { grid-template-columns: 1fr 1fr; grid-template-rows: 300px 220px 220px; }
	.ms-ref-teaser .wp-block-post:first-child { grid-column: span 2; grid-row: auto; }
	.ms-ref-liste .wp-block-post-template { grid-template-columns: 1fr 1fr; }
	.ms-fuss .ms-spalten { grid-template-columns: 1fr 1fr; }
	.ms-bildpaar { max-width: 560px; }
}
@media (max-width: 860px) {
	.ms-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--ms-papier); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; border-bottom: 1px solid var(--ms-linie); box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .3); }
	.ms-nav.offen { display: flex; }
	.ms-nav ul { flex-direction: column; gap: 0; }
	.ms-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--ms-linie); font-size: 1.1rem; }
	.ms-nav ul a::after { display: none; }
	.ms-nav .ms-btn { margin-top: 14px; }
	.ms-menueknopf { display: block; }
	.ms-oberleiste .ms-ort { display: none; }
}
@media (max-width: 782px) { .admin-bar .ms-kopf { top: 0; } }
@media (max-width: 600px) {
	body { padding-bottom: 72px; }
	.ms-kopf .ms-innen { height: 70px; padding: 0 16px; }
	.ms-logo img { height: 46px; }
	.ms-oberleiste { display: none; }
	.ms-karten, .ms-karten.ms-karten-2 { grid-template-columns: 1fr; }
	.ms-ref-teaser .wp-block-post-template, .ms-ref-liste .wp-block-post-template { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: auto; }
	.ms-ref-teaser .wp-block-post { height: 240px; }
	.ms-ref-teaser .wp-block-post:first-child { grid-column: auto; }
	.ms-buehne .wp-block-image figcaption { left: 12px; bottom: 12px; }
	.ms-buehne .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.ms-buehne .wp-block-button, .ms-buehne .wp-block-button__link { width: 100%; }
	form.ms-anfrage { grid-template-columns: 1fr; }
	.ms-fuss .ms-spalten { grid-template-columns: 1fr; }
	.ms-angaben dl { grid-template-columns: 1fr; gap: 2px; }
	.ms-angaben dd { margin-bottom: 10px; }
	.ms-schnell { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--ms-linie); box-shadow: 0 -8px 20px -12px rgba(0, 0, 0, .3); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 10px; }
	.ms-schnell .ms-btn { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .ms-oberleiste, .ms-kopf, .ms-schnell, .ms-fuss, form.ms-anfrage { display: none !important; } }

/* ---------- Seitengerüst ---------- */
.wp-site-blocks > header.wp-block-template-part { display: contents; }
.wp-site-blocks > * + *, .wp-block-post-content > .alignfull + .alignfull, main.wp-block-group > .alignfull + .alignfull { margin-block-start: 0 !important; }
.wp-site-blocks > footer { margin-block-start: 0 !important; }
.wp-block-post-content > .alignfull:first-child { margin-block-start: 0; }
.ms-ohne-unten { padding-bottom: 0 !important; }
.ms-inhalt .ms-aufruf, .ms-inhalt .ms-karten { margin-top: 40px; }
.ms-seitenkopf .taxonomy-referenz-art a { display: inline-block; background: #fff; color: var(--ms-blau); padding: 3px 12px; border-radius: 999px; text-decoration: none; font-size: .8rem; font-weight: 700; margin: 0 4px 10px 0; }
.ms-seitenkopf .wp-block-post-terms__separator { display: none; }
.ms-zurueck { margin: 0 0 14px; font-weight: 600; }
.ms-zurueck a { text-decoration: none; }
.ms-inhalt > .alignwide { max-width: var(--ms-breite); margin-left: auto !important; margin-right: auto !important; }
.ms-inhalt > .ms-aufruf { margin-top: 48px; }
