/* Events-Seiten — kleine Ergänzungen zum PAGE-KIT
   Nur zwei Anliegen: Featured-Karte als Solo-Element ohne Mindesthöhe,
   Agenda-Zeilen kompakt mit sichtbarer Uhrzeit (auch mobil). */

/* Featured-Event-Karte full-width in der Events-Liste */
.event-feature--solo { min-height: 0; }
.event-feature--solo .event-feature__ctas { padding-top: 40px; }

/* Agenda: kompakte Zeit-Zeilen im Programm */
.agenda .list-row { padding: 14px 0; gap: 16px; grid-template-columns: auto 1fr; }
.agenda .list-row__lead {
  display: block;
  font-size: 18px;
  min-width: 56px;
  letter-spacing: 0;
  color: var(--muted);
}
.agenda .list-row__title { font-size: 16px; }
.agenda .list-row:hover { opacity: 1; }
.agenda-day > .eyebrow { color: var(--ink); }

/* ==========================================================================
   P4d — Events: Hybrid-Schiene, Webinare, Speaker (E1–E5)
   Erweiterungen zum PAGE-KIT, nur Tokens aus style.css, keine neuen Farben.
   ========================================================================== */

/* ---------- Fakten-Strip (Datum · Ort · Format · Dauer) ---------- */
.event-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px 32px;
  margin: 0;
  border-top: 1px solid var(--line-onW);
  border-bottom: 1px solid var(--line-onW);
}
.event-facts__item { padding: 22px 0; }
.event-facts__item dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.event-facts__item dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

/* ---------- Stream-/Aufzeichnungs-Embed (responsive 16:9) ---------- */
.stream-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--r-4);
  overflow: hidden;
  box-shadow: var(--shadow-l);
}
.stream-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Speaker-Karten (E2) — volle Breite, fixe Clip-Höhe ---------- */
.speaker-grid { margin-top: 8px; }
.speaker-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-onW);
  border-radius: var(--r-4);
  background: var(--bg);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}
.speaker-card:hover,
.speaker-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-l);
  border-color: var(--line);
  outline: none;
}
.speaker-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.speaker-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.speaker-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* NUR hier erlaubt (E2). */
  display: block;
}
.speaker-card__media--blue { background: var(--blue); }
.speaker-card__media--ink  { background: var(--ink); }
.speaker-card__media--moss { background: var(--moss); }
.speaker-card__media--sand { background: var(--bg-sandHi); }
.speaker-card__initials {
  font-family: var(--font-display);
  font-size: clamp(40px, 9vw, 56px);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.speaker-card__media--sand .speaker-card__initials { color: var(--ink); }
.speaker-card__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(17,24,39,0.72), rgba(17,24,39,0));
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}
.speaker-card:hover .speaker-card__hint,
.speaker-card:focus-visible .speaker-card__hint { opacity: 1; transform: translateY(0); }
.speaker-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 20px 20px;
}
.speaker-card__name { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); }
.speaker-card__role { font-size: 14px; color: var(--ink-soft); }
.speaker-card__org  { font-size: 13px; color: var(--muted); }

/* Desktop: feste Clip-Höhe statt 1:1 */
@media (min-width: 720px) {
  .speaker-card__media { aspect-ratio: auto; height: 260px; }
}

