/* ==========================================================================
   DP-Dynamic · Kopfleiste (eine Fassung für dpc, Wix und den Shop)

   Vorbild ist die Leiste des Shops (medusa-storefront, site-nav.tsx):
   64 px hoch, Glas, Produkte · Branchen · Service als breite Panels unter
   dem Kopf, rechts Suche, Beratung, Farbschema, Konto und Warenkorb.
   Markup aus werkzeug/navigation.py, Verhalten in assets/js/dp-kopf.js.

   Die Farben kommen aus den Variablen der Seite (--bg, --t95 …). Im
   Wix-Snippet gibt es sie nicht; dann greift jeweils die helle Fassung
   hinter dem Komma.
   ========================================================================== */
.dpk {
  --k-bg: var(--bg, #eef1f5);
  --k-nav: var(--nav, rgba(238,241,245,0.82));
  --k-t95: var(--t95, #0c1621);
  --k-t75: var(--t75, #2f3d4e);
  --k-t55: var(--t55, #3b4757);
  --k-t45: var(--t45, #4a5668);
  --k-linie: var(--line5, rgba(15,23,42,0.08));
  --k-linie-stark: var(--line10, rgba(15,23,42,0.13));
  --k-rand: var(--glass-border, rgba(15,23,42,0.10));
  --k-flaeche: var(--surface-inset, rgba(15,23,42,0.05));
  --k-karte: var(--surface, rgba(255,255,255,0.72));
  --k-orange: #FF9600;
  --k-orange-2: #FFA333;
  --k-auf-orange: var(--on-orange, #14161a);
  --k-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.4; color: var(--k-t95);
}
/* Glas als eigene Ebene: backdrop-filter am Kopf selbst würde das feste
   Handy-Panel auf Kopfhöhe einsperren (wie im Shop). */
.dpk::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--k-nav); border-bottom: 1px solid var(--k-rand);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
}
/* Grundwerte ohne Gewicht (:where), damit die Klassen unten sie überschreiben */
:where(.dpk) *, :where(.dpk) *::before, :where(.dpk) *::after { box-sizing: border-box; }
:where(.dpk) a { color: inherit; text-decoration: none; }
:where(.dpk) ul { list-style: none; margin: 0; padding: 0; }
:where(.dpk) p { margin: 0; }
:where(.dpk) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
:where(.dpk) svg { display: block; flex-shrink: 0; }
.dpk :focus-visible { outline: 2px solid var(--k-orange); outline-offset: 2px; border-radius: 8px; }

.dpk-leiste {
  max-width: 80rem; height: 64px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 24px;
}
@media (min-width: 640px) { .dpk-leiste { padding: 0 24px; } }

.dpk-logo { display: flex; align-items: center; flex-shrink: 0; }
.dpk-logo img { height: 28px; width: auto; }
@media (min-width: 640px) { .dpk-logo img { height: 32px; } }
.dpk-logo-dunkel { display: none !important; }
:root[data-theme="dark"] .dpk-logo-hell { display: none !important; }
:root[data-theme="dark"] .dpk-logo-dunkel { display: block !important; }

/* --- Hauptmenü ----------------------------------------------------------- */
.dpk-nav { display: none; flex: 1; min-width: 0; justify-content: center; }
@media (min-width: 1024px) { .dpk-nav { display: flex; } }
.dpk-nav > ul { display: flex; align-items: center; gap: 4px; }
.dpk-ausloeser {
  display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 999px;
  font-size: 13px; color: var(--k-t75); transition: color 0.25s var(--k-ease);
}
.dpk-ausloeser:hover, .dpk-ausloeser[aria-expanded="true"] { color: var(--k-t95); }
.dpk-pfeil { width: 14px; height: 14px; transition: transform 0.3s var(--k-ease); }
.dpk-ausloeser[aria-expanded="true"] .dpk-pfeil { transform: rotate(180deg); }

.dpk-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--k-bg); border-bottom: 1px solid var(--k-rand);
  box-shadow: 0 24px 60px -24px rgba(18,38,64,0.35);
  max-height: calc(100vh - 64px); overflow-y: auto;
  animation: dpk-auf 0.28s var(--k-ease);
}
.dpk-panel[hidden] { display: none; }
@keyframes dpk-auf { from { opacity: 0; transform: translateY(-6px); } }
.dpk-panel-innen { max-width: 80rem; margin: 0 auto; padding: 40px 24px; font-size: 16px; }

.dpk-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dpk-kachel {
  display: flex; align-items: center; gap: 16px; height: 100%; padding: 12px;
  border: 1px solid var(--k-linie-stark); border-radius: 16px;
  transition: border-color 0.25s, background-color 0.25s;
}
.dpk-kachel:hover { border-color: var(--k-t45); background: var(--k-flaeche); }
.dpk-kachel-bild {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 80px; height: 64px; border-radius: 12px; overflow: hidden; background: #000;
}
.dpk-kachel-bild img { width: 100%; height: 100%; object-fit: cover; }
.dpk-kachel-text { min-width: 0; }
.dpk-kachel-titel { display: block; font-weight: 600; }
.dpk-kachel-teaser {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 2px; font-size: 12px; line-height: 1.6; color: var(--k-t55);
}
.dpk-kachel-akzent {
  justify-content: space-between; padding: 20px; border: 0; font-weight: 600;
  background: var(--k-orange); color: var(--k-auf-orange) !important;
}
.dpk-kachel-akzent:hover { background: var(--k-orange-2); }
.dpk-kachel-akzent svg { width: 20px; height: 20px; }

.dpk-modelle { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--k-linie); }
.dpk-modelle-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.dpk-modelle-kopf a { font-size: 13px; font-weight: 500; color: var(--k-t95); }
.dpk-modelle-kopf a:hover { color: var(--k-orange); }
.dpk-modelle-spalten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 24px; }
.dpk-gruppe {
  margin-bottom: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--k-orange);
}
.dpk-modelle-spalten a { display: block; padding: 3px 0; font-size: 13.5px; color: var(--k-t75); }
.dpk-modelle-spalten a:hover { color: var(--k-t95); }

