/* ==========================================================================
   sidebalance – Öffentlicher Header
   Datei: public_html/assets/css/header.css

   Farben:
   Navy:       #111A24
   Gold:       #D8A12B
   Weiß:       #FFFFFF
   Text:       #26313C
   Muted:      #64717D
   Oberfläche: #F3F5F7
   ========================================================================== */
/* --------------------------------------------------------------------------
   Header-Grundlayout
   -------------------------------------------------------------------------- */
.external-header {
    position: relative;
    z-index: 100;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid #E6E9ED;
    box-shadow: 0 4px 20px rgba(17, 26, 36, 0.035);
}
.external-header-inner {
    width: min(1440px, calc(100% - 64px));
    min-height: 88px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}
/* --------------------------------------------------------------------------
   Markenauftritt
   -------------------------------------------------------------------------- */
.external-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: #111A24;
    text-decoration: none;
    border-radius: 8px;
}
.external-brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(216, 161, 43, 0.42);
    border-radius: 14px;
    background: #111A24;
    color: #D8A12B;
    font-size: 21px;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}
.external-brand:hover .external-brand-mark {
    background: #1B2938;
    border-color: #D8A12B;
    transform: translateY(-1px);
}
.external-brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}
.external-brand-name {
    color: #111A24;
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.9px;
}
.external-brand-claim {
    color: #64717D;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 1.65px;
    white-space: nowrap;
}
/* --------------------------------------------------------------------------
   Hauptnavigation
   -------------------------------------------------------------------------- */
.external-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(14px, 1.6vw, 25px);
    min-width: 0;
}
.external-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
    color: #52606D;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: color 180ms ease;
}
.external-nav-link:hover,
.external-nav-link.is-active {
    color: #111A24;
}
.external-nav-link.is-active::after {
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 3px;
    border-radius: 3px;
    background: #D8A12B;
    content: "";
}
.external-nav-link:focus-visible,
.external-brand:focus-visible {
    outline: 3px solid rgba(216, 161, 43, 0.65);
    outline-offset: 5px;
}
/* --------------------------------------------------------------------------
   Aktionsbereich
   -------------------------------------------------------------------------- */
.external-navigation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 13px;
    flex-shrink: 0;
}
/* --------------------------------------------------------------------------
   Sprachwahl DE / EN
   -------------------------------------------------------------------------- */
.external-language-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid #E5E9ED;
    border-radius: 9px;
    background: #FFFFFF;
    color: #A1AAB3;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}
.external-language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    min-height: 25px;
    border-radius: 5px;
    color: #64717D;
    text-decoration: none;
    transition:
        background-color 180ms ease,
        color 180ms ease;
}
.external-language-switch a:hover {
    color: #111A24;
    background: #F3F5F7;
}
.external-language-switch a[aria-current="true"] {
    color: #111A24;
    background: #F5E9C9;
    box-shadow: inset 0 0 0 1px rgba(216, 161, 43, 0.24);
}
.external-language-switch a:focus-visible {
    outline: 2px solid #D8A12B;
    outline-offset: 3px;
}
/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.external-login-button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #DCE1E6;
    border-radius: 10px;
    background: #FFFFFF;
    color: #26313C;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}
.external-login-button i {
    font-size: 14px;
}
.external-login-button:hover {
    border-color: #111A24;
    background: #F3F5F7;
    color: #111A24;
}
.external-login-button:focus-visible,
.external-header-cta:focus-visible {
    outline: 3px solid rgba(216, 161, 43, 0.7);
    outline-offset: 3px;
}
/* --------------------------------------------------------------------------
   Primärer CTA – Preise ansehen
   -------------------------------------------------------------------------- */
.external-header-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 17px;
    border: 1px solid #D8A12B;
    border-radius: 10px;
    background: #D8A12B;
    color: #111A24;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(216, 161, 43, 0.12);
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}
.external-header-cta i {
    font-size: 12px;
    transition: transform 180ms ease;
}
.external-header-cta:hover {
    border-color: #E6B94F;
    background: #E6B94F;
    box-shadow: 0 5px 14px rgba(216, 161, 43, 0.22);
    transform: translateY(-1px);
}
.external-header-cta:hover i {
    transform: translateX(3px);
}
.external-header-cta:active {
    transform: translateY(0);
}
/* --------------------------------------------------------------------------
   Mobiler Menübutton
   -------------------------------------------------------------------------- */
