/* Mobile-Korrekturen für Startseite, Avestai Sales, MEDDPICC-Check und
   Nacharbeits-Rechner. Eingebunden nach dem Inline-<style>, damit gleiche
   Selektoren gewinnen. Nur Darstellung, keine Texte. Alles liegt in
   Media-Queries bis 900 px; der Desktop bleibt unverändert. */

@media (max-width: 900px) {
  /* ── Header: 56 statt 64 px, Logo 30 statt 44 px ──
     Startseite, MEDDPICC-Check und Rechner nutzen <nav> direkt im body,
     Avestai Sales nutzt <header>. */
  body > nav:not(.mobile-nav) {
    height: 56px;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  body > nav:not(.mobile-nav) > a:first-child svg { height: 30px; width: auto; }
  body > header {
    height: 56px;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  #hero { padding-top: 56px; }
  .mobile-nav { top: 56px; max-height: calc(100vh - 56px); }
  /* MEDDPICC-Check und Rechner schieben den Inhalt per body-Padding unter den Header */
  body:has(> nav.mobile-nav):not(:has(#hero)) { padding-top: 56px; }

  /* Ankerziele genau in Header-Höhe. Vorher 88 px bei 64 px Header: Nach
     einem Ankersprung blieb ein 24-px-Streifen des vorigen Abschnitts samt
     dessen Grenzlinie unter dem Header stehen (die „leere Trennlinie“).
     Die Abschnitte haben eigenes Padding oben, Luft ist also vorhanden.
     Die Tools nutzten scroll-padding statt scroll-margin; beides vereinheitlicht. */
  html { scroll-padding-top: 0; }
  [id] { scroll-margin-top: 56px; }
  #sicherheit { border-top: 0; }

  /* ── Sticky-CTA der Startseite: niedriger, Zusatz darf umbrechen ── */
  #stickyCta:not(:has(.sticky-cta-inner)) {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  #stickyCta > a {
    flex-wrap: wrap; column-gap: 6px; row-gap: 0;
    padding: 10px 12px; line-height: 1.25; text-align: center;
  }
  #stickyCta > a span { font-size: 12px; }

  /* ── Pilot-Zeile ohne Wert als einleitende Hervorhebung ── */
  .sich-item:not(:has(.sich-item-val)) {
    background: rgba(255, 55, 61, 0.06);
    border-left: 3px solid var(--red, #ff373d);
    border-bottom: 0;
    padding: 12px 14px;
    margin-bottom: 4px;
  }
  .sich-item:not(:has(.sich-item-val)) .sich-item-label {
    font-size: 15px; font-weight: 700; color: var(--dark, #0e0e0e);
  }

  /* Platz für die Sticky-Leiste am Seitenende (höchste Variante: Sales-Leiste
     bei 360 px mit 79 px). Der Abstand liegt im dunklen Footer statt im weißen
     body, sonst bleibt unter dem Footer ein weißer Streifen. 36 px ist das
     bestehende untere Footer-Padding auf Startseite und Sales. */
  body:has(#stickyCta) { padding-bottom: 0; }
  body:has(#stickyCta) > footer { padding-bottom: calc(36px + 80px + env(safe-area-inset-bottom)); }

  /* ── Tap-Ziele mindestens 44 px ── */
  body > nav:not(.mobile-nav) > a:first-child { display: inline-flex; align-items: center; min-height: 44px; }
  .btn-primary { min-height: 44px; }
  input[type=range] { height: 44px; }
  .hero-funding-badge { min-height: 44px; }
  .leistung-arrow {
    display: inline-flex; align-items: center; justify-content: flex-start;
    min-width: 44px; min-height: 44px;
  }
  .footer-col ul { gap: 0; }
  .footer-contact a, .footer-col a, .footer-bottom a, footer a {
    display: inline-flex; align-items: center; min-height: 44px; min-width: 44px;
  }
  body > header nav a, body > header .logo-link {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  }

  /* ── Eingabefelder mindestens 16 px, sonst zoomt iOS beim Antippen ── */
  input:not([type=radio]):not([type=checkbox]):not([type=range]), select, textarea {
    font-size: max(16px, 1em);
  }
}

@media (max-width: 600px) {
  /* Startseite, Leistungen: zwei Spalten statt drei, Pfeil unter den Text
     statt mitten in die Textspalte */
  .leistung-row { grid-template-columns: 36px 1fr; padding: 36px 0; }
  .leistung-arrow { grid-column: 2; justify-self: start; margin-top: 4px; transform: none; }

  /* Startseite, Technische Maßnahmen: mehrzeilige Werte rechtsbündig */
  .sich-item { gap: 16px; }
  .sich-item-val { text-align: right; }

  /* Avestai Sales, Preiskarten: Folgezeilen bündig mit dem Text statt unter dem Strich */
  .pricing-features li { padding-left: 26px; text-indent: -26px; }
}

@media (max-width: 479px) {
  /* Label/Wert-Zeilen: Label über Wert, beide linksbündig */
  .sich-item {
    flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 12px 0;
  }
  .sich-item-label { font-size: 14px; }
  .sich-item-val { font-size: 16px; font-weight: 700; text-align: left; }
}
