/* ==========================================================================
   Software Stäbler – Ergänzende Stile (Farben, Schriften, Abstände: theme.json)
   ========================================================================== */

:root {
	--st-radius: 12px;
	--st-shadow: 0 30px 60px -30px rgba(14, 15, 16, 0.35);
	--st-ease: cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--teal);
	outline-offset: 2px;
}

.screen-reader-text:focus { clip: auto; }

/* Bereiche stoßen ohne Lücke aneinander */
.wp-site-blocks > * + * { margin-block-start: 0; }
.st-main > .alignfull + .alignfull { margin-block-start: 0; }

/* ---------- Kopfbereich ---------- */
.st-header { border-bottom: 3px solid var(--wp--preset--color--teal); }
.st-header .wp-block-site-logo img,
.st-header .st-logo img { height: 56px; width: auto; display: block; }
.st-header .wp-block-navigation a { text-decoration: none; }
.st-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.st-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.st-header .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content { color: var(--wp--preset--color--teal-light); }
.st-header .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--ink-soft) !important;
	border: 1px solid #2A2F33 !important;
	border-radius: 8px;
	padding: .4rem 0;
	min-width: 230px !important;
}
.st-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .55rem 1rem !important; }
.st-nav-badge {
	display: inline-block; margin-left: .35rem; padding: 1px 6px; border-radius: 4px;
	font-size: 11px; font-weight: 700; line-height: 1.5;
	background: var(--wp--preset--color--teal-light); color: var(--wp--preset--color--ink);
}
.st-header .wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; gap: .5rem; }

/* Suche (Lupe) im Kopfbereich */
.st-header-search .wp-block-search__inside-wrapper { border: 0 !important; padding: 0 !important; background: transparent; gap: .35rem; }
.st-header-search .wp-block-search__button {
	background: transparent !important; color: #fff !important; border: 0 !important;
	min-width: 44px; min-height: 44px; padding: .5rem !important; margin: 0 !important;
	display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer;
}
.st-header-search .wp-block-search__button:hover,
.st-header-search .wp-block-search__button:focus-visible { color: var(--wp--preset--color--teal-light) !important; }
.st-header-search .wp-block-search__button svg { fill: currentColor; width: 24px; height: 24px; min-width: 24px; }
.st-header-search .wp-block-search__input {
	background: var(--wp--preset--color--ink-soft); color: #fff;
	border: 1px solid #4A5157 !important; border-radius: 6px; padding: .55rem .8rem; min-height: 44px; box-sizing: border-box;
	font-size: var(--wp--preset--font-size--small);
}
.st-header-search .wp-block-search__input::placeholder { color: var(--wp--preset--color--fog); }

