/* Matflixx custom UI fixes (Sektoren-Highlight, Validation-Layout, Anzahl-Stepper) */

/* ─── i18n: nur aktive Sprache von [data-lang]-Spans zeigen ───────────────
 * Global wirksam (Navbar, Footer, API-Doku usw.). Default ist Deutsch
 * (matflixx-i18n.js setzt html[lang] beim Laden). */
[data-lang]                                  { display: none; }
html[lang="de"] [data-lang="de"],
html:not([lang="en"]) [data-lang="de"],
html[lang="en"] [data-lang="en"]             { display: inline; }

/* ─── Hero-Title: \n aus i18n-Strings als Zeilenumbruch rendern ────────
 * Die i18n-Übersetzung setzt textContent — Newlines bleiben erhalten,
 * white-space:pre-line macht sie sichtbar. */
.hero-section .text-block-4 strong,
.hero-section .text-block-4-1 strong,
.hero-section .text-block-4-copy-copy strong {
  white-space: pre-line;
}

/* ─── Testimonials auf der Startseite sichtbar machen ──────────────────
 * Webflow setzt `.collection-list-wrapper { display:none }` UND webflow.js
 * fügt zusätzlich einen inline `style="display:none"` hinzu (für die
 * native CMS-Slider-Mechanik). Mit !important schlagen wir beides.
 * Der leere Webflow-Slider daneben (war für Finsweet gedacht) bleibt
 * leer und wird entfernt; wir zeigen die Testimonials direkt als Spalte. */
body[data-page-slug="index"] #beg .collection-list-wrapper {
  display: block !important;
}
body[data-page-slug="index"] #beg .slider-2 {
  display: none !important;
}
body[data-page-slug="index"] #strapi-testimonials {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  min-height: 260px;
  padding: 24px 0 0;
}
/* Horizontaler translateX-Track (Layout in mfx-overrides.css). Karten liegen
   nebeneinander, der Track wird verschoben – kein absolutes Stapeln/Cross-Fade. */
body[data-page-slug="index"] #strapi-testimonials .mf-tm-slide {
  flex: 0 0 100%;
  width: 100%;
}
body[data-page-slug="index"] #strapi-testimonials .div-block-17 {
  margin-top: 0;
}
/* Logo-Wrapper rund mit weißem Hintergrund, Bild zentriert + zugeschnitten.
 * Funktioniert auch wenn das Logo ein transparentes PNG ist. */
body[data-page-slug="index"] #strapi-testimonials .div-block-16 {
  background-image: none;       /* Webflow-Default-Bg-Image entfernen */
  overflow: hidden;
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
body[data-page-slug="index"] #strapi-testimonials .div-block-16 img.logo-img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  margin: 0;
  display: block;
}
/* Nav-Dots */
body[data-page-slug="index"] .mf-tm-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 0;
}
body[data-page-slug="index"] .mf-tm-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
body[data-page-slug="index"] .mf-tm-dot:hover  { background: rgba(255, 255, 255, .6); }
body[data-page-slug="index"] .mf-tm-dot.is-active {
  background: var(--orange);
  transform: scale(1.15);
}
body[data-page-slug="index"] .mf-tm-dot:focus { outline: none; box-shadow: 0 0 0 3px rgba(253,187,100,.35); }

/* ─── Registrierungs-Slider-Pages: Platz für die Fixed-Navbar ────────────
 * Die .section.bme/.form-1/.form-2 hat min-height:100vh + display:flex und
 * würde sonst hinter der Fixed-Navbar verschwinden. */
body[data-page-slug="bdsv"]            .section.bme,
body[data-page-slug="bme24"]           .section.bme,
body[data-page-slug="edi"]             .section.bme,
body[data-page-slug="eid"]             .section.bme,
body[data-page-slug="nfa"]             .section.bme,
body[data-page-slug="oa"]              .section.bme,
body[data-page-slug="matflixx-testen"] .section.bme,
body[data-page-slug="bdsv"]            .section.form-1,
body[data-page-slug="bme24"]           .section.form-1,
body[data-page-slug="edi"]             .section.form-1,
body[data-page-slug="eid"]             .section.form-1,
body[data-page-slug="nfa"]             .section.form-1,
body[data-page-slug="oa"]              .section.form-1,
body[data-page-slug="matflixx-testen"] .section.form-1,
body[data-page-slug="bdsv"]            .section.form-2,
body[data-page-slug="bme24"]           .section.form-2,
body[data-page-slug="edi"]             .section.form-2,
body[data-page-slug="eid"]             .section.form-2,
body[data-page-slug="nfa"]             .section.form-2,
body[data-page-slug="oa"]              .section.form-2,
body[data-page-slug="matflixx-testen"] .section.form-2 {
  padding-top: 90px;
}