.dpk-raster-service { gap: 16px; }
.dpk-dienst {
  display: block; height: 100%; padding: 20px; border-radius: 16px;
  background: var(--k-karte); border: 1px solid var(--k-rand);
  transition: border-color 0.25s;
}
.dpk-dienst:hover { border-color: var(--k-linie-stark); }
.dpk-dienst-titel { display: block; font-weight: 600; }
.dpk-dienst-text { display: block; margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--k-t55); }
.dpk-dienst svg { width: 16px; height: 16px; margin-top: 16px; color: var(--k-t75); transition: transform 0.3s var(--k-ease); }
.dpk-dienst:hover svg { transform: translateX(4px); }

.dpk-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--k-orange);
}

/* --- Rechte Gruppe ------------------------------------------------------- */
.dpk-rechts { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
@media (min-width: 1024px) { .dpk-rechts { margin-left: 0; } }
.dpk-symbol {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; color: var(--k-t75);
  transition: color 0.25s, background-color 0.25s;
}
.dpk-symbol:hover { color: var(--k-t95); background: var(--k-flaeche); }
.dpk-symbol svg { width: 18px; height: 18px; }
.dpk-farbe .dpk-mond { display: none; }
:root[data-theme="dark"] .dpk-farbe .dpk-sonne { display: none; }
:root[data-theme="dark"] .dpk-farbe .dpk-mond { display: block; }

.dpk-suche-knopf {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; width: 40px;
  border-radius: 999px; color: var(--k-t75); font-size: 13px;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.dpk-suche-knopf:hover { color: var(--k-t95); background: var(--k-flaeche); }
.dpk-suche-knopf svg { width: 17px; height: 17px; }
.dpk-suche-text, .dpk-kuerzel { display: none; }
@media (min-width: 1280px) {
  .dpk-suche-knopf { width: auto; padding: 0 10px 0 12px; margin-right: 6px; border: 1px solid var(--k-rand); background: var(--k-flaeche); color: var(--k-t55); }
  .dpk-suche-knopf:hover { color: var(--k-orange); border-color: rgba(255,150,0,0.4); }
  .dpk-suche-text, .dpk-kuerzel { display: inline; }
}
.dpk-kuerzel { font: inherit; font-size: 11px; color: var(--k-t45); border: 1px solid var(--k-rand); border-radius: 6px; padding: 0 5px; }

.dpk-beratung {
  display: none; align-items: center; min-height: 32px; margin-right: 8px; padding: 0 16px;
  border: 1px solid var(--k-linie-stark); border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--k-t95) !important;
  transition: border-color 0.25s, color 0.25s;
}
.dpk-beratung:hover { border-color: var(--k-orange); color: var(--k-orange) !important; }
@media (min-width: 640px) { .dpk-beratung { display: inline-flex; } }

.dpk-zaehler {
  position: absolute; right: 2px; top: 2px; min-width: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--k-orange); color: var(--k-auf-orange);
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
.dpk-zaehler[hidden] { display: none; }

.dpk-menue-knopf .dpk-menue-zu { display: none; }
.dpk-menue-knopf[aria-expanded="true"] .dpk-menue-auf { display: none; }
.dpk-menue-knopf[aria-expanded="true"] .dpk-menue-zu { display: block; }
@media (min-width: 1024px) { .dpk-menue-knopf { display: none; } }

/* --- Handy und Tablet ---------------------------------------------------- */
.dpk-mobil {
  position: fixed; left: 0; right: 0; top: 64px; bottom: 0; z-index: 50;
  overflow-y: auto; overscroll-behavior: contain; background: var(--k-bg);
}
.dpk-mobil[hidden] { display: none; }
.dpk-verdeckt { visibility: hidden; }
@media (min-width: 1024px) { .dpk-mobil { display: none !important; } }
.dpk-mobil-innen { max-width: 80rem; margin: 0 auto; padding: 32px 16px 48px; }
@media (min-width: 640px) { .dpk-mobil-innen { padding-inline: 24px; } }
.dpk-mobil .dpk-eyebrow { margin: 32px 0 10px; }
.dpk-mobil .dpk-eyebrow:first-child { margin-top: 0; }
.dpk-mobil a { display: block; padding: 6px 0; font-size: 15px; color: var(--k-t75); }
.dpk-mobil a.dpk-gross { padding: 8px 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--k-t95); }
.dpk-mobil a.dpk-mittel { padding: 8px 0; font-size: 18px; font-weight: 500; color: var(--k-t95); }
.dpk-zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* Schmale Handys: Farbschema bleibt im Fuß, Symbole etwas enger */
@media (max-width: 400px) {
  .dpk-leiste { gap: 12px; }
  .dpk-logo img { height: 24px; }
  .dpk-farbe { display: none; }
  .dpk-symbol, .dpk-suche-knopf { width: 36px; }
}

