/* WordPress-spezifische Ergänzungen zu site.css */

/* Abstände, die WordPress zwischen Blöcken einfügt, zurücksetzen */
.wp-site-blocks > * { margin-block: 0; }
.impact-main > .wp-block-post-content > *,
.impact-main > * { margin-block: 0; }
.wp-site-blocks { padding: 0; }

/* Header: der Template-Teil ist das klebende Element, die Leiste darin animiert */
header.wp-block-template-part {
  position: sticky; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 50;
  margin-top: 12px; pointer-events: none;
}
header.wp-block-template-part .site-header { position: relative; top: auto; margin-top: 0; }
.admin-bar header.wp-block-template-part { top: calc(44px + env(safe-area-inset-top, 0px)); }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: calc(58px + env(safe-area-inset-top, 0px)); } }

/* Honeypot des Formulars */
.impact-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.impact-leer { color: var(--muted); font-size: .95rem; padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); }
.band:not(.band--paper):not(.band--soft) .impact-leer { color: var(--on-ink-muted); border-color: var(--hair-2); }

/* Textseiten (Impressum, Datenschutz, Blog …) */
.impact-textseite {
  max-width: calc(760px + 64px); margin-inline: auto;
  padding: clamp(56px, 8vw, 110px) max(16px, env(safe-area-inset-right, 0px)) clamp(64px, 9vw, 120px) max(16px, env(safe-area-inset-left, 0px));
}
@media (min-width: 700px) { .impact-textseite { padding-left: 32px; padding-right: 32px; } }
.impact-textseite .wp-block-post-title, .impact-textseite .wp-block-query-title { font-size: var(--step-4); font-weight: 700; margin-bottom: 32px; }
.impact-textseite .wp-block-post-content { color: var(--on-ink-muted); line-height: 1.75; }
.impact-textseite .wp-block-post-content > * + * { margin-top: 1.1em; }
.impact-textseite h2, .impact-textseite h3, .impact-textseite h4 { color: var(--on-ink); margin-top: 1.8em; margin-bottom: .4em; line-height: 1.2; }
.impact-textseite h2 { font-size: var(--step-2); }
.impact-textseite h3 { font-size: var(--step-1); }
.impact-textseite a { color: var(--blue-hi); text-underline-offset: 3px; }
.impact-textseite ul, .impact-textseite ol { padding-left: 1.3em; }
.impact-textseite .wp-block-post-template { list-style: none; padding: 0; display: grid; gap: 28px; }
.impact-textseite .wp-block-post-template h2 a { color: var(--on-ink); text-decoration: none; }

/* Projekt-Einzelseite */
.projekt-fakten { margin: 0; border-top: 1px solid var(--line); }
.projekt-fakten div { border-color: var(--line); }
.projekt-fakten dt { color: var(--muted); }
.projekt-fakten a { color: var(--blue-deep); }
.projekt-text { display: grid; gap: 14px; color: var(--muted); }
.projekt-text .lead { color: var(--text); }
.projekt-text h2 { font-size: var(--step-1); font-weight: 600; color: var(--text); margin-top: 12px; }
.impact-archiv .band--paper { padding-top: calc(var(--band) - 20px); }

/* Formular-Rückmeldung nach dem Absenden */
.form.is-gesendet .field, .form.is-gesendet fieldset, .form.is-gesendet .consent, .form.is-gesendet button { display: none; }

/* H1 auf Archiv- und 404-Seite sieht aus wie die Sektions-Überschriften */
.section-head h1 { font-size: var(--step-4); font-weight: 700; }
.cta-band h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.04em; max-width: 16ch; }

/* Sicherheitsnetz gegen fremde globale Stile (Page-Builder, Plugins): Grundschrift und -farbe des Themes */
body.wp-theme-impact-studios:not(.impact-elementor-seite) { font-family: var(--f-body); color: var(--on-ink); background: var(--ink); }
body.wp-theme-impact-studios:not(.impact-elementor-seite) :is(h1, h2, h3, h4, h5, h6) { font-family: var(--f-display); }