/* ─── Slider-Pages: Desktop = kein Scroll (100vh), Mobile = scrollbar ───── */
html.mf-slider-page,
body[data-page-slug="bdsv"],
body[data-page-slug="bme24"],
body[data-page-slug="edi"],
body[data-page-slug="eid"],
body[data-page-slug="nfa"],
body[data-page-slug="oa"],
body[data-page-slug="matflixx-testen"] {
  height: 100vh;
  overflow: hidden;
  margin: 0;
}
body[data-page-slug="bdsv"]            .section.bme,
body[data-page-slug="bme24"]           .section.bme,
body[data-page-slug="edi"]             .section.bme,
body[data-page-slug="eid"]             .section.bme,
body[data-page-slug="nfa"]             .section.bme,
body[data-page-slug="oa"]              .section.bme,
body[data-page-slug="matflixx-testen"] .section.bme,
body[data-page-slug="bdsv"]            .section.form-1,
body[data-page-slug="bme24"]           .section.form-1,
body[data-page-slug="edi"]             .section.form-1,
body[data-page-slug="eid"]             .section.form-1,
body[data-page-slug="nfa"]             .section.form-1,
body[data-page-slug="oa"]              .section.form-1,
body[data-page-slug="matflixx-testen"] .section.form-1,
body[data-page-slug="bdsv"]            .section.form-2,
body[data-page-slug="bme24"]           .section.form-2,
body[data-page-slug="edi"]             .section.form-2,
body[data-page-slug="eid"]             .section.form-2,
body[data-page-slug="nfa"]             .section.form-2,
body[data-page-slug="oa"]              .section.form-2,
body[data-page-slug="matflixx-testen"] .section.form-2 {
  min-height: 0;
  height: calc(100vh - 88px);
  box-sizing: border-box;
  overflow: hidden;
}

/* Slider-Pages auf Mobile: Scroll erlauben, damit Formular-Felder erreichbar sind */
@media screen and (max-width: 767px) {
  html.mf-slider-page,
  body[data-page-slug="bdsv"],
  body[data-page-slug="bme24"],
  body[data-page-slug="edi"],
  body[data-page-slug="eid"],
  body[data-page-slug="nfa"],
  body[data-page-slug="oa"],
  body[data-page-slug="matflixx-testen"] {
    height: auto;
    overflow-y: auto;
  }
  body[data-page-slug="bdsv"]            .section.bme,
  body[data-page-slug="bme24"]           .section.bme,
  body[data-page-slug="edi"]             .section.bme,
  body[data-page-slug="eid"]             .section.bme,
  body[data-page-slug="nfa"]             .section.bme,
  body[data-page-slug="oa"]              .section.bme,
  body[data-page-slug="matflixx-testen"] .section.bme,
  body[data-page-slug="bdsv"]            .section.form-1,
  body[data-page-slug="bme24"]           .section.form-1,
  body[data-page-slug="edi"]             .section.form-1,
  body[data-page-slug="eid"]             .section.form-1,
  body[data-page-slug="nfa"]             .section.form-1,
  body[data-page-slug="oa"]              .section.form-1,
  body[data-page-slug="matflixx-testen"] .section.form-1,
  body[data-page-slug="bdsv"]            .section.form-2,
  body[data-page-slug="bme24"]           .section.form-2,
  body[data-page-slug="edi"]             .section.form-2,
  body[data-page-slug="eid"]             .section.form-2,
  body[data-page-slug="nfa"]             .section.form-2,
  body[data-page-slug="oa"]              .section.form-2,
  body[data-page-slug="matflixx-testen"] .section.form-2 {
    height: auto;
    min-height: calc(100svh - 160px);
    overflow: visible;
  }
}
/* Footer auf Slider-Pages: aus dem flexrow rausnehmen, kompakt halten */
body[data-page-slug="bdsv"]            .footer,
body[data-page-slug="bme24"]           .footer,
body[data-page-slug="edi"]             .footer,
body[data-page-slug="eid"]             .footer,
body[data-page-slug="nfa"]             .footer,
body[data-page-slug="oa"]              .footer,
body[data-page-slug="matflixx-testen"] .footer {
  padding-top: 16px;
  padding-bottom: 16px;
}

