.page-content {
  padding-top: 90px;
  -webkit-transition: padding .3s ease-in-out;
  transition: padding .3s ease-in-out;
}

.main-header {
  position: fixed;
  z-index: 9999;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  min-height: unset !important; /* Verhindert, dass Elementor eine Mindesthöhe erzwingt */
  -webkit-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out;
}

/* --- FIX FÜR SAFARI: Container im Normalzustand --- */
.hfe-site-logo-container {
  width: 90px !important; /* Identisch mit der normalen Bildbreite */
  -webkit-transition: width .3s ease-in-out;
  transition: width .3s ease-in-out;
  /* Hardware-Beschleunigung gegen Ruckeln */
  -webkit-transform: translateZ(0);
  transform: translateZ(0); 
}

.header-logo img {
  width: 90px !important;
  height: auto !important;
  -webkit-transition: width .3s ease-in-out;
  transition: width .3s ease-in-out;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  box-shadow: 0 2px 5px 2px rgba(0, 0, 0, .075);
}

.main-header.is-sticky + .page-content,
.main-header.is-sticky ~ .page-content {
  padding-top: 70px;
}

/* --- Hier schrumpfen jetzt Bild UND Container gleichzeitig seidenweich --- */
.main-header.is-sticky .header-logo img,
.main-header.is-sticky .hfe-site-logo-container {
  width: 70px !important;
} 

.main-header.is-sticky .menu-item.menu-item-has-children ul.sub-menu {
  margin-top: 8px !important;
}


@media (max-width: 767px) {
  .main-header.is-sticky .menu-item.menu-item-has-children ul.sub-menu{
    margin-top: 0 !important;
  }
  
  /* Mobil-Fix für den Container, damit dort nichts springt */
  .hfe-site-logo-container {
    width: 70px !important;
  }
  
  .header-logo{
    z-index: 99999;
    height: auto;
  }
  .header-logo .elementor-widget-container {
    -webkit-transform: translateY(10px);
    transform: translateY(10px);
  }

  /* Auf Mobile bleibt das Logo durchgehend bei 70px */
  .header-logo img,
  .main-header.is-sticky .header-logo img {
    width: 70px !important;
  }

  nav {
    position: relative;
  }
  
  nav::after {
        position: absolute;
        z-index: -1;
        top: -15px;
        left: 0;
        width: 100%;
        height: 15px;
        content: '';
        background-color: white;
  }
}