/* Honsel: Werte hier zentral ändern. CSS gilt ausschließlich für diese Templates. */
body.honsel-fullpage {
    --honsel-blue: #006cb9;
    --honsel-orange: #ee7202;
    --honsel-header-width: 1180px;
    --honsel-bar-height: 88px;
    --honsel-admin-offset: 0px;
    --honsel-nav-font: Arial, sans-serif;
    margin: 0;
    padding: 0;
}
body.honsel-fullpage.admin-bar { --honsel-admin-offset: 32px; }
.honsel-fullpage .honsel-header,
.honsel-fullpage .honsel-header * { box-sizing: border-box; }
.honsel-fullpage .honsel-main { margin: 0; padding: 0; width: 100%; outline: none; }
.honsel-fullpage .honsel-header {
    position: fixed;
    z-index: 99990;
    inset: var(--honsel-admin-offset) 0 auto;
    height: 230px;
    color: var(--honsel-blue);
    font-family: var(--honsel-nav-font);
    background: transparent;
    transition: height .3s ease, background-color .3s ease;
    pointer-events: none;
}
.honsel-header .honsel-header-inner {
    width: min(var(--honsel-header-width), calc(100% - 64px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}
.honsel-header .honsel-brand {
    position: relative;
    display: block;
    flex: 0 1 470px; min-width: 360px;
    padding-top: 45px;
    color: var(--honsel-blue);
    text-decoration: none;
    pointer-events: auto;
}
.honsel-header .honsel-brand img { display: block; object-fit: contain; max-width: 100%; }
.honsel-header .honsel-logo-hero { width: 460px; height: 165px; object-position: left center; }
.honsel-header .honsel-logo-small-wrap { display: none; width: 110px; height: 80px; overflow: hidden; }
.honsel-header .honsel-logo-small { width: 110px; height: 80px; }
/* Falls kein separates kleines Logo hinterlegt ist: Ausschnitt der Originalgrafik.
   Nur Anzeige per CSS, keine Änderung der Originaldatei. */
.honsel-header .honsel-logo-crop .honsel-logo-small {
    width: 222px; height: 80px; max-width: none; object-fit: fill;
    clip-path: polygon(0 0, 50% 0, 50% 65%, 44% 73%, 40% 82%, 37% 91%, 32% 100%, 0 100%);
}
.honsel-header .honsel-claim {
    position: absolute;
    left: 180px;
    top: 166px;
    white-space: nowrap;
    color: #fff;
    font: italic 27px cursive;
    transform: rotate(-6deg);
}
.honsel-header .honsel-wave {
    position: absolute;
    top: 95px;
    left: 0;
    width: 100%;
    height: auto;
    z-index: -1;
    pointer-events: none;
    transition: opacity .22s ease;
}
.honsel-header .honsel-desktop-nav { padding-top: 46px; pointer-events: auto; }
.honsel-header ul.honsel-menu,
.honsel-header .honsel-menu ul { list-style: none; margin: 0; padding: 0; }
.honsel-header .honsel-desktop-nav > .honsel-menu { display: flex; align-items: center; gap: clamp(16px, 1.8vw, 28px); }
.honsel-header .honsel-menu li { position: relative; margin: 0; padding: 0; line-height: 1.4; }
.honsel-header .honsel-menu a {
    color: var(--honsel-blue);
    display: block;
    text-decoration: none;
    transition: color .15s ease;
}
.honsel-header .honsel-desktop-nav > .honsel-menu > li > a {
    padding: 8px 0;
    font-size: clamp(16px, 1.4vw, 20px);
    font-weight: 400;
    text-transform: uppercase;
    white-space: nowrap;
}
.honsel-header .honsel-menu a:hover,
.honsel-header .honsel-menu a:focus-visible,
.honsel-header .honsel-menu .current-menu-item > a,
.honsel-header .honsel-menu .current-menu-ancestor > a { color: var(--honsel-orange); }
.honsel-header a:focus-visible,
.honsel-header button:focus-visible { outline: 2px solid var(--honsel-orange); outline-offset: 4px; }
.honsel-header .honsel-desktop-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: -12px;
    min-width: 285px;
    max-width: min(400px, 90vw);
    background: rgb(255 255 255 / 80%);
    padding: 5px 0;
    display: none;
    box-shadow: 0 8px 25px rgb(0 0 0 / 5%);
}
.honsel-header .honsel-desktop-nav .sub-menu a { padding: 6px 10px; font-size: 16px; }
.honsel-header .honsel-desktop-nav .sub-menu .sub-menu { top: 0; left: 100%; }
.honsel-header .honsel-desktop-nav > ul > li:last-child > .sub-menu { left: auto; right: 0; }
.honsel-header .honsel-desktop-nav > ul > li:last-child .sub-menu .sub-menu { left: auto; right: 100%; }
.honsel-header .honsel-desktop-nav li.honsel-submenu-open > .sub-menu,
html:not(.honsel-js) .honsel-header .honsel-desktop-nav li:hover > .sub-menu,
html:not(.honsel-js) .honsel-header .honsel-desktop-nav li:focus-within > .sub-menu { display: block; }
.honsel-header .honsel-submenu-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    width: 22px;
    height: 28px;
    cursor: pointer;
    color: var(--honsel-blue);
    position: absolute;
    right: 0;
    top: 8px;
}
.honsel-header .honsel-submenu-toggle::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    vertical-align: 3px;
}
.honsel-header .honsel-submenu-toggle:hover { color: var(--honsel-orange); }
.honsel-header .honsel-desktop-nav .menu-item-has-children > a { padding-right: 22px; }
.honsel-header .honsel-mobile-nav,
.honsel-header .honsel-menu-toggle { display: none; }
/* Kompakte Zeile, ab Abschnitt 2 bzw. immer im kompakten Template. */
.honsel-fullpage .honsel-header.is-compact {
    height: var(--honsel-bar-height);
    background: rgb(255 255 255 / 62%);
}
.honsel-header.is-compact .honsel-header-inner { align-items: center; justify-content: flex-start; }
.honsel-header.is-compact .honsel-brand { padding: 0; flex: 0 0 110px; min-width: 0; }
.honsel-header.is-compact .honsel-logo-small-wrap { display: block; }
.honsel-header.is-compact .honsel-logo-hero,
.honsel-header.is-compact .honsel-claim { display: none; }
.honsel-header.is-compact .honsel-wave { opacity: 0; }
.honsel-header.is-compact .honsel-desktop-nav { padding-top: 0; }
.honsel-header.is-compact .honsel-desktop-nav > .honsel-menu { gap: 24px; }
.honsel-header.is-compact .honsel-desktop-nav > .honsel-menu > li > a { font-size: 23px; }
.honsel-header.is-compact .honsel-desktop-nav .sub-menu { min-width: 300px; padding: 18px 24px; }
.honsel-header.is-compact .honsel-desktop-nav .sub-menu a { font-size: 19px; padding: 8px 10px; }
.honsel-header .honsel-brand-text { font-size: 24px; font-weight: bold; }
.honsel-fullpage .honsel-skip {
    position: fixed;
    z-index: 100000;
    top: var(--honsel-admin-offset);
    left: 12px;
    transform: translateY(-150%);
    padding: 12px;
    background: #fff;
    color: var(--honsel-blue);
}
.honsel-fullpage .honsel-skip:focus { transform: translateY(0); }
/* Großer Einstieg: Proportionen aus Thommes' bestehender Gestaltung.
   Im fixierten Header entsprechen vh den Prozentwerten einer Vollbildsektion.
   Nur Desktop und nur der große Zustand; die kompakte/mobile Zeile bleibt frei. */