/* ─── Footer site-wide: kompakt halten + immer am Viewport-Boden ────────
 * Webflow setzt im Mobile-Breakpoint (≤991px) padding-top:50px und stackt
 * die Footer-Karten vertikal → der Footer wächst auf 200-300px. Wir
 * begrenzen das. Plus: body als Flex-Spalte, Footer mit margin-top:auto
 * → bleibt am unteren Rand auch bei kurzen Inhalten. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.footer {
  margin-top: auto;
  flex-shrink: 0;
  max-height: 110px;
  padding-top: 18px !important;
  padding-bottom: 18px !important;
  overflow: hidden;
}
/* Tablet (480-991px): zwei kompakte Zeilen — Telefon/Mail oben, Links unten */
@media (max-width: 991px) and (min-width: 480px) {
  .footer { max-height: 130px; }
  .footer-grid {
    grid-template-columns: 1fr !important;
    grid-row-gap: 6px !important;
    place-items: center !important;
  }
  .footer-card { flex-wrap: wrap; justify-content: center !important; gap: 10px 22px; }
  .footer-link { margin-bottom: 0 !important; }
}
/* Smartphone: zwei kompakte Zeilen erlauben — phone/mail oben, Links unten */
@media (max-width: 479px) {
  .footer { max-height: 150px; padding-top: 14px !important; padding-bottom: 14px !important; }
  .footer-grid {
    grid-template-columns: 1fr !important;
    grid-row-gap: 6px !important;
    place-items: center !important;
  }
  .footer-card { flex-direction: row !important; flex-wrap: wrap; justify-content: center !important; gap: 6px 14px; }
  .footer-card .div-block-30 { margin: 0; }
  .footer-link, .footer-link._0 { margin-bottom: 0 !important; font-size: 14px !important; line-height: 1.2 !important; }
}

/* ─── Sektoren-Auswahl: gelb-orangener Rand wenn aktiviert ──────────────── */
.form12_checkbox_field {
  position: relative;
  transition: border-color .15s ease, box-shadow .15s ease;
}
/* Modern Browsers: :has() */
.form12_checkbox_field:has(input.checkbox:checked) {
  border-color: var(--orange) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 1px var(--orange);
}
/* Fallback for browsers without :has() — JS toggles this class */
.form12_checkbox_field.is-checked {
  border-color: var(--orange) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 1px var(--orange);
}

/* ─── Form Validation: Custom Tooltip, layout-stabil ─────────────────────
 * Browser-native Validation-Tooltip ist deaktiviert (form.novalidate via JS),
 * stattdessen rendern wir einen eigenen Tooltip mit position:fixed über
 * dem ERSTEN invaliden Feld. Kein Layout-Shift möglich.
 */

/* Webflow's Default-Validation-Indicators komplett unterdrücken — kein
 * Browser-Default :invalid red-glow, kein roter Border-shift. */
.w-form input,
.w-form select,
.w-form textarea {
  box-shadow: none;
}
.w-form input:invalid,
.w-form select:invalid,
.w-form textarea:invalid {
  box-shadow: none;
  outline: none;
}

/* Verstecke alle Inline-Validation-Boxen (z.B. .validation-msg auf matflixx-testen,
 * eingefügt vom seiteneigenen JS) — wir rendern Errors als position:fixed Tooltip. */
.validation-msg {
  display: none !important;
}

/* .error/.valid States: Layout-stabil — Border-Width bleibt gleich (kein Pixel-Shift),
 * Highlighting via box-shadow + Background. Überschreibt die Inline-Styles von
 * matflixx-testen.html (border: 2px solid ...). */