.dpk a[aria-current="page"] { color: var(--k-orange) !important; }

@media (prefers-reduced-motion: reduce) {
  .dpk *, .dpk *::before, .dpk *::after { transition: none !important; animation: none !important; }
}

/* --- Wix -----------------------------------------------------------------
   Außerhalb des Rahmens klebt die Leiste oben im Fluss der Wix-Seite. Im
   Rahmen ("HTML einbetten") füllt sie den Rahmen ganz aus, deckend;
   Panels und Handy-Menü können den Rahmen nicht verlassen, dort führen
   die Auslöser auf ihre Übersicht (dp-kopf.js). */
.dpk[data-umgebung="wix"] { position: sticky; z-index: 9999; }
/* Wix setzt den Inhalt in eine 980 px breite Spalte: Logo und Symbole
   stehen bündig mit dem Text darunter. */
@media (min-width: 1024px) { .dpk[data-umgebung="wix"] .dpk-leiste { max-width: 980px; padding: 0; } }
html.dpk-rahmen, html.dpk-rahmen body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: #eef1f5; }
.dpk-rahmen .dpk { position: static; height: 100%; }
.dpk-rahmen .dpk::before { background: #eef1f5; border-bottom: 0; box-shadow: inset 0 -1px 0 rgba(15,23,42,0.10); -webkit-backdrop-filter: none; backdrop-filter: none; }
.dpk-rahmen .dpk-leiste { height: 100%; }
.dpk-rahmen .dpk-pfeil, .dpk-rahmen .dpk-panel, .dpk-rahmen .dpk-mobil, .dpk-rahmen .dpk-menue-knopf { display: none !important; }
.dpk-rahmen .dpk-nav { display: flex; }
