/* =========================================
   DESIGN VARIABLES
   ========================================= */
:root {
  /* Helles Theme (Standard) */
  --bg: #ffffff;
  --fg: #0f172a;
  /* Slate 900 */
  --muted: #475569;
  /* Slate 600 */
  --brand: #2563eb;
  /* Blue 600 */
  --brand-700: #1d4ed8;
  /* Blue 700 */
  --card: #f8fafc;
  /* Slate 50 */
  --ring: #93c5fd;
  /* Focus Ring */
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --border: color-mix(in oklab, var(--muted) 15%, transparent);
  --border-strong: color-mix(in oklab, var(--muted) 25%, transparent);

  /* Speziell für Chips/Tags */
  --chip-bg: var(--bg);
  --chip-border: color-mix(in oklab, var(--muted) 18%, transparent);
}

/* Dunkles Theme (automatisch via Data-Attribut) */
html[data-theme="dark"] {
  --bg: #0b1220;
  /* Sehr dunkles Blau/Grau */
  --fg: #e5e7eb;
  /* Helles Grau für Text */
  --muted: #94a3b8;
  /* Abgetöntes Grau */
  --brand: #60a5fa;
  /* Helleres Blau für Dark Mode */
  --brand-700: #3b82f6;
  --card: #111827;
  /* Dunkle Karten */
  --ring: #1d4ed8;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  --border: color-mix(in oklab, var(--muted) 20%, transparent);
  --border-strong: color-mix(in oklab, var(--muted) 35%, transparent);
  --chip-bg: #1f2937;
  --chip-border: color-mix(in oklab, var(--muted) 30%, transparent);
}

/* =========================================
   GLOBAL RESET & TYPOGRAPHY
   ========================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* WICHTIG: Verhindert, dass Anker-Links hinter dem Sticky Header verschwinden */
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-700);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
/* --- STICKY HEADER (Fixierte Navigation) --- */

