/* ERZEUGT von werkzeuge/php-stil-erzeugen.py - nicht von Hand aendern.
   Quelle: werkzeuge/navigation/navigation.css */

/* ==========================================================================
   GLOBALE NAVIGATION  ·  einzige Quelle  ·  Fassung 2 (27.09.2026)
   --------------------------------------------------------------------------
   Diese Datei ist die EINZIGE Stelle, an der die Navigationsleiste beschrieben
   wird. Verteilt wird sie mit

       powershell -ExecutionPolicy Bypass -File werkzeuge\navigation-verteilen.ps1

   ── Aufbau ───────────────────────────────────────────────────────────────
   Links der Schriftzug „Timo Britz.“ (Punkt in Kupfer), daneben Software
   (Klappmenü mit Programmen und Werkstatt), Werkstatt, Über mich, Kontakt.
   Rechts Sprache, Anmelden, der Kaufknopf für Aktenlage und der Schalter
   hell/dunkel. Am Telefon wandert alles außer Schriftzug, Schalter und
   Menüknopf in ein Schubfach.

   ── Farben ───────────────────────────────────────────────────────────────
   Die Leiste nutzt die Merkmale des Designsystems (--bg, --surface,
   --text-primary, --accent …). Sie stehen auf jeder Seite, weil
   design-verteilen.ps1 sie überall einsetzt, und folgen dort data-thema.
   Rückfallwerte stehen trotzdem dabei, damit die Leiste nie unlesbar wird.

   ── Warum alle Eigenschaften ausgeschrieben sind ──────────────────────────
   Einige Seiten bringen Regeln für das Element nav, für nav a oder nav svg
   mit. Alles, was dort steht und hier fehlen würde, schlüge durch. Deshalb
   setzt .tb-nav die wichtigen Eigenschaften ausdrücklich.
   ========================================================================== */