@media (min-width: 1101px) {
    .honsel-header:not(.is-compact) .honsel-brand {
        position: absolute;
        top: 10vh;
        right: 60%;
        width: 30vw;
        max-width: 550px;
        min-width: 0;
        padding: 0;
        margin: 0;
    }
    .honsel-header:not(.is-compact) .honsel-logo-hero {
        width: 100%;
        height: auto;
    }
    .honsel-header:not(.is-compact) .honsel-wave {
        top: 13vh;
        width: 100%;
        max-height: 120px;
        height: auto;
    }
    .honsel-header:not(.is-compact) .honsel-desktop-nav {
        position: absolute;
        left: 50%;
        top: 10vh;
        transform: translateX(-15%);
        width: max-content;
        max-width: calc(50vw - 32px);
        padding: 0;
    }
    .honsel-header:not(.is-compact) .honsel-desktop-nav > .honsel-menu {
        gap: 2vw;
        flex-wrap: wrap;
    }
    .honsel-header:not(.is-compact) .honsel-desktop-nav > .honsel-menu > li > a {
        font-size: clamp(14px, 2vw, 26px);
    }
    .honsel-header:not(.is-compact) .honsel-desktop-nav .sub-menu {
        background: rgb(255 255 255 / 72%);
        border: none;
        padding: 4px 0;
    }
    .honsel-header:not(.is-compact) .honsel-desktop-nav .sub-menu a {
        font-size: clamp(14px, 1.3vw, 20px);
        padding: .2em .5em;
    }
    .honsel-header:not(.is-compact) .honsel-claim {
        left: 45%;
        top: 80%;
        font-size: clamp(16px, 1.8vw, 27px);
    }
}
/* Mobile: gleicher Header für beide Templates. Unterpunkte bleiben sichtbar. */
@media (max-width: 1100px) {
    .honsel-fullpage { --honsel-bar-height: 56px; }
    .honsel-fullpage .honsel-header,
    .honsel-fullpage .honsel-header.is-compact { height: 56px; background: rgb(255 255 255 / 72%); }
    .honsel-header .honsel-header-inner,
    .honsel-header.is-compact .honsel-header-inner {
        width: min(900px, calc(100% - 40px));
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .honsel-header .honsel-brand,
    .honsel-header.is-compact .honsel-brand { flex: 0 0 75px; min-width: 0; padding: 0; }
    .honsel-header .honsel-logo-small-wrap { display: block; width: 72px; height: 52px; }
    .honsel-header .honsel-logo-small { width: 72px; height: 52px; }
    .honsel-header .honsel-logo-crop .honsel-logo-small { width: 144px; height: 52px; }
    .honsel-header .honsel-logo-hero,
    .honsel-header .honsel-claim,
    .honsel-header .honsel-wave,
    .honsel-header .honsel-desktop-nav { display: none; }
    .honsel-js .honsel-header .honsel-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        border: 0;
        background: transparent;
        cursor: pointer;
        pointer-events: auto;
    }
    .honsel-header .honsel-menu-toggle span { width: 22px; height: 2px; background: var(--honsel-orange); transition: transform .2s, opacity .2s; }
    .honsel-header.is-menu-open .honsel-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .honsel-header.is-menu-open .honsel-menu-toggle span:nth-child(2) { opacity: 0; }
    .honsel-header.is-menu-open .honsel-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .honsel-header .honsel-mobile-nav {
        display: block;
        position: absolute;
        top: 56px;
        left: 50%;
        transform: translateX(-50%);
        width: min(900px, calc(100% - 40px));
        max-height: calc(100vh - 56px - var(--honsel-admin-offset) - 16px);
        max-height: calc(100dvh - 56px - var(--honsel-admin-offset) - 16px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        padding: 22px;
        box-shadow: 0 10px 25px rgb(0 0 0 / 12%);
        pointer-events: auto;
        touch-action: pan-y;
    }
    .honsel-js .honsel-header:not(.is-menu-open) .honsel-mobile-nav { display: none; }
    .honsel-header .honsel-mobile-nav a { padding: 7px 18px; font-size: 14px; line-height: 1.3; min-height: 32px; }
    .honsel-header .honsel-mobile-nav > .honsel-menu > li > a { text-transform: uppercase; }
    .honsel-header .honsel-mobile-nav .menu-item-has-children > a { background: #f5f5f5; font-weight: bold; }
    .honsel-header .honsel-mobile-nav .sub-menu { display: block; position: static; margin: 0 0 0 30px; }
    .honsel-header .honsel-mobile-nav .sub-menu a { border-bottom: 1px solid #f3f3f3; }
    .honsel-header .honsel-mobile-nav .sub-menu .menu-item-has-children > a { background: transparent; }
    .honsel-header .honsel-mobile-nav .honsel-submenu-toggle { display: none; }
}
@media (max-width: 782px) {
    body.honsel-fullpage.admin-bar { --honsel-admin-offset: 46px; }
    /* WP setzt seine Adminleiste unter 600px sonst absolut und sie scrollt weg. */
    body.honsel-fullpage #wpadminbar { position: fixed; }
}
@media (max-width: 380px) {
    .honsel-header .honsel-mobile-nav { padding: 14px; width: calc(100% - 24px); }
    .honsel-header .honsel-mobile-nav .sub-menu { margin-left: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .honsel-fullpage .honsel-header,
    .honsel-header .honsel-wave,
    .honsel-header .honsel-menu a,
    .honsel-header .honsel-menu-toggle span { transition: none; }
}
