/*
Theme Name: Zentraltreuhand
Theme URI: https://zentraltreuhand.de
Description: Block-Theme für die Zentraltreuhand. Seriöses Navy-Design mit eigenen Block-Stilen (Hero-Karte, Karten, Schritte, Checklisten, Vergleichstabellen) und Vorlagen-Mustern. Alle Inhalte bestehen aus Standard-Blöcken und lassen sich im Editor bearbeiten.
Version: 1.0.2
Requires at least: 6.6
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: zentraltreuhand
*/

/* ---------- Grundlagen ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks > main { margin-block-start: 0; }
.wp-block-post-content > .alignfull:first-child { margin-block-start: 0; }
.wp-block-post-content > * + .alignfull { margin-block-start: 0; }
[id] { scroll-margin-top: 96px; }

/* ---------- Kopfbereich ---------- */
.zt-topbar p { margin: 0; }
.zt-topbar a { color: inherit; text-decoration: none; }
.zt-topbar a:hover { color: #fff; }
header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 0; } }
.zt-header .wp-block-site-title a { text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.zt-header .wp-block-site-title a::before {
	content: ""; width: 36px; height: 36px; flex: none; border-radius: 4px;
	background: #0A2A5E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cpath d='M10 11h16L10 25h16' stroke='%23fff' stroke-width='2.6' fill='none' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.zt-header .wp-block-navigation-item__content { padding: 6px 0; border-bottom: 2px solid transparent; }
.zt-header .wp-block-navigation-item__content:hover,
.zt-header .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: #0A2A5E; }
.zt-header .wp-block-navigation a { text-decoration: none; }
@media (max-width: 1100px) {
	.zt-header .wp-block-buttons { display: none; }
}
/* Mobilmenü: linksbündig, größere Schrift */
.zt-header .wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-justification-setting: flex-start; --navigation-layout-justify: flex-start;
	padding: 1.5rem;
}
.zt-header .is-menu-open :is(.wp-block-navigation__responsive-container-content, .wp-block-navigation__container) { align-items: flex-start !important; }
.zt-header .is-menu-open .wp-block-navigation__container { gap: 1.25rem; }
.zt-header .is-menu-open .wp-block-navigation-item { font-size: 1.25rem; font-weight: 600; color: var(--wp--preset--color--navy); }

/* ---------- Abschnitte ---------- */
.is-style-zt-section { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--70); }
.is-style-zt-section-head {
	max-width: 760px !important; margin-bottom: var(--wp--preset--spacing--50) !important;
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1200px)) / 2)) !important;
}
.is-style-zt-section-head > * + * { margin-top: 1rem; }
.is-style-zt-section-head p { font-size: 1.0625rem; }

.is-style-zt-eyebrow {
	font-size: 0.8125rem !important; font-weight: 600; letter-spacing: 0.09em;
	text-transform: uppercase; color: var(--wp--preset--color--blue) !important;
}

/* ---------- Hero ---------- */
.wp-block-cover.is-style-zt-hero { padding-top: 4rem; padding-bottom: 4rem; }
.wp-block-cover.is-style-zt-hero .wp-block-cover__inner-container { width: 100%; }
.is-style-zt-hero-card {
	background: #fff; max-width: 600px !important; margin-left: 0 !important; margin-right: auto !important;
	padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: 4px; box-shadow: 0 12px 40px rgba(10, 42, 94, 0.14);
}
.is-style-zt-hero-card > * { margin-top: 0; margin-bottom: 0; }
.is-style-zt-hero-card > * + * { margin-top: 1.25rem; }
.is-style-zt-hero-card p:not(.is-style-zt-eyebrow) { font-size: 1.125rem; }
.is-style-zt-hero-card .wp-block-buttons { margin-top: 1.75rem; }

