/* =========================
   CoreWear – Mobile-First CSS (Off-Canvas Nav)
   ========================= */

/* Design Tokens */
:root {
  --bg: #0b0d10;
  --card: #12151a;
  --muted: #8892a6;
  --txt: #eaf2ff;
  --acc: #4f7cff;
  --ok: #3ccf7e;
  --warn: #ffb020;
  --max: 1200px;
  --danger: #ff5c5c;

  /* Mobile Nav Panel Breite */
  --nav-panel-w: min(40%, 200px);
}

* {
  -webkit-tap-highlight-color: transparent;
}

/* Reset & Basics */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Inter, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--txt); text-decoration: none; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }

body {
  margin-top: var(--header-h);
}

/* =========================
   Header
   ========================= */
header {
  position: sticky;
  top: 0;
  background: rgba(11,13,16,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid #1b2029;
  z-index: 800;
}
.header-bar {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;   /* Logo | (Hamburger rechts) */
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 64px;
}
.brand { display: inline-flex; align-items: center; }
#logo { height: 42px; width: auto; display: block; }

/* =========================
   Navigation – Desktop-Basis (transparent)
   ========================= */
.main-nav {
  position: static;
  height: auto; 
  width: auto;
  padding: 0;
  box-shadow: none;
  border-left: 0;
  transform: none;
  right: auto;

  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  overflow: visible;
  justify-content: flex-end;
  background: transparent;
  z-index: 1;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: .85;
}

.main-nav a:hover { opacity: 1; }
.main-nav a.active { opacity: 1; text-decoration: underline; }

/* Overlay soll NICHT unter dem Header liegen */
.nav-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: var(--header-h);      /* <— wichtiger Teil */
  background: rgba(0,0,0,.45);
  backdrop-filter: saturate(120%) blur(2px); /* optional */
  z-index: 900;              /* unter dem Header (950) lassen */
  display: none;
  pointer-events: none;
}