.field-input.error,
.field-input-dropdown.error,
.text-field-2.error,
textarea.error {
  border-width: 1.5px !important;
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 1.5px #e53e3e !important;
  background-color: #fff5f5 !important;
}
.field-input.valid,
.field-input-dropdown.valid,
.text-field-2.valid {
  border-width: 1.5px !important;
  border-color: #38a169 !important;
  box-shadow: none !important;
}

/* Webflow's submit-failure / submit-success Boxen aus dem Layout-Flow holen.
 * Sie waren `position: static` mit großem padding — Sichtbarkeit verschob
 * den ganzen Form-Bottom. Jetzt: Overlay unter dem Form, kein Reflow. */
.form-wrapper.w-form { position: relative; }
.form-wrapper.w-form .w-form-fail,
.form-wrapper.w-form .w-form-done,
.form-wrapper.w-form .error-message,
.form-wrapper.w-form .success-message {
  position: absolute !important;
  left: 0; right: 0;
  top: 100%;
  margin: 8px 0 0 !important;
  z-index: 10;
  pointer-events: none;
}

/* ─── Custom Tooltip für erstes invalid Feld ────────────────────────────── */
.mf-tooltip {
  position: fixed;
  background: #e74c3c;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  max-width: 260px;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.35);
  font-family: Varela Round, Montserrat, sans-serif;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: normal;
  text-align: center;
}
.mf-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.mf-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #e74c3c;
}

/* ─── NavBar Language Switcher — exact matflixx.de look: round flags in a pill
   with a sliding orange fill behind the active language. The fill transitions on
   .is-active (set by matflixx-i18n.js on rebuilds / mf-mirror-switch.js on
   mirrors), giving the same toggle/slide animation as live. ───────────────── */
.wg-element-wrapper.sw3 {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}
.wg-element-wrapper.sw3 .wg-selector-2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}
.wg-element-wrapper.sw3 .wg-selector-2.is-active { cursor: default; }
/* !important so the active-fill state wins over Webflow IX2's inline transforms
   on .wg-selector-2-fill (those default to DE on every load and otherwise leave
   the orange highlight stuck on German even when English is active). */
.wg-element-wrapper.sw3 .wg-selector-2-fill {
  position: absolute;
  inset: 0;
  background-color: #fdbb64;
  transform: translateX(-100%) !important;
  transition: transform .3s ease;
  display: block;
}
.wg-element-wrapper.sw3 .wg-selector-2.is-active .wg-selector-2-fill {
  transform: translateX(0) !important;
}
.wg-element-wrapper.sw3 .image-30 {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 5000px;
  box-shadow: 0 0 3px rgba(0, 0, 0, .5);
  display: block;
}

/* ─── Fallback Sprach-Switcher (Slider-Pages ohne NavBar-Switcher) ─────── */
#mf-lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 2px 12px rgba(0, 0, 55, 0.12);
  font-family: 'Varela Round', Montserrat, sans-serif;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#mf-lang-switcher button {
  border: none;
  background: transparent;
  color: #555;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
  font-family: inherit;
  line-height: 1;
}
#mf-lang-switcher button:hover {
  background: rgba(253, 187, 100, 0.15);
  color: #000037;
}
#mf-lang-switcher button.is-active {
  background: var(--orange);
  color: #fff;
}
#mf-lang-switcher button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(253, 187, 100, 0.4);
}

/* ─── Native number-input Spinner ausblenden (cross-browser) ────────────── */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ─── Anzahl-Zugaenge: +/- Stepper ──────────────────────────────────────── */
.anzahl-stepper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.anzahl-stepper .text-field-2 {
  /* Original width/height preserved; nur die Spalten-Anordnung ändert sich */
  margin: 0;
  text-align: center;
}
.anzahl-stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--orange);
  background: #fff;
  color: var(--orange);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  user-select: none;
  transition: background .15s ease, color .15s ease, transform .1s ease;
  font-family: inherit;
}
.anzahl-stepper-btn:hover {
  background: var(--orange);
  color: #fff;
}
.anzahl-stepper-btn:active {
  transform: scale(0.92);
}
.anzahl-stepper-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.anzahl-stepper-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(253, 187, 100, 0.3);
}