header {
  /* Das ist der "Excel-Effekt": */
  position: -webkit-sticky;
  /* Für Safari */
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Damit die Leiste immer ÜBER dem Text schwebt */

  /* Modernes "Milchglas"-Design */
  background-color: rgba(255, 255, 255, 0.85);
  /* 85% sichtbar, 15% durchsichtig */
  backdrop-filter: blur(12px);
  /* Verschwimmt den Hintergrund dahinter */

  /* Kleiner Schatten für 3D-Effekt */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

  /* Übergang für Smoothness */
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Anpassung für den Dark Mode (damit es dort dunkel und transparent ist) */
[data-theme="dark"] header {
  background-color: rgba(15, 23, 42, 0.85);
  /* Dunkler Hintergrund, leicht durchsichtig */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* --- STICKY HEADER (Fixierte Navigation) --- */

header {
  /* Das ist der "Excel-Effekt": */
  position: -webkit-sticky;
  /* Für Safari */
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Damit die Leiste immer ÜBER dem Text schwebt */

  /* Modernes "Milchglas"-Design */
  background-color: rgba(255, 255, 255, 0.85);
  /* 85% sichtbar, 15% durchsichtig */
  backdrop-filter: blur(12px);
  /* Verschwimmt den Hintergrund dahinter */

  /* Kleiner Schatten für 3D-Effekt */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

  /* Übergang für Smoothness */
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Anpassung für den Dark Mode (damit es dort dunkel und transparent ist) */
[data-theme="dark"] header {
  background-color: rgba(15, 23, 42, 0.85);
  /* Dunkler Hintergrund, leicht durchsichtig */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* --- STICKY HEADER (Fixierte Navigation) --- */

header {
  /* Das ist der "Excel-Effekt": */
  position: -webkit-sticky;
  /* Für Safari */
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Damit die Leiste immer ÜBER dem Text schwebt */

  /* Modernes "Milchglas"-Design */
  background-color: rgba(255, 255, 255, 0.85);
  /* 85% sichtbar, 15% durchsichtig */
  backdrop-filter: blur(12px);
  /* Verschwimmt den Hintergrund dahinter */

  /* Kleiner Schatten für 3D-Effekt */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

  /* Übergang für Smoothness */
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Anpassung für den Dark Mode (damit es dort dunkel und transparent ist) */
[data-theme="dark"] header {
  background-color: rgba(15, 23, 42, 0.85);
  /* Dunkler Hintergrund, leicht durchsichtig */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Suchen Sie diesen Block und ändern Sie ihn so ab: */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  font-size: 1.1rem;

  /* NEU HINZUFÜGEN: */
  text-decoration: none;
  /* Kein Unterstrich */
  cursor: pointer;
  /* Zeigt die Hand als Mauszeiger */
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: "Times New Roman", ui-serif, Georgia, serif;
  font-size: .9rem;
  letter-spacing: .5px;
  border: 1px solid var(--border-strong);
  color: var(--brand);
  background: var(--card);
}

/* NEU: Anpassung für den Firmennamen (kein H1 mehr) */
.brand .brand-name,
.brand h1 {
  font-size: 1.15rem;
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg);
}

nav ul {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav ul li a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

nav ul li a:hover {
  color: var(--brand);
}

.nav-row-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .9rem;
}

.lang-switch a {
  color: var(--muted);
  font-weight: 600;
}

.lang-switch a.active {
  color: var(--brand);
  font-weight: 700;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: .5rem;
  padding: .4rem .6rem;
  line-height: 1;
  font-size: .8rem;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--card);
  border-color: var(--brand);
}

/* =========================================
   BUTTONS (CTA)
   ========================================= */
.cta {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: .6rem;
  padding: .8rem 1.1rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: .95rem;
  transition: background 0.2s, transform 0.1s;
}

.cta:hover {
  background: var(--brand-700);
  color: #fff;
  transform: translateY(-1px);
}

.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
  box-shadow: none;
}

.ghost:hover {
  background: color-mix(in oklab, var(--brand) 10%, transparent);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

/* NEU: Anpassung für H1 im Hero (früher H2) */
.hero h1,
.hero h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.15;
  margin: .25rem 0 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 60ch;
  /* Verhindert zu lange Zeilen */
}

.hero .actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

/* Illustration Styles */
.illus {
  min-height: 260px;
  padding: 1rem;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.blob {
  position: absolute;
  inset: auto -15% -20% -15%;
  height: 80%;
  background: radial-gradient(60% 70% at 50% 40%, color-mix(in oklab, var(--brand) 25%, transparent), transparent 70%);
}

/* =========================================
   SECTIONS & HEADINGS
   ========================================= */
section {
  padding: 3.5rem 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* NEU: Bessere Abstände für Section Titles */
.section-head h2,
.section-head h3 {
  font-size: 1.75rem;
  margin: 0;
  font-weight: 700;
}

.lead {
  color: var(--muted);
  margin: 0;
  font-size: 1.05rem;
}

/* =========================================
   SERVICES GRID
   ========================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service {
  padding: 1.5rem;
  transition: transform .2s ease, border-color .2s;
  height: 100%;
  /* Gleiche Höhe für Karten */
}

.service:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}

.service h3,
.service h4 {
  margin: 1rem 0 .5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: .6rem;
  background: color-mix(in oklab, var(--brand) 8%, var(--card));
  border: 1px solid color-mix(in oklab, var(--brand) 20%, transparent);
  font-size: 1.2rem;
}

.service p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.list {
  display: grid;
  gap: .6rem;
  margin: 1rem 0;
  padding-left: 1.2rem;
  font-size: .95rem;
  color: var(--muted);
}

.list li {
  margin-left: 0;
}

/* =========================================
   LOGOS & CHIPS
   ========================================= */
.logos {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.logo-chip {
  padding: .5rem .9rem;
  border-radius: 2rem;
  /* Runderer Look */
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  font-weight: 500;
  font-size: .9rem;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: border-color 0.2s;
}

.logo-chip:hover {
  border-color: var(--brand);
}

/* =========================================
   CONTACT FORM
   ========================================= */
.contact {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

form {
  display: grid;
  gap: 1rem;
}

input,
textarea {
  width: 100%;
  padding: .9rem 1rem;
  border-radius: .7rem;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  outline: none;
  font-size: .95rem;
  font-family: inherit;
  transition: box-shadow 0.2s, border-color 0.2s;
}

input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 20%, transparent);
  border-color: var(--brand);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

small.lead {
  display: block;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--muted);
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
  background: var(--card);
}

.foot {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

/* =========================================
   UTILITIES
   ========================================= */
.pad {
  padding: 1.5rem;
}

.mt-s {
  margin-top: .6rem;
}

.mt-m {
  margin-top: 1rem;
}

.mt-l {
  margin-top: 1.5rem;
}

.hidden {
  display: none;
}

/* Scroll Reveal Animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   MOBILE / RESPONSIVE
   ========================================= */
@media (max-width: 800px) {

  .hero,
  .about,
  .contact {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero {
    padding-top: 2rem;
  }

  /* Reverse order for hero image on mobile if desired, 
     but default stacking order is usually text first, then image */

  .grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   MOBILE / RESPONSIVE FIX (V2 - Strict)
   ========================================= */

/* 1. Genereller Schutz gegen horizontales Scrollen */
html {
  scroll-behavior: smooth;
  /* WICHTIG: Das sorgt dafür, dass Sprungmarken nicht unter der Leiste landen */
  scroll-padding-top: 100px;
}

body {
  overflow-x: hidden;
  /* Verhindert das seitliche Wackeln */
  width: 100%;
  position: relative;
}

@media (max-width: 700px) {

  /* --- HEADER & NAVIGATION --- */

  /* Container darf nicht breiter sein als Screen */
  .container {
    width: 100%;
    max-width: 100vw;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: hidden;
    /* Sicherheitsnetz */
  }

  /* Header-Inhalt stapeln */
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 0.5rem;
  }

  /* Navigation: Links sauber umbrechen lassen (statt Scrollbalken) */
  nav ul {
    display: flex;
    flex-wrap: wrap;
    /* WICHTIG: Erlaubt mehrzeilige Links */
    gap: 0.8rem 1rem;
    /* Abstand zwischen den Links */
    padding: 0;
    width: 100%;
  }

  nav ul li {
    flex: 0 0 auto;
    /* Verhindert, dass Links gequetscht werden */
  }

  nav ul li a {
    display: inline-block;
    padding: 0.2rem 0;
    font-size: 0.95rem;
    /* Etwas kleiner für Mobile */
  }

  /* Meta-Zeile (Sprache / Dark Mode) */
  .nav-row-meta {
    width: 100%;
    justify-content: flex-start;
    /* Linksbündig wie der Rest */
    border-top: 1px solid var(--border);
    /* Trennlinie zur Optik */
    padding-top: 0.8rem;
  }

  /* --- HERO BEREICH (Mobile) --- */
  .hero {
    position: relative;
    overflow: hidden;
    /* Standard für Light Mode (Der helle Verlauf) */
    background: radial-gradient(circle at top right, #eef2ff, #ffffff);
    transition: background 0.3s ease;
  }

  /* WICHTIG: Das hier hat gefehlt - Überschreiben für Dark Mode */
  [data-theme="dark"] .hero {
    background: var(--bg) !important;
    background-image: none !important;
    background-color: #0b1220 !important;
    /* Dein Dark-Mode Hintergrund */
  }

  /* Der Aurora Effekt (Blob) */
  .hero::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
  }

  /* WICHTIG: Aurora im Dark Mode ausschalten */
  [data-theme="dark"] .hero::before {
    display: none !important;
    opacity: 0 !important;
  }

  .hero h1 {
    font-size: 1.75rem;
    word-wrap: break-word;
    hyphens: auto;
    position: relative;
    /* Damit Text über dem Hintergrund liegt */
    z-index: 1;
  }

  /* Textfarbe im Dark Mode erzwingen */
  [data-theme="dark"] .hero h1,
  [data-theme="dark"] .hero p {
    color: #ffffff !important;
  }

  /* Der Aurora Effekt */
  .hero::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
  }

  .hero h1 {
    font-size: 1.75rem;
    /* Überschrift passend machen */
    word-wrap: break-word;
    /* Lange Wörter umbrechen */
    hyphens: auto;
  }

  /* Das Bild/SVG darf niemals breiter als 100% sein */
  .card.illus {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
  }

  .card.illus svg {
    width: 100%;
    height: auto;
  }

  /* --- RESTLICHE SEKTIONEN --- */
  .grid {
    display: flex;
    flex-direction: column;
    /* Karten untereinander */
    gap: 1rem;
  }

  /* Kontaktformular & About stapeln */
  .contact,
  .about {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  /* Eingabefelder dürfen nicht überstehen */
  input,
  textarea {
    max-width: 100%;
    box-sizing: border-box;
    /* Wichtig für Padding */
  }
}

/* --- FLOATING NAVIGATION (Rechts unten) --- */
.floating-nav {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  z-index: 1000;
  opacity: 0;
  /* Unsichtbar am Anfang */
  pointer-events: none;
  /* Nicht klickbar wenn unsichtbar */
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
}

.floating-nav.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.float-btn {
  background-color: var(--brand);
  color: #fff;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  text-decoration: none;
  /* Falls es ein a-Tag ist */
}

.float-btn:hover {
  background-color: var(--accent);
  /* Hintergrund wird zur Akzentfarbe */
  color: var(--brand);
  /* WICHTIG: Pfeil wird zur dunklen Brand-Farbe geändert */
  transform: scale(1.1);
}

.float-btn:focus {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* --- MOBILE OPTIMIERUNG & FIXES (FINAL) --- */
@media (max-width: 768px) {

  /* 1. STICKY HEADER & NAVIGATION (Aufgeräumtes Layout) */
  header {
    position: -webkit-sticky !important;
    /* Wichtig für Safari */
    position: sticky !important;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    /* Fast undurchsichtig */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    /* Etwas kompakter */
  }

  /* Container für alles */
  .nav {
    flex-direction: column;
    /* Alles untereinander */
    height: auto;
    padding: 0.5rem 1rem;
    gap: 0.8rem;
    /* Abstand zwischen den Zeilen */
  }

  /* Zeile 1: Logo (Zentriert) */
  .brand {
    width: 100%;
    justify-content: center;
  }

  /* Zeile 2: Links (Horizontal scrollbar & zentriert) */
  .nav-row-links {
    display: block !important;
    width: 100%;
    overflow-x: auto;
    /* Horizontales Scrollen erlauben */
    white-space: nowrap;
    /* Kein Umbruch der Links */
    -webkit-overflow-scrolling: touch;
    /* Weiches Scrollen auf iOS */
    text-align: center;
    /* Inhalt zentrieren */
    padding-bottom: 5px;
    /* Platz für Scrollbalken */
  }

  .nav-row-links ul {
    display: inline-flex;
    /* Damit text-align: center wirkt */
    gap: 1.2rem;
    padding: 0;
    margin: 0;
  }

  /* Zeile 3: Meta (Sprache/Theme) - Sauber zentriert darunter */
  .nav-row-meta {
    position: static !important;
    /* Nicht mehr absolut! */
    width: 100%;
    justify-content: center;
    margin-top: 0;
  }

  /* 2. FLOATING BUTTONS (Immer sichtbar machen) */
  .floating-nav {
    bottom: 20px !important;
    right: 15px !important;
    z-index: 99999 !important;
    /* Erzwinge Sichtbarkeit, egal was das JS sagt */
    opacity: 1 !important;
    pointer-events: all !important;
    transform: translateY(0) !important;
  }

  /* 3. MAP FIX (Höhe erzwingen) */
  .map-container {
    height: auto !important;
    /* Inline-Style überschreiben */
    min-height: 450px !important;
    /* Mindesthöhe erzwingen */
    width: 100% !important;
    /* Volle Breite */
    display: block !important;
    /* Sicherstellen, dass es Platz einnimmt */
    margin-top: 2rem;
    /* Abstand zu den Kontaktkarten */
  }

  /* Overlay auf dem Handy anpassen */
  .map-overlay {
    position: absolute !important;
    width: 90% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    /* Perfekt zentrieren */
    bottom: 15px !important;
    padding: 1rem !important;
    background: rgba(255, 255, 255, 0.96) !important;
  }

  .map-overlay h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
}

/* --- CHAT WIDGET STYLES (FINAL & CLEAN) --- */

/* 1. DER BUTTON UNTEN LINKS (Das "schöne" Design) */
.chat-trigger-button {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 64px;
  /* Etwas größer und markanter */
  height: 64px;
  border-radius: 50%;

  /* Das Design: Sattes Lila (Akzent) ohne Rand */
  background-color: var(--accent, #4F46E5);
  color: white;
  border: none;

  /* Schatten für den "Schwebe-Effekt" */
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);

  cursor: pointer;
  z-index: 20000;
  /* Ganz oben */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-trigger-button:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
}

/* Icon im Button */
.chat-trigger-button svg {
  width: 30px;
  height: 30px;
  fill: white;
  display: block;
}

/* 2. DAS CHAT FENSTER */
.chat-container {
  position: fixed;
  bottom: 110px;
  /* Genug Abstand zum Button */
  left: 30px;
  width: 350px;
  max-width: 85vw;
  height: auto;
  max-height: 70vh;

  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  /* Weicher Schatten */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);

  z-index: 19999;
  /* Unter dem Button, aber über dem Rest */
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Startzustand: Ausgeblendet */
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom left;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-container.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* Header */
.chat-header {
  background: var(--accent, #4F46E5);
  color: white;
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.8;
  padding: 0;
  line-height: 1;
}

.chat-close-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Body Area */
.chat-body {
  flex-grow: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #f9fafb;
  /* Sehr helles Grau */
}

/* Optionen Area (Buttons) */
.chat-options {
  padding: 0 1.5rem 1.5rem 1.5rem;
  background-color: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* NACHRICHTEN */
.message {
  padding: 1rem;
  border-radius: 12px;
  max-width: 90%;
  line-height: 1.5;
  font-size: 0.95rem;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Bot Message Style */
.bot-message {
  background-color: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

/* User Message Style */
.user-message {
  background-color: var(--accent, #4F46E5);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

/* AUSWAHL BUTTONS */
.option-button {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.95rem;
}

.option-button:hover {
  border-color: var(--accent, #4F46E5);
  color: var(--accent, #4F46E5);
  background: #fdfdfd;
  transform: translateX(2px);
}

/* Der wichtige "Kontakt" Button (Hervorgehoben) */
.primary-chat-btn {
  background-color: var(--accent, #4F46E5) !important;
  color: white !important;
  border: 1px solid var(--accent, #4F46E5) !important;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.primary-chat-btn:hover {
  filter: brightness(110%);
  transform: translateY(-2px);
}

/* --- FINALER MOBILE DARK MODE FIX --- */
@media only screen and (max-width: 768px) {

  /* Wir zielen auf das Element, das BEIDE Klassen hat */
  body.dark-mode section.hero.container,
  body.dark-mode .hero.container {
    background-color: #0f172a !important;
    /* Festes Dunkelblau */
    background-image: none !important;
    /* Verläufe löschen */
    background: #0f172a !important;
    /* Doppelt hält besser */
    box-shadow: none !important;
    /* Eventuellen Glow entfernen */
  }

  /* Sicherstellen, dass der Text weiß bleibt */
  body.dark-mode section.hero.container *,
  body.dark-mode .hero.container * {
    color: #ffffff !important;
  }
}

/* --- COMPACT MOBILE HEADER FIX --- */
@media (max-width: 768px) {

  /* 1. Gesamtabstand im Header drastisch reduzieren */
  .nav {
    gap: 0.3rem !important;
    /* Abstand zwischen den Zeilen minimieren */
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
  }

  /* 2. Logo etwas kleiner machen */
  .brand {
    font-size: 1rem !important;
    /* Schrift kleiner */
  }

  .brand .logo-circle {
    width: 32px !important;
    /* Kreis kleiner */
    height: 32px !important;
    font-size: 0.8rem !important;
  }

  /* 3. Links-Zeile: Unnötige Ränder entfernen */
  .nav-row-links {
    padding-bottom: 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Zarte Trennlinie zur Optik */
  }

  .nav-row-links ul {
    gap: 1rem !important;
    /* Links etwas enger zusammen */
  }

  .nav-row-links a {
    padding: 0.3rem 0 !important;
    /* Weniger Luft um die Links */
    font-size: 0.9rem !important;
  }

  /* 4. Meta-Zeile (DE/EN): Enger nach oben ziehen */
  .nav-row-meta {
    margin-top: 0 !important;
    padding-top: 0.2rem !important;
    border: none !important;
    /* Trennlinie entfernen, spart Platz */
  }
}