/* =========================================================================
   Autohaus ASU – 3D-Auto-Showcase (Scroll-Effekt)
   ========================================================================= */

/* Kein seitliches Verschieben/Wackeln (clip statt hidden -> bricht Sticky NICHT) */
html, body { overflow-x: clip; max-width: 100%; }

.car3d-section {
  position: relative;
  height: 360vh;                 /* Scroll-Strecke für den Effekt */
  background: #121212;
}

/* Bühne bleibt beim Scrollen stehen */
.car3d-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Weicher roter Bodenglanz hinter dem Auto */
.car3d-stage::before {
  content: "";
  position: absolute;
  bottom: -10%;
  left: 50%;
  width: 70vw;
  height: 55vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
              rgba(233, 2, 30, 0.28) 0%,
              rgba(233, 2, 30, 0.06) 45%,
              transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

#car3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Überschrift oben mittig */
.car3d-intro {
  position: absolute;
  top: 8vh;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 3;
  pointer-events: none;
  padding: 0 1rem;
}
.car3d-intro .subtitle { color: #E9021E; }
.car3d-intro h2 { color: #fff; margin: 0; }

/* Lade-Hinweis */
.car3d-loading {
  position: absolute;
  z-index: 4;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: opacity .6s ease;
}
.car3d-loading.is-hidden { opacity: 0; visibility: hidden; }

/* ===============  Detail-Texte (Apple-Style · kein Container)  ========== */
.car3d-step {
  position: absolute;
  z-index: 3;
  width: 30vw;
  min-width: 300px;
  max-width: 460px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 26px rgba(0,0,0,0.55);
  transition: opacity .5s ease;
}
.car3d-step.is-active { opacity: 1; pointer-events: auto; }

.car3d-step .step-kicker {
  display: block;
  font-size: 13px; font-weight: 600; letter-spacing: .42em; text-transform: uppercase;
  color: #ff3346;
  margin-bottom: 22px;
}
.car3d-step .step-title {
  color: #fff; margin: 0;
  font-size: clamp(34px, 3.6vw, 54px);
  font-weight: 600; line-height: 1.03; letter-spacing: -.025em;
}
.car3d-step .step-text {
  margin: 24px 0 0;
  color: rgba(255,255,255,0.7);
  font-size: clamp(16px, 1.25vw, 20px); line-height: 1.55; font-weight: 300;
}

/* CTA – Apple-Voll-Pill, flach */
.car3d-step .step-cta {
  display: inline-block; margin-top: 32px;
  padding: 14px 30px; border-radius: 980px;
  background: #E9021E; color: #fff;
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}
.car3d-step .step-cta:hover { background: #ff1c38; color: #fff; transform: scale(1.045); }

/* Gestaffeltes Ein-/Ausschweben (fade + blur + rise) */
.car3d-step .step-kicker,
.car3d-step .step-title,
.car3d-step .step-text,
.car3d-step .step-cta {
  opacity: 0; transform: translateY(28px); filter: blur(7px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1),
              transform .9s cubic-bezier(.16,1,.3,1),
              filter .9s ease;
  will-change: opacity, transform, filter;
}
.car3d-step.is-active .step-kicker { opacity: 1; transform: none; filter: none; transition-delay: .04s; }
.car3d-step.is-active .step-title  { opacity: 1; transform: none; filter: none; transition-delay: .14s; }
.car3d-step.is-active .step-text   { opacity: 1; transform: none; filter: none; transition-delay: .30s; }
.car3d-step.is-active .step-cta    { opacity: 1; transform: none; filter: none; transition-delay: .44s; }

/* Positionen (Desktop) – Text floatet frei an den Rändern */
.car3d-step.pos-left   { left: 7vw;  top: 50%; transform: translateY(-50%); text-align: left; }
.car3d-step.pos-right  { right: 7vw; top: 47%; transform: translateY(-50%); text-align: right; }
.car3d-step.pos-bottom { left: 50%; bottom: 9vh; transform: translateX(-50%); text-align: center; }

/* Scroll-Hinweis */
.car3d-hint {
  position: absolute;
  bottom: 4vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  animation: car3dBob 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes car3dBob { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* Mobil: Text zentriert, an sichtbarer Viewport-Höhe ausgerichtet */
@media (max-width: 991px) {
  .car3d-section { height: 300vh; }

  /* svh = sichtbare Höhe OHNE Browser-URL-Leiste -> nichts wird verdeckt */
  .car3d-stage { height: 100svh; }

  /* Scroll-Hinweis mobil weg (überlappte den Kartentext) */
  .car3d-hint { display: none !important; }

  /* Intro-Text mobil NICHT zentriert -> linksbündig, volle Breite */
  .car3d-intro { text-align: left; padding: 0 6vw; }
  .car3d-intro h2 { font-size: 7.5vw; line-height: 1.12; }

  .car3d-step {
    left: 50% !important; right: auto !important;
    top: auto !important; bottom: 7svh !important;
    width: 86vw !important; max-width: none;
    transform: translateX(-50%) !important;
    text-align: center !important;
  }
  .car3d-step .step-kicker { margin-bottom: 12px; }
  .car3d-step .step-text { margin: 16px auto 0; max-width: 32ch; }
  .car3d-step .step-title { font-size: clamp(28px, 7.5vw, 38px); }
  .car3d-step .step-cta { margin-top: 22px; }
}


/* =====================  Aktuelle Fahrzeuge (mobile.de-Teaser)  ========== */
/* großzügige Seitenränder für die volle Breite */
#vehicles > .container-fluid { padding-left: clamp(20px, 6vw, 110px); padding-right: clamp(20px, 6vw, 110px); }

#vehicles .vehicles-head { margin-bottom: 56px; }

#vehicles .vehicles-lead {
  margin: 0 0 28px;
  color: rgba(255,255,255,0.66);
  font-size: clamp(16px, 1.25vw, 19px); line-height: 1.65; font-weight: 300;
}

/* Fahrzeugtyp-Kacheln über die ganze Breite (6 in einer Reihe) */
#vehicles .type-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
  margin: 0;
}
#vehicles .type-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 16px 26px; border-radius: 16px; text-decoration: none;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .3s ease, border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
#vehicles .type-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(233,2,30,0.55);
  background: linear-gradient(160deg, rgba(233,2,30,0.16), rgba(255,255,255,0.02));
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
}
#vehicles .type-ico {
  height: 52px; display: flex; align-items: center; justify-content: center;
}
#vehicles .type-ico img {
  width: 104px; height: auto; max-height: 52px; object-fit: contain;
  opacity: .5; transition: opacity .3s ease, transform .3s ease;
}
#vehicles .type-tile:hover .type-ico img { opacity: 1; transform: scale(1.07); }
#vehicles .type-name {
  margin-top: 16px; color: #fff; font-size: 16px; font-weight: 600; letter-spacing: .01em;
}