/* ─── Webflow Badge ausblenden ────────────────────────────────────────────── */
.w-webflow-badge { display: none !important; }

/* ─── Cross-Browser Font-Rendering (Safari / Chrome Parität) ────────────── */
/* Kein globales antialiased auf html — das macht Fonts in Safari dünner als
 * in Chrome. Stattdessen nur auf dunklen Hintergründen wo es optisch hilft. */
.section.dark-blue,
.hero-section,
.navbar,
.footer {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  text-rendering: optimizeLegibility;
}

/* ─── Mobile & Tablet Responsive Fixes ──────────────────────────────────── */

/* Navbar: Registrieren-Button auf Tablet sichtbar, nur auf <768px ausblenden */
@media screen and (max-width: 767px) {
  .button.navigation.register { display: none; }
  /* Hamburger Menu: ausreichend Platz */
  .full-container.nav { padding-left: 16px; padding-right: 16px; }
}

/* Registration Form: Felder auf Mobile stapeln */
@media screen and (max-width: 479px) {
  /* grid-7._3 (Unternehmen/Position) auf Mobile einspaltig */
  .grid-7._2,
  .grid-7._3 {
    grid-template-columns: 1fr !important;
  }

  /* Sektor-Checkboxen: 2 pro Reihe auf Mobile */
  .checkbox_wrap {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* Stepper auf Mobile: volle Breite */
  .anzahl-stepper {
    width: 100%;
    justify-content: center;
  }

  /* Slider-Navigation Buttons auf Mobile */
  .previous, .next { bottom: -40px; }

  /* Feature Cards auf Mobile: stack */
  .card {
    flex-direction: column;
  }
  .card-image {
    width: 100% !important;
    height: 180px !important;
  }
  .div-block-15 {
    transform: none !important;
    width: 100% !important;
  }

  /* Hero Section: kleinerer Text auf Mobile */
  .text-block-4 { font-size: 22px !important; line-height: 1.3 !important; }

  /* Testimonials: Text lesbar auf Mobile */
  .mf-tm-slide { padding: 12px !important; }
}

/* Tablet (480–991px) */
@media screen and (max-width: 991px) and (min-width: 480px) {
  /* grid-7._3 auf Tablet: zwei Spalten bleibt, aber mit Wrap */
  .grid-7._3 { grid-template-columns: 1fr 1fr; }

  /* Feature Cards: leicht kompakter */
  .card-image { height: 220px; }
}

/* ─── Touch-Geräte: Hover-States deaktivieren (verhindert "stuck" hover) ── */
@media (hover: none) {
  .anzahl-stepper-btn:hover {
    background: #fff;
    color: var(--orange);
  }
  .button:hover,
  .button-3:hover,
  .button-copy-3:hover {
    opacity: 1;
  }
}

/* ─── iOS Safari: Inputs ohne unerwünschte Styling-Overrides ────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  -webkit-appearance: none;
  border-radius: 0;
}
/* Aber Checkboxen sollen native bleiben */
input[type="checkbox"] {
  -webkit-appearance: checkbox;
}
/* Select-Dropdown auf iOS: explizites Pfeil-Icon via background bleibt erhalten */

/* ─── Video-Hintergrund auf Mobile: performance-schonend ────────────────── */
@media screen and (max-width: 767px) {
  .background-video-2 video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

/* ─── Weiter-Button (ersetzt weiter-button_2.svg) ───────────────────────── */
.mf-weiter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 192px;
  height: 54px;
  background-color: #fdbb64;
  color: #1d2d49;
  border: none;
  border-radius: 9px;
  font-family: Seguisb, 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.072em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.16);
  transition: background-color .15s ease, transform .1s ease;
  -webkit-font-smoothing: antialiased;
}
.mf-weiter-btn:hover  { background-color: #f5a832; }
.mf-weiter-btn:active { transform: scale(0.97); }
@media screen and (max-width: 479px) {
  .mf-weiter-btn { width: 160px; font-size: 19px; height: 48px; }
}

/* ─── Responsive: Homepage Feature-Cards kein horizontaler Overflow ─────── */
#services { overflow-x: hidden; }
@media screen and (max-width: 479px) {
  .div-block-15 {
    transform: none !important;      /* Animation deaktivieren auf Mobile */
  }
  #services.in-view .div-block-15 { transform: none !important; }
}

/* ─── Navbar Language-Switcher auf Mobile kompakter ─────────────────────── */
@media screen and (max-width: 479px) {
  .wg-element-wrapper.sw3 { gap: 4px; }
  .image-30 { width: 22px !important; }
  .div-block-5 { gap: 6px; }
}

/* ─── Registrierungs-Slider: Maske voll breit auf Mobile ─────────────────────
 * .slider-3 ist display:flex. Wenn die Pfeile (Weiter/Zurueck) auf
 * position:relative gesetzt werden (damit der Weiter-Button sichtbar bleibt),
 * werden sie zu Flex-Items in derselben Zeile wie die Maske und stehlen ihr
 * ~150px -> Maske schrumpft auf ~190px und Slide 2 landet ausserhalb des
 * Viewports. Darum den Slider vertikal stapeln und die Maske voll breit halten.
 * Der Step-Slider mit Weiter-Button bleibt erhalten. */
@media screen and (max-width: 767px) {
  .slider-3 { flex-direction: column; align-items: stretch; }
  .slider-3 .w-slider-mask { width: 100%; overflow: hidden; }

  .next.w-slider-arrow-right { position: relative; right: auto; bottom: auto; }
  .previous.w-slider-arrow-left { position: relative; left: auto; bottom: auto; }

  /* Gap unter Slide 1: Die Slides liegen auf Mobile nebeneinander (position:static)
     und der Slider verschiebt sie per translateX. Das hoehere Slide 2 blaeht die
     Maske dauerhaft auf seine Hoehe auf -> der Weiter-Button landet weit unten im
     Leeren. Loesung ohne die translateX-Geometrie zu zerstoeren: das inaktive
     (aria-hidden) Slide auf Hoehe 0 kollabieren. Dann folgt die Maske der Hoehe
     des jeweils aktiven Slides, der Weiter-Button rueckt direkt unter den Inhalt. */
  .slider-3 .w-slide[aria-hidden="true"] {
    height: 0 !important;
    overflow: hidden;
  }

  /* dekorative graue Linie ueber dem Weiter-Button auf Mobile entfernen */
  .slider-3 .line-bottom { display: none; }
}

/* ─── "jetzt testen"-Submit: gleiche (Semibold-)Font wie der Weiter-Button ───
 * Weiter nutzt "Seguisb" (Segoe UI Semibold), der Submit-Button erbt das duennere
 * "Fontsfree net segoe ui". Hier angleichen, damit beide gleich aussehen. */
.submit-button-3.w-button {
  font-family: Seguisb, sans-serif;
}

/* ─── Strapi-Preview-Karussell auf Mobile ausblenden ─────────────────────────
 * Die Feature-/Preview-Bilder aus dem CMS liegen im Splide-Karussell (.splide2)
 * in der linken Spalte (.column / w-col-7). Auf Desktop steht es neben der
 * Anmeldung, auf Mobile stapelt es darunter -> dort soll es weg. Das Formular
 * (.column-2) bleibt und nimmt die volle Breite ein. */
@media screen and (max-width: 767px) {
  .w-col-7:has(.splide2) { display: none !important; }
}

/* ─── Sektoren-Grid auf Mobile: 2,2,2 + letzte Kachel zentriert ──────────────
 * Die 7 Sektoren liegen im HTML in 3 Gruppen (.checkbox_wrap = 3 + 3 + 1). Je
 * Gruppe ein eigenes 2-Spalten-Grid ergab das ineffiziente 2-1-2-1-1. Loesung:
 * die .checkbox_wrap per display:contents aufloesen und EIN gemeinsames Grid auf
 * der Slide-1-.form-content aufspannen -> alle 7 Kacheln fliessen 2,2,2,1, die
 * letzte zentriert ueber beide Spalten. (Slide 2 = .form-content.final bleibt unberuehrt.) */
@media screen and (max-width: 479px) {
  .form-content:not(.final) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
  }
  /* Titel und "Wie viele Zugaenge" ueber volle Breite */
  .form-content:not(.final) > .form-title-wrap,
  .form-content:not(.final) > .form-wrap-full {
    grid-column: 1 / -1;
  }
  /* Gruppen-Wrapper aufloesen, damit ihre Kacheln direkte Grid-Items werden */
  .form-content:not(.final) > .checkbox_wrap {
    display: contents !important;
  }
  /* letzte einzelne Kachel ueber beide Spalten zentrieren */
  .form-content:not(.final) .checkbox_wrap._1 .form12_checkbox_field {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 5px) !important;
  }

  /* Sektor-Kacheln: volle Zellenbreite statt 30%/31%/140px-Mix.
     Sonst kollabiert die Kachel auf ~56px und das Sektor-Bild (max-width:100%)
     auf 0px Breite -> Bilder "fehlen". */
  .checkbox_wrap .checkbox-field,
  .checkbox_wrap .form12_checkbox_field {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 120px !important;
    margin: 0 !important;
    padding: 16px 8px !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Bild wieder sichtbar machen (feste Groesse, nicht schrumpfen lassen) */
  .checkbox_wrap .checkbox-image {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 auto !important;
    margin-bottom: 8px;
    object-fit: contain;
  }
}