/* ---------- Vertrauensleiste / Häkchen-Liste ---------- */
ul.is-style-zt-checks {
	list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap;
	justify-content: space-between; gap: 1rem 2.5rem; color: var(--wp--preset--color--navy); font-weight: 500;
}
ul.is-style-zt-checks li { display: flex; align-items: center; gap: 10px; }
ul.is-style-zt-checks li::before {
	content: ""; width: 20px; height: 20px; flex: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A2A5E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

ul.is-style-zt-checklist {
	list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem 3rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
ul.is-style-zt-checklist li { position: relative; padding-left: 44px; font-size: 1rem; }
ul.is-style-zt-checklist li::before {
	content: ""; position: absolute; left: 0; top: 0; width: 28px; height: 28px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F6FD6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
ul.is-style-zt-checklist li strong { display: block; color: var(--wp--preset--color--navy); font-size: 1.0625rem; margin-bottom: 4px; }

/* ---------- Merkmal mit Linie ---------- */
.is-style-zt-feature { border-top: 3px solid var(--wp--preset--color--navy); padding-top: 1.375rem; }
.is-style-zt-feature > * { margin: 0; }
.is-style-zt-feature > * + * { margin-top: 0.625rem; }

/* ---------- Karte ---------- */
.is-style-zt-card {
	background: #fff; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column;
	box-shadow: 0 1px 3px rgba(10, 42, 94, 0.08); transition: box-shadow .2s, transform .2s; height: 100%;
}
.is-style-zt-card:hover { box-shadow: 0 10px 30px rgba(10, 42, 94, 0.14); transform: translateY(-2px); }
.is-style-zt-card > .wp-block-image { margin: 0; }
.is-style-zt-card > .wp-block-image img { width: 100%; height: 180px; object-fit: cover; display: block; }
.is-style-zt-card > :not(.wp-block-image) { margin: 0; padding-left: 1.5rem; padding-right: 1.5rem; }
.is-style-zt-card > .wp-block-image + * { padding-top: 1.5rem; }
.is-style-zt-card > :last-child { padding-bottom: 1.5rem; margin-top: auto; }
.is-style-zt-card > * + :not(.wp-block-image) { margin-top: 0.625rem; }
.is-style-zt-card h3 { hyphens: auto; overflow-wrap: break-word; }
.is-style-zt-card p { font-size: 0.9375rem; }
.is-style-zt-card .zt-card-focus { color: var(--wp--preset--color--navy); font-weight: 500; font-size: 0.875rem; }
.is-style-zt-card .zt-card-link a { font-weight: 600; color: var(--wp--preset--color--blue); text-decoration: none; }

/* ---------- Schritte ---------- */
.zt-steps { counter-reset: zt-step; }
.is-style-zt-step { counter-increment: zt-step; position: relative; padding-left: 68px; min-height: 48px; }
.is-style-zt-step::before {
	content: counter(zt-step);
	position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%;
	background: var(--wp--preset--color--navy); color: #fff; font-weight: 700; font-size: 1.125rem;
	display: flex; align-items: center; justify-content: center;
}
.is-style-zt-step > * { margin: 0; }
.is-style-zt-step > h3 { margin-top: 0.375rem; font-size: 1.1875rem; }
.is-style-zt-step > * + * { margin-top: 0.5rem; }
.is-style-zt-step p { font-size: 0.9375rem; }

/* ---------- Bild in Text-Bild-Spalten ---------- */
.is-style-zt-rounded img { border-radius: 4px; }

/* ---------- Vergleichstabelle (zwei Stile: normal / letzte Spalte hervorgehoben) ---------- */
:is(.is-style-zt-compare, .is-style-zt-compare-highlight).wp-block-table { border: 1px solid var(--wp--preset--color--line); border-radius: 4px; overflow-x: auto; background: #fff; }
:is(.is-style-zt-compare, .is-style-zt-compare-highlight) table { min-width: 720px; border-collapse: collapse; font-size: 0.9375rem; }
:is(.is-style-zt-compare, .is-style-zt-compare-highlight) :is(th, td) { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 1.125rem 1.25rem; text-align: left; vertical-align: top; color: var(--wp--preset--color--muted); }
:is(.is-style-zt-compare, .is-style-zt-compare-highlight) thead { border: 0; }
:is(.is-style-zt-compare, .is-style-zt-compare-highlight) thead th { background: var(--wp--preset--color--navy); color: #fff; font-weight: 600; font-size: 0.875rem; }
:is(.is-style-zt-compare, .is-style-zt-compare-highlight) tbody tr:last-child td { border-bottom: 0; }
:is(.is-style-zt-compare, .is-style-zt-compare-highlight) tbody td:first-child { color: var(--wp--preset--color--navy); font-weight: 600; width: 22%; }
.is-style-zt-compare-highlight tbody td:last-child { background: #F7FAFE; color: var(--wp--preset--color--ink); font-weight: 500; }

/* ---------- Hinweis-Box ---------- */
.is-style-zt-notice { border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--light); padding: 1.5rem 1.75rem; border-radius: 4px; }
.is-style-zt-notice p { font-size: 0.9375rem; margin: 0; }

/* ---------- Fußbereich ---------- */
.zt-footer a { color: inherit; text-decoration: none; }
.zt-footer a:hover { color: #fff; }
.zt-footer h2 { color: #fff; margin-bottom: 0; }
.zt-footer h2 + :is(p, ul) { margin-top: 0.875rem; }
.zt-footer ul { list-style: none; padding: 0; margin: 0; }
.zt-footer li + li { margin-top: 0.5rem; }

/* ---------- Schmale Bildschirme: lange deutsche Wörter trennen ---------- */
@media (max-width: 600px) {
	:is(h1, h2, h3, h4, p, li) {
		-webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4;
		overflow-wrap: anywhere;
	}
	.is-style-zt-hero-card { padding: 1.5rem 1.25rem; }
}
