/**
 * Rengy Automation AG – custom.css
 * Theme: child_classic | CE: v2.13
 * Modul: rengy_megamenu_pro
 * Version: v2.7.37 – Weg C: Nativer CE-Hamburger
 *
 * SYNCHRONISATION MIT BO-EINSTELLUNGEN:
 * -------------------------------------
 * Drawer Breite ? wird automatisch via CSS-Variable --rmm-drawer-width übernommen
 * Breakpoint    ? MUSS manuell synchron gehalten werden:
 *                 BO ? rengy_megamenu_pro ? Mobile Einstellungen ? Breakpoint (PX)
 *                 Aktuell: 991px ? überall im CSS als @media (max-width: 991px)
 */

/* -----------------------------------------------
   1. HEADER LAYOUT – Desktop
   ----------------------------------------------- */
.rmm-header-nav-row {
  display: block;
}

/* Desktop: NUR Spalte 3 Widgets inline – NICHT Nav-Row */
.rmm-header-main-row .elementor-column:last-child .elementor-widget-wrap > .elementor-widget {
  display: inline-flex !important;
  width: auto !important;
  flex: 0 0 auto !important;
}

/* -----------------------------------------------
   2. ORIGINAL HAMBURGER – verstecken
   ----------------------------------------------- */
button.rengy-hamburger,
button.rengy-hamburger--ce-hidden {
  display: none !important;
}

/* -----------------------------------------------
   3. CE-HAMBURGER BUTTON
   ----------------------------------------------- */
.rengy-hamburger-ce {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 6px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.rengy-hamburger-ce > span {
  display: block !important;
  width: 22px !important;
  height: 2px !important;
  background: #ffffff !important;
  border-radius: 2px !important;
  transition: all 0.3s ease !important;
  opacity: 1 !important;
  transform: none;
  font-style: normal !important;
}

.rengy-hamburger-ce.is-open > span:nth-child(1) {
  transform: translateY(7px) rotate(45deg) !important;
}
.rengy-hamburger-ce.is-open > span:nth-child(2) {
  opacity: 0 !important;
  transform: scaleX(0) !important;
}
.rengy-hamburger-ce.is-open > span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg) !important;
}

/* -----------------------------------------------
   4. MOBIL/TABLET BREAKPOINT
   WICHTIG: Muss mit BO-Einstellung übereinstimmen!
   BO ? rengy_megamenu_pro ? Mobile Einstellungen ? Breakpoint (PX)
   Aktuell: 991px
   ----------------------------------------------- */
@media (max-width: 991px) {
  /* Nav-Row ausblenden */
  .rmm-header-nav-row {
    display: none !important;
  }

  /* CE-Hamburger einblenden */
  .rengy-hamburger-ce {
    display: flex;
  }

  /* Kein Umbruch in Spalte 3 */
  .rmm-header-main-row .elementor-widget-wrap {
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  /* Widgets in Spalte 3 horizontal inline */
  .rmm-header-main-row .elementor-column:last-child .elementor-widget-wrap > .elementor-widget {
    display: inline-flex !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }
}

/* -----------------------------------------------
   5. BREADCRUMB
   WICHTIG: Breakpoint muss mit Sektion 4 übereinstimmen
   ----------------------------------------------- */
@media (max-width: 991px) {
  .rmm-header-breadcrumb-row .breadcrumb {
    color: inherit;
  }
}

/* ============================================
   RENGY MOBILE DRAWER – POSITION FIX
   
   HINWEIS: transform, display und is-open werden
   vollständig durch megamenu.css + megamenu.js
   gesteuert – hier NICHT überschreiben!
   
   Drawer Breite ? via CSS-Variable --rmm-drawer-width
   Breakpoint    ? 991px (siehe Sektion 4)
   ============================================ */
@media (max-width: 991px) {
  .rengy-mobile-drawer {
    /* position:fixed und z-index sicherstellen */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
    /* Breite aus BO via CSS-Variable */
    width: min(var(--rmm-drawer-width, 320px), 85vw) !important;
    height: 100vh !important;
    /* KEIN transform:none – megamenu.js steuert das! */
    /* KEIN display override – megamenu.css steuert das! */
  }

  /* Inhalt-Elemente korrekt dimensionieren */
  .rengy-mobile-drawer__header,
  .rengy-mobile-drawer__content {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}