.tb-nav {
  position: sticky; top: 0; z-index: 9999;
  display: block; width: auto; height: auto; margin: 0; padding: 0;
  background: color-mix(in srgb, var(--bg, #f6f4ef) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border: 0; border-bottom: 1px solid var(--border, #e3ded4);
  box-shadow: none;
  font: 400 15px/1.2 var(--schrift, system-ui, -apple-system, "Segoe UI", sans-serif);
  color: var(--text-secondary, #50555b);
  text-align: left; letter-spacing: normal; text-transform: none;
  box-sizing: border-box;
}
.tb-nav * { box-sizing: border-box; }
/* Aktionsstreifen (Einführungsrabatt Oktober 2026). Erscheint nur per Skript bis zum Datum in data-bis. */
.tb-nav .tb-aktion { display: block; margin: 0; padding: 6px 16px; text-align: center; text-decoration: none;
  font-size: 13.5px; line-height: 1.35; color: #fff; background: var(--kupfer, #b8703e); }
.tb-nav .tb-aktion b { font-weight: 700; }
.tb-nav .tb-aktion:hover { text-decoration: underline; }
.tb-nav .tb-aktion[hidden] { display: none; }
html[data-thema="dunkel"] .tb-nav .tb-aktion { color: #1c1206; background: #d9955f; }
.tb-nav .tb-innen {
  position: relative;
  max-width: 1168px; margin: 0 auto; padding: 0 24px; height: 64px;
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
}

/* ---- Schriftzug ---------------------------------------------------------- */
.tb-nav .tb-marke {
  display: inline-flex; align-items: baseline; flex: none;
  margin: 0 22px 0 0; padding: 0; background: none; border: 0; height: auto;
  font: 700 20px/1 var(--kopf, "Lexend", system-ui, sans-serif);
  letter-spacing: -0.02em; text-transform: none;
  color: var(--text-primary, #262a2f); text-decoration: none; white-space: nowrap;
}
.tb-nav .tb-punkt { color: var(--warm, #b8703e); }

/* ---- Einträge ------------------------------------------------------------ */
.tb-nav .tb-liste { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; }
.tb-nav .tb-ziel,
.tb-nav .tb-kopf {
  display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto;
  padding: 8px 12px; margin: 0; border: 0; border-radius: 8px; background: none;
  font: inherit; font-size: 15px; letter-spacing: normal; text-transform: none;
  color: var(--text-secondary, #50555b); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.tb-nav .tb-ziel:hover,
.tb-nav .tb-kopf:hover,
.tb-nav .tb-gruppe:focus-within > .tb-kopf { color: var(--text-primary, #262a2f); background: var(--surface-2, #f2efe9); }
.tb-nav .tb-ziel.tb-aktiv,
.tb-nav .tb-gruppe.tb-aktiv > .tb-kopf { color: var(--accent, #1f6f78); }
.tb-nav .tb-kopf svg { width: 14px; height: 14px; flex: none; transition: transform .2s ease; }
.tb-nav .tb-luecke { flex: 1 1 auto; }
.tb-nav .tb-sprache,
.tb-nav .tb-neben { font-size: 14px; color: var(--text-muted, #686c71); padding: 8px 10px; }
.tb-nav .tb-intern { color: var(--accent, #1f6f78); }

/* ---- Klappmenü Software -------------------------------------------------- */
.tb-nav .tb-gruppe { position: relative; }
.tb-nav .tb-unter {
  position: absolute; top: calc(100% + 12px); left: -14px; z-index: 2;
  width: min(640px, 92vw);
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px;
  padding: 16px; margin: 0;
  background: var(--surface, #fffdf9); border: 1px solid var(--border, #e3ded4); border-radius: 14px;
  box-shadow: var(--schatten, 0 12px 32px -12px #0004);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.tb-nav .tb-unter.tb-drei { width: min(920px, calc(100vw - 200px)); grid-template-columns: repeat(3, 1fr); }
/* Brücke über den Spalt, damit das Menü beim Hinüberfahren offen bleibt */
.tb-nav .tb-unter::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.tb-nav .tb-gruppe:hover > .tb-unter,
.tb-nav .tb-gruppe:focus-within > .tb-unter {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .16s ease, transform .16s ease, visibility 0s;
}
.tb-nav .tb-gruppe:hover > .tb-kopf svg,
.tb-nav .tb-gruppe:focus-within > .tb-kopf svg { transform: rotate(180deg); }
.tb-nav .tb-spalte { display: grid; gap: 1px; align-content: start; }
.tb-nav .tb-spalte-kopf {
  display: block; padding: 6px 10px 8px;
  font: 600 11.5px/1 var(--schrift, system-ui, sans-serif); letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted, #686c71);
}
.tb-nav .tb-spalte a {
  display: block; padding: 8px 10px; border-radius: 8px;
  font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: normal; text-transform: none;
  color: var(--text-primary, #262a2f); text-decoration: none; background: none;
}
.tb-nav .tb-spalte a em {
  display: block; margin-top: 2px; font-style: normal; font-weight: 400; font-size: 13px;
  color: var(--text-muted, #686c71);
}
.tb-nav .tb-spalte a:hover { background: var(--surface-2, #f2efe9); }
.tb-nav .tb-spalte a.tb-aktiv { color: var(--accent, #1f6f78); background: var(--accent-weich, #1f6f781f); }
.tb-nav .tb-werkstatt {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px;
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border, #e3ded4);
}
.tb-nav .tb-werkstatt .tb-spalte-kopf { padding: 6px 10px 6px; }
.tb-nav .tb-werkstatt a {
  padding: 5px 8px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary, #4a4e53); text-decoration: none;
}
.tb-nav .tb-werkstatt a:hover { background: var(--surface-2, #f2efe9); color: var(--text-primary, #262a2f); }
.tb-nav .tb-werkstatt a.tb-aktiv { color: var(--accent, #1f6f78); background: var(--accent-weich, #1f6f781f); }
.tb-nav .tb-alle {
  grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px; padding: 8px 10px 2px;
  font-size: 14.5px; font-weight: 600; color: var(--accent, #1f6f78); text-decoration: none;
}
.tb-nav .tb-alle svg { width: 14px; height: 14px; flex: none; }
.tb-nav .tb-alle:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Kaufknopf ----------------------------------------------------------- */
.tb-nav .tb-kauf {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  margin: 0 0 0 8px; padding: 10px 16px; border-radius: 10px; border: 0;
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  background: var(--accent, #1f6f78); color: var(--auf-akzent, #fff);
  box-shadow: 0 6px 16px -9px var(--accent, #1f6f78);
  transition: background-color .15s ease, transform .15s ease;
}
.tb-nav .tb-kauf:hover { background: var(--accent-2, #185a62); transform: translateY(-1px); color: var(--auf-akzent, #fff); }

/* ---- Hell/Dunkel --------------------------------------------------------- */
.tb-nav .tb-thema {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; margin: 0 0 0 8px; padding: 0;
  border: 1px solid var(--border, #e3ded4); border-radius: 10px; background: transparent;
  color: var(--text-secondary, #50555b); cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.tb-nav .tb-thema:hover { color: var(--text-primary, #262a2f); border-color: var(--border-strong, #cbc4b7); }
.tb-nav .tb-thema svg { width: 18px; height: 18px; }
.tb-nav .tb-thema .tb-mond { display: none; }
html[data-thema="dunkel"] .tb-nav .tb-thema .tb-sonne { display: none; }
html[data-thema="dunkel"] .tb-nav .tb-thema .tb-mond { display: block; }

/* ---- Menüknopf (nur Telefon) --------------------------------------------- */
.tb-nav .tb-menue { display: none; }

@media (max-width: 980px) {
  .tb-nav .tb-innen { padding: 0 16px; }
  .tb-nav .tb-marke { margin-right: auto; }
  .tb-nav .tb-menue {
    display: inline-flex; align-items: center; gap: 7px; flex: none;
    height: 38px; margin: 0 0 0 8px; padding: 0 12px;
    border: 1px solid var(--border, #e3ded4); border-radius: 10px; background: transparent;
    font: 600 14px/1 var(--schrift, system-ui, sans-serif); color: var(--text-primary, #262a2f); cursor: pointer;
  }
  .tb-nav .tb-menue svg { width: 18px; height: 18px; }
  .tb-nav .tb-liste {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px 20px; max-height: calc(100vh - 64px); overflow-y: auto;
    background: var(--bg, #f6f4ef); border-bottom: 1px solid var(--border, #e3ded4);
    box-shadow: var(--schatten, 0 12px 32px -12px #0004);
  }
  .tb-nav.offen .tb-liste { display: flex; }
  .tb-nav .tb-ziel, .tb-nav .tb-kopf { width: 100%; justify-content: space-between; padding: 13px 12px; font-size: 16px; }
  .tb-nav .tb-luecke { display: none; }
  .tb-nav .tb-sprache, .tb-nav .tb-neben { font-size: 15px; }
  .tb-nav .tb-gruppe { position: static; }
  .tb-nav .tb-unter,
  .tb-nav .tb-gruppe:hover > .tb-unter,
  .tb-nav .tb-gruppe:focus-within > .tb-unter {
    position: static; display: none; width: auto; grid-template-columns: 1fr;
    margin: 2px 0 8px; padding: 8px; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .tb-nav .tb-unter::before { display: none; }
  .tb-nav .tb-unter.tb-drei { width: auto; grid-template-columns: 1fr; }
  .tb-nav .tb-gruppe.auf > .tb-unter { display: grid; }
  .tb-nav .tb-gruppe:hover > .tb-kopf svg,
  .tb-nav .tb-gruppe:focus-within > .tb-kopf svg { transform: none; }
  .tb-nav .tb-gruppe.auf > .tb-kopf svg { transform: rotate(180deg); }
  .tb-nav .tb-kauf { margin: 12px 0 0; padding: 14px; font-size: 15px; }
}
@media (max-width: 420px) {
  .tb-nav .tb-menue span { display: none; }
  .tb-nav .tb-marke { font-size: 19px; }
}

/* Anker unter der klebenden Leiste nicht verstecken */
html { scroll-padding-top: 76px; }

@media print { .tb-nav { display: none; } }
