/*! DK Website – Basis-Stile für die Elementor-Seiten von Dennys Kalder.
 *  Das eigentliche Design steckt in den Elementor-Einstellungen der Container und Widgets
 *  (bzw. in den Website-Einstellungen: Farben, Schriften). Hier nur Hilfsklassen und
 *  das Verhalten der interaktiven Bereiche. */

html { scroll-behavior: smooth; }
:where(body.dk-site) { margin: 0; background: #082036; color: #edf0f3; font-family: 'Geist', system-ui, sans-serif; font-size: 16px; }
body.dk-site { -webkit-font-smoothing: antialiased; }
html body.dk-site { line-height: normal; }

/* ---------- Layout-Grundregeln wie im Originalentwurf ---------- */
/* Flex-Elemente dürfen (wie in normalem CSS) nicht schmaler als ihr Inhalt werden */
body .dk-scope .e-con, body .dk-scope .elementor-widget { min-width: auto; }
/* Elementor vererbt einen gesetzten Z-Index (--z-index) an alle inneren Container – hier nur am Element selbst */
body .dk-scope .e-con { --z-index: auto; }
/* Buttons: keine zusätzliche Zeilenhöhe um den Button herum */
body.dk-site .elementor-widget-button, body.dk-site .elementor-widget-button .elementor-button-wrapper { line-height: 0; }

/* ---------- Hilfsklassen (Erweitert → CSS-Klassen) ---------- */
.dk-wide, .dk-wide :is(.elementor-heading-title, .elementor-button) { font-stretch: 112%; }
.dk-balance, .dk-balance .elementor-heading-title { text-wrap: balance; }
.dk-pretty, .dk-pretty .elementor-heading-title { text-wrap: pretty; }
.dk-nowrap, .dk-nowrap :is(.elementor-heading-title, .elementor-button) { white-space: nowrap; }
.dk-tabular, .dk-tabular :is(.elementor-heading-title, .elementor-button) { font-variant-numeric: tabular-nums; }
.elementor-widget-image.dk-img-block img { display: block; }
.elementor-widget-image.dk-img-fill, .elementor-widget-image.dk-img-fill > .elementor-widget-container { width: 100%; height: 100%; }
.elementor-widget-image.dk-img-fill img { display: block; }

/* ---------- Code-Bausteine (HTML-Widgets) und interaktive Bereiche ---------- */
/* Die Hülle erzeugt keine eigene Box – Grafiken/Rechner sitzen exakt wie im Original. */
body.dk-site .elementor-widget.dk-raw:not(#dkz), body.dk-site .dk-raw > .elementor-widget-container:not(#dkz),
body.dk-site .dk-raw :is(.dk-island, .sc-host):not(#dkz), body.dk-site .dk-header:not(#dkz) { display: contents; }
/* Theme-Stile (Buttons, Links, Tabellen …) im Code-Bereich neutralisieren */
body.dk-site .dk-raw :not(#dkz):not(:where(svg, svg *, image-slot, .elementor-element-overlay, .elementor-element-overlay *, [class*="elementor-editor-"], [class*="elementor-editor-"] *)),
body.dk-site .dk-portal:not(#dkz), body.dk-site .dk-portal :not(#dkz):not(:where(svg, svg *)) { all: revert; box-sizing: border-box; }
body.dk-site :is(.dk-raw, .dk-portal) a:not(#dkz) { color: #edf0f3; text-decoration: none; }
body.dk-site :is(.dk-raw, .dk-portal) a:not(#dkz):hover { color: #ffffff; }
body.dk-site :is(.dk-raw, .dk-portal) img:not(#dkz) { display: block; max-width: 100%; }

/* ---------- FAQ (Container „FAQ“ mit Einträgen; Klick auf die Frage klappt die Antwort auf) ---------- */
.dk-faq .dk-faq-q { cursor: pointer; user-select: none; }
.dk-faq .dk-faq-q:focus-visible { outline: 2px solid #be8921; outline-offset: 2px; }
.dk-faq-anim .dk-faq-a { display: grid !important; grid-template-rows: 0fr; transition: grid-template-rows .35s; }
.dk-faq-anim .dk-faq-item.is-open > .dk-faq-a { grid-template-rows: 1fr; }
.dk-faq-anim .dk-faq-a > .elementor-element { min-height: 0; overflow: hidden; }
.dk-faq-swap .dk-faq-item:not(.is-open) > .dk-faq-a { display: none !important; }
/* im Editor alle Antworten zeigen, damit sie bearbeitet werden können */
body.elementor-editor-active .dk-faq .dk-faq-a { display: flex !important; grid-template-rows: 1fr; }

/* ---------- Einblendung beim Laden (Failsafe nach 2,5 s) ---------- */
@keyframes dkFailsafe { to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  html.dk-js:not(.dk-intro-go) body:not(.elementor-editor-active) .dk-root .dk-intro,
  html.dk-js:not(.dk-intro-go) body:not(.elementor-editor-active) .dk-root.dk-reveal-sub section:first-of-type :has(> .elementor-widget h1) {
    opacity: 0;
    animation: dkFailsafe .01s linear 2.5s forwards;
  }
}