/* ─── Landscape-Mobile: Formular scrollbar ───────────────────────────────── */
@media screen and (max-height: 500px) and (orientation: landscape) {
  body[data-page-slug="bdsv"],
  body[data-page-slug="bme24"],
  body[data-page-slug="edi"],
  body[data-page-slug="eid"],
  body[data-page-slug="nfa"],
  body[data-page-slug="oa"],
  body[data-page-slug="matflixx-testen"] {
    height: auto;
    overflow-y: auto;
  }
}

/* ─── Hero Text: SemiBold statt Regular ─────────────────────────────────── */
.text-block-4,
.text-block-4-1,
.text-block-4-copy-copy {
  font-weight: 600 !important;
}
.text-block-4 strong,
.text-block-4-1 strong,
.text-block-4-copy-copy strong {
  font-weight: 700 !important;
}

/* ─── Weiter-Button: Bold statt SemiBold ────────────────────────────────── */
.mf-weiter-btn {
  font-weight: 700;
}

/* ─── Logos Marquee-Animation ("Unsere Kunden") ──────────────────────────── */
@keyframes mf-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.slide-wrap .collection-list {
  animation: mf-marquee 30s linear infinite;
  /* Logos werden im JS gedoppelt — so entsteht nahtloser Loop */
}

.slide-wrap:hover .collection-list {
  animation-play-state: paused;
}

