:root{
  --brand:#e30613;
  --bg:#fff;
  --text:#111;
  --muted:#666;
  --line:rgba(0,0,0,.12);
  --shadow:0 10px 28px rgba(0,0,0,.12);
  --radius:14px;
  --ticker-speed: 46s;

  /* Mobile sizes (Admin) */
  --m-logo-w: 200px;
  --m-logo-h: 24px;
  --m-search-w: 50vw;
  --m-search-max: 180px;
  --m-search-min: 110px;
}

*{ box-sizing:border-box; }
.bd-header{
  position: sticky;
  top:0;
  z-index:1000;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

/* TICKER */
.bd-ticker{
  background: var(--brand);
  color:#fff;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.bd-ticker__inner{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  overflow:hidden;
}
.bd-ticker__label{
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing:.4px;
  font-size: 13px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.bd-ticker__viewport{
  flex: 1 1 auto;
  overflow:hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.bd-ticker__track{
  display:inline-flex;
  align-items:center;
  gap: 18px;
  white-space: nowrap;
  will-change: transform;
  animation: bd-marquee var(--ticker-speed) linear infinite;
  padding-left: 100%;
}

/* Chip-Link */
.bd-ticker__item{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  color:#fff;
  font-weight: 800;
  font-size: 13px;
  opacity:.95;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  transition: opacity .15s ease, background .15s ease;
}
.bd-ticker__item:hover{ opacity:1; background: rgba(255,255,255,.16); }
.bd-ticker__sep{
  width:6px; height:6px; border-radius:999px;
  background: rgba(255,255,255,.65);
  flex: 0 0 auto;
}

@keyframes bd-marquee{
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* TOPBAR (mobile first) */
.bd-top{
  display:grid;
  /* Mobile: Logo | Suche | Burger */
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
}

/* Logo */
.bd-logo{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  color:var(--text);
  gap: 10px;
  min-width: 0;
}
.bd-logo__badge{
  background: var(--brand);
  color:#fff;
  font-weight: 900;
  letter-spacing: .6px;
  padding: 8px 10px;
  border-radius: 9px;
  line-height: 1;
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(227,6,19,.22);
  white-space: nowrap;
}
.bd-logo__img{
  height: var(--logo-h, 30px);
  width: auto;
  max-width: var(--logo-w, 170px);
  display:block;
}
.bd-logo__text{
  display:none;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .2px;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  max-width: 16ch;
}

/* Search */
.bd-search{
  display:flex;
  align-items:center;
  gap:10px;
  border: 1px solid var(--line);
  background:#fff;
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 0;
  /* Mobile sizing via Admin */
  width: var(--m-search-w, 50vw);
  max-width: var(--m-search-max, 180px);
  min-width: var(--m-search-min, 110px);
  justify-self: center;
}
.bd-search:focus-within{
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.bd-search svg{ width:18px; height:18px; color: var(--muted); flex: 0 0 auto; }
.bd-search input{
  border:0;
  outline:none;
  background:transparent;
  width:100%;
  font-size: 14px;
}

/* Extra-tight Handy (<= 480px) */
@media (max-width: 979px){
  /* Mobile logo sizing from Admin (applies to all mobile widths) */
  .bd-logo__img{
    height: var(--m-logo-h, var(--logo-h, 30px)) !important;
    max-width: var(--m-logo-w, var(--logo-w, 170px)) !important;
  }
}

/* Extra-tight Handy (<= 480px) */
@media (max-width: 480px){
  .bd-top{ gap: 8px; padding: 10px; }

  /* Logo kleiner (Admin + zusätzlich kompaktere Badge-Styles) */
  .bd-logo__badge{ padding: 6px 8px; font-size: 14px; border-radius: 8px; }

  /* Suche: Handyansicht kompakter */
  .bd-search{ padding: 6px 8px; }
  .bd-search input{ font-size: 13px; }

  .bd-iconbtn{ width: 40px; height: 40px; border-radius: 12px; }
}

/* Icon button */
.bd-iconbtn{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .06s ease, box-shadow .12s ease;
}
.bd-iconbtn:active{ transform: scale(.98); }
.bd-iconbtn:hover{ box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.bd-iconbtn svg{ width:22px; height:22px; color: var(--text); }

/* Right-side actions (mobile): Search icon + Burger */
.bd-actions{ display:flex; align-items:center; gap: 10px; justify-self: end; grid-column: 3; }

/* Desktop search shown, mobile search icon shown */
.bd-search--desktop{ display:none; }
.bd-searchbtn{ display:inline-grid; }

/* Mobile search row (hidden until toggled) */
.bd-msearch{
  display:none;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  margin: 0 12px 12px;
  border: 1px solid var(--line);
  background:#fff;
  border-radius: 10px;
}
.bd-msearch svg{ width:18px; height:18px; color: var(--muted); flex: 0 0 auto; }
.bd-msearch input{
  border:0;
  outline:none;
  background:transparent;
  width:100%;
  font-size: 14px;
}
.bd-msearch__close{
  border:0;
  background:transparent;
  font-size: 22px;
  line-height: 1;
  cursor:pointer;
  color: var(--muted);
  padding: 0 4px;
}
.bd-header.bd-header--msearch .bd-msearch{ display:flex; }

/* Desktop NAV */
.bd-nav{ display:none; justify-content:center; align-items:center; min-width:0; position:relative; z-index:1200; }
.bd-nav__list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  /* Dropdowns müssen außerhalb sichtbar sein (sonst werden sie abgeschnitten) */
  overflow: visible;
}
.bd-nav__list .bd-nav__item{ list-style:none; margin:0; padding:0; }
.bd-nav__list a{
  display:inline-flex;
  align-items:center;
  padding: 10px 14px;
  text-decoration:none;
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .15px;
  white-space: nowrap;
  transition: background .12s ease;
}
.bd-nav__list a:hover{ background: transparent; color: var(--brand); }
.bd-nav__sep{
  width:1px;
  height: 18px;
  background: var(--line);
}

/* Desktop layout: Logo links | Menü Mitte | Suche rechts | Burger nur mobile */
@media (min-width: 980px){
  .bd-top{
    grid-template-columns: auto 1fr auto;
    padding: 14px 16px;
    gap: 12px;
  }
  .bd-logo__text{ display:inline; }
  /* Desktop: Suchfeld rechts, ohne mobile Max/Min-Einschränkungen */
  .bd-search{
    width: min(420px, 36vw);
    max-width: none;
    min-width: 0;
    justify-self: end;
  }
  .bd-search--desktop{ display:flex; }
  .bd-searchbtn{ display:none; }
  .bd-actions{ display:none; }
  .bd-nav{ display:flex; }
  .bd-burger{ display:none; }
}

/* Desktop dropdowns */
.bd-nav__item{ position: relative; }

/* Pfeil nur bei Items mit Untermenü */
.bd-nav__has-children > a::after{
  content: "▾";
  display:inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  transform: translateY(-1px);
}

/* Hover-Bridge: verhindert, dass das Dropdown "zuklappt", bevor die Maus im Menü ist */
.bd-nav__has-children::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height: 12px;
}

.bd-nav__dd{
  position:absolute;
  left: 0;
  top: 100%;
  margin-top: 10px;
  background:#fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(0,0,0,.12);
  padding: 8px;
  min-width: 240px;
  list-style: none;
  margin-left: 0;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 1400;
}
.bd-nav__dd li{ list-style:none; margin:0; padding:0; }
.bd-nav__dd a{
  display:flex;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 13px;
}
.bd-nav__dd a:hover{ background: transparent; color: var(--brand); }

.bd-nav__has-children:hover > .bd-nav__dd{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Tastatur: wenn Link fokussiert ist, Dropdown offen halten */
.bd-nav__has-children:focus-within > .bd-nav__dd{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Drawer */
.bd-drawer{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display:none;
  z-index: 2000;
}
.bd-drawer[aria-hidden="false"]{ display:block; }

.bd-panel{
  position:absolute;
  top:0;
  right:0;
  width: min(92vw, 420px);
  height: 100%;
  background:#fff;
  box-shadow: var(--shadow);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform .22s ease;
  display:flex;
  flex-direction:column;
}
.bd-drawer[aria-hidden="false"] .bd-panel{ transform: translateX(0); }

.bd-panel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.bd-panel__title{ font-weight: 900; letter-spacing:.2px; }

.bd-panel__nav{ padding: 10px 14px 18px; overflow:auto; }
.bd-panel__link,
.bd-acc__btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 14px 10px;
  text-decoration:none;
  color: var(--text);
  font-weight: 900;
  border-bottom: 1px solid var(--line);
  background:transparent;
  border-left:0;border-right:0;border-top:0;
  cursor:pointer;
  text-align:left;
}

/* Remove theme blue backgrounds on accordion buttons (hover/focus) */
.bd-acc__btn,
.bd-acc__btn:hover,
.bd-acc__btn:focus,
.bd-acc__btn:focus-visible{
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
}
.bd-acc__btn:focus-visible{
  outline: 2px solid rgba(0,0,0,.18);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Mobile icon buttons: ensure truly no background */
.bd-burger,
#bdSearch,
#bdSearchBtn,
.bd-searchbtn,
#bdClose{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Some themes add blue focus/hover backgrounds to <button>. Kill it for the search icon explicitly. */
.bd-searchbtn:hover,
.bd-searchbtn:focus,
.bd-searchbtn:focus-visible,
.bd-searchbtn:active{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}
.bd-panel__link small,
.bd-acc__btn small{
  color: var(--muted);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .25px;
  margin-left:auto;
  opacity:.9;
}
.bd-panel__chev, .bd-acc__chev{ color: var(--muted); font-size:18px; line-height:1; }

.bd-acc{ display:none; padding-left:10px; }
.bd-acc.is-open{ display:block; }

.bd-acc__item{ border-bottom: 1px solid transparent; }
.bd-acc__title{ display:inline-flex; gap:10px; align-items:center; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .bd-ticker__track{ animation: none; padding-left: 0; }
  .bd-panel{ transition:none; }
}
