/*
Theme Name: DealBörse Child
Theme URI: https://dealboerse.com
Description: Child-Theme für Divi 5 – individuelle Anpassungen (eigenes CSS, Header-Feinschliff, Markenfarben) für dealboerse.com. Schützt alle Anpassungen davor, bei Divi-Updates überschrieben zu werden.
Author: Markus Gabeli
Author URI: https://dealboerse.com
Template: Divi
Version: 1.26.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dealboerse-child
*/

/* =========================================================
   Markenfarben als CSS-Variablen (aus dem Logo abgeleitet)
   Verwendung in eigenem CSS, z. B.:  color: var(--db-blau);
   ========================================================= */
:root {
  --db-navy:     #0B1F3A;
  --db-navy-2:   #0A2B4E;
  --db-blau:     #1479C9;
  --db-tuerkis:  #0FA3B1;
  --db-gruen:    #2DB36F;
  --db-orange:   #F2711C;
  --db-orange-2: #E9661A;
  --db-gold:     #F5B841;
  --db-bg:       #F3F6FA;
  --db-weiss:    #FFFFFF;
  --db-border:   #E2E8F0;
  --db-muted:    #5A6B7B;

  --db-grad-marke: linear-gradient(135deg, #1479C9 0%, #0FA3B1 55%, #2DB36F 100%);
  --db-grad-cta:   linear-gradient(135deg, #F2711C 0%, #E9661A 100%);
}

/* =========================================================
   Eigene Anpassungen ab hier
   (werden bei Divi-Updates NICHT überschrieben)
   ========================================================= */

/* ---------------------------------------------------------
   1) Header-Logo – harmonisch zum Menü (Logo bleibt unverändert,
      nur die Darstellungsgröße wird feiner abgestimmt)
   --------------------------------------------------------- */
#logo,
.et_pb_menu__logo img,
.et_pb_fullwidth_menu__logo img,
.et-fw-header__logo img,
header#main-header .logo_container #logo {
  max-height: 62px !important;     /* präsenter, bleibt proportional */
  width: auto !important;
  height: auto !important;
}
/* Logo sauber vertikal zentrieren + etwas Luft zum Menü */
header#main-header .logo_container,
.et_pb_menu__logo-wrap,
.et-fw-header__logo {
  display: flex !important;
  align-items: center;
}
/* Menü-Links optisch auf Logo-Höhe ausrichten */
#main-header #et-top-navigation nav > ul > li > a { font-size: 15px; }

@media (max-width: 980px) {
  #logo,
  .et_pb_menu__logo img,
  .et_pb_fullwidth_menu__logo img { max-height: 48px !important; }
}

/* ---------------------------------------------------------
   2) Typografie – klarer, markanter
   --------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body,
body * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Logo und Grafiken gestochen scharf skalieren (kein „Treppeneffekt") */
#logo, .et_pb_menu__logo img, header#main-header .logo_container #logo {
  image-rendering: -webkit-optimize-contrast;
}
::selection { background: rgba(20, 121, 201, 0.18); }

h1, h2, h3, h4, h5, h6 { color: var(--db-navy); letter-spacing: -0.01em; }
h1, h2 { font-weight: 800; line-height: 1.12; }
h3 { font-weight: 700; }

a { color: var(--db-blau); transition: color 0.15s ease; }
a:hover { color: var(--db-tuerkis); }

/* Hilfsklasse: markenfarbener Verlaufs-Text  ->  <span class="db-gradient">…</span> */
.db-gradient {
  background: var(--db-grad-marke);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hilfsklasse: feiner Verlaufsstrich unter einer Überschrift (im Divi-Feld "CSS-Klasse": db-underline) */
.db-underline::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 16px 0 0;
  border-radius: 4px;
  background: var(--db-grad-marke);
}
.et_pb_text_align_center .db-underline::after,
.db-underline.et_pb_text_align_center::after { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------
   3) Buttons – markig & EINHEITLICH groß
   (Grundstil global; Farb-Varianten per CSS-Klasse im Divi-Button)
   --------------------------------------------------------- */
.et_pb_button,
a.et_pb_button {
  border-radius: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  padding: 14px 30px !important;
  min-width: 190px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}
.et_pb_button:hover { transform: translateY(-2px); }

