/* Seitenlayout der Webinar-Terminübersicht – zuerst für das Handy gebaut.
   Nutzt ausschließlich die Tokens aus pm24-tokens.css – keine eigenen Hex-Werte.
   Koralle sitzt bewusst nur an wenigen Stellen: in den Köpfen der Kalenderblätter,
   im Akzentwort des Titels, in den Häkchen und auf dem Knopf, sobald man ein Blatt berührt.
   Alles andere bleibt ruhig. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--space-3); }
body { min-height: 100vh; overflow-x: clip; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.spalte { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 var(--space-2); }

/* Sprunglink für Tastatur */
.skip-link { position: absolute; left: var(--space-2); top: var(--space-2); z-index: 10; transform: translateY(-200%); }
.skip-link:focus-visible { transform: none; }

/* ---------- Kopfleiste: Querlogo links, Telefon rechts ---------- */
.leiste { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.leiste__inhalt { max-width: 640px; margin: 0 auto; padding: 12px var(--space-2); display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.leiste__logo { display: block; flex: 0 1 auto; border-radius: var(--radius-sm); }
.leiste__logo img { display: block; width: 196px; height: auto; }
.leiste__logo:focus-visible, .leiste__tel:focus-visible { outline: 3px solid var(--fokus); outline-offset: 4px; }
/* Am Handy: runder 48-px-Knopf mit Hörer, Nummer nur für Screenreader */
.leiste__tel { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); min-width: 48px; min-height: 48px; border-radius: var(--radius-pill); background: var(--koralle-hell); color: var(--koralle-on); font-weight: 700; text-decoration: none; transition: background-color .2s ease; }
.leiste__tel:hover { background: var(--koralle); }
.leiste__tel svg { width: 22px; height: 22px; flex: none; }
.leiste__tel-label, .leiste__tel-nummer { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf (weiß, endet in einem flachen zartblauen Bogen) ---------- */
.kopf { position: relative; background: var(--weiss); text-align: center; padding: var(--space-3) 0 40px; overflow: hidden; }
.kopf::before, .kopf::after { content: ""; position: absolute; left: -25%; right: -25%; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.kopf::before { bottom: 8px; height: 32px; background: var(--hellblau); left: -10%; right: -40%; }
.kopf::after { bottom: -1px; height: 28px; background: var(--zartblau); }
.kopf__inhalt { max-width: 640px; margin: 0 auto; padding: 0 var(--space-2); display: grid; justify-items: center; }
.kopf__dachzeile { color: var(--stahlblau-text); margin-bottom: var(--space-1); }
.kopf__titel { font: 700 32px/1.15 var(--font-sans); color: var(--ink); text-wrap: balance; max-width: 18ch; }
.akzent-zeile { white-space: nowrap; }
/* Folgt ein Satzzeichen, sitzt es direkt hinter dem Kringel statt mit Leerraum davor */
.akzent--vor-zeichen { margin-right: .4em; }
/* Kringel skaliert in em mit der Schriftgröße: gleicher Abstand zu den Buchstaben auf jedem Gerät */
.akzent { position: relative; display: inline-block; color: var(--koralle-hover); margin: 0 .5em; }
.kringel { position: absolute; left: -.36em; top: -.12em; width: calc(100% + .72em); max-width: none; height: calc(100% + .26em); overflow: visible; pointer-events: none; }
.kringel path { fill: none; stroke: var(--koralle); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.kopf__einleitung { margin-top: 12px; color: var(--text); text-wrap: pretty; max-width: 40ch; }
.kopf__punkte { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px var(--space-2); color: var(--ink); }
.kopf__punkte li { display: inline-flex; align-items: center; gap: var(--space-1); }
.kopf__punkte svg { width: 22px; height: 22px; flex: none; color: var(--koralle); }
.kopf__slogan { margin-top: var(--space-2); }

/* ---------- Termine (zartblau): Kalenderblätter mit Abriss-Abschnitt ----------
   Alle Termine sind gleich groß und gleich gewichtet. Jede Karte ist quer: links ein fast
   quadratisches Kalenderblatt, rechts hinter der Abrisskante Uhrzeit und Anmelde-Knopf.
   Die Karten hängen leicht unterschiedlich schräg und richten sich beim Berühren auf. */
.termine { background: var(--zartblau); padding: var(--space-4) 0 var(--space-5); }
.termine__titel { font: 700 28px/1.25 var(--font-sans); color: var(--ink); text-align: center; text-wrap: balance; margin-bottom: 40px; }
.termine__hinweis { margin-top: var(--space-4); text-align: center; color: var(--text); text-wrap: pretty; }
.termine__leer { display: grid; gap: var(--space-1); text-align: center; background: var(--weiss); border-radius: var(--radius-lg); box-shadow: var(--schatten-karte); padding: var(--space-4) var(--space-3); }
.termine__leer .termine__titel { margin: 0; }

.karten { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.karten > li { position: relative; display: flex; }
/* Das nächste Blatt des Blocks schaut unten hervor */
.karten > li::before { content: ""; position: absolute; inset: 8px 6px -6px 6px; border-radius: 16px; background: var(--weiss); box-shadow: var(--schatten-karte); transform: rotate(1.2deg); }

.karte { --neigung: -.6deg; position: relative; z-index: 1; flex: 1; display: grid; grid-template-columns: 120px minmax(0, 1fr); background: var(--weiss); border-radius: 16px; box-shadow: var(--schatten-karte); color: var(--ink); text-decoration: none; transform: rotate(var(--neigung)); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.karten > li:nth-child(4n+2) .karte { --neigung: .5deg; }
.karten > li:nth-child(4n+3) .karte { --neigung: -.3deg; }
.karten > li:nth-child(4n) .karte { --neigung: .7deg; }

/* Kalenderblatt links, mit senkrechter Abrisskante und zwei ausgestanzten Halbkreisen */
.karte__blatt { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 16px; border-right: 2px dashed var(--linie); }
.karte__blatt::before, .karte__blatt::after { content: ""; position: absolute; right: -9px; z-index: 3; width: 16px; height: 16px; border-radius: var(--radius-kreis); background: var(--zartblau); }
.karte__blatt::before { top: -8px; }
.karte__blatt::after { bottom: -8px; }

/* Ringbindung */
.karte__ringe { position: absolute; top: -8px; left: 24%; right: 24%; z-index: 2; display: flex; justify-content: space-between; }
.karte__ringe span { width: 8px; height: 20px; border-radius: 4px; background: var(--ink); box-shadow: inset 0 2px 0 var(--stahlblau); }

.karte__kopf { align-self: stretch; padding: 16px 4px 8px; border-radius: 16px 0 0 0; background: var(--koralle); color: var(--koralle-on); font: 700 18px/1.2 var(--font-sans); }
.karte__tag { padding-top: 8px; font: 700 52px/1 var(--font-sans); font-variant-numeric: tabular-nums; }
.karte__monat { margin-top: 4px; padding: 0 4px; color: var(--stahlblau-text); font-size: 18px; line-height: 1.3; }

/* Rechts: Uhrzeit, Abstand, Knopf */
.karte__info { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; min-width: 0; padding: 20px 16px 16px 20px; }
.karte__zeit { font: 700 21px/1.3 var(--font-sans); font-variant-numeric: tabular-nums; }
.karte__titel { font-size: 15px; line-height: 1.4; color: var(--text); }
.karte__abstand { margin-bottom: 12px; font-size: 15px; line-height: 1.4; color: var(--stahlblau-text); }
/* Nur kurz vor dem Termin wird der Abstand zur Markierung */
.karte__abstand--bald { padding: 2px 12px; border-radius: var(--radius-pill); background: var(--koralle); color: var(--koralle-on); font-weight: 700; }

.karte__knopf { align-self: stretch; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); min-height: 48px; padding: 0 12px; border: 2px solid var(--stahlblau-text); border-radius: var(--radius-pill); background: var(--weiss); color: var(--stahlblau-text); font: 700 18px/1 var(--font-sans); white-space: nowrap; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.karte__knopf svg { width: 18px; height: 18px; flex: none; }
.karte__knopf-kurz { display: none; }
.karte__folgt { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 48px; color: var(--text); font-size: 15px; }
.karte__folgt svg { width: 18px; height: 18px; flex: none; color: var(--stahlblau); }

/* Berühren: das Blatt richtet sich auf, der Knopf wird Koralle */
.karte--link { cursor: pointer; }
.karte--link:hover, .karte--link:focus-visible { transform: translateY(-4px) rotate(0deg); }
.karte--link:hover .karte__knopf, .karte--link:focus-visible .karte__knopf { background: var(--koralle); border-color: var(--koralle); color: var(--koralle-on); }
.karte--link:focus-visible { outline: 3px solid var(--fokus); outline-offset: 4px; }
.karte--link:active { transform: scale(.98); }

/* Sprungziel aus /zum-webinar/<id>, solange noch kein Link hinterlegt ist */
.karten > li:target .karte { outline: 3px solid var(--stahlblau-text); outline-offset: 4px; }

/* Eine ruhige Ankunft: die Blätter erscheinen einmal beim Laden, kurz und gestaffelt */
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px); } }
.karten > li { animation: auftauchen .4s cubic-bezier(.22, 1, .36, 1) both; }
.karten > li:nth-child(2) { animation-delay: 40ms; }
.karten > li:nth-child(3) { animation-delay: 80ms; }
.karten > li:nth-child(4) { animation-delay: 120ms; }
.karten > li:nth-child(5) { animation-delay: 160ms; }
.karten > li:nth-child(6) { animation-delay: 200ms; }
.karten > li:nth-child(7) { animation-delay: 240ms; }
.karten > li:nth-child(n+8) { animation-delay: 280ms; }

/* Handys: kürzerer Knopftext, damit nichts umbricht */
@media (max-width: 439px) {
  .karte__knopf-lang { display: none; }
  .karte__knopf-kurz { display: inline; }
}
/* Sehr schmale Handys: Knopf ohne Symbol, Uhrzeit ohne "Uhr" */
@media (max-width: 399px) {
  .karte__knopf svg, .karte__uhr { display: none; }
  .karte__knopf { padding: 0 8px; }
  .karte__info { padding: 20px 12px 16px 16px; }
}

/* ---------- Koralle statt Rot für Links und Telefon ----------
   Orange-Ton aus den Tokens (koralle-hover), nur in großer Schrift (≥ 19 px fett),
   dort erfüllt er den Kontrast von 3:1. Die Komponenten-Datei bleibt unverändert. */
.pm-link, .pm-contact__mail { color: var(--koralle-hover); font-size: 19px; font-weight: 700; text-decoration-thickness: 2px; }
.pm-contact__phone { color: var(--koralle-hover); }

/* ---------- Kontakt (weiß) ---------- */
.kontakt { background: var(--weiss); padding: var(--space-5) 0; }
.kontakt__karte { margin: 0 auto; max-width: none; text-align: center; justify-items: center; background: var(--zartblau); box-shadow: none; padding: var(--space-4) var(--space-3); }
.kontakt__titel { color: var(--ink); }
.pm-contact__phone, .pm-contact__mail { display: inline-flex; align-items: center; min-height: 48px; overflow-wrap: anywhere; }
.pm-contact__phone { font-size: 28px; }
.pm-contact__phone:focus-visible, .pm-contact__mail:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ---------- Fuß (zartblau) ---------- */
.fuss { background: var(--zartblau); padding: var(--space-5) 0; text-align: center; }
.fuss__inhalt { display: grid; justify-items: center; gap: var(--space-2); }
.fuss__social-text { max-width: 36ch; }
.fuss__social { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-2); }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-kreis); color: var(--stahlblau); background: var(--weiss); transition: color .2s ease; }
.social-link:hover { color: var(--stahlblau-text); }
.social-link:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
.fuss__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--space-3); }
.fuss__links a { display: inline-flex; align-items: center; min-height: 48px; }
.fuss__copy { color: var(--text); }

