/*  Hinweisleiste ganz oben auf der Startseite.
 *
 *  Vorher: zwei Textblöcke in Arial, per <br/> auf zwei enge Zeilen gequetscht,
 *  Telefonnummer und E-Mail als reiner Text, kein Schliessen-Knopf – und dabei
 *  position: sticky, die Leiste lief also dauerhaft mit.
 *
 *  Alle Regeln sind unter .cl-topbar verschachtelt.
 */

.cl-topbar {
  --tb-gelb: #ffdb51;
  --tb-dunkel: #141414;
  position: sticky;
  inset: 0 0 auto;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(90deg, #ffd63f 0%, #ffdb51 45%, #ffe587 100%);
  color: var(--tb-dunkel);
  box-shadow: 0 1px 0 rgba(20, 20, 20, .08);
}

.cl-topbar .top-bar-container---brix {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 18px;
  width: 100%;
  max-width: 1240px;
  padding: 9px 56px;
  overflow: visible;
  font-family: Epilogue, sans-serif;
}

/* Kurs-Kennzeichnung als Pille */
.cl-topbar .heading-23 {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--tb-dunkel);
  color: #fff;
  font-family: Epilogue, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  white-space: nowrap;
}

.cl-topbar .cl-topbar-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.cl-topbar .cl-topbar-teil {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.cl-topbar .cl-topbar-teil svg { flex: none; opacity: .75; }

.cl-topbar b { font-weight: 700; }

/* "Noch Plätze frei" */
.cl-topbar .cl-topbar-frei {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(20, 20, 20, .09);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.cl-topbar .cl-topbar-frei svg { flex: none; opacity: 1; color: #1d6b39; }

/* Telefon und E-Mail sind jetzt anklickbar */
/* Wie auf dem Rest der Seite: keine dauerhafte Unterstreichung. Das Symbol
   davor zeigt bereits, worum es geht. */
.cl-topbar a {
  color: var(--tb-dunkel);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.cl-topbar a:hover { border-color: rgba(20, 20, 20, .55); }
.cl-topbar a:focus-visible { outline: 2px solid var(--tb-dunkel); outline-offset: 3px; }

/* Schliessen */
.cl-topbar .cl-topbar-zu {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tb-dunkel);
  cursor: pointer;
  transition: background-color .2s;
}

.cl-topbar .cl-topbar-zu:hover { background: rgba(20, 20, 20, .12); }
.cl-topbar .cl-topbar-zu:focus-visible { outline: 2px solid var(--tb-dunkel); outline-offset: 2px; }

/* ------------------------------------------------------------------ Schmal */

@media (max-width: 991px) {
  .cl-topbar .top-bar-container---brix { padding: 8px 46px; gap: 6px 12px; }
  .cl-topbar .cl-topbar-info { font-size: 13px; gap: 4px 12px; }
}

@media (max-width: 767px) {
  /* Die Leiste läuft mit, darf also nicht zu viel Platz kosten. */
  .cl-topbar .top-bar-container---brix {
    padding: 7px 40px 7px 12px;
    justify-content: flex-start;
    gap: 4px 10px;
  }
  .cl-topbar .heading-23 { font-size: 11.5px; padding: 3px 9px; }
  /* Die Gruppe würde als Ganzes umbrechen und damit eine Zeile verschwenden.
     display:contents lässt ihre Teile einzeln umbrechen. */
  .cl-topbar .cl-topbar-info { display: contents; }
  .cl-topbar .cl-topbar-teil,
  .cl-topbar .cl-topbar-frei { font-size: 12px; }
  .cl-topbar .cl-topbar-teil { gap: 5px; }
  .cl-topbar .cl-topbar-teil svg { width: 13px; height: 13px; }
  .cl-topbar .cl-topbar-frei { font-size: 11.5px; padding: 3px 9px; }
  /* Die E-Mail ist auf dem Handy der unwichtigste Teil und würde umbrechen */
  .cl-topbar .cl-topbar-mail { display: none; }
  .cl-topbar .cl-topbar-zu { right: 6px; width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .cl-topbar, .cl-topbar .cl-topbar-zu { transition: none; }
}
