.mhm-hero { 
  position: relative;
  overflow: hidden;
  width: 100%;
  /* Variablen (werden im PHP gesetzt) */
  --mhm-title-size: 64px;
  --mhm-subtitle-size: 22px;
  --mhm-title-color: #ffffff;
  --mhm-subtitle-color: #ffffff;
}

.mhm-hero.mhm-fullwidth {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.mhm-media-wrap,
.mhm-overlay,
.mhm-inner {
  position: absolute;
  inset: 0;
}

/* ✅ Media unter Header halten */
.mhm-media-wrap { z-index: 1; }
.mhm-overlay,
.mhm-inner { z-index: 2; }

.mhm-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mhm-overlay { pointer-events: none; }

.mhm-inner {
  display: flex;
  padding: 24px;
  /* Text darf nicht unter Header/Logo verschwinden */
  padding-top: calc(var(--mhm-header-h, 110px) + var(--mhm-adminbar-h, 0px) + 24px);
}

.mhm-box {
  width: 100%;
  margin: 0 auto;
}

.mhm-align-left .mhm-box { text-align: left; }
.mhm-align-center .mhm-box { text-align: center; }
.mhm-align-right .mhm-box { text-align: right; }

.mhm-vpos-top { align-items: flex-start; }
.mhm-vpos-center { align-items: center; }
.mhm-vpos-bottom { align-items: flex-end; padding-bottom: 48px; }

/* ✅ Responsive Typo */
.mhm-title {
  margin: 0 0 10px 0;
  line-height: 1.05;
  color: var(--mhm-title-color);
  text-shadow: 0 2px 14px rgba(0,0,0,0.35);
  font-size: clamp(30px, 7.2vw, var(--mhm-title-size));
}

/* ✅ Theme/Elementor darf NICHT die Farbe überschreiben */
body.mhm-has-hero .mhm-title{
  color: var(--mhm-title-color) !important;
}

.mhm-subtitle {
  margin: 0 0 18px 0;
  line-height: 1.35;
  color: var(--mhm-subtitle-color);
  text-shadow: 0 2px 14px rgba(0,0,0,0.35);
  font-size: clamp(16px, 4.2vw, var(--mhm-subtitle-size));
}

/* ✅ Theme/Elementor darf NICHT die Farbe überschreiben */
body.mhm-has-hero .mhm-subtitle{
  color: var(--mhm-subtitle-color) !important;
}

.mhm-cta { margin-top: 14px; }

.mhm-btn {
  display: inline-block;
  text-decoration: none !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mhm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}

/* =========================================================
   ✅ EINHEITLICH: Topbar/Logo Transparenz + Blur
   (wirkt auf Seiten mit aktivem Hero ODER globalem Menü)
   + ✅ Menü-Schriftfarbe wie Bild 2 (dunkel statt weiß)
   ========================================================= */
body.mhm-has-hero,
body.mhm-global-menu{
  /* ✅ Frostglas / "milchig" wie auf Referenzen/Angebote */
  --mhm-topbar-bg: rgba(255,255,255,0.18);
  --mhm-topbar-blur: 12px;

  /* ✅ Linkfarben im Menü (dunkel wie Bild 2) */
  --mhm-topbar-link: rgba(0,0,0,0.78);
  --mhm-topbar-link-hover: rgba(0,0,0,0.92);
  --mhm-topbar-link-active: rgba(0,0,0,0.95);
}

/* =========================================================
   ✅ GLOBAL: gleiches Scroll-Menü-Verhalten wie Plugin
   - gilt auch ohne aktivierten Hero (Startseite & Co.)
   - macht Header fixed, damit Hide-on-Scroll sauber funktioniert
   ========================================================= */

/* ✅ Standard: Abstand NUR auf reinen WP-Seiten (ohne Elementor) */
body.mhm-global-menu:not(.elementor-page):not(.mhm-has-hero):not(.mhm-has-ext-hero){
  padding-top: calc(var(--mhm-header-h, 110px) + var(--mhm-adminbar-h, 0px)) !important;
}

/* ✅ Elementor-Seiten: grundsätzlich kein Abstand (kein weißer Balken) */
body.mhm-global-menu.elementor-page{
  padding-top: 0 !important;
}

/* ✅ Falls Plugin-Hero aktiv ist, bleibt der Body ohne Abstand */
body.mhm-global-menu.mhm-has-hero{
  padding-top: 0 !important;
}

/* ------------------------------------------
   ✅ Header/Logo/Menü OBEN (Hero + Global)
   -> FIXED, damit es NIE unter Medien landet
   -> plus Hide-on-Scroll
------------------------------------------ */
body.mhm-has-hero .elementor-location-header,
body.mhm-has-hero header#masthead,
body.mhm-has-hero #masthead,
body.mhm-has-hero header.site-header,
body.mhm-has-hero .site-header,
body.mhm-has-hero #site-header,
body.mhm-has-hero header[role="banner"],
body.mhm-global-menu .elementor-location-header,
body.mhm-global-menu header#masthead,
body.mhm-global-menu #masthead,
body.mhm-global-menu header.site-header,
body.mhm-global-menu .site-header,
body.mhm-global-menu #site-header,
body.mhm-global-menu header[role="banner"]{
  position: fixed !important;
  top: var(--mhm-adminbar-h, 0px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;

  /* ✅ WICHTIG: z-index runter, sonst überdeckt es Lightbox */
  z-index: 5000 !important;

  background: var(--mhm-topbar-bg) !important;
  backdrop-filter: blur(var(--mhm-topbar-blur));
  -webkit-backdrop-filter: blur(var(--mhm-topbar-blur));

  /* ✅ Hide-on-scroll Animation */
  transform: translateY(0);
  opacity: 1;
  transition: transform 240ms ease, opacity 240ms ease;
  will-change: transform;
}

/* =========================================================
   ✅ OPTION B FIX: Startseite erzwingt oft "transparent header"
   -> hier Frostglas hart auch auf Startseite setzen
   ========================================================= */
body.home.mhm-global-menu .elementor-location-header,
body.home.mhm-global-menu header#masthead,
body.home.mhm-global-menu #masthead,
body.home.mhm-global-menu header.site-header,
body.home.mhm-global-menu .site-header,
body.home.mhm-global-menu #site-header,
body.home.mhm-global-menu header[role="banner"]{
  background: var(--mhm-topbar-bg) !important;
  backdrop-filter: blur(var(--mhm-topbar-blur)) !important;
  -webkit-backdrop-filter: blur(var(--mhm-topbar-blur)) !important;
}

/* ✅ Menü-Links (dunkel wie Bild 2) – Theme überschreibt oft auf weiß */
body.mhm-has-hero .elementor-location-header a,
body.mhm-global-menu .elementor-location-header a,
body.mhm-has-hero header#masthead a,
body.mhm-global-menu header#masthead a,
body.mhm-has-hero #masthead a,
body.mhm-global-menu #masthead a,
body.mhm-has-hero header.site-header a,
body.mhm-global-menu header.site-header a,
body.mhm-has-hero .site-header a,
body.mhm-global-menu .site-header a,
body.mhm-has-hero #site-header a,
body.mhm-global-menu #site-header a,
body.mhm-has-hero header[role="banner"] a,
body.mhm-global-menu header[role="banner"] a{
  color: var(--mhm-topbar-link) !important;
}

/* Elementor Nav Menu besonders robust */
body.mhm-has-hero .elementor-nav-menu a,
body.mhm-global-menu .elementor-nav-menu a,
body.mhm-has-hero .elementor-nav-menu--main a,
body.mhm-global-menu .elementor-nav-menu--main a{
  color: var(--mhm-topbar-link) !important;
}

body.mhm-has-hero .elementor-nav-menu a:hover,
body.mhm-global-menu .elementor-nav-menu a:hover,
body.mhm-has-hero .elementor-nav-menu--main a:hover,
body.mhm-global-menu .elementor-nav-menu--main a:hover{
  color: var(--mhm-topbar-link-hover) !important;
}

/* Aktiver Menüpunkt */
body.mhm-has-hero .elementor-nav-menu .current-menu-item > a,
body.mhm-global-menu .elementor-nav-menu .current-menu-item > a,
body.mhm-has-hero .elementor-nav-menu .current_page_item > a,
body.mhm-global-menu .elementor-nav-menu .current_page_item > a{
  color: var(--mhm-topbar-link-active) !important;
}

/* Dropdown-Pfeile / Icons (falls weiß) */
body.mhm-has-hero .elementor-nav-menu a .sub-arrow,
body.mhm-global-menu .elementor-nav-menu a .sub-arrow,
body.mhm-has-hero .elementor-nav-menu a i,
body.mhm-global-menu .elementor-nav-menu a i{
  color: var(--mhm-topbar-link) !important;
}

/* Mobile Toggle / Burger (falls weiß) */
body.mhm-has-hero .elementor-menu-toggle,
body.mhm-global-menu .elementor-menu-toggle{
  color: var(--mhm-topbar-link) !important;
}
body.mhm-has-hero .elementor-menu-toggle svg,
body.mhm-global-menu .elementor-menu-toggle svg{
  fill: var(--mhm-topbar-link) !important;
}

/* ✅ Beim Runterscrollen: Menü nach oben ausblenden */
body.mhm-has-hero.mhm-header-hidden .elementor-location-header,
body.mhm-has-hero.mhm-header-hidden header#masthead,
body.mhm-has-hero.mhm-header-hidden #masthead,
body.mhm-has-hero.mhm-header-hidden header.site-header,
body.mhm-has-hero.mhm-header-hidden .site-header,
body.mhm-has-hero.mhm-header-hidden #site-header,
body.mhm-has-hero.mhm-header-hidden header[role="banner"],
body.mhm-global-menu.mhm-header-hidden .elementor-location-header,
body.mhm-global-menu.mhm-header-hidden header#masthead,
body.mhm-global-menu.mhm-header-hidden #masthead,
body.mhm-global-menu.mhm-header-hidden header.site-header,
body.mhm-global-menu.mhm-header-hidden .site-header,
body.mhm-global-menu.mhm-header-hidden #site-header,
body.mhm-global-menu.mhm-header-hidden header[role="banner"]{
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

/* ✅ Lightbox/Modal offen: Header komplett weg, damit Bilder nie überdeckt werden */
body.mhm-modal-open .elementor-location-header,
body.mhm-modal-open header#masthead,
body.mhm-modal-open #masthead,
body.mhm-modal-open header.site-header,
body.mhm-modal-open .site-header,
body.mhm-modal-open #site-header,
body.mhm-modal-open header[role="banner"]{
  transform: translateY(-120%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ✅ Damit das Logo NICHT einen eigenen weißen Kasten mitbringt */
body.mhm-has-hero .site-branding,
body.mhm-has-hero .custom-logo-link,
body.mhm-has-hero .custom-logo-link img,
body.mhm-global-menu .site-branding,
body.mhm-global-menu .custom-logo-link,
body.mhm-global-menu .custom-logo-link img{
  background: transparent !important;
}

/* ✅ Links bleiben clean */
body.mhm-has-hero .elementor-location-header a,
body.mhm-has-hero header#masthead a,
body.mhm-has-hero #masthead a,
body.mhm-has-hero header.site-header a,
body.mhm-has-hero .site-header a,
body.mhm-has-hero #site-header a,
body.mhm-has-hero header[role="banner"] a,
body.mhm-global-menu .elementor-location-header a,
body.mhm-global-menu header#masthead a,
body.mhm-global-menu #masthead a,
body.mhm-global-menu header.site-header a,
body.mhm-global-menu .site-header a,
body.mhm-global-menu #site-header a,
body.mhm-global-menu header[role="banner"] a{
  text-decoration: none;
}

/* ✅ Logo-Block -> gleiche Transparenz wie Menüleiste (flächig) */
body.mhm-has-hero .elementor-widget-theme-site-logo .elementor-widget-container,
body.mhm-has-hero .elementor-widget-site-logo .elementor-widget-container,
body.mhm-global-menu .elementor-widget-theme-site-logo .elementor-widget-container,
body.mhm-global-menu .elementor-widget-site-logo .elementor-widget-container{
  background: var(--mhm-topbar-bg) !important;
  backdrop-filter: blur(var(--mhm-topbar-blur));
  -webkit-backdrop-filter: blur(var(--mhm-topbar-blur));
  border-radius: 0 !important;
}

/* Optional: falls ein extra Container um Logo/Navigation existiert */
body.mhm-has-hero .elementor-location-header .elementor-container,
body.mhm-has-hero .elementor-location-header .elementor-column-gap-default,
body.mhm-global-menu .elementor-location-header .elementor-container,
body.mhm-global-menu .elementor-location-header .elementor-column-gap-default{
  background: transparent !important;
}

/* Mobile: etwas weniger Padding, damit Titel nicht zu tief rutscht */
@media (max-width: 600px) {
  .mhm-inner { padding-left: 16px; padding-right: 16px; }
}