/* ---------- Icons (über Klassen an Absätzen, Überschriften, Buttons) ---------- */
[class*="st-icon-"]::before {
	content: ""; display: inline-block; flex: none;
	width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: .5em;
	background-color: currentColor;
	-webkit-mask: var(--st-icon) center / contain no-repeat;
	mask: var(--st-icon) center / contain no-repeat;
}
/* Bei Buttons sitzt das Icon im Link, nicht davor */
.wp-block-button[class*="st-icon-"]::before { content: none; }
.wp-block-button[class*="st-icon-"] .wp-block-button__link::before {
	content: ""; display: inline-block; flex: none; width: 1.15em; height: 1.15em;
	background-color: currentColor;
	-webkit-mask: var(--st-icon) center / contain no-repeat;
	mask: var(--st-icon) center / contain no-repeat;
}
.st-icon-big::before { width: 28px; height: 28px; margin: 0 0 .25rem; display: block; }
.st-icon-remote { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4M9 10.5h6M12.5 8l2.5 2.5-2.5 2.5'/%3E%3C/svg%3E"); }
.st-icon-download { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 20h16'/%3E%3C/svg%3E"); }
.st-icon-refresh { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-3-6.7L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E"); }
.st-icon-file { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M12 18v-6M9 15l3 3 3-3'/%3E%3C/svg%3E"); }
.st-icon-lock { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.st-icon-phone { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' 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"); }
.st-icon-globe { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E"); }
.st-icon-mail { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E"); }
.st-icon-pin { --st-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 0 1 16 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }

.st-iconbox {
	width: 48px; height: 48px; border-radius: 10px; flex: none;
	display: flex; align-items: center; justify-content: center;
	background: #FBE7E7; color: var(--wp--preset--color--red);
}
.st-iconbox::before { margin: 0 !important; width: 26px !important; height: 26px !important; }

/* ---------- Block-Stile ---------- */
.is-style-kicker {
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 700 !important;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--teal-dark);
}
.has-ink-background-color .is-style-kicker,
.has-ink-soft-background-color .is-style-kicker { color: var(--wp--preset--color--teal-light); }

.wp-block-group.is-style-karte,
.wp-block-group.is-style-karte-link {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--st-radius);
	padding: 1.5rem;
	color: var(--wp--preset--color--body);
}
.wp-block-group.is-style-karte-link { position: relative; transition: transform .2s var(--st-ease), box-shadow .2s var(--st-ease), border-color .2s; }
.wp-block-group.is-style-karte-link:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(14,15,16,.45); border-color: #C9CFD3; }
.wp-block-group.is-style-karte-link :where(h2, h3, h4) a { color: inherit; text-decoration: none; }
.wp-block-group.is-style-karte-link :where(h2, h3, h4) a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.wp-block-image.is-style-screenshot img {
	border-radius: 10px;
	border: 1px solid #D5DADE;
	box-shadow: var(--st-shadow);
}

.wp-block-list.is-style-haken { list-style: none; padding-left: 0; }
.wp-block-list.is-style-haken li { position: relative; padding-left: 2rem; margin-bottom: .6rem; }
.wp-block-list.is-style-haken li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 1.2em; height: 1.2em;
	background-color: var(--wp--preset--color--teal-dark);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-button.is-style-tuerkis .wp-block-button__link { background: var(--wp--preset--color--teal); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-tuerkis .wp-block-button__link:hover { background: var(--wp--preset--color--teal-light); }
.wp-block-button.is-style-rahmen-hell .wp-block-button__link { background: transparent; color: #fff; border: 1px solid #4A5157; }
.wp-block-button.is-style-rahmen-hell .wp-block-button__link:hover { border-color: var(--wp--preset--color--teal-light); color: var(--wp--preset--color--teal-light); }
.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; box-sizing: border-box; }

/* MASYWIN-Logo als helle Kachel auf dunklem Grund */
.st-logo-kachel img {
	background: #fff; padding: 12px 18px; border-radius: 10px; box-sizing: content-box;
	box-shadow: 0 20px 40px -24px rgba(0,0,0,.6);
}

/* ---------- Fernwartungs-Karte ---------- */
.st-fernwartung { border-top: 6px solid var(--wp--preset--color--red) !important; box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); }
.st-fernwartung .wp-block-button, .st-fernwartung .wp-block-button__link { width: 100%; }
.st-fernwartung .wp-block-button__link { min-height: 56px; font-size: 1.125rem; font-weight: 700; }
.st-fernwartung .st-meta p { display: flex; align-items: flex-start; gap: .5rem; margin: 0; }
.st-fernwartung .st-meta p::before { color: var(--wp--preset--color--teal-dark); margin-top: .2em; }

/* ---------- Kategorien als Chips ---------- */
.wp-block-categories.is-style-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.wp-block-categories.is-style-chips li { margin: 0; }
.wp-block-categories.is-style-chips a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; box-sizing: border-box;
	border: 1px solid #C9CFD3; border-radius: 999px; background: #fff;
	color: var(--wp--preset--color--body); text-decoration: none; font-size: var(--wp--preset--font-size--small); font-weight: 600;
}
.wp-block-categories.is-style-chips a:hover,
.wp-block-categories.is-style-chips .current-cat a { background: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--ink); color: #fff; }
.st-chip-alle { display: inline-flex; }
.st-chip-alle a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1rem; box-sizing: border-box;
	border-radius: 999px; background: var(--wp--preset--color--ink); color: #fff; text-decoration: none; font-size: var(--wp--preset--font-size--small); font-weight: 600;
}
.category .st-chip-alle a { background: #fff; color: var(--wp--preset--color--body); border: 1px solid #C9CFD3; }

/* ---------- Kategorie-Etiketten an Beiträgen ---------- */
.wp-block-post-terms.taxonomy-category { display: flex; flex-wrap: wrap; gap: .35rem; }
.wp-block-post-terms.taxonomy-category .wp-block-post-terms__separator { display: none; }
.wp-block-post-terms.taxonomy-category a {
	display: inline-block; padding: 3px 10px; border-radius: 4px;
	font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
	background: #E9EDEF; color: #2B3135;
}
.wp-block-post-terms a.cat-update { background: var(--wp--preset--color--red); color: #fff; }
.wp-block-post-terms a.cat-release { background: var(--wp--preset--color--ink); color: #fff; }
.wp-block-post-terms a.cat-schnittstellen { background: var(--wp--preset--color--teal-dark); color: #fff; }
.wp-block-post-terms a.cat-sicherheit { background: #DCEFEE; color: #0B4F4B; }
.wp-block-post-terms a.cat-hinweis { background: #E9EDEF; color: #2B3135; }

/* ---------- Beitragsraster ---------- */
.st-post-grid .wp-block-post-template { gap: 1.25rem; }
.st-post-grid .wp-block-post { display: flex; }
.st-post-grid .wp-block-post > .wp-block-group { flex: 1; display: flex; flex-direction: column; }
.st-post-grid .wp-block-post-excerpt { flex-grow: 1; }
.st-post-grid .wp-block-post-excerpt__more-link { font-weight: 600; font-size: var(--wp--preset--font-size--small); }
.st-post-grid .wp-block-post-title a { color: inherit; text-decoration: none; }
.st-post-grid .wp-block-post-title a:hover { color: var(--wp--preset--color--teal-dark); }

/* Neuester Beitrag auf Seite 1 des Blogs: breite, dunkle Karte */
body.blog:not(.paged) .st-blog .wp-block-post-template > li:first-child { grid-column: 1 / -1; }
body.blog:not(.paged) .st-blog .wp-block-post-template > li:first-child > .wp-block-group {
	background: var(--wp--preset--color--ink-soft); color: #fff; border-color: var(--wp--preset--color--ink-soft);
	padding: clamp(1.5rem, 4vw, 2.75rem);
}
body.blog:not(.paged) .st-blog .wp-block-post-template > li:first-child .wp-block-post-title { font-size: var(--wp--preset--font-size--x-large); }
body.blog:not(.paged) .st-blog .wp-block-post-template > li:first-child :is(.wp-block-post-date, .wp-block-post-excerpt) { color: var(--wp--preset--color--fog); }
body.blog:not(.paged) .st-blog .wp-block-post-template > li:first-child .wp-block-post-excerpt__more-link { color: var(--wp--preset--color--teal-light); }
body.blog:not(.paged) .st-blog .wp-block-post-template > li:first-child .wp-block-post-title a:hover { color: var(--wp--preset--color--teal-light); }

.wp-block-query-pagination { gap: .5rem; font-weight: 600; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; }
.wp-block-query-pagination-numbers .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border-radius: 8px; }
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--wp--preset--color--ink); color: #fff; }

/* ---------- Download-Liste ---------- */
.st-downloads { display: flex; flex-direction: column; gap: .6rem; }
.st-download {
	display: flex; align-items: center; gap: 1.1rem; position: relative;
	background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 1rem 1.25rem;
	transition: border-color .2s, box-shadow .2s;
}
.st-download:hover { border-color: #C9CFD3; box-shadow: 0 12px 30px -20px rgba(14,15,16,.4); }
.st-download .st-pdf {
	flex: none; width: 44px; height: 44px; border-radius: 8px; margin: 0 !important;
	display: flex; align-items: center; justify-content: center;
	background: #FBE7E7; color: #A30D0C; font-size: 12px; font-weight: 700;
}
.st-download .st-download-text { flex: 1; }
.st-download .st-download-text > * { margin: 0 !important; }
.st-download .st-download-text a { color: var(--wp--preset--color--body); text-decoration: none; font-weight: 700; }
.st-download .st-download-text a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.st-download::after {
	content: ""; flex: none; width: 22px; height: 22px; background-color: var(--wp--preset--color--teal-dark);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Chips (Referenzen, Branchen) ---------- */
.st-chips { gap: .5rem !important; }
.st-chips > * { margin: 0 !important; }
.st-chip {
	padding: .45rem .9rem; border: 1px solid #D5DADE; border-radius: 999px; background: #fff;
	font-size: var(--wp--preset--font-size--small);
}
.st-ref {
	border: 1px solid var(--wp--preset--color--line); border-radius: 8px; background: #fff; padding: .7rem 1rem;
	display: flex; flex-direction: column; gap: 0 !important;
}
.st-ref > * { margin: 0 !important; line-height: 1.4; }

/* ---------- Nummerierte Schritte ---------- */
.st-step-no { font-family: var(--wp--preset--font-family--inter-display); font-weight: 800; line-height: 1 !important; }
.st-num {
	flex: none; width: 34px; height: 34px; border-radius: 50%; margin: 0 !important;
	display: flex; align-items: center; justify-content: center;
	background: var(--wp--preset--color--ink); color: var(--wp--preset--color--teal-light); font-weight: 700; font-size: 14px;
}

/* ---------- Fußbereich ---------- */
.st-footer a { color: var(--wp--preset--color--fog); text-decoration: none; }
.st-footer a:hover { color: var(--wp--preset--color--teal-light); }
.st-footer .st-footer-head { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.st-footer .wp-block-image img { height: 64px; width: auto; }

/* ---------- Ältere Inhalte (klassischer Editor, Twenty-Seventeen-Zeit) ---------- */
.entry-content .alignleft, .wp-block-post-content .alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.entry-content .alignright, .wp-block-post-content .alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.entry-content .aligncenter, .wp-block-post-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-block-post-content img { max-width: 100%; height: auto; border-radius: 6px; }
.wp-block-post-content .wp-caption { max-width: 100%; }
.wp-block-post-content .wp-caption-text { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--slate); margin-top: .4rem; }
.wp-block-post-content::after { content: ""; display: table; clear: both; }
.wp-block-post-content .wp-video { max-width: 100% !important; }
.wp-block-post-content table { border-collapse: collapse; width: 100%; }
.wp-block-post-content td, .wp-block-post-content th { border: 1px solid var(--wp--preset--color--line); padding: .5rem .75rem; vertical-align: top; }
.wp-block-post-content a[href$=".pdf"]::before {
	content: "PDF"; display: inline-block; margin-right: .4rem; padding: 0 5px; border-radius: 3px;
	font-size: 11px; font-weight: 700; line-height: 1.6; background: #FBE7E7; color: #A30D0C; vertical-align: .1em;
}

.wp-block-post-content .st-download a[href$=".pdf"]::before,
.wp-block-post-content .wp-element-button[href$=".pdf"]::before { content: none; }

@media (max-width: 781px) {
	.entry-content .alignleft, .entry-content .alignright,
	.wp-block-post-content .alignleft, .wp-block-post-content .alignright { float: none; margin: 1rem 0; }
}