/* ─── Datenschutz: Abschnitts-Titel hervorheben + Lesbarkeit ─────────────────
 * Titel sind <div><strong>…</strong></div> (kein data-i18n am div), Fließtext
 * ist <div data-i18n>…</div>. Vorher: alles 14px, bold-inline, ohne Abstand ->
 * Textwand. Titel groesser/navy mit Luft davor, Absaetze mit Abstand. */
body[data-page-slug="datenschutz"] .div-block-33 > div:not([data-i18n]) {
  margin-top: 30px;
  margin-bottom: 4px;
}
body[data-page-slug="datenschutz"] .div-block-33 > div:not([data-i18n]) strong {
  display: inline-block;
  font-size: 18px;
  line-height: 1.35;
  color: var(--midnight-blue-4);
}
body[data-page-slug="datenschutz"] .div-block-33 > div[data-i18n] {
  margin-bottom: 16px;
  line-height: 1.65;
}
/* erster Absatz (Intro) direkt unter dem Seitentitel etwas Luft */
body[data-page-slug="datenschutz"] .div-block-33 > h2 { margin-bottom: 18px; }

/* ─── AGB: zu grosse Absatz-Abstaende reduzieren ─────────────────────────────
 * .paragraph-5 (Fliesstext) hatte margin-bottom:52px + padding-top:20px
 * (~72px Luecke). Enger & ruhiger setzen; nummerierte Abschnitts-Titel
 * (.paragraph-6) klar, aber kompakter absetzen. */
body[data-page-slug="agb"] .paragraph-5 {
  margin-bottom: 14px;
  padding-top: 0;
  line-height: 1.6;
}
body[data-page-slug="agb"] .paragraph-6 {
  margin-top: 26px;
  margin-bottom: 6px;
  padding-top: 0;
}