/* CTA-Button zu mobile.de – Apple-Voll-Pill */
.mobile-cta {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 16px 36px; border-radius: 980px;
  background: #E9021E; color: #fff;
  font-size: 16px; font-weight: 600; text-decoration: none;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.mobile-cta:hover {
  background: #ff1c38; color: #fff; transform: scale(1.04);
  box-shadow: 0 14px 34px rgba(233,2,30,0.4);
}
.mobile-cta i { transition: transform .25s ease; }
.mobile-cta:hover i { transform: translateX(5px); }
.mobile-cta-note {
  margin-top: 16px; font-size: 13px; letter-spacing: .04em;
  color: rgba(255,255,255,0.45);
}

@media (max-width: 991px) {
  #vehicles .vehicles-head { margin-bottom: 36px; }
  #vehicles .type-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  #vehicles .type-grid { gap: 12px; }
  #vehicles .type-tile { padding: 24px 12px 20px; }
  #vehicles .type-ico img { width: 86px; }
  #vehicles .type-name { font-size: 15px; }
}
@media (max-width: 575px) {
  #vehicles .type-grid { grid-template-columns: repeat(2, 1fr); }
}


/* =====================  Marken-Laufband (Marquee, helles Band)  ========= */
section.brand-section {
  padding: 50px 0;
  background: #141414;          /* dezent abgesetztes dunkles Band */
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-section .subtitle { margin-bottom: 30px; }

.brand-marquee {
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;          /* vertikal NICHT abschneiden (Hover-Zoom) */
  padding: 14px 0;              /* Luft, damit nichts oben/unten abschneidet */
  /* weiche Ränder links/rechts */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.brand-track {
  display: flex;
  width: max-content;
  animation: brandScroll 60s linear infinite;
}
.brand-marquee:hover .brand-track { animation-play-state: paused; }

.brand-group {
  display: flex;
  align-items: center;
  gap: 70px;
  padding-right: 70px;     /* sorgt für nahtlosen Loop bei -50% */
}
.brand-item {
  display: flex; align-items: center; justify-content: center;
  height: 52px;            /* feste Höhe = gleichmäßige optische Größe */
  flex: 0 0 auto;
}
.brand-item img {
  max-height: 42px; width: auto; max-width: 150px; object-fit: contain;
  display: block;
  transition: transform .3s ease, filter .3s ease;
}
.brand-item:hover img { transform: scale(1.1); }

@keyframes brandScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 767px) {
  .brand-section { padding: 34px 0; }
  .brand-group { gap: 46px; padding-right: 46px; }
  .brand-item { height: 42px; }
  .brand-item img { max-height: 32px; max-width: 110px; }
  .brand-track { animation-duration: 42s; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-track { animation: none; }
}


/* =====================  Hero – Mobile schöner verteilen  =============== */
@media (max-width: 991px) {
  /* Hero etwas kompakter (weniger leerer Bildraum oben/unten) */
  .hero-section .mh-800 { min-height: 78vh; }

  /* Inhalt von OBEN beginnen lassen (Untertitel weiter oben) */
  .hero-section .abs.bottom-0 { top: 0; bottom: auto; padding-top: 52px; padding-bottom: 32px; }

  /* Untertitel oben: kleiner + näher am Rand */
  .hero-section .sw-text-wrapper .subtitle {
    font-size: 11px; letter-spacing: .2em; margin-bottom: 16px;
  }

  /* Headline angenehm groß + dezente Trennlinie darüber */
  .hero-section h1.fs-xs-10vw {
    font-size: 10vw; line-height: 1.08; margin: 0;
    padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.16);
  }

  /* leerer Abstand zwischen Headline und Button */
  .hero-section .sw-text-wrapper .spacer-20 { height: 40px; }

  /* Beschreibungstext klar unter dem Button – etwas größer (nicht so leer) */
  .hero-section .col-lg-3 { margin-top: 30px; }
  .hero-section .col-lg-3 .spacer-double { display: none; }
  .hero-section .col-lg-3 p { font-size: 17px; line-height: 1.6; }

  /* Bild formatfüllend über den ganzen Hero */
  .hero-section .swiper-inner {
    background-size: cover !important;
    background-position: center !important;
  }
}

/* =========================================================
   "Warum ASU?" – Apple-Style (linksbündig, volle Breite,
   keine Boxen; dezente Nummer + feine Hairline statt Karten)
========================================================= */
.why-section { padding-top: 110px; padding-bottom: 110px; }
.why-head { max-width: 760px; margin-bottom: 64px; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 56px 48px;
}
.why-item {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.why-num {
  display: block;
  font-family: 'Oxanium', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--primary-color);
  margin-bottom: 16px;
}
.why-item h4 { font-size: 21px; margin-bottom: 10px; color: #fff; }
.why-item p { margin-bottom: 0; color: rgba(255, 255, 255, .62); line-height: 1.7; }

@media (max-width: 1200px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 40px; }
}
@media (max-width: 575px) {
  .why-section { padding-top: 80px; padding-bottom: 80px; }
  .why-grid { grid-template-columns: 1fr; gap: 38px; }
  .why-head { margin-bottom: 44px; }
}

/* =========================================================
   MOBIL: einheitliche Seitenabstände aller Sektionen (20px)
========================================================= */
@media (max-width: 991px) {
  #content > section > .container,
  #content > section > .container-fluid {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  /* "Auto kaufen/verkaufen": Hintergrundbilder randlos lassen –
     der Text hat sein eigenes Innenpadding (.p-40), nur der BG soll voll bleiben */
  #content > section.pt-0 > .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Text-Innenabstand links/rechts an die übrigen Sektionen angleichen (20px) */
  #content > section.pt-0 .p-40 {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* =========================================================
   Hero – "direkt zu den Autos" (nur mobil)
========================================================= */
.hero-mobile-cta { display: none; }
@media (max-width: 991px) {
  .hero-mobile-cta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 32px;
    padding: 11px 18px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 980px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background .18s ease;
  }
  .hero-mobile-cta span { color: #fff; font-size: 13.5px; font-weight: 600; }
  .hero-mobile-cta img { height: 16px; width: auto; display: block; }
  .hero-mobile-cta:active { background: rgba(255, 255, 255, .15); }
}

/* =========================================================
   Floating Kontakt-Widget (nur mobil)
========================================================= */
.asu-fab { display: none; }
@media (max-width: 991px) {
  .asu-fab {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1600;
  }
  .asu-fab-options {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
  }
  .asu-fab.open .asu-fab-options { opacity: 1; visibility: visible; }

  .asu-fab-opt {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 8px 9px 8px 17px;
    border-radius: 980px;
    background: #1d1f24;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
    text-decoration: none;
    transform: translateY(10px) scale(.95);
    opacity: 0;
    transition: transform .32s cubic-bezier(.16, 1, .3, 1), opacity .25s ease;
  }
  .asu-fab.open .asu-fab-opt { transform: translateY(0) scale(1); opacity: 1; }
  .asu-fab.open .opt-wa     { transition-delay: .02s; }
  .asu-fab.open .opt-call   { transition-delay: .07s; }
  .asu-fab.open .opt-mobile { transition-delay: .12s; }

  .asu-fab-opt .opt-label { color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }
  .asu-fab-opt .opt-ico {
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; flex-shrink: 0;
  }
  .opt-wa   .opt-ico { background: #25D366; }
  .opt-call .opt-ico { background: var(--primary-color); }

  /* mobile.de-Option: weiße Pille nur mit Original-Logo */
  .opt-mobile {
    background: #fff;
    border-color: #fff;
    padding: 11px 18px;
  }
  .opt-mobile img { height: 20px; width: auto; display: block; }

  .asu-fab-toggle {
    width: 58px; height: 58px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 24px rgba(233, 2, 30, .45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform .18s ease;
  }
  .asu-fab-toggle i { font-size: 26px; line-height: 1; }
  .asu-fab-toggle:active { transform: scale(.92); }
  .asu-fab-toggle .asu-fab-ico-close { display: none; }
  .asu-fab.open .asu-fab-toggle .asu-fab-ico-open { display: none; }
  .asu-fab.open .asu-fab-toggle .asu-fab-ico-close { display: inline-flex; }

  /* "Nach oben"-Pfeil nicht mit dem Widget überlappen */
  #back-to-top { bottom: 86px !important; right: 22px !important; }
}

/* Widget ausblenden, solange das mobile Menü offen ist */
body.mobile-menu-open .asu-fab { display: none !important; }
