/* =========================================================
   MOBILE.CSS – STABIL & SICHTBAR
   Ziel:
   - Logo immer vollständig sichtbar & mittig
   - Burger immer sichtbar rechts
   - Overlay rein visuell, keine Layout-Effekte
========================================================= */

@media (max-width: 768px) {
  /* ORIGINAL HEADER OVERLAY KOMPLETT DEAKTIVIEREN */
  .site-header-home .header-overlay,
  .site-header-inner .header-overlay {
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    height: 0 !important;
    border: none !important;
  }
  /* =======================================================
     BASIS / RESET
  ======================================================= */

  .menu-toggle {
    display: none !important;
  }

  .wp-block-navigation__responsive-container-open {
    margin: 0 !important;
    padding: 0 !important;
  }


  /* =======================================================
     HEADER – KLARER CONTAINER
  ======================================================= */

  .site-header-home,
  .site-header-inner {
    position: relative;
    height: 140px;
    overflow: visible;
      margin-bottom: 0 !important;
  }

  .site-header-home .header-bg,
  .site-header-inner .header-bg {
    height: 140px;
    background-position: center top;
     position: relative;
  }


  /* =======================================================
     CONTENT
  ======================================================= */
  /* ================================
     CONTENT-START KORREKT POSITIONIEREN
     (überschreibt WP Inline-Styles)
  ================================= */

  main.wp-block-group {
    margin-top: 0 !important;
    padding-top: -1.5rem;
  }

  main.wp-block-group > .wp-block-group:first-child {
    padding-top: 0rem !important;
  }

    /* WP GLOBAL SPACING AUF MOBILE REDUZIEREN */
  :root {
    --wp--preset--spacing--60: 1.75rem;
  }

/* =======================================================
   OVERLAY – SAUBERES MILCHGLAS (WIE REFERENZ)
======================================================= */

  /* EINHEITLICHES OVERLAY – EINFACHE TRANSPARENZ */
  .site-header-home::after,
  .site-header-inner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 78px;
    background: rgba(255,255,255,0.85); /* ruhig & sauber */
    border-bottom: 1px solid rgba(0,0,0,0.05);

    pointer-events: none;
    z-index: 1;
  }

  /* =======================================================
     HEADER-INNER – GRID, NICHT ABSOLUTE
  ======================================================= */

  .site-header-home .header-inner,
  .site-header-inner .header-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 44px auto 44px; /* links Platzhalter | Logo | Burger */
    align-items: center;
    height: 78px;
    padding: 0 1rem;
  }
  .site-header-home .header-inner::before,
  .site-header-inner .header-inner::before {
    content: "";
    width: 44px;
    height: 1px;
  }


  /* =======================================================
     LOGO – IM GRID, NICHT FREISCHWEBEND
  ======================================================= */

  .site-header-home .logo-box,
  .site-header-inner .logo-box {
  grid-column: 2;
  justify-self: center;
    transform: scale(0.55);
    margin: 0 !important;
    padding: 0 !important;
    z-index: 4;
  }
   .site-header-inner .logo-box {
    transform: translateY(-140px) scale(0.55);
  }

  /* Sticky bleibt sauber */
  .site-header-inner.is-mini-sticky .logo-box {
    transform: scale(0.45);
  }


  /* =======================================================
     BURGER – RECHTS, IM GRID
  ======================================================= */

  .site-header-home .wp-block-navigation__responsive-container-open,
  .site-header-inner .wp-block-navigation__responsive-container-open {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    position: relative !important;
    z-index: 3;
  }


  /* =======================================================
     MINI STICKY – RUHIG & SICHTBAR
  ======================================================= */

  .site-header-home.is-mini-sticky,
  .site-header-inner.is-mini-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff8eb;
    z-index: 9999;
  }

  .is-mini-sticky .header-bg,
  .is-mini-sticky .header-claim {
    display: none !important;
  }

  .is-mini-sticky .header-overlay {
    height: 100%;
    background: rgba(255, 255, 255, 0.90); /* ruhiger, kaum Foto-Durchscheinen */
    backdrop-filter: blur(6px) saturate(1.05);
    -webkit-backdrop-filter: blur(6px) saturate(1.05);
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .is-mini-sticky .header-inner {
    height: 64px;
  }

  .is-mini-sticky .logo-box {
    transform: scale(0.45);
  }

  body.has-mini-sticky main {
    padding-top: 64px;
  }

  .site-header-home.is-mini-sticky::after,
  .site-header-inner.is-mini-sticky::after {
    height: 100%;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px) saturate(1.05);
    -webkit-backdrop-filter: blur(6px) saturate(1.05);
  }
  /* =======================================================
     NAVIGATION OVERLAY – FULLSCREEN
  ======================================================= */

  .wp-block-navigation__responsive-container {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    z-index: 100000 !important;
  }
/* NAVIGATION: geschlossen = keine Klicks blockieren */
.wp-block-navigation__responsive-container {
  pointer-events: none;
}
/* NAVIGATION: offen = klickbar */
.wp-block-navigation__responsive-container.is-menu-open {
  pointer-events: auto;
}
.wp-block-navigation__responsive-container-open {
  pointer-events: auto !important;
  cursor: pointer;
}
  /* =========================================
     GUTENBERG LAYOUT-ENGINE BÄNDIGEN (MOBILE)
  ========================================= */

  /* Entfernt automatisches Block-Gap nach Header */
  main.wp-block-group.is-layout-constrained > *:first-child {
    margin-top: 0 !important;
  }

  /* Entfernt zusätzliches Padding der ersten Group */
  main.wp-block-group > .wp-block-group:first-child {
    padding-top: 0 !important;
  }
  /* INLINE-MARGIN VON <main> ENTFERNEN */
  main.wp-block-group[style] {
    margin-top: 0 !important;
  }

  /* INLINE-PADDING DES ERSTEN WRAPPERS ENTFERNEN */
  main.wp-block-group > .wp-block-group[style] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
   .site-header-home,
  .site-header-inner {
    margin-bottom: 0 !important;
  }
    main.wp-block-group {
    padding-top: 1rem;
  }
}

