/* ============================================================
 *  header.css — Zentrales, einheitliches Header-Styling für hilfeweb.com
 *  Greift auf ALLEN Seiten (unabhängig vom lokalen Inline-CSS),
 *  weil die Kernregeln mit !important abgesichert sind.
 *  Layout: Logo links · waagerechte Topnav mittig · Auth rechts.
 *  Mobile (<900px): Burger-Menü (Hamburger), Menü klappt auf.
 *  Palette: Teal (#0d9488 / #0f766e / #134e4a) — einheitlich.
 * ============================================================ */

/* === Header-Container: immer waagerecht, niemals umbrechen === */
header,
.hw-header {
    background: #fff !important;
    color: #0f766e !important;
    padding: 15px 5% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid #e5e7eb !important;
    position: relative !important;
    z-index: 50 !important;
}

/* Header-Kind-Elemente sollen nicht als Block stapeln */
header > * { margin: 0 !important; }

/* === Logo / Brand === */
header .brand,
.hw-header .brand {
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    background: #fff !important;
    padding: 6px 14px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
}
header .brand .logo-img,
.hw-header .brand .logo-img {
    height: 60px !important;
    width: auto !important;
    max-width: 100% !important;
    vertical-align: middle !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)) !important;
}
header .brand h1,
.hw-header .brand h1 {
    font-size: 1.3rem !important;
    margin: 0 !important;
    color: #0f766e !important;
    font-weight: 800 !important;
}

/* === Navigation: waagerecht === */
header nav,
.hw-header nav {
    flex: 1 1 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 0 !important;
}
header nav ul,
.hw-header nav ul {
    list-style: none !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
}
header nav ul li,
.hw-header nav ul li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
header nav ul li a,
.hw-header nav ul li a,
header nav > a,
.hw-header nav > a {
    color: #0f766e !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: color 0.3s, background 0.3s !important;
    white-space: nowrap !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    background: transparent !important;
    box-shadow: none !important;
}
header nav ul li a:hover,
.hw-header nav ul li a:hover,
header nav > a:hover {
    color: #fff !important;
    background: #0d9488 !important;
}

/* Falls lokale Inline-Styles den "Zurück"-Button erzwingen — anpassen */
header span a,
.hw-header span a {
    background: #0d9488 !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.35) !important;
}

/* === Auth-Bereich rechts === */
header #auth-area,
.hw-header #auth-area {
    flex-shrink: 0 !important;
    margin-inline-start: auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

/* === Burger-Button: nur auf Mobile sichtbar === */
.hw-burger {
    display: none !important;
    background: #0d9488 !important;
    color: #fff !important;
    border: none !important;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1.3rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

/* ============================================================
 *  Mobile (<900px): Burger-Menü, Topnav wird aufklappbar
 * ============================================================ */
@media (max-width: 900px) {
    header,
    .hw-header {
        flex-wrap: wrap !important;
        position: relative !important;
    }
    header .brand .logo-img,
    .hw-header .brand .logo-img { height: 50px !important; }

    .hw-burger { display: inline-flex !important; order: 3 !important; }

    /* Topnav ausblenden und als aufklappbares Menü positionieren */
    header nav,
    .hw-header nav {
        display: none !important;
        flex-direction: column !important;
        flex: 1 0 100% !important;
        order: 4 !important;
        background: #fff !important;
        margin-top: 10px !important;
        padding: 10px 0 !important;
        border-top: 1px solid #e5e7eb !important;
        width: 100% !important;
    }
    header nav.is-open,
    .hw-header nav.is-open { display: flex !important; }

    header nav ul,
    .hw-header nav ul {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
        width: 100% !important;
    }
    header nav ul li a,
    .hw-header nav ul li a,
    header nav > a,
    .hw-header nav > a {
        display: block !important;
        padding: 10px 14px !important;
        font-size: 0.95rem !important;
    }
    header nav ul li a:hover,
    .hw-header nav ul li a:hover { background: #ccfbf1 !important; color: #0f766e !important; }

    /* Auth-Buttons dürfen umbrechen, falls mehrere */
    header #auth-area,
    .hw-header #auth-area { flex-wrap: wrap !important; }
}
