.termine,
.termine .wrap,
.kurs-kalender {
  overflow-x: visible;
  border: 2px solid #000;
  background: #fff;
  border-radius: 16px;
  padding: 6px;
}

.kurs-grid {
  display: grid;
  gap: 1px;
  min-width: 980px; /* damit Tage schön Platz haben */
}

.kurs-header,
.kurs-row {
  display: grid;
  grid-template-columns: 80px repeat(31, 64px); /* Monat links, Tage rechts */
  align-items: center;
  gap: 1px;
}

.kurs-header .cell,
.kurs-row .cell {
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid #000;
  border-radius: 4px;
  background: #f7f7f7;
  font-size: 12px;
  user-select: none;
  padding: 0;
}

.kurs-header .cell {
  background: #fff3a6;
  font-weight: 700;
}

.cell.month {
  justify-content: start;
  padding-left: 8px;
  font-weight: 700;
  background: #e9f0ff;
}

.cell.day-empty {
  background: transparent;
  border: 0;
}

.kurs-icon-btn {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.kurs-icon-btn img {
  width: 64px;
  height: 64px;
  display: block;
}

/* Modal */
.kurs-modal.hidden { display: none; }

.kurs-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.kurs-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.kurs-modal__card {
  position: relative;
  width: min(520px, calc(100vw - 24px));
  margin: 10vh auto 0;
  background: #fff;
  border: 3px solid #000;
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.kurs-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 28px;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.kurs-modal__title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 10px;
}

.kurs-modal__line {
  margin: 6px 0;
  font-size: 14px;
}

.cell.today {
  outline: 3px solid #ff2a2a;
  box-shadow: 0 0 0 4px rgba(255, 42, 42, .25);
  background: #fff;
}

.kurs-day-badge {
  font-size: 10px;
  margin-top: 2px;
  line-height: 1;
}

.termine__head{
  display: block;         /* statt flex */
}

.termine__title{
  display: block;
  margin: 0 0 12px 0;     /* Abstand nach unten */
}
 
/* Standard: alle Zellen weiß */
.kurs-row .cell { background: #fff; }

/* Sonntage dunkelgelb */
.kurs-row .cell.sunday {
  background: #8a6f00;
  color: #fff;
}

/* Ungültige Tage (z.B. 31 im April) */
.kurs-row .cell.day-empty {
  background: transparent;
  border: 0;
}

/* ================================= */
/* KURSTERMINE – MOBILE OPTIMIERUNG */
/* ================================= */

@media (max-width: 768px) {
  /* Desktop grid auf mobile nicht erzwingen */
  .kurs-grid { min-width: 0 !important; }

  .kurs-mobile__tabs{
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 10px;
    -webkit-overflow-scrolling: touch;
  }

  .kurs-mobile__tab{
    flex: 0 0 auto;
    border: 2px solid #000;
    border-radius: 999px;
    padding: 8px 12px;
    background: #fff3a6;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
  }

  .kurs-mobile__tab.is-active{
    background: #ffd24d;
  }

  .kurs-mobile__tab.is-empty{
    opacity: .55;
  }

  .kurs-mobile__list{
    display: grid;
    gap: 10px;
    padding-top: 4px;
  }

  .kurs-mobile__row{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;

    border: 3px solid #000;
    border-radius: 16px;
    background: #fff;
    padding: 14px;

    cursor: pointer;
    text-align: left;
  }

  /* Sonntag = gelbe Zeile */
  .kurs-mobile__row.sunday{
    background: #8a6f00;
    color: #fff;
  }

  /* Heute */
  .kurs-mobile__row.today{
    outline: 3px solid #ff2a2a;
    box-shadow: 0 0 0 4px rgba(255, 42, 42, .25);
  }

  .kurs-mobile__wd{
    font-weight: 900;
    font-size: 12px;
    opacity: .9;
  }

  .kurs-mobile__dm{
    font-weight: 900;
    font-size: 16px;
  }

  .kurs-mobile__icons{
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .kurs-mobile__icon{
    width:  96px;
    height: 96px;
    display: block;
  }

  .kurs-mobile__icon-fallback{
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 2px solid #000;
    border-radius: 16px;
    font-weight: 900;
	font-size: 24px;
    background: rgba(255,255,255,.85);
    color: #000;
  }

  .kurs-mobile__more,
  .kurs-mobile__count{
    font-weight: 900;
    border: 2px solid #000;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(255,255,255,.85);
    color: #000;
    font-size: 12px;
  }

  .kurs-mobile__empty{
    border: 2px dashed #000;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    font-weight: 700;
  }
}

/* ===== DESKTOP (wide): Monate vertikal, Kurstage horizontal ===== */
.kurs-wide{
  display: grid;
  gap: 18px;
}

.kurs-wide__month{
  border: 3px solid #000;
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  overflow: hidden;  
}

.kurs-wide__month-title{
  font-weight: 900;
  font-size: 18px;
  margin: 0 0 10px 0;
}

.kurs-wide__days{
  display: flex;              /* <- FEHLT bei dir */
  flex-wrap: nowrap;          /* <- verhindert Zeilenumbruch */
  gap: 12px;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  overflow-x: auto;           /* <- horizontal scroll */
  overflow-y: hidden;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;

}


/* Card etwas kompakter */
.kurs-wide__day{
  padding: 10px 12px 8px;   /* statt 12px rundum */
  width: 220px;             /* so lassen – passt gut */
}

/* Wochentag + Datum in einer Zeile */
.kurs-wide__wd,
.kurs-wide__dm{
  display: inline;
  white-space: nowrap;
  line-height: 1.15;
}

.kurs-wide__wd{
  margin-right: 6px;
  font-size: 12px;
  font-weight: 900;
}

.kurs-wide__dm{
  font-size: 16px;
  font-weight: 900;
}

/* Icons = Hauptfokus (Comic-Sticker Look) */
.kurs-wide__icons{
  margin-top: 6px;   /* statt 10px → weniger Leerraum */
  gap: 6px;          /* statt 8px */
}

/* WICHTIG: größere Icons */
.kurs-wide__icon{
  width: 84px;       /* vorher 64px */
  height: 84px;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); /* optional, sieht sehr gut aus */
}

/* Fallback-Icons anpassen */
.kurs-wide__icon-fallback{
  width: 84px;
  height: 84px;
  font-size: 26px;
}
.kurs-wide__day:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,.25);
}