/* CTA-Button (Orange-Verlauf)  ->  CSS-Klasse: db-cta */
.et_pb_button.db-cta,
a.et_pb_button.db-cta {
  background: var(--db-grad-cta) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(242, 113, 28, 0.30);
}
.et_pb_button.db-cta:hover { box-shadow: 0 12px 28px rgba(242, 113, 28, 0.42); color: #fff !important; }

/* Marken-Button (Blau→Türkis→Grün)  ->  CSS-Klasse: db-brand */
.et_pb_button.db-brand,
a.et_pb_button.db-brand {
  background: var(--db-grad-marke) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(20, 121, 201, 0.26);
}
.et_pb_button.db-brand:hover { color: #fff !important; }

/* ---------------------------------------------------------
   4) Flächen-Feinschliff
   --------------------------------------------------------- */
body:not(.et-fb) { background: var(--db-bg); }

/* Hilfsklasse: Sektion mit Marken-Verlauf als Hintergrund (CSS-Klasse der Sektion: db-section-brand) */
.et_pb_section.db-section-brand {
  background: var(--db-grad-marke) !important;
}
.et_pb_section.db-section-brand h1,
.et_pb_section.db-section-brand h2,
.et_pb_section.db-section-brand h3,
.et_pb_section.db-section-brand p,
.et_pb_section.db-section-brand li { color: #fff !important; }

/* Hilfsklasse: dezente Karten-Sektion (CSS-Klasse der Sektion: db-section-soft) */
.et_pb_section.db-section-soft { background: var(--db-weiss) !important; }

/* =========================================================
   5) Startseite – Verläufe & Effekte (CSS-Klassen im Divi-Modul)
   Diese Klassen werden im Startseiten-Import automatisch gesetzt.
   ========================================================= */

/* Hero mit Marken-Verlauf + dezentem Leucht-Muster */
.db-hero {
  background: var(--db-grad-marke) !important;
  position: relative;
  overflow: hidden;
}
.db-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 90% at 15% 10%, rgba(255,255,255,0.18), transparent 60%),
    radial-gradient(55% 80% at 90% 100%, rgba(11,31,58,0.45), transparent 60%);
  pointer-events: none;
}
.db-hero > * { position: relative; z-index: 1; }

/* CTA-Sektion mit Orange-Verlauf */
.db-cta-section {
  background: var(--db-grad-cta) !important;
  position: relative;
  overflow: hidden;
}
.db-cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 120% at 80% 0%, rgba(255,255,255,0.18), transparent 55%);
  pointer-events: none;
}
.db-cta-section > * { position: relative; z-index: 1; }

/* ---------------------------------------------------------
   Gleich große Kästchen (Breite + Höhe), egal wie viel Text
   --------------------------------------------------------- */

/* Spalten einer Reihe auf gleiche Höhe ziehen (Divi 4 + 5) */
.db-equal.et_pb_row,
.db-equal .et_pb_row_inner,
.et_pb_row.db-equal {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.db-equal > .et_pb_column,
.db-equal > [class*="et_pb_column"] {
  display: flex;
  flex-direction: column;
}
.db-equal > .et_pb_column > .et_pb_module { height: 100%; }

/* Ablauf-Karten (Blurb) – gleiche Höhe, deutlich abgehoben, eigene Animation
   (bewusst anders als die Domain-Karten darunter: sanftes Aufsteigen beim Laden,
   plastischer Tiefen-Schatten + Licht-Glanz, lebendiger Hover). */
.db-step {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 300px;               /* fester Boden → auch bei wenig Text gleich groß */
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Tiefe: Farbfläche + feiner Verlauf oben hell → unten etwas dunkler */
  background-image: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(0,0,0,0.10)) !important;
  box-shadow: 0 20px 45px rgba(11,31,58,0.20), 0 2px 6px rgba(11,31,58,0.10);
  transform: translateY(28px) scale(0.96);
  opacity: 0;
  animation: dbStepIn 0.75s cubic-bezier(0.2,0.75,0.2,1) forwards;
  transition: transform 0.28s cubic-bezier(0.2,0.75,0.2,1), box-shadow 0.28s ease !important;
}
/* feiner Licht-Glanz oben – gibt der Karte Glas-/Tiefenwirkung */
.db-step::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 80% at 50% -15%, rgba(255,255,255,0.28), transparent 60%);
  pointer-events: none;
}
.db-step > * { position: relative; z-index: 1; }

/* Gestaffeltes Aufsteigen der drei Karten (Karte 1 → 2 → 3) */
.db-soft .db-equal > .et_pb_column:nth-child(1) .db-step { animation-delay: 0.05s; }
.db-soft .db-equal > .et_pb_column:nth-child(2) .db-step { animation-delay: 0.18s; }
.db-soft .db-equal > .et_pb_column:nth-child(3) .db-step { animation-delay: 0.31s; }

.db-step:hover {
  transform: translateY(-12px) scale(1.025);
  box-shadow: 0 34px 66px rgba(11,31,58,0.30), 0 4px 10px rgba(11,31,58,0.14);
}

/* Dark Mode: ein navyfarbener Schatten ist auf dunklem Grund unsichtbar.
   Darum beim Hover ein heller Rand (Ring) + leuchtender Schein (Glow) und ein
   leichtes Aufhellen/Sättigen – die Karte hebt sich klar und modern ab.
   Die Hebe-Bewegung (translateY/scale) bleibt aus der Grundregel erhalten. */
