/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

header {
    position: relative;
    z-index: 500;

    width: 100%;
}


/*
|--------------------------------------------------------------------------
| Header Inner
|--------------------------------------------------------------------------
*/

.header-inner {
    display: flex;
    align-items: center;

    min-height: 76px;

    gap: clamp(18px, 2.5vw, 40px);
}


/*
|--------------------------------------------------------------------------
| Logo / Marke
|--------------------------------------------------------------------------
*/

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

    flex: 0 0 auto;

    gap: 12px;

    color: var(--color-header-text);
}

.logo:hover {
    color: var(--color-header-text);
}

.logo img {
    display: block;

    width: auto;
    max-width: clamp(120px, 14vw, 200px);
    max-height: 54px;

    object-fit: contain;
}

.brand-name {
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    font-weight: 700;
    line-height: 1.2;

    white-space: nowrap;
}


/*
|--------------------------------------------------------------------------
| Navigation
|--------------------------------------------------------------------------
*/

.header-inner > .navigation {
    margin-left: auto;
}


/*
|--------------------------------------------------------------------------
| Sprachumschalter
|--------------------------------------------------------------------------
*/

.language-switcher {
    position: relative;

    flex: 0 0 auto;
}


/*
|--------------------------------------------------------------------------
| Aktuelle Sprache
|--------------------------------------------------------------------------
*/

.language-switcher-current {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    min-height: 40px;

    padding: 8px 10px;

    color: var(--color-header-text);

    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;

    border-radius: 7px;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.language-switcher-current:hover {
    color: var(--color-primary);
    background: var(--color-surface-soft);
}


/*
|--------------------------------------------------------------------------
| Sprachmenü
|--------------------------------------------------------------------------
*/

.language-switcher-dropdown {
    position: absolute;

    top: 100%;
    right: 0;

    z-index: 200;

    min-width: 150px;

    padding: 7px;

    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: 9px;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.12);

    opacity: 0;
    visibility: hidden;

    transform: translateY(6px);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}


/*
|--------------------------------------------------------------------------
| Sprachmenü öffnen
|--------------------------------------------------------------------------
*/

.language-switcher:hover .language-switcher-dropdown,
.language-switcher:focus-within .language-switcher-dropdown {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);
}


/*
|--------------------------------------------------------------------------
| Sprachoption
|--------------------------------------------------------------------------
*/

.language-switcher-dropdown a {
    display: flex;
    align-items: center;

    width: 100%;

    padding: 10px 12px;

    color: var(--color-text);

    font-size: 0.9rem;
    font-weight: 500;

    border-radius: 6px;
}

.language-switcher-dropdown a:hover {
    color: var(--color-primary);
    background: var(--color-surface-soft);
}


/*
|--------------------------------------------------------------------------
| Sprachflagge
|--------------------------------------------------------------------------
*/

.language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    margin-right: 6px;
}

.language-flag img {
    display: block;

    width: 22px;
    height: 16px;

    object-fit: cover;

    border-radius: 2px;
}




/* ==========================================================================
   Header Search
   ========================================================================== */

/* ==========================================================================
   Header Search
   ========================================================================== */

.header-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;
    border: 0;
    background: transparent;

    color: inherit;
    cursor: pointer;
}

.header-search-toggle svg {
    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/*
|--------------------------------------------------------------------------
| Ausfahrender Suchbereich
|--------------------------------------------------------------------------
*/

.header-search {
    max-height: 0;
    overflow: hidden;

    background: var(--color-surface-soft);

    transition:
        max-height 0.35s ease;
}

.header-search.is-open {
    max-height: 600px;
    overflow: visible;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}


/*
|--------------------------------------------------------------------------
| Suchfeld
|--------------------------------------------------------------------------
*/

.header-search-inner {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 8px 22px;

    background: #fff;

    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}


/*
|--------------------------------------------------------------------------
| Suchsymbol
|--------------------------------------------------------------------------
*/

.header-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    color: #6f6b78;
}

.header-search-icon svg {
    width: 24px;
    height: 24px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/*
|--------------------------------------------------------------------------
| Eingabe
|--------------------------------------------------------------------------
*/

.header-search-input {
    flex: 1;
    min-width: 0;

    padding: 0;

    border: 0;
    outline: 0;
    background: transparent;

    color: inherit;

    font: inherit;
    font-size: clamp(
        1rem,
        0.95rem + 0.2vw,
        1.15rem
    );
}

.header-search-input::placeholder {
    color: #85818c;
    opacity: 1;
}


/*
|--------------------------------------------------------------------------
| Schließen
|--------------------------------------------------------------------------
*/

.header-search-close {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 0;
    background: transparent;

    color: #77727f;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;

    opacity: 0.7;

    transition: opacity 0.2s ease;
}

.header-search-close:hover {
    opacity: 1;
}


/* Nativen Löschen-Button bei type="search" ausblenden */

.header-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.header-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}


.header-search-input {
    appearance: none;
}



/* ==========================================================================
   Header Search Results
   ========================================================================== */

.header-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    z-index: 100;

    padding: 20px 24px 24px;

    background: #fff;
}

.header-search-results:empty {
    display: none;
}

.header-search-results:empty {
    display: none;
}

.header-search-result-group {
    padding: 18px 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.header-search-result-group strong {
    display: block;
    margin-bottom: 10px;

    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    color: var(--color-accent);
}

.header-search-result-group a {
    display: block;

    padding: 7px 0;

    color: inherit;
    text-decoration: none;

    line-height: 1.4;

    transition:
        color 0.2s ease,
        padding-left 0.2s ease;
}

.header-search-result-group a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.header-search-content{
    padding-top:15px;
    padding-bottom:15px;
}

.header-search-content > .container {
    position: relative;
}


.header-search-empty {
    padding: 5px 4px 0px;

    color: #6f6b78;
    font-size: 0.95rem;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    .header-inner {
        min-height: 68px;

        gap: 12px;
    }

    .logo img {
        max-width: min(42vw, 180px);
        max-height: 48px;
    }

    .brand-name {
        font-size: clamp(1rem, 4vw, 1.2rem);

        white-space: normal;
    }

    /*
    |--------------------------------------------------------------------------
    | Reihenfolge rechts:
    |
    | Logo            Sprache   Hamburger
    |--------------------------------------------------------------------------
    */

    .header-inner > .navigation {
        margin-left: auto;
    }

    .language-switcher {
        order: 2;
    }

    .navigation {
        order: 3;
    }

    .language-switcher-current {
        min-height: 40px;

        padding-inline: 7px;
    }
}