/* ----------------------------------------
   MOBILE HEADER BASIS
----------------------------------------- */

/* Standard: Header auf nicht-mobilen Viewports ausblenden.
   Markup ist da, aber unsichtbar → Cache-freundlich. */
#mobileHeader {
    display: none;

    align-items: center;
    justify-content: center;

    width: 100vw;
    height: 60px;
    min-height: 60px;

    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    font-family: system-ui, sans-serif;

    /* transform NICHT animieren → CLS vermeiden */
    transition: box-shadow 200ms ease;
}

/* nach oben ausblenden */
#mobileHeader.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

/* sichtbar */
#mobileHeader.header-revealed {
    transform: translateY(0);
}

/* Schatten sobald man scrollt */
#mobileHeader.header-scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* wenn Menü offen */
#mobileHeader.menu-open {
    transform: translateY(0) !important;
}

/* Motion friendly */
@media (prefers-reduced-motion: reduce) {
    #mobileHeader {
        transition: none;
    }
}

/* ----------------------------------------
   MOBILE ONLY
----------------------------------------- */

@media (max-width: 768px) {

    /* Content beginnt UNTER dem Header (+10px extra Abstand) */
    body {
        padding-top: 70px !important;
        margin-top: 0 !important;
    }

    html {
        scroll-padding-top: 70px !important;
    }

    body>*:first-child {
        margin-top: 70px !important;
    }

    /* Nur auf Mobile anzeigen */
    #mobileHeader {
        display: flex !important;
    }
}

/* Header layout */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 20px;
    line-height: 1;
}

.logo-link {
    display: flex;
    align-items: center;
}

/* Logo Reset */
#mobileHeader img {
    max-width: none !important;
    max-height: none !important;
    vertical-align: middle;
    image-rendering: auto;
}

/* Logo sizing */
#mobileHeader .logo-link img.left-image {
    width: 192px !important;
    height: 60px !important;
    display: block;
    object-fit: contain;
    aspect-ratio: 192 / 60;
}

/* ----------------------------------------
   BURGER ICON
----------------------------------------- */

.burger-icon {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    user-select: none;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.burger-icon::before {
    content: "\2630";
    /* ☰ */
}

.burger-icon[aria-expanded="true"]::before {
    content: "\00D7";
    /* × */
}

/* ----------------------------------------
   DROPDOWN MENU
----------------------------------------- */

#dropdownMenu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #fff;
    text-align: center;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.3s ease-out;
}

/* geöffnet */
#dropdownMenu.show {
    display: block;
    max-height: 500px;
    padding: 30px 0 30px;
}

/* hidden support */
#dropdownMenu[hidden] {
    display: none !important;
    max-height: 0 !important;
    padding: 0 !important;
}

/* Menülinks */
#dropdownMenu h3 a {
    display: block;
    padding: 12px 0;
    font-size: 1.44rem;
    font-weight: 600;
    color: #0F71D1 !important;
    text-decoration: none;
}

#dropdownMenu h3 a:hover,
#dropdownMenu h3 a:focus {
    color: #0F71D1 !important;
}

/* Abstand zwischen Menüblöcken */
#dropdownMenu div[style] {
    pointer-events: none;
}

/* ----------------------------------------
   THEME NAVIGATION AUSBLENDEN (nur Mobile)
----------------------------------------- */

@media (max-width: 768px) {

    .main-navigation,
    .menu-toggle,
    .mobile-menu,
    .ast-mobile-header,
    .header-toggle,
    .site-header .menu,
    .navbar-toggle,
    .custom-mobile-nav {
        display: none !important;
    }
}