:root[data-theme="dark"] .db-step:hover {
  box-shadow: 0 26px 60px rgba(0,0,0,0.60),
              0 0 0 1px rgba(255,255,255,0.24),
              0 0 38px rgba(125,195,255,0.32);
  filter: brightness(1.07) saturate(1.05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .db-step:hover {
    box-shadow: 0 26px 60px rgba(0,0,0,0.60),
                0 0 0 1px rgba(255,255,255,0.24),
                0 0 38px rgba(125,195,255,0.32);
    filter: brightness(1.07) saturate(1.05);
  }
}

@keyframes dbStepIn { to { opacity: 1; transform: none; } }

/* Barrierefrei: wer reduzierte Bewegung wünscht, bekommt kein Einfliegen */
@media (prefers-reduced-motion: reduce) {
  .db-step { animation: none; opacity: 1; transform: none; }
  .db-step:hover { transform: none; }
}

/* Kennzahlen-Leiste – große farbige Zahlen zentriert, alle gleich hoch */
.db-stat {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.db-stats .et_pb_text_inner h2,
.db-stats h2 { margin: 0 0 4px; }

/* Startseiten-Buttons: EXAKT gleich groß (Breite + Höhe), egal wie lang der Text.
   Feste Breite + einheitliche Höhe über das globale Button-Padding (14px 30px). */
.db-hero .et_pb_button,
.db-cta-section .et_pb_button {
  width: 264px !important;
  min-width: 264px !important;
  max-width: 100%;
  white-space: nowrap;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .db-hero .et_pb_button,
  .db-cta-section .et_pb_button { width: 100% !important; min-width: 0 !important; }
}

/* =========================================================
   6) Footer (Divi Theme Builder – globaler Footer)
   ========================================================= */
/* Footer dunkel – Theme-Builder-Footer-Wrapper UND Sektion, in beiden Modi */
.et-l--footer,
.db-footer { background-color: var(--db-navy) !important; background-image: none !important; }
.db-footer a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  transition: color 0.15s ease, padding-left 0.15s ease;
}
.db-footer a:hover { color: var(--db-tuerkis); }
.db-foot-col h4 { opacity: 0.95; margin-bottom: 6px; }
/* dezente Trennlinie über der Copyright-Zeile */
.db-foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  margin-top: 8px;
}
.db-foot-copy { font-size: 13px !important; color: rgba(255,255,255,0.55) !important; }

/* Standard-Footer-Credit von Divi ausblenden ("Designed by Elegant Themes …") */
#footer-info { display: none !important; }

/* =========================================================
   7) Hell-/Dunkelmodus – Grundsatz: System-Einstellung
   (prefers-color-scheme) UND manuell umschaltbar
   (html[data-theme="dark"|"light"]). Der Umschalter des
   Portfolio-Plugins setzt data-theme auf <html> und merkt
   die Wahl (localStorage) – siehe [dealboerse_theme_toggle].
   ========================================================= */

/* --- Dunkle Farbtokens, sobald Dark aktiv ist --- */
:root[data-theme="dark"] {
  --db-bg:     #0A1526;
  --db-surface:#111D33;
  --db-text:   #E7EDF5;
  --db-muted:  #A7B6CC;
  --db-border: #243352;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --db-bg:     #0A1526;
    --db-surface:#111D33;
    --db-text:   #E7EDF5;
    --db-muted:  #A7B6CC;
    --db-border: #243352;
  }
}

/* Gemeinsame Dark-Regeln in eine Hilfsklasse am <html> spiegeln,
   damit wir sie nur einmal schreiben müssen. */
:root[data-theme="dark"],
:root:not([data-theme="light"]) { }