.kurs-wide__badge{
  margin-left: auto;
  font-weight: 900;
  border: 2px solid #000;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255,255,255,.85);
  color: #000;
  font-size: 12px;
}

.kurs-wide__empty{
  border: 2px dashed #000;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  font-weight: 700;
}

/* ===== Sticky Monatsüberschrift (Desktop) ===== */
.kurs-wide__month-title{
  position: sticky;
  top: 10px;              /* Abstand zum oberen Rand */
  z-index: 5;

  /* damit der Text beim Scrollen nicht "durchsichtig" über Inhalt liegt */
  background: #fff;
  padding: 6px 10px;
  border: 2px solid #000;
  border-radius: 12px;

  /* optional: leichter Schatten für "floating" Effekt */
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

/* Kurstermine – Story-Bilder an Prüfungstermine angleichen */
@media (min-width: 900px){
  .story__grid{
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Kurstermine: Story exakt wie Prüfungstermine */
@media (min-width: 900px){
  .story__grid{
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Kurstermine: Erzählertext optisch größer */
.story__item--narrator img{
  padding: 0;          /* nimmt die zusätzliche Luft weg */
  object-fit: cover;   /* füllt den Frame komplett */
  background: transparent;
}

.kurs-filter{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px 0;
}

.kurs-filter__label{
  font-weight: 900;
}

.kurs-filter__select{
  border: 3px solid #000;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  font-weight: 800;
}

/* === KURS-WIDE: kompakter + größere Icons + Datum 1-zeilig === */

/* weniger Innen-Luft in der Tageskarte */
.kurs-wide__day{
  padding: 10px;            /* war 12px */
  width: 210px;             /* optional: minimal schmaler, damit 3 Karten sichtbarer */
}

/* Datum auf 1 Zeile
.kurs-wide__wd{ display: none; }Wochentag ausblenden (optional) */

.kurs-wide__dm{
  font-size: 15px;          /* leicht kleiner, damit es sicher 1-zeilig bleibt */
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
}

/* Alternativ: Wochentag behalten -> dann statt display:none: */
/* DO + Datum in einer Zeile */
.kurs-wide__wd,
.kurs-wide__dm{
  display: inline;
  line-height: 1.15;
}

.kurs-wide__wd{
  margin-right: 6px;
}

.kurs-wide__dm{
  font-size: 15px;
  white-space: nowrap;
}

.kurs-wide__icon,
.kurs-wide__icon-fallback{
  width: 78px;              /* war 64px */
  height: 78px;
}

/* Badge etwas kleiner/kompakter */
.kurs-wide__badge{
  padding: 3px 8px;
  font-size: 11px;
}

/* ===== Badge als Sticker rechts oben ===== */

/* Tageskarte = Bezugspunkt für absolute Position */
.kurs-wide__day{
  position: relative;
  width: 260px;                 /* ggf. 240–280 je nach Geschmack */
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

/* Datum oben links fix 1-zeilig */
.kurs-wide__date{
  display: flex;
  gap: 8px;
  align-items: baseline;
  white-space: nowrap;
}

.kurs-wide__wd,
.kurs-wide__dm{
  display: inline-block;
  white-space: nowrap;
  line-height: 1.15;
  margin: 0;
}

/* Icons: sauber oben links, dürfen nicht schrumpfen */
.kurs-wide__icons{
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 8px;
  width: 100%;
}

.kurs-wide__icon,
.kurs-wide__icon-fallback{
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
}

/* BADGE als Sticker rechts oben */
.kurs-wide__badge{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;

  margin-left: 0;               /* falls irgendwo noch drin steht */
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1;
  border: 2px solid #000;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