.external-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid #DCE1E6;
    border-radius: 11px;
    background: #FFFFFF;
    color: #111A24;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease;
}
.external-menu-toggle:hover {
    border-color: #D8A12B;
    background: #F3F5F7;
}
.external-menu-toggle:focus-visible {
    outline: 3px solid rgba(216, 161, 43, 0.7);
    outline-offset: 3px;
}
.external-menu-icon {
    width: 21px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.external-menu-icon span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition:
        transform 180ms ease,
        opacity 180ms ease;
}
/* Optional: Hamburger wird bei geöffnetem Menü zum X. */
.external-menu-toggle[aria-expanded="true"] .external-menu-icon span:first-child {
    transform: translateY(7px) rotate(45deg);
}
.external-menu-toggle[aria-expanded="true"] .external-menu-icon span:nth-child(2) {
    opacity: 0;
}
.external-menu-toggle[aria-expanded="true"] .external-menu-icon span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}
/* --------------------------------------------------------------------------
   Kompakte Desktopansicht
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
    .external-header-inner {
        width: calc(100% - 40px);
        gap: 20px;
    }
    .external-navigation {
        gap: 15px;
    }
    .external-navigation-actions {
        gap: 9px;
    }
    .external-brand-name {
        font-size: 23px;
    }
    .external-brand-claim {
        font-size: 8px;
        letter-spacing: 1.4px;
    }
    .external-nav-link,
    .external-login-button,
    .external-header-cta {
        font-size: 12px;
    }
    .external-login-button {
        padding-right: 11px;
        padding-left: 11px;
    }
    .external-header-cta {
        gap: 7px;
        padding-right: 12px;
        padding-left: 12px;
    }
}
/* --------------------------------------------------------------------------
   Tablet und Smartphone
   -------------------------------------------------------------------------- */
@media (max-width: 1020px) {
    .external-header-inner {
        width: calc(100% - 36px);
        min-height: 76px;
        flex-wrap: wrap;
        gap: 0;
    }
    .external-brand-name {
        font-size: 23px;
    }
    .external-brand-mark {
        width: 41px;
        height: 41px;
        border-radius: 12px;
        font-size: 19px;
    }
    .external-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }
    .external-navigation {
        display: none;
        width: 100%;
        min-width: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
        padding: 8px 0 20px;
    }
    .external-navigation.is-open {
        display: flex;
    }
    .external-nav-link {
        min-height: 45px;
        padding: 12px 14px;
        border-radius: 9px;
        font-size: 14px;
        white-space: normal;
    }
    .external-nav-link:hover,
    .external-nav-link.is-active {
        background: #F3F5F7;
    }
    .external-nav-link.is-active {
        box-shadow: inset 3px 0 0 #D8A12B;
    }
    .external-nav-link.is-active::after {
        display: none;
    }
    .external-navigation-actions {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 8px 0;
        margin-top: 9px;
        border-top: 1px solid #E6E9ED;
    }
    .external-language-switch {
        margin-right: auto;
    }
    .external-login-button,
    .external-header-cta {
        min-height: 43px;
        font-size: 13px;
    }
}
/* --------------------------------------------------------------------------
   Kleine Smartphones
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .external-header-inner {
        width: calc(100% - 28px);
        min-height: 72px;
    }
    .external-brand {
        gap: 9px;
    }
    .external-brand-mark {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }
    .external-brand-name {
        font-size: 21px;
        letter-spacing: -0.7px;
    }
    .external-brand-claim {
        font-size: 7px;
        letter-spacing: 1.2px;
    }
    .external-menu-toggle {
        width: 42px;
        height: 42px;
    }
    .external-navigation-actions {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 10px;
        padding-right: 4px;
        padding-left: 4px;
    }
    .external-language-switch {
        justify-self: start;
        margin-right: 0;
    }
    .external-login-button {
        justify-self: end;
    }
    .external-header-cta {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }
}
/* --------------------------------------------------------------------------
   Barrierefreiheit: reduzierte Bewegung
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .external-brand-mark,
    .external-nav-link,
    .external-language-switch a,
    .external-login-button,
    .external-header-cta,
    .external-header-cta i,
    .external-menu-toggle,
    .external-menu-icon span {
        transition: none !important;
    }
    .external-brand:hover .external-brand-mark,
    .external-header-cta:hover {
        transform: none;
    }
}