/* Rechtstexte (Template „Impact – Rechtstext“): Kopf wie die Leistungsseiten, daneben ein mitlaufendes Inhaltsverzeichnis */
.recht-kopf { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--hair); }
.recht-kopf .wrap { grid-template-columns: 1fr; }
.recht-stand { margin-top: 18px; font: 500 var(--step--1)/1 var(--f-mono); color: var(--on-ink-muted); letter-spacing: .04em; }
.recht-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.recht-tabs a { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--hair-2); text-decoration: none; font-size: .9rem; color: var(--on-ink-muted); transition: color .2s, border-color .2s, background-color .2s; }
.recht-tabs a:hover { color: var(--on-ink); border-color: rgba(255,255,255,.4); }
.recht-tabs a[aria-current="page"] { color: #04121a; background: var(--blue); border-color: var(--blue); }
.recht-body { max-width: var(--wrap); margin-inline: auto; padding: clamp(40px, 6vw, 88px) max(16px, env(safe-area-inset-right, 0px)) clamp(64px, 9vw, 120px) max(16px, env(safe-area-inset-left, 0px)); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (min-width: 700px) { .recht-body { padding-left: 32px; padding-right: 32px; } }
@media (min-width: 1000px) { .recht-body.mit-toc { grid-template-columns: 240px minmax(0, 1fr); } }
.recht-toc { display: none; }
@media (min-width: 1000px) {
  .recht-toc { display: block; position: sticky; top: 110px; }
  .recht-toc p { font: 500 var(--step--1)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--on-ink-muted); margin: 0 0 16px; }
  .recht-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hair); }
  .recht-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--on-ink-muted); text-decoration: none; font-size: .88rem; line-height: 1.4; transition: color .2s, border-color .2s; }
  .recht-toc a:hover { color: var(--on-ink); }
  .recht-toc a.is-active { color: var(--blue-hi); border-left-color: var(--blue-hi); }
}
.recht-inhalt { max-width: 760px; color: var(--on-ink-muted); line-height: 1.75; }
.recht-inhalt > * + * { margin-top: 1.1em; }
.recht-inhalt > p:first-child { font-size: var(--step-1); color: var(--on-ink); line-height: 1.6; }
.recht-inhalt h2 { font-size: var(--step-2); font-weight: 700; color: var(--on-ink); line-height: 1.2; margin-top: 2.2em; padding-top: 1.4em; border-top: 1px solid var(--hair); scroll-margin-top: 110px; }
.recht-inhalt > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.recht-inhalt h3 { font-size: var(--step-1); color: var(--on-ink); margin-top: 1.6em; }
.recht-inhalt strong { color: var(--on-ink); font-weight: 600; }
.recht-inhalt a { color: var(--blue-hi); text-underline-offset: 3px; overflow-wrap: anywhere; }
.recht-inhalt ul, .recht-inhalt ol { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.recht-inhalt li { position: relative; padding-left: 22px; }
.recht-inhalt li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 2px; border-radius: 2px; background: var(--blue); }
.recht-karte { padding: clamp(20px, 3vw, 30px); border-radius: var(--radius); background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--hair-2); position: relative; overflow: hidden; }
.recht-karte::after { content: ""; position: absolute; right: -20%; top: -60%; width: 60%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(0,159,227,.16), transparent); pointer-events: none; }
.recht-karte > * + * { margin-top: .9em; }
.recht-karte p { color: var(--on-ink); }

/* Button in Rechtstexten (z. B. Cookie-Einstellungen öffnen) */
.recht-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; padding: 13px 22px; border-radius: 999px; border: 0; background: var(--blue); color: #04121a; font: 600 .95rem/1.2 var(--f-body); cursor: pointer; text-decoration: none; transition: background-color .25s var(--ease), transform .25s var(--ease); }
.recht-btn:hover { background: var(--blue-hi); transform: translateY(-1px); }
.recht-btn:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; }