body.menu-open .nav-overlay {
  display: block;
  pointer-events: auto;
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #2a3342;
  background: #1a2030;
  color: var(--txt);
  cursor: pointer;
  transition: .2s;
  font-size: 14px;
}
.btn:hover { transform: translateY(-1px); border-color: #3a4458; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.ghost { background: transparent; border-color: #343c4f; }

/* Busy Spinner */
.btn[aria-busy="true"] {
  position: relative;
  pointer-events: none;
  opacity: .9;
  padding-right: 40px;
}
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  transform: translateY(-50%);
  animation: corewear-spin .8s linear infinite;
}
@keyframes corewear-spin { to { transform: translateY(-50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn[aria-busy="true"]::after { animation: none; }
}

/* =========================
   Hero
   ========================= */
.hero {
  max-width: var(--max);
  margin: 24px auto;
  padding: 0 16px;
  display: flex;
  justify-content: center;
}
.hero-card {
  background: linear-gradient(160deg,#121623 0%,#0e1320 60%);
  border: 1px solid #232a39;
  border-radius: 20px;
  padding: 22px;
  max-width: 720px;
  width: 100%;
  text-align: center;
}
h1 { font-size: 30px; line-height: 1.15; margin: 6px 0 10px; }
.sub { color: var(--muted); }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 14px 0;
}
.badge {
  border: 1px solid #2b3242;
  background: #151a26;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: #cbd6f6;
}
.notice { font-size: 13px; color: #a9b9df; margin-top: 8px; }

/* =========================
   Grid Layouts (Mobile default)
   ========================= */
.grid {
  max-width: var(--max);
  margin: 8px auto 40px;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}
.grid.cols-3,
.grid.cols-4,
.grid.cols-1 { grid-template-columns: 1fr; }

/* =========================
   Cards
   ========================= */
.card {
  background: var(--card);
  border: 1px solid #1f2532;
  border-radius: 18px;
  padding: 16px;
  overflow: hidden; /* Sicherheitsnetz gegen Überhang */
}
.card h3 { margin: 6px 0 6px; }
.muted { color: var(--muted); font-size: 14px; }

/* Quick-Link Karten */
a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: 1px solid #2a3245;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: #1b2231;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
a.card:hover {
  background: #2a3245;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  border-color: var(--acc);
}
a.card h3 { margin-bottom: 8px; font-size: 1.2rem; color:rgb(23, 103, 250) }
a.card p.muted { font-size: 0.95rem; color: #c8d2f0; }

/* =========================
   Lists & Chips
   ========================= */
.list { display: grid; gap: 10px; margin: 10px 0; padding-left: 0; }
.list li { list-style: none; display: flex; gap: 8px; }
.chip {
  font-size: 12px;
  border: 1px solid #2e3748;
  border-radius: 999px;
  padding: 4px 8px;
  color: #c7d3f7;
}

/* =========================
   Gallery
   ========================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 8px;
}
.gallery img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #232a39;
}

/* =========================
   FAQ
   ========================= */
.faq-item {
  border: 1px solid #222b3a;
  background: #111723;
  border-radius: 14px;
  padding: 12px;
}
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { color: #c8d2f0; }

/* =========================
   Contact
   ========================= */
.contact {
  max-width: var(--max);
  margin: 0 auto 56px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field { display: grid; gap: 8px; }
input, select, textarea {
  background: #0f1421;
  border: 1px solid #283246;
  color: var(--txt);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 4px;
}
textarea { min-height: 120px; }
label { font-size: 14px; color: #c8d2f0; }
.hint { font-size: 12px; color: #9fb1da; }

/* Upload-Liste & Remove-Button */
#file-list { margin: 0; padding: 0; list-style: none; display: none; }
#file-list .file-row { margin: 6px 0 0 0; }
#file-list .file-row:first-child { margin-top: 0; }
#file-list .rm {
  color: var(--danger);
  font-weight: 700;
  line-height: 1;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color .15s ease, background-color .15s ease, transform .1s ease;
  border: 0; background: none; cursor: pointer;
}
#file-list .rm:hover { color: #ff8c8c; background-color: rgba(255, 92, 92, .10); transform: scale(1.05); }
#file-list .rm:active { transform: scale(0.96); }
#file-list .rm:focus-visible { outline: 2px solid rgba(255, 92, 92, .5); outline-offset: 2px; }

/* Checkbox + Text */
.privacy-field { margin-top: 0; margin-bottom: 24px; }
#contactForm.has-attachments .privacy-field { margin-top: 16px; }
.privacy-label { display: flex; align-items: flex-start; gap: 0; }
.privacy-label input[type="checkbox"] { margin-top: 8; }
.privacy-label span { display: block; line-height: 1.5; }

/* Honeypot */
.hp { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

/* =========================
   Footer
   ========================= */
footer {
  border-top: 1px solid #1b2029;
  padding: 24px 16px;
  color: var(--muted);
}
footer .wrap {
  max-width: var(--max);
  margin: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  text-align: center;
}
footer a { color: #c8d2f0; text-decoration: underline; }

/* =========================
   Section titles
   ========================= */
.section-title {
  max-width: var(--max);
  margin: 28px auto 16px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.section-title h2 { margin: 0 0 4px; }
.section-title .muted { display: block; max-width: 760px; margin: 0 auto; }

/* =========================
   Produkte-Seite
   ========================= */
.product-layout {
  max-width: var(--max);
  margin: 8px auto 40px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.category-row {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto 32px;
}
.row-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  text-align: center;
}
.row-head h3 { margin: 0; }
.row-head .muted { margin-top: 4px; }

/* Kartenreihe (flex-wrap) */
.row-items {
  --gap: 12px;
  --cols: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  overflow: visible;
}
.product-card {
  --cardH: 162px;
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  width: auto;
  height: var(--cardH);
  background: var(--card);
  border: 1px solid #1f2532;
  border-radius: 14px;
  padding: 8px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  cursor: pointer;
  transition: .15s ease;
  color: var(--txt);
}
.product-card:hover { transform: translateY(-2px); border-color:#2b364b; }
.product-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #0f1421;
  border: 1px solid #283246;
  border-radius: 10px;
}
.pc-title {
  font-size: 13px;
  color: #cbd6f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Info-Panel */
.info-panel { position: static; min-height: 220px; }
.info-grid { display: grid; gap: 12px; }
.info-grid h4 { margin: 6px 0; }
.info-grid ul { margin: 0; padding-left: 18px; color: #c8d2f0; }

/* Hinweisbox */
.hint-box {
  max-width: var(--max);
  margin: 0 auto 24px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid #1f2532;
  border-radius: 14px;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

/* Number Inputs: Spinner ausblenden */
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

a.underline { text-decoration: underline; }

/* =========================
   Prozess-Seite (zentriert + Bild-Fit)
   ========================= */
.steps {
  max-width: var(--max);
  margin: 8px auto 40px;
  padding: 0 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: min(100%, 780px); /* Spalte begrenzen */
  justify-content: center;                  /* Spalte mittig */
}
.step {
  display: grid;
  grid-template-columns: minmax(0,1fr) clamp(120px, 28vw, 140px); /* Bildspalte flexibel, nie zu breit */
  align-items: center;
  gap: 14px;
  width: 100%;
}
.step h3 { margin: 4px 0 6px; }
.step p { margin: 0; }
.step ul { margin: 8px 0 0; padding-left: 18px; color: #c8d2f0; }

.thumb {
  width: 100%;                 /* füllt die rechte Spalte */
  aspect-ratio: 14 / 9;        /* konsistente 140x90-Proportion */
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #1f2532;
  opacity: 0.8;
  filter: saturate(85%);
}

/* Deko-Bildreihe */
.process-strip {
  max-width: var(--max);
  margin: 0 auto 32px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  opacity: .85;
}
.process-strip img {
  width: 100%; height: 72px; object-fit: cover;
  border-radius: 10px; border: 1px solid #232a39;
  filter: saturate(85%) brightness(0.95);
}

/* Zusätzliche Hilfsklassen */
.section-title .muted { max-width: 760px; }
.info-slot { margin-top: 20px; }
.upload-hint { display: block; margin: 0; }

/* =========================
   Autofill vereinheitlichen
   ========================= */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0f1421 inset !important;
  box-shadow: 0 0 0 1000px #0f1421 inset !important;
  -webkit-text-fill-color: var(--txt) !important;
  caret-color: var(--txt);
  border: 1px solid #283246 !important;
  transition: background-color 9999s ease-out 0s;
}
input:-moz-autofill,
textarea:-moz-autofill,
select:-moz-autofill {
  background-color: #0f1421 !important;
  color: var(--txt) !important;
  box-shadow: 0 0 0 1000px #0f1421 inset !important;
  border: 1px solid #283246 !important;
}

/* =========================
   Breakpoints (aufwärts)
   ========================= */

/* ≥ 640px: kleine Tablets */
@media (min-width: 640px) {
  #logo { height: 48px; }

  .gallery { grid-template-columns: repeat(3,1fr); }

  /* Grids */
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }

  /* Produktkarten: 2 → 3 Spalten */
  .row-items { --cols: 3; }

  /* Prozess-Bilderreihe dichter */
  .process-strip { grid-template-columns: repeat(4, 1fr); }

  h1 { font-size: 34px; }
}

/* ===== Mobile Off-Canvas: nur bis 959px aktiv ===== */
@media (max-width: 959.98px) {
  /* Hamburger sichtbar */
  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start; /* oben ausrichten */
    height: 40px;
    width: 44px;
    border: 1px solid #2a3342;
    background: #1a2030;
    color: var(--txt);
    border-radius: 10px;
    cursor: pointer;
    justify-self: end;
  }
  /* Mobile Panel-Styles */
  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    height: calc(100dvh - var(--header-h));
    width: var(--nav-panel-w);
    background: #0f1421;
    border-left: 1px solid #1f2532;
    box-shadow: -12px 0 24px rgba(0,0,0,.35);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 10px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .25s ease, right .25s ease;
    z-index: 900;
    text-align: center;
    align-items: stretch;          /* Links füllen die Breite */
    padding-top: 16px;             /* etwas Luft oben */
    margin-top: 2.99px;
  }
  .main-nav a {
    padding: 12px 14px;
    line-height: 1.35;
    border-radius: 10px;
    opacity: .95;
  }
  .main-nav a:hover { background: rgba(255,255,255,.05); opacity: 1; }

  /* Zustand "offen" */
  body.menu-open .main-nav { 
    transform: translateX(0); 
    right: 0; 
    pointer-events: auto; 
  }

  .grid.cols-1 .card {
  text-align: center;       /* Textzeilen zentrieren */
  display: flex;            /* damit align-items wirkt */
  flex-direction: column;   /* Paragraphen untereinander */
  align-items: center;      /* Blocke selbst mittig */
  justify-content: center;  /* vertikal mittig, wenn Höhe vorhanden */
  }

  section.grid.cols-1:has(> .card > a[href="/de/process.html"].btn.ghost) .card {
    justify-content: center !important; /* inline override */
    text-align: center;
  }
  section.grid.cols-1:has(> .card > a[href="/de/process.html"].btn.ghost) .card > a.btn {
    margin: 0 auto; /* zentriert den Button */
  }

  /* Falls eine Karte intern Flex nutzt → Inhalte auch horizontal zentrieren */
  main#home section.grid.cols-4 .card {
    align-items: center; /* hat nur Effekt, wenn .card display:flex ist */
  }
  .contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* Texte zentriert */
  }

  .contact .card {
    width: 100%;
    max-width: 480px;  /* optional, damit es nicht zu breit wird */
    margin: 0 auto 20px auto;
  }

  .contact .field,
  .contact label,
  .contact input,
  .contact textarea,
  .contact select,
  .contact button {
    text-align: center;
  }

  .contact button {
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
  /* File-Upload-Button + Text mittig */
  #files-main {
    display: block;
    margin: 0 auto;        /* zentriert das Element */
    text-align: center;    /* falls Browser die Beschriftung interpretiert */
      /* kleiner linker Innenabstand, gleicht Button-Rahmen aus */
    padding-left: 34px; 
  }

  /* Die Beschriftung "Anhänge (optional)" auch mittig */
  label[for="files-main"] {
    display: block;
    text-align: center;
  }

  /* Liste der hochgeladenen Dateien mittig */
  #file-list {
    text-align: center;
  }
  #file-list li {
    justify-content: center;  /* falls Flex-Styles greifen */
  }
  /* Karte "Direkter Kontakt" mittig */
  .contact aside.card { text-align: center; }

  /* Liste neutralisieren + zentrieren */
  .contact aside.card .list {
    padding-left: 0;
    list-style: none;
    margin: 0 auto;
    display: block !important;   /* override evtl. grid/flex */
  }

  /* Jede Zeile wirklich mittig – auch wenn li als Flex läuft */
  .contact aside.card .list li {
    width: 100%;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 6px;                    /* Abstand nach dem Emoji */
    text-align: center;
  }

  /* Falls irgendein Marker übrig bleibt */
  .contact aside.card .list li::marker { content: ""; }

  /* Autoverlinkte E-Mail in manchen Browsern */
  .contact aside.card .list a {
    display: inline-block;
    text-align: center;
  }
  .main-nav { 
    z-index: 1000;        /* Panel über Header */
  }
  .faq-item summary {
    /* iOS/Android Tipp-Highlight deaktivieren */
    -webkit-tap-highlight-color: transparent;
  }

  /* Focus-Ring für das FAQ komplett abschalten (nur Touch) */
  .faq-item:focus,
  .faq-item summary:focus,
  .faq-item summary:focus-visible,
  .faq-item:focus-within {
    outline: none !important;
    box-shadow: none !important;
  }
  body.menu-open header {
    background: rgba(11,13,16,.65);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px); /* iOS */
    transition: backdrop-filter .2s ease, background-color .2s ease;
  }
  /* Scroll-Lock ohne JS, ohne top/width-Änderungen */
  @media (max-width: 959.98px) {
    /* 1) Viewport selbst nicht scrollen */
    html:has(body.menu-open) {
      overflow: hidden;
      height: 100dvh; /* stabil auf iOS/Android */
    }

    /* 2) Body vorsichtshalber auch dicht machen */
    body.menu-open {
      overflow: hidden;
      overscroll-behavior: contain; /* verhindert Scroll-Chaining */
    }

    /* 3) Overlay fängt Touch-Pan ab, damit nix durchgeht */
    body.menu-open .nav-overlay {
      touch-action: none;
    }
  }
  html, body {
    text-align: center;          /* ← NEU: alle Texte zentrieren */
  }
  article.card.step { 
    text-align: left;
  }
  .product-rows {
    text-align: left;
  }
  /* ==== Impressum: Adressliste zentrieren (global, alle Breakpoints) ==== */
  .list.imprint-address { 
    /* Eltern ist ein Grid → Items zentrieren */
    justify-items: center; 
  }

  .list.imprint-address li { 
    /* li ist Flex → Inhalt horizontal zentrieren */
    justify-content: center; 
    text-align: center;
  }

  /* 0) Alles, was nach links zieht, neutralisieren */
  .info-grid ul { padding-left: 0 !important; }   /* überschreibt dein 18px-Indent */

  /* 1) Karten & Maßnahmen-Box zentrieren */
  .grid.cols-1 .card,
  .legal-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* 2) UI-Listen (.list) mittig – auch mehrzeilig */
  .card .list {
    justify-items: center;           /* Grid-Items in der UL */
  }
  .card .list li {
    justify-content: center;         /* Flex-Inhalt mittig */
    text-align: center;              /* mehrzeilige Texte mittig */
    width: 100%;                     /* damit justify-content wirkt */
  }

  /* 3) Rechtstext-Listen (Bullets) schön mittig */
  .legal-list {
    display: block;
    text-align: center;
    padding-left: 0;                 /* kein Außen-Indent */
    list-style-position: inside;     /* Bullet nach innen, wirkt mittiger */
    line-height: 1.6;
  }
  .legal-list li {
    display: list-item;
    margin: 6px 0;
  }

  /* 4) Adressliste im Kopf */
  .list.imprint-address { justify-items: center; }
  .list.imprint-address li {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  /* 5) Maßnahmen-Box (ul) */
  .legal-box ul {
    padding-left: 0;
    list-style-position: inside;
    text-align: center;
  }

  /* 6) Dienstleister-Kacheln: einspaltig + zentriert */
  .service-grid {
    grid-template-columns: 1fr !important;
    justify-items: center;
  }
  .service-card {
    text-align: center;
    width: 100%;
    max-width: 520px;
  }
  /* ===== Datenschutz: Listen ohne Punkte ===== */
  .legal-list,
  .legal-list li,
  .legal-box ul,
  .legal-box li {
    list-style: none !important;   /* Punkte weg */
    padding-left: 0 !important;    /* Einzug weg */
    margin-left: 0 !important;     /* Sicherheitsnetz */
    text-align: center;            /* Inhalt mittig */
  }
}

/* ≥ 960px: Desktop */
@media (min-width: 960px) {
  /* Hamburger aus, Overlay weg */
  .hamburger { 
    display: none; 
  }
  .nav-overlay { display: none !important; }
  body { overflow: auto; }

  .header-bar {
    grid-template-columns: auto 1fr;
    gap: 24px;
    padding: 16px 20px;
    min-height: 80px;
  }
  .brand { justify-content: flex-start; }

  .hero { margin: 32px auto; padding: 24px 20px; }
  h1 { font-size: 38px; }

  /* Grids */
  .grid { gap: 18px; }
  .grid.cols-3 { grid-template-columns: repeat(3,1fr); }
  .grid.cols-4 { grid-template-columns: repeat(4,1fr); }

  /* Contact: zweispaltig */
  .contact { grid-template-columns: 1fr 1fr; gap: 18px; }

  /* Produkte-Seite */
  .product-layout { gap: 18px; }
  .row-items { --cols: 4; }
  .info-panel { position: sticky; top: 90px; }

  /* Mobile-Default: Footer zentriert */
  footer .wrap {
    display: grid;          /* einfache Zentrierung */
    place-items: center;    /* Inhalt horizontal & vertikal zentrieren */
    gap: 8px;
    text-align: center;
  }

  footer .wrap > div {
    /* überschreibt nur die Ausrichtung, dein inline display:flex bleibt gültig */
    justify-content: center;  /* "Impressum" + "Datenschutz" mittig */
  }

  footer .wrap a {
    display: inline-block;
  }
}

/* ≥ 1100px: Widescreen */
@media (min-width: 1100px) {
  .row-items { --cols: 5; }
}

/* Sehr schmale Screens: Bild unter Text stapeln */
@media (max-width: 420px) {
  .step { grid-template-columns: 1fr; }
  .thumb { width: 100%; }
}

/* Default = Mobile Styles */
footer .wrap {
  display: grid;          /* einfache Zentrierung */
  place-items: center;    /* Inhalt horizontal & vertikal zentrieren */
  gap: 8px;
  text-align: center;
}

footer .wrap > div {
  justify-content: center;  /* "Impressum" + "Datenschutz" mittig */
}

footer .wrap a {
  display: inline-block;
}

main#home section.grid.cols-4 .card {
   text-align: center;
}

/* ==== Immer sichtbarer Header (inkl. Hamburger) ==== */
:root { --header-h: 64px; }           /* Mobile Höhe */
@media (min-width: 960px) { 
  :root { --header-h: 80px; }         /* Desktop Höhe */
}

/* Header fixieren & über Inhalt legen */
header {
  position: fixed;        /* statt sticky */
  top: 0; left: 0; right: 0;
  z-index: 950;           /* über Content, unter dem Off-Canvas-Panel */
}

.privacy-label span { text-align: left !important; }

/* Datenschutz: Maßnahmen-Box */
.legal-box {
  background: var(--card);
  border: 1px solid #232a39;
  border-radius: 16px;
  padding: 18px 20px;
}

.legal-box h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.legal-box ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
  line-height: 1.6;
}

.legal-box li {
  margin-bottom: 8px;
}

/* Dienstleister-Transparenz Übersicht */
.service-grid {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.service-card {
  background: var(--card);
  border: 1px solid #232a39;
  border-radius: 14px;
  padding: 14px 16px;
}

.service-card h4 {
  margin: 0 0 6px;
}

.service-card p {
  margin: 0;
  font-size: 14px;
  color: #c8d2f0;
  line-height: 1.5;
}

/* ==== Sprachschalter: robust (Desktop & Mobile) ==== */

/* 1) Nav-Links stylen – aber NICHT die Flaggen-Links */
.main-nav > a:not(.lang-link) {
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: .85;
}
.main-nav > a:not(.lang-link):hover { opacity: 1; }

/* 2) Sprachschalter (immer untereinander) */
.lang-switch{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* 3) Flaggen-Kachel: fixes Format + kompletter Reset */
.lang-link{
  --flag-w: 25px;
  display:flex;               /* stabil in transform/overflow-Containern */
  align-items:stretch;
  justify-content:center;
  width:var(--flag-w);
  aspect-ratio:3 / 2;         /* 3:2-Flaggenformat */
  padding:0 !important;       /* generisches Nav-Padding aus */
  line-height:0;              /* keine Baseline-Lücke */
  border:1px solid #2a3342;
  border-radius:8px;
  background:#0f1421;
  overflow:hidden;
  transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.lang-link:hover{ transform:translateY(-1px); border-color:#3a4458; }

/* 4) Bild füllt die Kachel komplett */
.lang-link img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* 5) Positionierung neben "Kontakt" (Desktop) */
@media (min-width:960px){
  .main-nav{ flex-wrap:nowrap; align-items:center; gap:16px; }
  .main-nav > .btn{ order:100; }
  .lang-switch{ order:101; margin-left:8px; align-self:center; }
}

/* 6) Im Hamburger unter "Kontakt" (Mobile) */
@media (max-width:959.98px){
  .main-nav{ display:flex; flex-direction:column; align-items:stretch; }
  .main-nav > .btn{ order:100; }
  .lang-switch{ order:101; align-items:center; padding-top:6px; }
}

/* ==== Sprachschalter: Active-State dezent ==== */

/* Grundzustand leicht gedimmt, Hover minimal betont */
.lang-link { opacity: .82; }
.lang-link:hover {
  opacity: 1;
  transform: translateY(-1px);
  border-color: #3a4458;
}

/* Aktivierte Sprache: subtiler Ring + Akzent-Border */
.lang-link.is-active,
.lang-link[aria-current="true"],
.lang-link[aria-pressed="true"] {
  opacity: 1;
  border-color: rgba(1, 96, 238, 0.692);
  /* sehr dezenter Ring */
  box-shadow: 0 0 0 2px rgba(79, 123, 255, 0);
  outline: none;
}