/* ---------- Größere Bildschirme ---------- */
@media (min-width: 600px) {
  .kopf { padding: var(--space-5) 0 var(--space-6); }
  .kopf::after { height: 48px; }
    .kopf__titel { font-size: 40px; }
  .leiste__inhalt { padding: var(--space-2); }
  .leiste__logo img { width: 260px; }
  .leiste__tel { padding: 0 20px; background: transparent; border: 2px solid var(--koralle); }
  .leiste__tel:hover { background: var(--koralle-hell); }
  .leiste__tel-nummer { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .kopf__einleitung { font-size: 21px; line-height: 1.5; }
  .termine { padding: var(--space-5) 0 var(--space-6); }
  .termine__titel { font-size: 32px; margin-bottom: var(--space-5); }
  .karte { grid-template-columns: 144px minmax(0, 1fr); }
  .karte__tag { font-size: 64px; }
  .karte__info { padding: 24px 28px 20px; }
  .karte__zeit { font-size: 24px; }
  .karte__knopf { align-self: flex-start; padding: 0 24px; }
  .kontakt, .fuss { padding: var(--space-6) 0; }
  .pm-contact__phone { font-size: 32px; }
}

/* Breite Bildschirme: zwei Karten nebeneinander */
@media (min-width: 880px) {
  .spalte--breit { max-width: 1040px; }
  .karten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .karte, .karte__knopf, .social-link, .leiste__tel { transition: none; }
  .karten > li { animation: none; }
  .karte--link:hover, .karte--link:focus-visible, .karte--link:active { transform: rotate(var(--neigung)); }
}