/* Complianz-Cookie-Richtlinie im Theme-Stil (Complianz nutzt ID-Selektoren, daher #cmplz-document) */
.recht-inhalt #cmplz-document { color: var(--on-ink-muted); font-size: inherit; }
.recht-inhalt #cmplz-document > * + * { margin-top: 1.1em; }
.recht-inhalt #cmplz-document > p, .recht-inhalt #cmplz-document > ul li { font-size: inherit; line-height: 1.75; }
.recht-inhalt #cmplz-document > p:first-child { font-size: .9rem; color: var(--on-ink-muted); }
.recht-inhalt #cmplz-document > p:first-child i { font-style: normal; }
.recht-inhalt #cmplz-document h2 { font-size: var(--step-2); font-weight: 700; color: var(--on-ink); line-height: 1.2; text-transform: none; margin: 2.2em 0 .4em; padding: 1.4em 0 0; border-top: 1px solid var(--hair); border-bottom: 0; }
.recht-inhalt #cmplz-document h3 { font-size: var(--step-1); font-weight: 600; color: var(--on-ink); text-transform: none; margin: 1.6em 0 .4em; padding: 0; border: 0; }
.recht-inhalt #cmplz-document h4, .recht-inhalt #cmplz-document h5 { color: var(--on-ink); text-transform: none; }
.recht-inhalt #cmplz-document a { color: var(--blue-hi); }
.recht-inhalt #cmplz-document a[target=_blank]::after { content: " ↗"; font-size: .85em; }
.recht-inhalt #cmplz-document ul { list-style: none; padding-left: 0; }
/* Dienste als aufklappbare Karten */
.recht-inhalt #cmplz-document .cmplz-dropdown { margin: 12px 0; padding: 0; border-radius: var(--radius); border: 1px solid var(--hair-2); background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); overflow: hidden; }
.recht-inhalt #cmplz-document .cmplz-dropdown[open] { padding-bottom: 18px; }
.recht-inhalt #cmplz-document .cmplz-dropdown summary { margin: 0; padding: 16px 20px; background: transparent; transition: background-color .2s; }
.recht-inhalt #cmplz-document .cmplz-dropdown summary:hover { background: rgba(255,255,255,.03); }
.recht-inhalt #cmplz-document .cmplz-dropdown summary div { align-items: center; }
.recht-inhalt #cmplz-document .cmplz-dropdown summary h3 { margin: 0; padding: 0; font-size: 1.05rem; color: var(--on-ink); }
.recht-inhalt #cmplz-document .cmplz-dropdown summary p { font: 500 .72rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blue-hi); }
.recht-inhalt #cmplz-document .cmplz-dropdown summary div::after { filter: invert(1); opacity: .7; }
.recht-inhalt #cmplz-document .cmplz-dropdown input[type=checkbox] { accent-color: var(--blue); }
.recht-inhalt #cmplz-document .cmplz-dropdown .cmplz-service-description,
.recht-inhalt #cmplz-document .cmplz-dropdown .cmplz-sharing-data { padding: 0 20px; }
.recht-inhalt #cmplz-document .cmplz-dropdown h4 { margin: 14px 0 4px; font-size: .78rem; font-family: var(--f-mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--on-ink-muted); }
.recht-inhalt #cmplz-document .cmplz-dropdown p { color: var(--on-ink); font-size: .92rem; }
/* Cookie-Tabelle */
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose { margin: 16px 20px 0; border: 1px solid var(--hair-2); border-radius: 12px; overflow: hidden; background-color: var(--hair); }
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose div { background-color: var(--ink); color: var(--on-ink); padding: 12px 14px; font-size: .88rem; overflow-wrap: anywhere; }
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose .purpose,
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose .name-header,
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose .retention-header,
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose .function-header { background-color: var(--ink-3); }
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose h4,
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose h5 { margin: 0; font: 500 .72rem/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-ink-muted); }
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose a::after { content: none; }
/* Einwilligung je Kategorie (Abschnitt 7.1, wird von Complianz per Script gefüllt) */
.recht-inhalt #cmplz-manage-consent-container .cmplz-categories .cmplz-category { margin-bottom: 10px; border-radius: 14px; border: 1px solid var(--hair-2); background: var(--ink-2); overflow: hidden; }
.recht-inhalt #cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header { padding: 12px 16px; background: transparent; }
.recht-inhalt #cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-category-header h2 { margin: 0; padding: 0; border: 0; font-size: 1rem; font-weight: 600; color: var(--on-ink); }
.recht-inhalt #cmplz-manage-consent-container .cmplz-categories .cmplz-category .cmplz-description { padding: 0 16px 14px; color: var(--on-ink-muted); font-size: .9rem; }
.recht-inhalt #cmplz-manage-consent-container .cmplz-icon { filter: invert(1); }
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose :is(.name-header, .retention-header, .function-header, .purpose) { overflow-wrap: normal; }
.recht-inhalt #cmplz-document .cmplz-dropdown .cookies-per-purpose h5 { hyphens: auto; -webkit-hyphens: auto; letter-spacing: .03em; }
