/*
================================================================================
TURFSPORT RACECENTER – assets/header.css

Zweck:
- Zentrale CSS-Datei nur für Header, Logo, Navigation, Suche, Konto und Menü.
- Wird nach style.css geladen und überschreibt alte Header-Regeln zuverlässig.

Hier bearbeiten, wenn:
- mobiler Header anders aussehen soll
- Logo/Icons/Navigation angepasst werden sollen
- Renntermine/News/Markt im Header verändert werden sollen

Nicht hier bearbeiten:
- Renntag/Starter/Formkarten -> assets/race-detail.css
- News-Inhalte -> künftig assets/news.css
- Markt -> künftig assets/market.css
================================================================================
*/

/* V96 Turfsport Header: zentrale Header-Regeln, nach style.css geladen */

/* Desktop: bewusst nah am bisherigen Stand lassen */
.rc-topbar.rc-site-header.rc-site-header-v3{
  position:relative;
}

/* Mobile Header */
@media (max-width: 760px){
  html,
  body{
    max-width:100%;
    overflow-x:hidden;
  }

  body .rc-shell{
    overflow:visible!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3{
    display:block!important;
    position:relative!important;
    box-sizing:border-box!important;
    width:100vw!important;
    max-width:100vw!important;
    min-width:100vw!important;
    margin-top:0!important;
    margin-bottom:14px!important;
    margin-left:calc(50% - 50vw)!important;
    margin-right:calc(50% - 50vw)!important;
    padding:0!important;
    border-radius:0 0 24px 24px!important;
    background:#063b25!important;
    color:#fff!important;
    overflow:visible!important;
    box-shadow:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 > .rc-header-v3-inner{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "logo actions"
      "search search"
      "nav nav"!important;
    align-items:center!important;
    gap:9px!important;
    width:100%!important;
    max-width:760px!important;
    margin:0 auto!important;
    padding:12px 18px 12px!important;
    box-sizing:border-box!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-topline{
    display:contents!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo{
    grid-area:logo!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    line-height:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    display:block!important;
    width:245px!important;
    max-width:calc(100vw - 188px)!important;
    height:auto!important;
    max-height:64px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    grid-area:actions!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;
    margin:0!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-icon-button,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-toggle,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    position:static!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    padding:0!important;
    border-radius:999px!important;
    font-size:19px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-mini-text{
    display:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    grid-area:search!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-navline{
    grid-area:nav!important;
    display:block!important;
    width:100%!important;
    margin:0!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-portal-nav,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-main-nav,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-primary-nav-v3{
    display:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav button,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav a{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:40px!important;
    padding:0 8px!important;
    border-radius:999px!important;
    font-size:14px!important;
    font-weight:900!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav{
    display:flex!important;
    gap:7px!important;
    width:100%!important;
    margin:7px 0 0!important;
    padding:6px!important;
    border-radius:16px!important;
    background:rgba(255,255,255,.08)!important;
    border:1px solid rgba(255,255,255,.14)!important;
    box-sizing:border-box!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav[hidden]{
    display:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav a{
    flex:1 1 0!important;
    min-height:34px!important;
    padding:0 7px!important;
    border-radius:999px!important;
    font-size:12.5px!important;
    font-weight:900!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
}

@media (max-width: 420px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 > .rc-header-v3-inner{
    padding:10px 14px 11px!important;
    gap:8px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    width:220px!important;
    max-width:calc(100vw - 174px)!important;
    max-height:58px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    gap:7px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-icon-button,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-toggle,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
  }
}

@media (max-width: 360px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    width:198px!important;
    max-width:calc(100vw - 162px)!important;
    max-height:54px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-icon-button,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-toggle,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    width:39px!important;
    height:39px!important;
    min-width:39px!important;
    min-height:39px!important;
  }
}


/* V148: Mobile Hauptnavigation kompakter */
@media (max-width: 760px) {
    .rc-site-header-v3 {
        border-radius: 0 0 24px 24px;
    }

    .rc-header-v3-inner {
        padding: 18px 16px 16px !important;
    }

    .rc-header-v3-topline {
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    .rc-header-logo img,
    .rc-logo-full-image img {
        max-height: 54px !important;
        width: auto !important;
    }

    .rc-header-v3-actions {
        gap: 8px !important;
    }

    .rc-header-icon-button {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        font-size: 20px !important;
    }

    .rc-account-mini-text {
        display: none !important;
    }

    .rc-header-v3-navline,
    .rc-header-v40-navline {
        display: block !important;
        margin-top: 6px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .rc-header-v3-navline::-webkit-scrollbar,
    .rc-header-v40-navline::-webkit-scrollbar {
        display: none;
    }

    .rc-header-mobile-quicknav {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        width: max-content !important;
        min-width: 100% !important;
        padding: 0 0 4px !important;
    }

    .rc-header-mobile-quicknav a,
    .rc-header-mobile-quicknav button {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        width: auto !important;
        height: 40px !important;
        padding: 0 16px !important;
        border-radius: 999px !important;
        font-size: 15px !important;
        line-height: 1 !important;
        font-weight: 900 !important;
        white-space: nowrap !important;
    }

    .rc-header-mobile-quicknav button[data-rc-mobile-race-toggle] {
        padding-right: 18px !important;
    }

    .rc-header-mobile-race-subnav {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        width: max-content !important;
        margin-top: 8px !important;
        padding-bottom: 4px !important;
    }

    .rc-header-mobile-race-subnav[hidden] {
        display: none !important;
    }

    .rc-header-mobile-race-subnav a {
        flex: 0 0 auto !important;
        padding: 9px 14px !important;
        border-radius: 999px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 420px) {
    .rc-header-logo img,
    .rc-logo-full-image img {
        max-height: 48px !important;
    }

    .rc-header-icon-button {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
    }

    .rc-header-mobile-quicknav a,
    .rc-header-mobile-quicknav button {
        height: 38px !important;
        padding: 0 14px !important;
        font-size: 14px !important;
    }
}


/* V149: Mobile Nav Link-Fix – echte Header-Links kompakt */
@media (max-width: 760px) {
    header.rc-site-header.rc-site-header-v3 .rc-header-v3-navline,
    header.rc-site-header.rc-site-header-v3 .rc-header-v40-navline {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding-bottom: 2px !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-v3-navline::-webkit-scrollbar,
    header.rc-site-header.rc-site-header-v3 .rc-header-v40-navline::-webkit-scrollbar {
        display: none !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 7px !important;
        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;
        padding: 0 16px 5px 0 !important;
        margin: 0 !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav > a,
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav > button,
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav a,
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav button {
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        height: 36px !important;
        min-height: 36px !important;
        padding: 0 13px !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        line-height: 1 !important;
        font-weight: 900 !important;
        white-space: nowrap !important;
        letter-spacing: 0 !important;
        text-align: center !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav > button[data-rc-mobile-race-toggle] {
        padding-right: 14px !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 7px !important;
        width: max-content !important;
        min-width: max-content !important;
        padding: 0 16px 5px 0 !important;
        margin: 7px 0 0 !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav[hidden] {
        display: none !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav > a,
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav a {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: auto !important;
        height: 34px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        line-height: 34px !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-primary-nav,
    header.rc-site-header.rc-site-header-v3 .rc-header-portal-nav {
        gap: 7px !important;
    }
}

@media (max-width: 420px) {
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav > a,
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav > button,
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav a,
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-quicknav button {
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 11px !important;
        font-size: 12px !important;
    }

    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav > a,
    header.rc-site-header.rc-site-header-v3 .rc-header-mobile-race-subnav a {
        height: 32px !important;
        padding: 0 11px !important;
        font-size: 12px !important;
        line-height: 32px !important;
    }
}


/* V150: Mobile Nav finaler Cache-/Style-Fix */
@media (max-width: 820px) {
    .rc-site-header-v3 .rc-header-mobile-quicknav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 0 6px !important;
        margin: 0 !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-quicknav::-webkit-scrollbar {
        display: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-quicknav > a,
    .rc-site-header-v3 .rc-header-mobile-quicknav > button,
    .rc-site-header-v3 .rc-header-mobile-quicknav a,
    .rc-site-header-v3 .rc-header-mobile-quicknav button {
        box-sizing: border-box !important;
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding: 0 14px !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        line-height: 1 !important;
        font-weight: 900 !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    .rc-site-header-v3 .rc-header-mobile-quicknav > button[data-rc-mobile-race-toggle] {
        padding-right: 14px !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 0 6px !important;
        margin: 8px 0 0 !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav::-webkit-scrollbar {
        display: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav[hidden] {
        display: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav > a,
    .rc-site-header-v3 .rc-header-mobile-race-subnav a {
        box-sizing: border-box !important;
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 0 !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        font-size: 13px !important;
        line-height: 1 !important;
        font-weight: 850 !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 460px) {
    .rc-site-header-v3 .rc-header-mobile-quicknav {
        gap: 7px !important;
    }

    .rc-site-header-v3 .rc-header-mobile-quicknav > a,
    .rc-site-header-v3 .rc-header-mobile-quicknav > button,
    .rc-site-header-v3 .rc-header-mobile-quicknav a,
    .rc-site-header-v3 .rc-header-mobile-quicknav button {
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 12px !important;
        font-size: 12px !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav > a,
    .rc-site-header-v3 .rc-header-mobile-race-subnav a {
        height: 32px !important;
        min-height: 32px !important;
        padding: 0 11px !important;
        font-size: 12px !important;
    }
}


/* V151: Mobile Nav Slim – eigene Klassen */
@media (max-width: 820px) {
    .rc-site-header-v3 .rc-header-mobile-quicknav-slim {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 7px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 0 5px 0 !important;
        margin: 0 !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-quicknav-slim::-webkit-scrollbar {
        display: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-quicknav-slim .rc-mobile-nav-pill,
    .rc-site-header-v3 .rc-header-mobile-quicknav-slim a.rc-mobile-nav-pill,
    .rc-site-header-v3 .rc-header-mobile-quicknav-slim button.rc-mobile-nav-pill {
        appearance: none !important;
        -webkit-appearance: none !important;
        box-sizing: border-box !important;
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        font-size: 12px !important;
        line-height: 1 !important;
        font-weight: 900 !important;
        letter-spacing: .01em !important;
        white-space: nowrap !important;
        text-decoration: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-quicknav-slim button.rc-mobile-nav-pill {
        font-family: inherit !important;
        cursor: pointer !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 7px !important;
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 0 5px 0 !important;
        margin: 7px 0 0 !important;
        scrollbar-width: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav::-webkit-scrollbar {
        display: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav[hidden] {
        display: none !important;
    }

    .rc-site-header-v3 .rc-header-mobile-race-subnav a {
        flex: 0 0 auto !important;
        height: 30px !important;
        min-height: 30px !important;
        padding: 0 11px !important;
        border-radius: 999px !important;
        font-size: 12px !important;
        line-height: 30px !important;
        white-space: nowrap !important;
    }
}


/* V159: Ampel-Akzente für Heute / Kommend / Ergebnisse
   Kein Icon, kein zusätzlicher Platzverbrauch.
   Kommend nutzt ein helles Amber-Gelb, bewusst anders als das normale Turfsport-Gold.
*/
:root {
    --ts-race-today: #1f8a4c;
    --ts-race-upcoming: #ffd166;
    --ts-race-results: #b84a4a;
}

.rc-header-race-subnav a.rc-race-state-heute,
.rc-mobile-race-tabs a.rc-race-state-heute {
    border-bottom: 3px solid var(--ts-race-today) !important;
}

.rc-header-race-subnav a.rc-race-state-kommend,
.rc-mobile-race-tabs a.rc-race-state-kommend {
    border-bottom: 3px solid var(--ts-race-upcoming) !important;
}

.rc-header-race-subnav a.rc-race-state-ergebnisse,
.rc-mobile-race-tabs a.rc-race-state-ergebnisse {
    border-bottom: 3px solid var(--ts-race-results) !important;
}

.rc-header-race-subnav a.rc-race-state-heute.is-active,
.rc-mobile-race-tabs a.rc-race-state-heute.is-active {
    background: rgba(31, 138, 76, .16) !important;
    border-color: rgba(31, 138, 76, .28) !important;
    border-bottom-color: var(--ts-race-today) !important;
    color: #0f5138 !important;
}

.rc-header-race-subnav a.rc-race-state-kommend.is-active,
.rc-mobile-race-tabs a.rc-race-state-kommend.is-active {
    background: rgba(255, 209, 102, .20) !important;
    border-color: rgba(255, 209, 102, .44) !important;
    border-bottom-color: var(--ts-race-upcoming) !important;
    color: #5a4216 !important;
}

.rc-header-race-subnav a.rc-race-state-ergebnisse.is-active,
.rc-mobile-race-tabs a.rc-race-state-ergebnisse.is-active {
    background: rgba(184, 74, 74, .14) !important;
    border-color: rgba(184, 74, 74, .28) !important;
    border-bottom-color: var(--ts-race-results) !important;
    color: #6f2424 !important;
}

@media (max-width: 820px) {
    .rc-site-header-v3 .rc-mobile-race-tabs a.rc-race-state-heute,
    .rc-site-header-v3 .rc-mobile-race-tabs a.rc-race-state-kommend,
    .rc-site-header-v3 .rc-mobile-race-tabs a.rc-race-state-ergebnisse {
        border-bottom-width: 3px !important;
    }

    .rc-site-header-v3 .rc-mobile-race-tabs a.rc-race-state-heute.is-active {
        background: rgba(31, 138, 76, .24) !important;
        color: #f8fff9 !important;
        border-color: rgba(31, 138, 76, .38) !important;
        border-bottom-color: var(--ts-race-today) !important;
    }

    .rc-site-header-v3 .rc-mobile-race-tabs a.rc-race-state-kommend.is-active {
        background: rgba(255, 209, 102, .24) !important;
        color: #fff8df !important;
        border-color: rgba(255, 209, 102, .48) !important;
        border-bottom-color: var(--ts-race-upcoming) !important;
    }

    .rc-site-header-v3 .rc-mobile-race-tabs a.rc-race-state-ergebnisse.is-active {
        background: rgba(184, 74, 74, .22) !important;
        color: #fff4f4 !important;
        border-color: rgba(184, 74, 74, .38) !important;
        border-bottom-color: var(--ts-race-results) !important;
    }
}



/* V239: Einheitliches Desktop-Header-System
   Ziel: Logo links als eigene Markenfläche, Navigation als klare Leiste,
   Aktionen rechts, Suche/Dropdown ohne seitenabhängiges Springen. */
@media (min-width: 761px){
  body .rc-topbar.rc-site-header.rc-site-header-v3{
    position:relative!important;
    display:block!important;
    width:min(1420px, calc(100vw - 64px))!important;
    max-width:1420px!important;
    min-height:172px!important;
    margin:18px auto 28px!important;
    padding:0!important;
    border-radius:0 0 28px 28px!important;
    overflow:visible!important;
    background:
      linear-gradient(90deg, rgba(2,33,20,.06) 0, rgba(2,33,20,.14) 28%, rgba(255,255,255,0) 58%),
      radial-gradient(circle at 58% 18%, rgba(221,187,107,.12), rgba(221,187,107,0) 28%),
      linear-gradient(135deg, #05361f 0%, #063b25 42%, #04331f 100%)!important;
    color:#fff!important;
    box-shadow:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:0 0 28px 28px;
    pointer-events:none;
    background:
      linear-gradient(110deg, transparent 0 37%, rgba(255,255,255,.08) 38%, transparent 41%),
      linear-gradient(110deg, transparent 0 45%, rgba(216,181,96,.09) 46%, transparent 48%);
    opacity:.55;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 > .rc-header-v3-inner{
    position:relative!important;
    z-index:2!important;
    display:grid!important;
    grid-template-columns:340px minmax(420px,1fr) auto!important;
    grid-template-rows:1fr 54px!important;
    grid-template-areas:
      "logo stage actions"
      "logo nav actions"!important;
    align-items:center!important;
    gap:0 24px!important;
    width:100%!important;
    height:172px!important;
    max-width:none!important;
    margin:0!important;
    padding:0 26px 0 28px!important;
    box-sizing:border-box!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-topline{
    display:contents!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo{
    grid-area:logo!important;
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:330px!important;
    min-width:330px!important;
    max-width:330px!important;
    height:148px!important;
    margin:0!important;
    padding:0!important;
    line-height:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    overflow:visible!important;
    z-index:3!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    display:block!important;
    width:300px!important;
    max-width:300px!important;
    height:auto!important;
    max-height:148px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-navline{
    grid-area:nav!important;
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:0!important;
    width:100%!important;
    max-width:720px!important;
    justify-self:center!important;
    align-self:start!important;
    margin:0!important;
    padding:0!important;
    z-index:10!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-portal-nav,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-primary-nav-v3,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-main-nav{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    width:auto!important;
    max-width:100%!important;
    gap:8px!important;
    margin:0!important;
    padding:7px 10px!important;
    border-radius:999px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    background:rgba(0,0,0,.18)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-portal-link,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-link,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-primary-nav-v3 a,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-main-nav a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:30px!important;
    height:30px!important;
    padding:0 12px!important;
    border-radius:999px!important;
    border:1px solid rgba(255,255,255,.13)!important;
    background:rgba(255,255,255,.075)!important;
    color:rgba(255,255,255,.93)!important;
    font-size:13px!important;
    font-weight:900!important;
    line-height:1!important;
    white-space:nowrap!important;
    text-decoration:none!important;
    box-sizing:border-box!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-portal-link:hover,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-link:hover,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-portal-link.is-active,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-link.is-active,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-group.is-active .rc-header-race-link{
    background:#f1eadf!important;
    border-color:#f1eadf!important;
    color:#073a25!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-group{
    position:relative!important;
    display:inline-flex!important;
    flex:0 0 auto!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav{
    position:absolute!important;
    top:calc(100% + 10px)!important;
    left:0!important;
    z-index:99999!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:6px!important;
    width:max-content!important;
    min-width:150px!important;
    max-width:220px!important;
    margin:0!important;
    padding:9px!important;
    border-radius:16px!important;
    background:#fffdf8!important;
    border:1px solid rgba(28,55,44,.12)!important;
    box-shadow:0 18px 40px rgba(0,0,0,.18)!important;
    opacity:0!important;
    transform:translateY(-4px)!important;
    pointer-events:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-group:hover .rc-header-race-subnav,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-group:focus-within .rc-header-race-subnav{
    opacity:1!important;
    transform:translateY(0)!important;
    pointer-events:auto!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-height:34px!important;
    height:auto!important;
    padding:0 12px!important;
    border-radius:999px!important;
    background:#f1eadf!important;
    border:1px solid rgba(28,55,44,.10)!important;
    color:#7b5521!important;
    font-size:13px!important;
    font-weight:900!important;
    white-space:nowrap!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    grid-area:actions!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:10px!important;
    margin:0!important;
    min-width:230px!important;
    align-self:center!important;
    z-index:12!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-icon-button,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-toggle,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    position:static!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:44px!important;
    width:44px!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0!important;
    border-radius:999px!important;
    border:1px solid rgba(255,255,255,.42)!important;
    background:#f8f3e8!important;
    color:#073a25!important;
    box-shadow:none!important;
    font-size:18px!important;
    line-height:1!important;
    text-decoration:none!important;
    box-sizing:border-box!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    width:auto!important;
    min-width:132px!important;
    gap:8px!important;
    padding:0 16px!important;
    font-size:14px!important;
    font-weight:900!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-mini-text{
    display:inline!important;
    white-space:nowrap!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    position:absolute!important;
    left:380px!important;
    right:310px!important;
    bottom:19px!important;
    z-index:20!important;
    padding:0!important;
    margin:0!important;
    width:auto!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel[hidden]{display:none!important;}

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 112px!important;
    gap:8px!important;
    width:100%!important;
    max-width:720px!important;
    margin:0 auto!important;
    padding:7px!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.13)!important;
    border:1px solid rgba(255,255,255,.18)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3 input{
    min-height:38px!important;
    border-radius:999px!important;
    border:0!important;
    padding:0 18px!important;
    background:#fffdf8!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3 button{
    min-height:38px!important;
    border-radius:999px!important;
    border:0!important;
    background:#d7ac51!important;
    color:#073a25!important;
    font-weight:900!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-mobile-main-tabs,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-mobile-sub-tabs{
    display:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:calc(100% + 12px)!important;
    right:24px!important;
    left:auto!important;
    width:min(330px, calc(100vw - 48px))!important;
    z-index:100000!important;
  }
}

@media (min-width: 761px) and (max-width: 1180px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 > .rc-header-v3-inner{
    grid-template-columns:290px minmax(360px,1fr) auto!important;
    gap:0 16px!important;
    padding-left:22px!important;
    padding-right:22px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo{
    width:285px!important;
    min-width:285px!important;
    max-width:285px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    width:260px!important;
    max-width:260px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-portal-nav,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-primary-nav-v3,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-main-nav{
    gap:6px!important;
    padding:6px 8px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-portal-link,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-link,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-primary-nav-v3 a,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-main-nav a{
    min-height:30px!important;
    height:30px!important;
    padding:0 9px!important;
    font-size:12.5px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    min-width:198px!important;
    gap:8px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    min-width:112px!important;
    padding:0 12px!important;
  }
}

@media (max-width: 760px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    width:132px!important;
    max-width:calc(100vw - 190px)!important;
    max-height:86px!important;
  }
}

/* V240: Header-Feinschliff – Menüposition, Renntermine-Ampel, dezente Rennsport-Bühne */
@media (min-width: 761px){
  body .rc-topbar.rc-site-header.rc-site-header-v3{
    overflow:visible!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3::before{
    content:""!important;
    position:absolute!important;
    left:340px!important;
    right:270px!important;
    top:20px!important;
    bottom:18px!important;
    z-index:0!important;
    pointer-events:none!important;
    background:
      radial-gradient(ellipse at 22% 45%, rgba(226,190,110,.16) 0%, rgba(226,190,110,.06) 28%, transparent 58%),
      linear-gradient(115deg, transparent 0%, transparent 36%, rgba(255,255,255,.08) 37%, transparent 42%),
      linear-gradient(115deg, transparent 0%, transparent 47%, rgba(226,190,110,.08) 48%, transparent 54%),
      linear-gradient(90deg, transparent 0%, rgba(255,255,255,.035) 48%, transparent 74%)!important;
    opacity:.9!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 > .rc-header-v3-inner{
    position:relative!important;
    z-index:2!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-navline,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    z-index:4!important;
  }

  /* Hamburger-Menü näher am Button statt zu tief unter dem Header */
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:76px!important;
    right:24px!important;
    left:auto!important;
    width:min(330px, calc(100vw - 48px))!important;
    z-index:100000!important;
  }

  /* Renntermine Dropdown: wieder nebeneinander mit Status-/Ampel-Look */
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-group{
    position:relative!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav{
    top:calc(100% + 8px)!important;
    left:0!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:7px!important;
    width:max-content!important;
    min-width:0!important;
    max-width:none!important;
    padding:8px!important;
    border-radius:18px!important;
    background:#fffdf8!important;
    border:1px solid rgba(28,55,44,.13)!important;
    box-shadow:0 16px 36px rgba(0,0,0,.16)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:92px!important;
    min-height:34px!important;
    height:34px!important;
    padding:0 13px!important;
    border-radius:999px!important;
    font-size:12.5px!important;
    font-weight:950!important;
    line-height:1!important;
    white-space:nowrap!important;
    box-shadow:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a.rc-race-state-heute{
    background:rgba(31,138,76,.13)!important;
    border:1px solid rgba(31,138,76,.30)!important;
    color:#0f5138!important;
    border-bottom:3px solid #1f8a4c!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a.rc-race-state-kommend{
    background:rgba(218,176,85,.16)!important;
    border:1px solid rgba(218,176,85,.40)!important;
    color:#6b4b13!important;
    border-bottom:3px solid #d9ae4f!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a.rc-race-state-ergebnisse{
    background:rgba(184,74,74,.11)!important;
    border:1px solid rgba(184,74,74,.28)!important;
    color:#7a2424!important;
    border-bottom:3px solid #b84a4a!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a.is-active{
    color:#073a25!important;
    background:#f1eadf!important;
    border-color:rgba(28,55,44,.16)!important;
  }
}

@media (min-width: 761px) and (max-width: 1180px){
  body .rc-topbar.rc-site-header.rc-site-header-v3::before{
    left:290px!important;
    right:230px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:72px!important;
    right:18px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a{
    min-width:84px!important;
    padding:0 10px!important;
    font-size:12px!important;
  }
}

/* V241: Header-Feinschliff nach Live-Screens
   - Suche nicht mehr über der Navigation
   - Hamburger-Menü leicht tiefer
   - Renntermine-Dropdown dunkler und klarer erkennbar
   - dezente Rennszene im Bühnenbereich */
@media (min-width: 761px){
  body .rc-topbar.rc-site-header.rc-site-header-v3{
    overflow:visible!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3::after{
    content:""!important;
    position:absolute!important;
    left:370px!important;
    right:235px!important;
    top:18px!important;
    bottom:22px!important;
    z-index:0!important;
    pointer-events:none!important;
    opacity:.18!important;
    background:
      linear-gradient(110deg, transparent 0%, transparent 38%, rgba(236,204,132,.18) 39%, transparent 45%),
      radial-gradient(ellipse at 50% 34%, rgba(239,210,144,.16) 0%, rgba(239,210,144,.07) 26%, transparent 58%),
      url('logo/header-logo-v239.png') center 44% / 430px auto no-repeat!important;
    filter:saturate(.85) contrast(.95)!important;
    mix-blend-mode:screen!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 > .rc-header-v3-inner,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-navline,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    position:relative!important;
    z-index:5!important;
  }

  /* Suche als eigenes Overlay unter dem Header, nicht mehr über den Links */
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    position:absolute!important;
    top:calc(100% + 10px)!important;
    bottom:auto!important;
    left:360px!important;
    right:250px!important;
    z-index:99990!important;
    width:auto!important;
    padding:0!important;
    margin:0!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3{
    max-width:760px!important;
    margin:0 auto!important;
    padding:7px!important;
    border-radius:999px!important;
    background:rgba(5,49,31,.96)!important;
    border:1px solid rgba(231,195,122,.30)!important;
    box-shadow:0 16px 34px rgba(0,0,0,.18)!important;
  }

  /* Hamburger-Menü etwas tiefer, aber noch am Button orientiert */
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:92px!important;
    right:24px!important;
    left:auto!important;
    z-index:100000!important;
  }

  /* Renntermine-Dropdown: dunkler Fond, Ampel klarer sichtbar */
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav{
    top:calc(100% + 0px)!important;
    left:0!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:max-content!important;
    min-width:0!important;
    max-width:none!important;
    padding:9px!important;
    border-radius:18px!important;
    background:rgba(5,49,31,.98)!important;
    border:1px solid rgba(231,195,122,.32)!important;
    box-shadow:0 18px 40px rgba(0,0,0,.22)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:96px!important;
    min-height:35px!important;
    height:35px!important;
    padding:0 14px!important;
    border-radius:999px!important;
    font-size:12.5px!important;
    font-weight:950!important;
    line-height:1!important;
    white-space:nowrap!important;
    color:#fffdf8!important;
    text-shadow:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a.rc-race-state-heute{
    background:rgba(31,138,76,.34)!important;
    border:1px solid rgba(80,205,129,.55)!important;
    border-bottom:3px solid #35c56c!important;
    color:#f4fff7!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a.rc-race-state-kommend{
    background:rgba(218,176,85,.31)!important;
    border:1px solid rgba(231,195,122,.62)!important;
    border-bottom:3px solid #e7c37a!important;
    color:#fff7df!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a.rc-race-state-ergebnisse{
    background:rgba(184,74,74,.34)!important;
    border:1px solid rgba(238,128,128,.58)!important;
    border-bottom:3px solid #de6565!important;
    color:#fff1f1!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a.is-active,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav a:hover{
    background:#fff4df!important;
    color:#073a25!important;
    border-color:#e7c37a!important;
  }
}

@media (min-width: 761px) and (max-width: 1180px){
  body .rc-topbar.rc-site-header.rc-site-header-v3::after{
    left:300px!important;
    right:210px!important;
    background-size:360px auto!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    left:300px!important;
    right:220px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:88px!important;
    right:18px!important;
  }
}


/* V242: echte Rennszene im Desktop-Header + stabile Overlay-Positionen */
@media (min-width: 761px){
  body .rc-topbar.rc-site-header.rc-site-header-v3{
    position:relative!important;
    isolation:isolate!important;
    overflow:visible!important;
    background:#05331f!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3::before{
    content:""!important;
    position:absolute!important;
    inset:0!important;
    z-index:0!important;
    pointer-events:none!important;
    border-radius:inherit!important;
    opacity:.72!important;
    background:
      linear-gradient(90deg, rgba(5,49,31,.93) 0%, rgba(5,49,31,.76) 27%, rgba(5,49,31,.36) 52%, rgba(5,49,31,.68) 100%),
      linear-gradient(180deg, rgba(2,24,14,.16) 0%, rgba(2,24,14,.56) 100%),
      url('header-race-scene-v242.png') center center / cover no-repeat!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3::after{
    content:""!important;
    position:absolute!important;
    inset:0!important;
    z-index:1!important;
    pointer-events:none!important;
    border-radius:inherit!important;
    opacity:.64!important;
    background:
      radial-gradient(ellipse at 18% 50%, rgba(3,44,27,.96) 0%, rgba(3,44,27,.78) 19%, rgba(3,44,27,.20) 35%, transparent 52%),
      linear-gradient(90deg, rgba(3,44,27,.72) 0%, transparent 34%, rgba(3,44,27,.14) 64%, rgba(3,44,27,.68) 100%)!important;
    mix-blend-mode:normal!important;
    filter:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 > .rc-header-v3-inner,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-navline,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo{
    position:relative!important;
    z-index:5!important;
  }

  /* Suche bleibt ein separates Feld unterhalb der Header-Bühne */
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    position:absolute!important;
    top:calc(100% + 10px)!important;
    left:360px!important;
    right:260px!important;
    z-index:99990!important;
    width:auto!important;
    padding:0!important;
    margin:0!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3{
    max-width:760px!important;
    margin:0 auto!important;
    padding:7px!important;
    border-radius:999px!important;
    background:rgba(5,49,31,.97)!important;
    border:1px solid rgba(231,195,122,.34)!important;
    box-shadow:0 18px 38px rgba(0,0,0,.24)!important;
  }

  /* Hamburger-Menü wieder etwas tiefer als V241, aber noch klar am Button */
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:calc(100% + 2px)!important;
    right:24px!important;
    left:auto!important;
    z-index:100000!important;
  }

  /* Renntermine-Untermenü: kompakt, dunkel, Ampel weiterhin klar */
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-race-subnav{
    top:calc(100% + 0px)!important;
    left:0!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:max-content!important;
    min-width:0!important;
    max-width:none!important;
    padding:9px!important;
    border-radius:18px!important;
    background:rgba(4,39,25,.98)!important;
    border:1px solid rgba(231,195,122,.36)!important;
    box-shadow:0 18px 40px rgba(0,0,0,.28)!important;
  }
}

@media (min-width: 761px) and (max-width: 1180px){
  body .rc-topbar.rc-site-header.rc-site-header-v3::before{
    background-position:center center!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    left:300px!important;
    right:220px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:calc(100% + 2px)!important;
    right:18px!important;
  }
}


/* V243: nur Feinschliff – Rennszene minimal sichtbarer, Dropdowns höher */


/* V244: nur Hamburger-Menü 20px höher setzen */
@media (min-width: 761px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:calc(100% - 18px)!important;
  }
}

@media (min-width: 761px) and (max-width: 1180px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:calc(100% - 18px)!important;
  }
}

/* V246: Mobile-Header Richtung Vorlage – großes Logo + deutlichere Rennszene
   Nur mobiler oberer Headerbereich. Quicknav/Untermenü bleiben strukturell unverändert. */
@media (max-width: 760px){
  body .rc-topbar.rc-site-header.rc-site-header-v3{
    position:relative!important;
    isolation:isolate!important;
    overflow:hidden!important;
    background:#052f1d!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3::before{
    content:""!important;
    position:absolute!important;
    left:0!important;
    right:0!important;
    top:0!important;
    height:178px!important;
    z-index:0!important;
    pointer-events:none!important;
    opacity:1!important;
    background:
      linear-gradient(90deg, rgba(4,40,25,.60) 0%, rgba(4,40,25,.18) 42%, rgba(4,40,25,.22) 100%),
      linear-gradient(180deg, rgba(2,22,14,.10) 0%, rgba(2,22,14,.18) 48%, rgba(2,22,14,.56) 100%),
      url('header-race-scene-v242.png') 58% 50% / cover no-repeat!important;
    filter:saturate(1.18) contrast(1.14) brightness(1.18)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3::after{
    content:""!important;
    position:absolute!important;
    left:0!important;
    right:0!important;
    top:0!important;
    height:178px!important;
    z-index:1!important;
    pointer-events:none!important;
    background:
      radial-gradient(ellipse at 19% 56%, rgba(246,220,151,.18) 0%, rgba(246,220,151,.08) 28%, transparent 48%),
      linear-gradient(90deg, rgba(2,28,17,.18) 0%, transparent 32%, rgba(2,28,17,.08) 70%, rgba(2,28,17,.24) 100%)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 > .rc-header-v3-inner{
    position:relative!important;
    z-index:5!important;
    padding-top:14px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-topline,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-navline,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    position:relative!important;
    z-index:6!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo{
    align-self:start!important;
    padding-top:4px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    width:205px!important;
    max-width:calc(100vw - 190px)!important;
    max-height:150px!important;
    height:auto!important;
    object-fit:contain!important;
    object-position:left top!important;
    filter:drop-shadow(0 10px 20px rgba(0,0,0,.24))!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    align-self:start!important;
    padding-top:26px!important;
    gap:8px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-icon-button,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-toggle,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
    background:#fff8ea!important;
    color:#073a25!important;
    box-shadow:0 10px 22px rgba(0,0,0,.16)!important;
  }
}

@media (max-width: 420px){
  body .rc-topbar.rc-site-header.rc-site-header-v3::before,
  body .rc-topbar.rc-site-header.rc-site-header-v3::after{
    height:170px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    width:192px!important;
    max-width:calc(100vw - 184px)!important;
    max-height:142px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    padding-top:24px!important;
    gap:7px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-icon-button,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-toggle,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;
  }
}

@media (max-width: 370px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-logo img{
    width:176px!important;
    max-width:calc(100vw - 172px)!important;
    max-height:130px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    padding-top:23px!important;
    gap:6px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-icon-button,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-toggle,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
  }
}

/* V247: Mobile Hamburger-Menü über Header/Tab-Leisten legen und scrollbar machen */
@media (max-width: 760px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    position:fixed!important;
    top:188px!important;
    left:18px!important;
    right:18px!important;
    width:auto!important;
    max-width:none!important;
    max-height:calc(100vh - 210px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    z-index:2147483000!important;
  }
}

@media (max-width: 420px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:178px!important;
    left:16px!important;
    right:16px!important;
    max-height:calc(100vh - 198px)!important;
  }
}

@media (max-width: 370px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:168px!important;
    left:14px!important;
    right:14px!important;
    max-height:calc(100vh - 186px)!important;
  }
}


/* V248: mobiles Hamburger-Menü noch etwas höher für mehr sichtbare Links */
@media (max-width: 760px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:176px!important;
    max-height:calc(100vh - 196px)!important;
  }
}

@media (max-width: 420px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:164px!important;
    max-height:calc(100vh - 184px)!important;
  }
}

@media (max-width: 370px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-menu-panel{
    top:156px!important;
    max-height:calc(100vh - 174px)!important;
  }
}

/* V308: Mobiles Konto-Icon mit Login-Status */
@media (max-width: 760px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    position:relative!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-out{
    background:#fff8ea!important;
    color:#073a25!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in{
    background:linear-gradient(135deg,#e7c37a 0%,#fff2cf 100%)!important;
    color:#073a25!important;
    border-color:rgba(231,195,122,.95)!important;
    box-shadow:0 10px 24px rgba(231,195,122,.22), 0 10px 22px rgba(0,0,0,.16)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in::after{
    content:""!important;
    position:absolute!important;
    right:5px!important;
    top:5px!important;
    width:11px!important;
    height:11px!important;
    border-radius:999px!important;
    background:#1f8a4c!important;
    border:2px solid #fff8ea!important;
    box-shadow:0 2px 7px rgba(0,0,0,.22)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in span:first-child{
    transform:translateY(1px)!important;
    filter:saturate(.35) contrast(1.1)!important;
  }
}


/* V151: Desktop-Feinschliff Header - Anmelden, Login-Status, bessere Nav-Abstände und Suche links vom Icon */
@media (min-width: 761px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    min-width:252px!important;
    gap:10px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-portal-nav,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-primary-nav-v3,
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-main-nav{
    gap:10px!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    min-width:142px!important;
    padding:0 18px!important;
    gap:9px!important;
    position:relative!important;
    overflow:visible!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-out{
    background:#fff8ea!important;
    color:#073a25!important;
    border-color:rgba(255,255,255,.46)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in{
    background:linear-gradient(135deg,#e7c37a 0%,#fff2cf 100%)!important;
    color:#073a25!important;
    border-color:rgba(231,195,122,.95)!important;
    box-shadow:0 10px 24px rgba(231,195,122,.22), 0 10px 22px rgba(0,0,0,.16)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in::after{
    content:""!important;
    position:absolute!important;
    right:7px!important;
    top:7px!important;
    width:10px!important;
    height:10px!important;
    border-radius:999px!important;
    background:#1f8a4c!important;
    border:2px solid #fff8ea!important;
    box-shadow:0 2px 7px rgba(0,0,0,.22)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in span:first-child{
    transform:translateY(1px)!important;
    filter:saturate(.35) contrast(1.1)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    top:25px!important;
    left:auto!important;
    right:158px!important;
    bottom:auto!important;
    width:min(540px, calc(100vw - 560px))!important;
    max-width:540px!important;
    margin:0!important;
    z-index:99990!important;
    transform-origin:right center!important;
    animation:rcHeaderSearchSlide .18s ease-out;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3{
    max-width:none!important;
    margin:0!important;
  }
}

@keyframes rcHeaderSearchSlide{
  from{opacity:0;transform:translateX(12px) scale(.98);}
  to{opacity:1;transform:translateX(0) scale(1);}
}


/* V152: Desktop Header finaler Feinschliff - Anmelden/Login-Status und ausfahrende Suche */
@media (min-width: 761px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-topline{
    position:relative!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-v3-actions{
    position:absolute!important;
    right:24px!important;
    top:28px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:10px!important;
    min-width:0!important;
    z-index:100001!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link{
    width:auto!important;
    min-width:138px!important;
    height:44px!important;
    min-height:44px!important;
    padding:0 17px!important;
    gap:8px!important;
    position:relative!important;
    overflow:visible!important;
    border-radius:999px!important;
    font-size:14px!important;
    font-weight:950!important;
    letter-spacing:.01em!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-mini-text{
    display:inline!important;
    white-space:nowrap!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-out{
    background:#fff8ea!important;
    color:#073a25!important;
    border-color:rgba(255,255,255,.55)!important;
    box-shadow:0 10px 22px rgba(0,0,0,.14)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in{
    background:linear-gradient(135deg,#e7c37a 0%,#fff2cf 100%)!important;
    color:#073a25!important;
    border-color:rgba(231,195,122,.95)!important;
    box-shadow:0 12px 26px rgba(231,195,122,.25), 0 10px 22px rgba(0,0,0,.16)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in::after{
    content:""!important;
    position:absolute!important;
    right:7px!important;
    top:6px!important;
    width:10px!important;
    height:10px!important;
    border-radius:999px!important;
    background:#16884b!important;
    border:2px solid #fff8ea!important;
    box-shadow:0 2px 7px rgba(0,0,0,.24)!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in::before{
    content:"aktiv"!important;
    position:absolute!important;
    left:18px!important;
    bottom:-17px!important;
    color:#f5e7c8!important;
    font-size:10px!important;
    font-weight:950!important;
    text-transform:uppercase!important;
    letter-spacing:.07em!important;
    opacity:.92!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-search-toggle{
    position:relative!important;
    z-index:100003!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    position:absolute!important;
    top:28px!important;
    right:calc(24px + 44px + 10px + 138px + 10px + 44px + 10px)!important;
    left:auto!important;
    bottom:auto!important;
    width:0!important;
    max-width:none!important;
    min-width:0!important;
    height:44px!important;
    padding:0!important;
    margin:0!important;
    overflow:visible!important;
    z-index:100002!important;
    transform-origin:right center!important;
    animation:rcSearchDrawerOpen .20s ease-out forwards!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel[hidden]{
    display:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3{
    position:absolute!important;
    right:0!important;
    top:0!important;
    width:520px!important;
    max-width:calc(100vw - 560px)!important;
    height:44px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 94px!important;
    gap:6px!important;
    align-items:center!important;
    margin:0!important;
    padding:5px!important;
    border-radius:999px!important;
    background:rgba(5,49,31,.98)!important;
    border:1px solid rgba(231,195,122,.38)!important;
    box-shadow:0 16px 34px rgba(0,0,0,.22)!important;
    transform-origin:right center!important;
    animation:rcSearchDrawerInner .20s ease-out forwards!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3 input{
    height:34px!important;
    min-height:34px!important;
    border-radius:999px!important;
    padding:0 14px!important;
    font-size:13px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3 button{
    height:34px!important;
    min-height:34px!important;
    border-radius:999px!important;
    padding:0 13px!important;
    font-size:12px!important;
  }
}

@keyframes rcSearchDrawerOpen{
  from{opacity:0;}
  to{opacity:1;}
}

@keyframes rcSearchDrawerInner{
  from{opacity:0;transform:scaleX(.05);}
  to{opacity:1;transform:scaleX(1);}
}


/* V153: Korrektur Desktop-Header - Aktiv-Text ausblenden und Suche weiter nach links */
@media (min-width: 761px){
  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-account-icon-link.is-logged-in::before{
    content:none!important;
    display:none!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-panel{
    right:258px!important;
  }

  body .rc-topbar.rc-site-header.rc-site-header-v3 .rc-header-search-v3{
    width:500px!important;
    max-width:calc(100vw - 600px)!important;
  }
}
