/* Robust header styles independent from Tailwind utility generation */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.site-header-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-headline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem 0;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-decoration: none;
}

.brand-logo {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.brand-logo-image {
    width: 7.5rem;
    max-width: 100%;
    height: auto;
    max-height: 3.5rem;
    display: block;
    flex: 0 0 auto;
}

.brand-meta {
    min-width: 0;
    overflow: hidden;
}

.brand-meta p {
    margin: 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: #64748b;
}

.brand-meta h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
}

.brand-meta h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-toggle-wrap {
    position: relative;
    flex: 0 0 auto;
}

.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex: 0 0 auto;
    padding: 0.375rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #334155;
    line-height: 1;
    cursor: pointer;
}

.lang-toggle-btn:hover {
    background: #f1f5f9;
}

.lang-toggle-flag {
    display: block;
    width: 22px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid #cbd5e1;
}

.lang-toggle-caret {
    font-size: 0.7rem;
    color: #64748b;
}

.lang-switch {
    display: none;
    align-items: center;
    gap: 0.375rem;
}

.lang-switch.lang-switch-open {
    display: flex;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: max-content;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    padding: 0.5rem;
    z-index: 50;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem;
    border-radius: 0.75rem;
    line-height: 1;
    transition: background-color 0.15s ease;
}

.lang-btn-active {
    background: #e0f2fe;
    box-shadow: 0 0 0 2px #38bdf8;
}

.lang-btn-flag {
    display: block;
    width: 24px;
    height: 18px;
    border-radius: 2px;
    border: 1px solid #cbd5e1;
}

.lang-btn:hover {
    background: #f1f5f9;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    padding: 0.75rem 0;
}

.main-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
}

.main-nav-link:hover {
    color: #0284c7;
}

@media (min-width: 640px) {
    .site-header-inner {
        padding: 0 1.5rem;
    }

    .brand-meta h1 {
        font-size: 1.25rem;
        line-height: 1.2;
    }

    .lang-toggle-btn {
        display: none;
    }

    .lang-switch,
    .lang-switch.lang-switch-open {
        display: inline-flex;
        position: static;
        margin: 0 0 0 auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }
}

@media (max-width: 639px) {
    .brand-logo-image {
        width: 6.25rem;
        max-height: 2.9rem;
    }
}

@media (max-width: 399px) {
    .brand-meta {
        display: none;
    }

    .site-headline {
        justify-content: center;
        position: relative;
    }

    .brand-link {
        flex: 0 0 auto;
    }

    .lang-toggle-wrap {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
    }
}

@media (min-width: 1024px) {
    .site-header-inner {
        padding: 0 2rem;
    }
}

/* Im installierten PWA-Fenster wirkt das Menü wie native App-Buttons statt
   wie Browser-Textlinks - passend zum "standalone" Look ohne Adressleiste.
   Sitewide (nicht mehr an .has-pwa-manifest gekoppelt), damit die Optik auch
   greift, wenn man z. B. von der installierten Karten-App zu haberler
   navigiert - display-mode: standalone bleibt beim Navigieren innerhalb des
   Standalone-Fensters erhalten, unabhängig vom Manifest der Zielseite. */
@media (display-mode: standalone) {
    .site-header {
        padding-top: env(safe-area-inset-top);
    }

    .main-nav {
        gap: 0.5rem;
        border-top: none;
        padding: 0.5rem 0 0.75rem;
    }

    .main-nav-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.55rem 1.1rem;
        border-radius: 9999px;
        background: #f1f5f9;
        color: #334155;
        font-weight: 600;
        text-decoration: none;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .main-nav-link:hover {
        background: #e0f2fe;
        color: #0284c7;
    }

    .main-nav-link--search {
        display: none;
    }
}

.moved-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #e0f2fe;
    color: #0c4a6e;
    border-bottom: 1px solid #bae6fd;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    text-align: center;
}

.moved-banner-close {
    background: transparent;
    border: none;
    color: #0c4a6e;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.moved-banner-close:hover {
    color: #082f49;
}