/* ---- Grundflächen & Text ---- */
:root[data-theme="dark"] body:not(.et-fb),
:root:not([data-theme="light"]) body:not(.et-fb) { background: #0A1526 !important; color: #DCE5F2; }

/* Divi-Header dunkel – echter Theme-Builder-Header (.et-l--header / .et_pb_menu / ul.et-menu),
   zusätzlich der klassische #main-header als Fallback. */
:root[data-theme="dark"] #main-header,
:root[data-theme="dark"] #et-top-navigation,
:root[data-theme="dark"] .et-l--header,
:root[data-theme="dark"] .et-l--header .et_pb_section,
:root[data-theme="dark"] .et-l--header .et_pb_row,
:root[data-theme="dark"] .et-l--header .et_pb_column,
:root[data-theme="dark"] .et-l--header .et_pb_menu,
:root[data-theme="dark"] .et-l--header .et_pb_menu_inner_container,
:root[data-theme="dark"] .et_mobile_menu {
  background-color: #0C1A30 !important;
  background-image: none !important;
}
:root[data-theme="dark"] .et-l--header { box-shadow: 0 1px 0 rgba(255,255,255,0.08); }
/* Menü-Text im dunklen Header hell (Divi hält das Modul für „bg_layout_light") */
:root[data-theme="dark"] #top-menu a,
:root[data-theme="dark"] .et-menu > li > a,
:root[data-theme="dark"] .et_mobile_menu a { color: #E7EDF5 !important; }
:root[data-theme="dark"] .et-menu > li > a:hover,
:root[data-theme="dark"] .et_mobile_menu a:hover { color: var(--db-tuerkis) !important; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #main-header,
  :root:not([data-theme="light"]) #et-top-navigation,
  :root:not([data-theme="light"]) .et-l--header,
  :root:not([data-theme="light"]) .et-l--header .et_pb_section,
  :root:not([data-theme="light"]) .et-l--header .et_pb_row,
  :root:not([data-theme="light"]) .et-l--header .et_pb_column,
  :root:not([data-theme="light"]) .et-l--header .et_pb_menu,
  :root:not([data-theme="light"]) .et-l--header .et_pb_menu_inner_container,
  :root:not([data-theme="light"]) .et_mobile_menu {
    background-color: #0C1A30 !important;
    background-image: none !important;
  }
  :root:not([data-theme="light"]) .et-l--header { box-shadow: 0 1px 0 rgba(255,255,255,0.08); }
  :root:not([data-theme="light"]) #top-menu a,
  :root:not([data-theme="light"]) .et-menu > li > a,
  :root:not([data-theme="light"]) .et_mobile_menu a { color: #E7EDF5 !important; }
  :root:not([data-theme="light"]) .et-menu > li > a:hover,
  :root:not([data-theme="light"]) .et_mobile_menu a:hover { color: var(--db-tuerkis) !important; }
}

/* Überschriften & Links generell */
:root[data-theme="dark"] h1, :root[data-theme="dark"] h2, :root[data-theme="dark"] h3,
:root[data-theme="dark"] h4, :root[data-theme="dark"] h5, :root[data-theme="dark"] h6,
:root:not([data-theme="light"]) h1, :root:not([data-theme="light"]) h2, :root:not([data-theme="light"]) h3,
:root:not([data-theme="light"]) h4, :root:not([data-theme="light"]) h5, :root:not([data-theme="light"]) h6 { color: #EEF3FA; }

/* ---- Helle Sektionen & Grundflächen konsequent abdunkeln ----
   ROOT CAUSE (warum vorher nur die Schrift dunkel wurde):
   Divi 5 scopt den Sektions-Hintergrund mit HOHER Spezifität + !important, z. B.
   `.et-l--post>.et_builder_inner_content .et_pb_section.et_pb_section_12{background:#F3F6FA!important}`
   = Spezifität (0,4,0). Eine Regel `:root[data-theme="dark"] .db-soft` ist nur (0,3,0) → verliert.
   Lösung: die Sektions-Regeln MINDESTENS so spezifisch machen wie Divi, indem wir
   `.et-l--post .et_pb_section.db-soft` schreiben → (0,5,0) mit :root[data-theme] → gewinnt. */

/* 1) Divi-Grundcontainer (IDs/Body-Layer) – damit nichts Helles durchscheint */
:root[data-theme="dark"] #page-container,
:root[data-theme="dark"] #main-content,
:root[data-theme="dark"] #et-main-area,
:root[data-theme="dark"] .et-l--body {
  background-color: #0A1526 !important;
  background-image: none !important;
}
/* 2) Die eigentlichen Sektionen mit erhöhter Spezifität (schlägt Divis (0,4,0)+!important) */
:root[data-theme="dark"] .et-l--post .et_pb_section.db-soft,
:root[data-theme="dark"] .et-l--post .et_pb_section.db-plain,
:root[data-theme="dark"] .et-l--post .et_pb_section.db-legal,
:root[data-theme="dark"] .et_pb_section.db-soft,
:root[data-theme="dark"] .et_pb_section.db-plain,
:root[data-theme="dark"] .et_pb_section.db-legal {
  background-color: #0A1526 !important;
  background-image: none !important;
}
/* 2b) CATCH-ALL – Sektionen OHNE db-*-Klasse trotzdem abdunkeln.
   Die Startseite-Sektionen tragen keine db-soft/plain/legal-Klasse, deshalb
   blieben sie im Dark-Mode hell. Dieser Selektor (0,7,0) schlägt Divis
   generierte (0,4,0)-Regel und färbt JEDE Body-Sektion dunkel – außer sie
   ist bewusst als Marken-/Navy-Fläche mit .db-keepbg oder .db-section-brand
   markiert (dann bleibt der Verlauf/Navy erhalten). Nur Body, nicht Header. */
:root[data-theme="dark"] .et-l--post .et_builder_inner_content .et_pb_section:not(.db-keepbg):not(.db-section-brand),
:root[data-theme="dark"] .et-l--body .et_builder_inner_content .et_pb_section:not(.db-keepbg):not(.db-section-brand) {
  background-color: #0A1526 !important;
  background-image: none !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #page-container,
  :root:not([data-theme="light"]) #main-content,
  :root:not([data-theme="light"]) #et-main-area,
  :root:not([data-theme="light"]) .et-l--body {
    background-color: #0A1526 !important;
    background-image: none !important;
  }
  :root:not([data-theme="light"]) .et-l--post .et_pb_section.db-soft,
  :root:not([data-theme="light"]) .et-l--post .et_pb_section.db-plain,
  :root:not([data-theme="light"]) .et-l--post .et_pb_section.db-legal,
  :root:not([data-theme="light"]) .et_pb_section.db-soft,
  :root:not([data-theme="light"]) .et_pb_section.db-plain,
  :root:not([data-theme="light"]) .et_pb_section.db-legal {
    background-color: #0A1526 !important;
    background-image: none !important;
  }
  /* 2b) CATCH-ALL (System-Dark) – wie oben, für die Automatik ohne Umschalter. */
  :root:not([data-theme="light"]) .et-l--post .et_builder_inner_content .et_pb_section:not(.db-keepbg):not(.db-section-brand),
  :root:not([data-theme="light"]) .et-l--body .et_builder_inner_content .et_pb_section:not(.db-keepbg):not(.db-section-brand) {
    background-color: #0A1526 !important;
    background-image: none !important;
  }
}
/* Rows/Spalten in den Sektionen bleiben transparent (falls Divi Weiß setzt) */
:root[data-theme="dark"] .db-soft .et_pb_row, :root[data-theme="dark"] .db-plain .et_pb_row,
:root[data-theme="dark"] .db-legal .et_pb_row, :root[data-theme="dark"] .db-soft .et_pb_column,
:root[data-theme="dark"] .db-plain .et_pb_column, :root[data-theme="dark"] .db-legal .et_pb_column,
:root:not([data-theme="light"]) .db-soft .et_pb_row, :root:not([data-theme="light"]) .db-plain .et_pb_row,
:root:not([data-theme="light"]) .db-legal .et_pb_row, :root:not([data-theme="light"]) .db-soft .et_pb_column,
:root:not([data-theme="light"]) .db-plain .et_pb_column, :root:not([data-theme="light"]) .db-legal .et_pb_column {
  background-color: transparent !important;
}

/* Text in diesen Sektionen hell erzwingen (Divi setzt feste Modulfarben) */
:root[data-theme="dark"] .db-soft :is(h1,h2,h3,h4,h5,h6),
:root[data-theme="dark"] .db-plain :is(h1,h2,h3,h4,h5,h6),
:root[data-theme="dark"] .db-legal :is(h1,h2,h3,h4,h5,h6),
:root:not([data-theme="light"]) .db-soft :is(h1,h2,h3,h4,h5,h6),
:root:not([data-theme="light"]) .db-plain :is(h1,h2,h3,h4,h5,h6),
:root:not([data-theme="light"]) .db-legal :is(h1,h2,h3,h4,h5,h6) { color: #EEF3FA !important; }

:root[data-theme="dark"] .db-soft .et_pb_text p,
:root[data-theme="dark"] .db-plain .et_pb_text p,
:root[data-theme="dark"] .db-legal .et_pb_text p,
:root[data-theme="dark"] .db-legal .et_pb_text li,
:root:not([data-theme="light"]) .db-soft .et_pb_text p,
:root:not([data-theme="light"]) .db-plain .et_pb_text p,
:root:not([data-theme="light"]) .db-legal .et_pb_text p,
:root:not([data-theme="light"]) .db-legal .et_pb_text li { color: #C2D0E4 !important; }

/* Dark: hervorgehobener Text (strong) im Legal/Soft/Plain lesbar halten
   (hell statt des erzwungenen Navy – sonst unsichtbar auf dunklem Grund). */
:root[data-theme="dark"] .db-soft .et_pb_text strong,
:root[data-theme="dark"] .db-plain .et_pb_text strong,
:root[data-theme="dark"] .db-legal .et_pb_text strong,
:root:not([data-theme="light"]) .db-soft .et_pb_text strong,
:root:not([data-theme="light"]) .db-plain .et_pb_text strong,
:root:not([data-theme="light"]) .db-legal .et_pb_text strong { color: #EAF1FB !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .db-soft .et_pb_text strong,
  :root:not([data-theme="light"]) .db-plain .et_pb_text strong,
  :root:not([data-theme="light"]) .db-legal .et_pb_text strong { color: #EAF1FB !important; }
}

/* Dark: Kontaktformular-Kleintext (Einwilligung + Hinweis) lesbar.
   Das Formular liegt außerhalb .ddp-portfolio, daher greifen die Plugin-Dark-
   Variablen dort nicht – hier gezielt nachziehen. */
:root[data-theme="dark"] .ddp-contact-form .ddp-consent label,
:root[data-theme="dark"] .ddp-contact-note { color: #A7B6CC !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ddp-contact-form .ddp-consent label,
  :root:not([data-theme="light"]) .ddp-contact-note { color: #A7B6CC !important; }
}

/* Hero & CTA im Dark Mode abdunkeln – der Marken-Verlauf bleibt erkennbar,
   wirkt aber dunkler, damit die Seite durchgehend dunkel aussieht.
   (Inset-Overlay dimmt nur den Hintergrund, der Text bleibt klar.) */
:root[data-theme="dark"] .db-hero,
:root[data-theme="dark"] .db-cta-section { box-shadow: inset 0 0 0 100vmax rgba(5,11,22,0.34) !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .db-hero,
  :root:not([data-theme="light"]) .db-cta-section { box-shadow: inset 0 0 0 100vmax rgba(5,11,22,0.34) !important; }
}
/* Kennzahlen-Leiste (db-stats) bleibt dunkelblau – im Dark Mode noch etwas tiefer.
   Gleiche Spezifitäts-Anhebung wie oben, damit Divis Sektions-Hintergrund nicht gewinnt. */
:root[data-theme="dark"] .et-l--post .et_pb_section.db-stats,
:root[data-theme="dark"] .et_pb_section.db-stats { background-color: #081222 !important; background-image: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .et-l--post .et_pb_section.db-stats,
  :root:not([data-theme="light"]) .et_pb_section.db-stats { background-color: #081222 !important; background-image: none !important; }
}

/* Die Marken-Karten (db-step) behalten ihre kräftigen Farben – gut lesbar.
   Footer nutzt eigene dunkle Fläche – bleibt wie er ist. */

/* ---- Alle übrigen hellen Flächen konsequent abdunkeln ----
   (Domain-Karten, Filterleiste, Formulare, Paginierung, allgemeiner Text)
   Behebt „im Dunkelmodus bleibt noch viel hell". */

/* allgemeiner Text ohne feste Divi-Farbe wird hell (Inline-Farben gewinnen weiter) */
:root[data-theme="dark"] body p,
:root[data-theme="dark"] body li,
:root[data-theme="dark"] .et_pb_text { color: #C7D4E6; }
:root[data-theme="dark"] a:not(.et_pb_button):not(.ddp-btn) { color: #5BB7EC; }

/* Domain-Karten */
:root[data-theme="dark"] .ddp-card { background: #111d33 !important; border-color: #243352 !important; box-shadow: 0 16px 36px rgba(0,0,0,0.45) !important; }
:root[data-theme="dark"] .ddp-card-media { background: #0C182B !important; }
:root[data-theme="dark"] .ddp-card-title a,
:root[data-theme="dark"] .ddp-card-name,
:root[data-theme="dark"] .ddp-price { color: #EEF3FA !important; }
:root[data-theme="dark"] .ddp-card-desc { color: #A7B6CC !important; }
:root[data-theme="dark"] .ddp-card-details { color: #5BB7EC !important; }
/* Filter / Suche / Auswahl */
:root[data-theme="dark"] .ddp-filter { background: #0E1A2F !important; border-color: #243352 !important; }
:root[data-theme="dark"] .ddp-search,
:root[data-theme="dark"] .ddp-select,
:root[data-theme="dark"] .ddp-contact-form input,
:root[data-theme="dark"] .ddp-contact-form textarea { background: #0D1A30 !important; color: #F2F6FB !important; border-color: #41567E !important; box-shadow: inset 0 1px 2px rgba(0,0,0,0.25) !important; }
:root[data-theme="dark"] .ddp-contact-form input::placeholder,
:root[data-theme="dark"] .ddp-contact-form textarea::placeholder { color: #7C8DA6 !important; }
:root[data-theme="dark"] .ddp-contact-form input:hover,
:root[data-theme="dark"] .ddp-contact-form textarea:hover { border-color: #4C6490 !important; }
:root[data-theme="dark"] .ddp-contact-form input:focus,
:root[data-theme="dark"] .ddp-contact-form textarea:focus { border-color: #5BB7EC !important; box-shadow: 0 0 0 3px rgba(91,183,236,0.22) !important; }
:root[data-theme="dark"] .ddp-select option { background: #0F1E38 !important; color: #E7EDF5 !important; }
:root[data-theme="dark"] .ddp-contact-form label { color: #EAF0F8 !important; }
:root[data-theme="dark"] .ddp-contact-form .ddp-req { color: #FF8A3D !important; }
:root[data-theme="dark"] .ddp-contact-form .ddp-consent label,
:root[data-theme="dark"] .ddp-contact-note,
:root[data-theme="dark"] .ddp-empty,
:root[data-theme="dark"] .ddp-platform-note,
:root[data-theme="dark"] .ddp-sold-note { color: #BFCEE3 !important; }
/* Paginierung / Karussell-Steuerung */
:root[data-theme="dark"] .ddp-pagination a,
:root[data-theme="dark"] .ddp-pagination span { color: #E7EDF5 !important; border-color: #2B3C5C !important; }
:root[data-theme="dark"] .ddp-carousel-nav { background: #111d33 !important; color: #E7EDF5 !important; border-color: #2B3C5C !important; }
:root[data-theme="dark"] .ddp-carousel-dots button { background: #2B3C5C !important; }
:root[data-theme="dark"] .ddp-carousel-dots button.is-active { background: #5BB7EC !important; }
/* Domain-Seite: Divi-Sektion hinter dem Portfolio abdunkeln – unabhängig davon,
   ob dort eine db-*-Klasse gesetzt ist (:has trifft genau die umschließende Sektion). */
:root[data-theme="dark"] .et_pb_section:has(.ddp-portfolio),
:root[data-theme="dark"] .et_pb_section:has(.ddp-contact) { background-color: #0A1526 !important; background-image: none !important; }
/* Portfolio-Design-Variablen im Dark Mode umdefinieren → Karten, Filter, Felder
   und Platzhalter greifen automatisch die dunklen Werte. */
:root[data-theme="dark"] .ddp-portfolio,
:root[data-theme="dark"] .ddp-contact,
:root[data-theme="dark"] .ddp-actions {
  --ddp-bg: #0A1526; --ddp-surface: #15223C; --ddp-surface-2: #182748;
  --ddp-border: #2E3F61; --ddp-text: #EEF3FA; --ddp-muted: #C2D0E4;
  --ddp-media: radial-gradient(130% 130% at 0% 0%, #17294A 0%, #0D1B33 70%);
  --ddp-shadow: 0 18px 42px rgba(0,0,0,0.55);
}
/* Sekundär-Button (Navy) im Dark Mode aufhellen, sonst Navy auf Navy. */
:root[data-theme="dark"] .ddp-btn-secondary { background: #1C2F52 !important; border-color: #3A4F78 !important; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body p,
  :root:not([data-theme="light"]) body li,
  :root:not([data-theme="light"]) .et_pb_text { color: #C7D4E6; }
  :root:not([data-theme="light"]) a:not(.et_pb_button):not(.ddp-btn) { color: #5BB7EC; }

  :root:not([data-theme="light"]) .ddp-card { background: #111d33 !important; border-color: #243352 !important; box-shadow: 0 16px 36px rgba(0,0,0,0.45) !important; }
  :root:not([data-theme="light"]) .ddp-card-media { background: #0C182B !important; }
  :root:not([data-theme="light"]) .ddp-card-title a,
  :root:not([data-theme="light"]) .ddp-card-name,
  :root:not([data-theme="light"]) .ddp-price { color: #EEF3FA !important; }
  :root:not([data-theme="light"]) .ddp-card-desc { color: #A7B6CC !important; }
  :root:not([data-theme="light"]) .ddp-card-details { color: #5BB7EC !important; }
  :root:not([data-theme="light"]) .ddp-filter { background: #0E1A2F !important; border-color: #243352 !important; }
  :root:not([data-theme="light"]) .ddp-search,
  :root:not([data-theme="light"]) .ddp-select,
  :root:not([data-theme="light"]) .ddp-contact-form input,
  :root:not([data-theme="light"]) .ddp-contact-form textarea { background: #0D1A30 !important; color: #F2F6FB !important; border-color: #41567E !important; box-shadow: inset 0 1px 2px rgba(0,0,0,0.25) !important; }
  :root:not([data-theme="light"]) .ddp-contact-form input::placeholder,
  :root:not([data-theme="light"]) .ddp-contact-form textarea::placeholder { color: #7C8DA6 !important; }
  :root:not([data-theme="light"]) .ddp-contact-form input:hover,
  :root:not([data-theme="light"]) .ddp-contact-form textarea:hover { border-color: #4C6490 !important; }
  :root:not([data-theme="light"]) .ddp-contact-form input:focus,
  :root:not([data-theme="light"]) .ddp-contact-form textarea:focus { border-color: #5BB7EC !important; box-shadow: 0 0 0 3px rgba(91,183,236,0.22) !important; }
  :root:not([data-theme="light"]) .ddp-select option { background: #0F1E38 !important; color: #E7EDF5 !important; }
  :root:not([data-theme="light"]) .ddp-contact-form label { color: #EAF0F8 !important; }
  :root:not([data-theme="light"]) .ddp-contact-form .ddp-req { color: #FF8A3D !important; }
  :root:not([data-theme="light"]) .ddp-contact-form .ddp-consent label,
  :root:not([data-theme="light"]) .ddp-contact-note,
  :root:not([data-theme="light"]) .ddp-empty,
  :root:not([data-theme="light"]) .ddp-platform-note,
  :root:not([data-theme="light"]) .ddp-sold-note { color: #BFCEE3 !important; }
  :root:not([data-theme="light"]) .ddp-pagination a,
  :root:not([data-theme="light"]) .ddp-pagination span { color: #E7EDF5 !important; border-color: #2B3C5C !important; }
  :root:not([data-theme="light"]) .ddp-carousel-nav { background: #111d33 !important; color: #E7EDF5 !important; border-color: #2B3C5C !important; }
  :root:not([data-theme="light"]) .ddp-carousel-dots button { background: #2B3C5C !important; }
  :root:not([data-theme="light"]) .ddp-carousel-dots button.is-active { background: #5BB7EC !important; }
  :root:not([data-theme="light"]) .et_pb_section:has(.ddp-portfolio),
  :root:not([data-theme="light"]) .et_pb_section:has(.ddp-contact) { background-color: #0A1526 !important; background-image: none !important; }
  :root:not([data-theme="light"]) .ddp-portfolio,
  :root:not([data-theme="light"]) .ddp-contact,
  :root:not([data-theme="light"]) .ddp-actions {
    --ddp-bg: #0A1526; --ddp-surface: #15223C; --ddp-surface-2: #182748;
    --ddp-border: #2E3F61; --ddp-text: #EEF3FA; --ddp-muted: #C2D0E4;
    --ddp-media: radial-gradient(130% 130% at 0% 0%, #17294A 0%, #0D1B33 70%);
    --ddp-shadow: 0 18px 42px rgba(0,0,0,0.55);
  }
  :root:not([data-theme="light"]) .ddp-btn-secondary { background: #1C2F52 !important; border-color: #3A4F78 !important; }
}

/* Hell-/Dunkel-Umschalter – sitzt sauber als letztes Element DIREKT in der
   Menüzeile, hinter dem letzten Menüpunkt. Das Menü nutzt den Divi-Stil
   "inline_centered_logo" (zentrierte Flex-Liste). Der Schalter wird per JS als
   <li> an die Menü-Liste gehängt und fließt als Flex-Element mit – dadurch kein
   Überlappen und (dank nowrap) kein Umbruch in eine zweite Zeile. */
.et_pb_menu__menu nav ul.et-menu,
#top-menu { flex-wrap: nowrap !important; align-items: center; }
#top-menu li.db-theme-switch,
.et-menu li.db-theme-switch,
.et_pb_menu__menu li.db-theme-switch {
  display: flex !important;
  align-items: center;
  float: none !important;
  margin: 0 0 0 16px !important;
  padding: 0 !important;
  list-style: none !important;
  border: 0 !important;
}
#top-menu li.db-theme-switch::before,
.et-menu li.db-theme-switch::before,
.et_pb_menu__menu li.db-theme-switch::before,
#top-menu li.db-theme-switch::after,
.et-menu li.db-theme-switch::after,
.et_pb_menu__menu li.db-theme-switch::after { content: none !important; display: none !important; }
/* Im mobilen Klapp-Menü den Schalter sauber rechts ausrichten */
.et_mobile_menu li.db-theme-switch { display: flex !important; justify-content: flex-end; padding: 10px 5% !important; margin: 0 !important; }

.db-switch {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}
.db-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 46px;
  height: 24px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #d7e0ec;
  box-shadow: inset 0 1px 2px rgba(11,31,58,0.18);
  transition: background 0.3s ease;
}
.db-switch-ico { font-size: 11px; line-height: 1; position: relative; z-index: 1; }
.db-switch-sun { color: #F5B841; }
.db-switch-moon { color: #5A6B7B; }
.db-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(11,31,58,0.35);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  z-index: 2;
}
.db-switch[aria-checked="true"] .db-switch-track { background: var(--db-grad-marke); }
.db-switch[aria-checked="true"] .db-switch-knob { transform: translateX(22px); }
.db-switch:hover .db-switch-knob { box-shadow: 0 3px 9px rgba(11,31,58,0.45); }
.db-switch:focus-visible .db-switch-track { outline: 2px solid var(--db-blau); outline-offset: 2px; }
/* Dark-Mode: Mond-Icon hell halten */
:root[data-theme="dark"] .db-switch-moon,
:root:not([data-theme="light"]) .db-switch-moon { color: #E7EDF5; }

/* ---- Plugin-Umschalter [dealboerse_theme_toggle] auf denselben Slider-Look bringen ----
   Falls der runde Shortcode-Button irgendwo platziert ist (z. B. im Header),
   sieht er damit GENAUSO aus wie der Menü-Schalter (kein Kreis mehr). */
.ddp-theme-toggle {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  width: 58px !important;
  height: 30px !important;
  min-width: 0 !important;
  padding: 0 7px !important;
  margin: 0;
  border: 0 !important;
  border-radius: 999px !important;
  background: #d7e0ec !important;
  box-shadow: inset 0 1px 2px rgba(11,31,58,0.18) !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: space-between;
  vertical-align: middle;
  box-sizing: border-box;
  line-height: 1;
  transition: background 0.3s ease;
}
/* beide Icons dauerhaft sichtbar (Plugin blendet sonst je eins aus) */
.ddp-theme-toggle .ddp-ico { display: inline !important; position: relative; z-index: 1; font-size: 13px; line-height: 1; }
.ddp-theme-toggle .ddp-ico-sun { color: #F5B841 !important; }
.ddp-theme-toggle .ddp-ico-moon { color: #5A6B7B !important; }
.ddp-theme-toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #ffffff; box-shadow: 0 2px 6px rgba(11,31,58,0.35);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1); z-index: 2;
}
.ddp-theme-toggle:hover::after { box-shadow: 0 3px 9px rgba(11,31,58,0.45); }
:root[data-theme="dark"] .ddp-theme-toggle { background: var(--db-grad-marke) !important; }
:root[data-theme="dark"] .ddp-theme-toggle::after { transform: translateX(28px); }
:root[data-theme="dark"] .ddp-theme-toggle .ddp-ico-moon { color: #E7EDF5 !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ddp-theme-toggle { background: var(--db-grad-marke) !important; }
  :root:not([data-theme="light"]) .ddp-theme-toggle::after { transform: translateX(28px); }
  :root:not([data-theme="light"]) .ddp-theme-toggle .ddp-ico-moon { color: #E7EDF5 !important; }
}

/* =========================================================
   8) Modernes Hauptmenü – „Pill"-Navigation (ohne Unterstreichung)
   Hover = weiche Marken-Kapsel, aktiver Punkt = Marken-Verlauf.
   ========================================================= */
#top-menu > li > a,
.et-menu > li > a,
#et-top-navigation .nav > li > a {
  position: relative;
  font-weight: 600;
  padding: 7px 16px !important;
  border-radius: 999px;
  line-height: 1.4;
  transition: color 0.2s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}
/* Hover: dezente Marken-Kapsel + leichtes Anheben */
#top-menu > li > a:hover,
.et-menu > li > a:hover,
#et-top-navigation .nav > li > a:hover {
  color: var(--db-blau) !important;
  background-color: rgba(20,121,201,0.10);
  transform: translateY(-1px);
}
/* Aktiver Menüpunkt: kräftige Marken-Kapsel */
#top-menu > li.current-menu-item > a,
#top-menu > li.current-menu-ancestor > a,
.et-menu > li.current-menu-item > a {
  color: #ffffff !important;
  background: var(--db-grad-marke);
  box-shadow: 0 6px 16px rgba(20,121,201,0.28);
}
#top-menu > li.current-menu-item > a:hover,
.et-menu > li.current-menu-item > a:hover {
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Dark Mode: hellere Kapsel, Verlauf beim aktiven Punkt bleibt */
:root[data-theme="dark"] #top-menu > li > a:hover,
:root:not([data-theme="light"]) #top-menu > li > a:hover {
  color: #ffffff !important;
  background-color: rgba(79,179,232,0.16);
}
:root[data-theme="dark"] #top-menu > li.current-menu-item > a,
:root:not([data-theme="light"]) #top-menu > li.current-menu-item > a { color: #ffffff !important; }

/* =========================================================
   9) Lesbarkeit auf hellen Flächen erzwingen (Light Mode)
   – behebt zu blasse Überschriften/Texte auf hellem Grund.
   (Die Dark-Mode-Regeln oben haben höhere Spezifität und
    überschreiben dies bei aktivem Dunkelmodus.)
   ========================================================= */
.db-soft :is(h1,h2,h3,h4,h5,h6),
.db-plain :is(h1,h2,h3,h4,h5,h6),
.db-legal :is(h1,h2,h3,h4,h5,h6) { color: var(--db-navy) !important; }
/* Fließtext auf hellem Grund deutlich dunkler + etwas kräftiger */
.db-soft .et_pb_text p, .db-soft .et_pb_text li, .db-soft .et_pb_text span,
.db-plain .et_pb_text p, .db-plain .et_pb_text li, .db-plain .et_pb_text span,
.db-legal .et_pb_text p, .db-legal .et_pb_text li, .db-legal .et_pb_text span {
  color: #233140 !important;
}
.db-soft .et_pb_text strong,
.db-plain .et_pb_text strong,
.db-legal .et_pb_text strong { color: var(--db-navy) !important; }
