/*
 * Navigation (Aufgabe 10): Kopfzeile, Menü fürs Handy, Leiste unten auf dem Handy.
 * Bewusst eine eigene, fertige CSS-Datei (kein Tailwind-Build nötig) – wirkt sofort lokal und
 * auf dem Server. Farben aus den Dashboard-Einstellungen (CSS-Variablen aus base.html).
 *
 * Breiten: Menü-Button bis 1023 px (Handy & Tablet), ab 1024 px Einträge in der Kopfzeile.
 *          Leiste unten nur bis 767 px (Handy).
 */
:root {
    --hn-head: 64px;
    --hn-navy: rgb(var(--brand-navy));
    --hn-gold: rgb(var(--brand-gold));
    --hn-accent: rgb(var(--brand-accent));
}

/* Beim Springen zu einem Abschnitt bleibt die Überschrift unter der Kopfzeile sichtbar */
html {
    scroll-padding-top: calc(var(--hn-head) + 16px);
}

/* --- Kopfzeile ------------------------------------------------------------ */
.hn-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--hn-navy);
    border-bottom: 1px solid var(--hn-accent);
}

.hn-bar {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 16px;
    height: var(--hn-head);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hn-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.hn-logo img {
    height: 40px;
    width: auto;
}

.hn-logo span {
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
}

/* Computer: Einträge nebeneinander */
.hn-links {
    display: none;
    align-items: center;
    gap: 26px;
    height: 100%;
}

.hn-link {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding-top: 2px;
    border-bottom: 2px solid transparent;
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.hn-link:hover,
.hn-link[aria-current="page"] {
    color: #fff;
    border-bottom-color: var(--hn-gold);
}

.hn-link-small {
    font-size: .875rem;
}

.hn-cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    background: var(--hn-gold);
    color: var(--hn-navy);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    white-space: nowrap;
}

.hn-cta:hover {
    background: var(--custom-gold-hover, #e0bd4c);
}

.hn-sep {
    width: 1px;
    height: 28px;
    background: #475569;
}

/* Dashboard / Anmeldung */
.hn-admin {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hn-admin a {
    color: #cbd5e1;
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
}

.hn-admin a:hover,
.hn-admin a[aria-current="page"] {
    color: var(--hn-gold);
}

.hn-admin a.hn-admin-logout {
    padding: 6px 14px;
    border: 1px solid var(--hn-gold);
    color: var(--hn-gold);
}

/* Handy & Tablet: Button „Menü“ */
.hn-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 14px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .4);
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
}

.hn-menu-btn:hover {
    border-color: var(--hn-gold);
}

/* Geöffnetes Menü */
.hn-panel {
    border-top: 1px solid var(--hn-accent);
    background: var(--hn-navy);
    max-height: calc(100vh - var(--hn-head));
    overflow-y: auto;
}

.hn-panel ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.hn-mlink {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 20px;
    border-left: 4px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 1.1875rem;
    font-weight: 500;
    text-decoration: none;
}

.hn-mlink:hover,
.hn-mlink[aria-current="page"] {
    background: var(--hn-accent);
    border-left-color: var(--hn-gold);
}

.hn-mlink-cta {
    color: var(--hn-gold);
    font-weight: 700;
}

.hn-mlink-small {
    font-size: 1rem;
    color: #cbd5e1;
}

.hn-call {
    margin: 0;
    padding: 14px 20px 22px;
    color: #cbd5e1;
    font-size: 1.0625rem;
}

.hn-call a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    color: var(--hn-gold);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.hn-nav a:focus-visible,
.hn-nav button:focus-visible,
.hn-mobilebar a:focus-visible {
    outline: 3px solid var(--hn-gold);
    outline-offset: 2px;
}

@media (min-width: 1024px) {
    .hn-links {
        display: flex;
    }

    .hn-menu-btn,
    .hn-panel {
        display: none !important;
    }
}

/* --- Leiste unten (nur Handy) --------------------------------------------- */
.hn-mobilebar {
    display: none;
}

@media (max-width: 767.98px) {
    .hn-mobilebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #e4ded2;
        box-shadow: 0 -10px 30px -18px rgba(15, 23, 42, .5);
    }

    .hn-mobilebar a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 52px;
        font-size: 1.0625rem;
        font-weight: 700;
        text-decoration: none;
    }

    .hn-mobilebar .hn-bar-call {
        background: var(--hn-navy);
        color: #fff;
    }

    .hn-mobilebar .hn-bar-book {
        background: var(--hn-gold);
        color: var(--hn-navy);
    }

    /* Platz unten, damit Fußbereich (Impressum, Datenschutz) nie unter der Leiste liegt */
    body.hn-has-mobilebar {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* Solange der Cookie-Hinweis offen ist, hat er Vorrang: Leiste ausblenden */
    .consent:not([hidden]) ~ .hn-mobilebar {
        display: none;
    }
}
