/* Bestehender HFE-Kopf bleibt beim Scrollen auf allen Seiten erreichbar. */
#masthead {
    position: sticky !important;
    top: 0;
    z-index: 8900;
    background: #fff;
    border-bottom: 2px solid #0870b0;
    box-shadow: 0 5px 18px #152a5014;
}
body.admin-bar #masthead { top: 32px; }
html { scroll-padding-top: 115px; }
@media (max-width: 782px) {
    body.admin-bar #masthead { top: 46px; }
}
@media (max-width: 600px) {
    /* Die WordPress-Adminleiste scrollt auf schmalen Geräten aus dem Bild. */
    body.admin-bar #masthead { top: 0; }
}

/* Kompakter mobiler Kopf: Logo und Suche statt eines hohen Desktop-Banners. */
@media (max-width: 1024px) {
    #masthead { height: 62px; min-height: 0; box-sizing: border-box; }
    #masthead .elementor-top-section { padding: 4px 16px !important; min-height: 0 !important; }
    #masthead .elementor-container { height: 52px; min-height: 0 !important; align-items: center; }
    #masthead .elementor-widget-wrap { padding: 0 !important; align-content: center; }
    #masthead .elementor-widget-site-logo { margin: 0; }
    #masthead .hfe-site-logo img {
        width: auto !important;
        height: 44px !important;
        max-width: 130px !important;
        max-height: 44px !important;
        object-fit: contain;
    }
    html { scroll-padding-top: 72px; }
}