/* ---------- Speaker-Modal (E1) ---------- */
.speaker-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.speaker-modal[hidden] { display: none; }
.speaker-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17,24,39,0.55);
  backdrop-filter: blur(2px);
}
.speaker-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--r-4);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: var(--shadow-l);
  animation: speakerModalIn 220ms var(--ease);
}
@keyframes speakerModalIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.speaker-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.speaker-modal__close:hover { background: var(--bg-warm); color: var(--ink); }
.speaker-modal__head { margin-bottom: 20px; padding-right: 36px; }
.speaker-modal__name { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin: 8px 0 4px; color: var(--ink); }
.speaker-modal__role { font-size: 15px; color: var(--blue); font-weight: 500; }
.speaker-modal__bio p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 14px; }
.speaker-modal__themen { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-onW); }
.speaker-modal__pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Mobile: Modal als Bottom-Sheet */
@media (max-width: 620px) {
  .speaker-modal { align-items: flex-end; padding: 0; }
  .speaker-modal__dialog {
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    animation: speakerSheetIn 260ms var(--ease);
  }
  @keyframes speakerSheetIn {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
}

/* ---------- Countdown-Timer (E5, Webinar) ---------- */
.countdown { text-align: center; }
.countdown__label { display: block; color: var(--muted); margin-bottom: 16px; }
.countdown__grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.countdown__grid[hidden] { display: none; }
.countdown__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: clamp(58px, 18vw, 96px);
  padding: clamp(14px, 3vw, 22px) clamp(8px, 2vw, 16px);
  background: var(--blue);
  border-radius: var(--r-4);
}
.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.countdown__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.countdown__sep {
  align-self: center;
  font-family: var(--font-display);
  font-size: clamp(22px, 6vw, 36px);
  font-weight: 600;
  color: var(--blue);
  padding-top: clamp(10px, 2vw, 18px);
}
.countdown__done {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 600;
  color: var(--blue);
}
.countdown__done[hidden] { display: none; }

/* Sehr schmale Viewports: 4 gleiche Kacheln ohne Trenner, kein Überlauf. */
@media (max-width: 430px) {
  .countdown__grid { gap: 6px; }
  .countdown__sep { display: none; }
  .countdown__tile { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; }
}

/* ---------- Curriculum-Timeline (E5, Webinar-Agenda) ---------- */
.curriculum { list-style: none; margin: 0; padding: 0; }
.curriculum__item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 20px;
  padding: 0 0 26px;
  position: relative;
}
.curriculum__item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: -8px;
  width: 2px;
  background: var(--line);
}
.curriculum__item:last-child { padding-bottom: 0; }
.curriculum__item:last-child::before { display: none; }
.curriculum__time {
  position: relative;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  padding-left: 22px;
}
.curriculum__time::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--bg-warm);
}
.curriculum__title { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--ink); }
.curriculum__desc { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

@media (max-width: 560px) {
  .curriculum__item { grid-template-columns: 1fr; gap: 4px; padding-left: 22px; }
  .curriculum__item::before { left: 5px; }
  .curriculum__time { padding-left: 0; }
  .curriculum__time::before { left: -22px; }
}

/* ---------- Anmeldung: Verpflegung, Fehler, Zugangslink ---------- */
.register-wrap { position: relative; }
.register-form__essen {
  border: 1px solid var(--line-onW);
  border-radius: var(--r-4);
  padding: 18px 20px;
  margin: 0;
}
.register-form__essen legend { padding: 0 6px; }
.register-form__options { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.register-form__error {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-radius: var(--r-4);
  background: rgba(184,58,58,0.08);
  border: 1px solid rgba(184,58,58,0.28);
  color: var(--live);
  font-size: 15px;
}
.register-form__error[hidden] { display: none; }

.access-link {
  margin: 24px auto 4px;
  max-width: 520px;
  padding: 20px 22px;
  background: var(--blue-lt);
  border: 1px solid #D6E0EC;
  border-radius: var(--r-4);
  text-align: left;
}
.access-link__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.access-link__url {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--blue);
  word-break: break-all;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.access-link__hint { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- E4 Test-Mode-Switcher (nur bei ?preview=1) ---------- */
.preview-switcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 14px;
  background: var(--ink);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-l);
}
.preview-switcher__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-right: 4px;
}
.preview-switcher a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.preview-switcher a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.preview-switcher a.is-active { background: #fff; color: var(--ink); }

@media (max-width: 480px) {
  .preview-switcher { left: 16px; right: 16px; justify-content: center; }
}
