/* ==========================================================================
   A&L SERVICE & TECHNOLOGY — RESPONSIVE
   responsive.css
   Mobile First hat höchste Priorität. Klare Breakpoints, saubere Umbrüche,
   keine Überlappungen, kein horizontales Scrollen.
   Breakpoints:
     1200px  großes Tablet / kleiner Desktop
     1024px  Desktop-Nav -> Burger/Drawer
      760px  Tablet -> einspaltig
      520px  kleines Smartphone
   ========================================================================== */

/* --------------------------------------------------------------------------
   <= 1200px  — engere Container, Mega-Menü etwas kompakter
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .nav__link { padding-inline: 0.8rem; font-size: 0.88rem; }
  .mega__inner { grid-template-columns: 1fr 1fr 1fr; }
  .mega__promo { grid-column: span 3; flex-direction: row; align-items: center; gap: 2rem; }
  .mega__promo p { margin-bottom: 0; }
  .hero__stat-num { font-size: clamp(1.5rem, 4vw, 2.2rem); }
}

/* --------------------------------------------------------------------------
   <= 1024px  — Umschalten auf mobile Navigation
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .primary-nav { display: none; }
  .header-actions .lang-switch,
  .header-actions .header-actions__divider,
  .header-actions .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }

  /* Grids etwas reduzieren */
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: var(--rule); }

  .hero__stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__stat:nth-child(3) { border-left: 0; }
  .hero__stat:nth-child(1), .hero__stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,0.14); }
  .hero__stat { padding-block: 1.1rem; }
}

/* --------------------------------------------------------------------------
   <= 900px  — Split-Layouts einspaltig, Sektionsköpfe stapeln
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split__media { order: -1; }          /* Bild zuerst */
  .split--media-first .split__media { order: -1; }
  .split--body-first .split__body { order: -1; }
  .split--body-first .split__media { order: 0; }

  .section-head--split { flex-direction: column; align-items: flex-start; }

  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .footer-cta__inner { flex-direction: column; align-items: flex-start; }

  .media-framed::after { display: none; }

  .mega__promo { flex-direction: column; align-items: flex-start; }

  /* USP-Leiste: zwei Spalten */
  .usp-strip__grid { grid-template-columns: repeat(2, 1fr); }
  .usp:nth-child(2) { border-right: 0; }
  .usp:nth-child(1), .usp:nth-child(2) { border-bottom: 1px solid var(--c-border); }

  /* Kennzahlen-Block: zwei Spalten */
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure:nth-child(2) { border-right: 0; }
  .figure:nth-child(1), .figure:nth-child(2) {
    border-bottom: 1px solid rgba(255,255,255,0.22);
    padding-bottom: 1.75rem;
  }
}

/* --------------------------------------------------------------------------
   <= 760px  — Tablet -> einspaltig, kompaktere Typo
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  :root {
    --header-h: 72px;
    --header-h-scroll: 60px;
  }

  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }

  .col-span-4, .col-span-5, .col-span-6,
  .col-span-7, .col-span-8 { grid-column: 1 / -1; }

  .footer-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom__inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0 !important; border-bottom: var(--rule); }
  .stat:last-child { border-bottom: 0; }

  .hero { min-height: auto; padding-bottom: 2.5rem; }
  .hero__stats-grid { grid-template-columns: 1fr 1fr; }

  /* Branchen-Karten flacher & Text dauerhaft sichtbar (kein Hover auf Touch) */
  .industry-card { aspect-ratio: 16 / 10; }
  .industry-card__text { max-height: 6rem; opacity: 1; }

  .list-card { grid-template-columns: 1fr; gap: 1rem; }
  .list-card__cta { justify-self: start; }

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

  /* Balken über dem Header (Topbar) auf Mobil komplett entfernen.
     Die 24/7-Notfall-Hotline wandert in den Header-Button + das Menü. */
  .topbar { display: none; }
  .site-header { top: 0; }
  .header-spacer { height: var(--header-h); }
  .hero, .pagehead { padding-top: calc(var(--header-h) + 1.75rem); }

  /* 24/7-Hotline-Button im Header sichtbar (klar beschriftet) */
  .header-actions .header-cta--phone { display: inline-flex; }

  .breadcrumb { display: none; }

  .step-list li { padding-left: 3.5rem; }
}

/* --------------------------------------------------------------------------
   <= 520px  — kleine Smartphones
   -------------------------------------------------------------------------- */
@media (max-width: 520px) {
  :root { --gutter: 1.15rem; }

  .hero__stats-grid { grid-template-columns: 1fr; }
  .hero__stat { border-left: 0 !important; border-bottom: 1px solid rgba(255,255,255,0.14); padding-block: 0.9rem; }
  .hero__stat:last-child { border-bottom: 0; }

  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .cta-band__actions,
  .footer-cta__inner .btn,
  .hero__actions .btn { width: 100%; }
  .cta-band__actions { flex-direction: column; align-items: stretch; width: 100%; }

  .btn { width: 100%; }
  .header-actions .btn { width: auto; }

  .display { font-size: clamp(2.1rem, 7vw, 2.8rem); }

  .trustbar__inner { gap: 1.25rem 2rem; }

  .lang-switch__menu { right: auto; left: 0; }

  /* USP-Leiste & Kennzahlen: eine Spalte */
  .usp-strip__grid { grid-template-columns: 1fr; }
  .usp { border-right: 0; border-bottom: 1px solid var(--c-border); }
  .usp:last-child { border-bottom: 0; }

  .figures { grid-template-columns: 1fr; }
  .figure { border-right: 0 !important; border-bottom: 1px solid rgba(255,255,255,0.22); padding-bottom: 1.5rem; }
  .figure:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Mobile-Drawer nur unterhalb Desktop-Nav aktiv halten
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  .mobile-drawer { display: none; }
}

/* --------------------------------------------------------------------------
   Sehr breite Screens — Container-Breite begrenzen, Ruhe bewahren
   -------------------------------------------------------------------------- */
@media (min-width: 1600px) {
  .hero { min-height: min(84vh, 880px); }
}

/* --------------------------------------------------------------------------
   Druck
   -------------------------------------------------------------------------- */
@media print {
  .topbar, .site-header, .mobile-drawer, .overlay, .to-top,
  .site-footer .footer-cta, .cta-band, .nav-toggle { display: none !important; }
  body { color: #000; }
  .hero, .pagehead { background: #fff; color: #000; padding-top: 2rem; }
  * { box-shadow: none !important; }
}
