/* Camplix · Blog-Beitrag (aus main.css ausgegliedert, als die das
   800-Zeilen-Budget riss). Lädt NUR auf /blog/<slug>/ — blog-post.js hängt
   den Link per extraHead an, build.mjs versioniert die Datei wie main.css.
   Lädt nach tailwind.css: keine position-Regel auf Elemente, deren sticky
   aus dem Markup kommt (siehe .cx-toc und .cx-toc-mobil). */

/* ── Blog-Prosa (gerendertes Markdown aus src/data/blog/) ─────────────
   Bewusst eigene Klasse statt eines Typography-Plugins: die Seite hat kein
   Tailwind-Plugin-Setup, und der Stil soll exakt zur restlichen Seite passen. */
.cx-prosa {
  color: #2C2C2C;
  font-size: 1.0625rem;
  line-height: 1.75;
}
.cx-prosa > * + * { margin-top: 1.1em; }
.cx-prosa h2, .cx-prosa h3, .cx-prosa h4 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  color: #2C2C2C;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-top: 1.9em;
}
.cx-prosa h2 { font-size: 1.55rem; }
.cx-prosa h3 { font-size: 1.25rem; }
.cx-prosa h4 { font-size: 1.05rem; }
.cx-prosa a { color: #2BA8A8; font-weight: 600; text-decoration: none; }
.cx-prosa a:hover { color: #1F8080; text-decoration: underline; }
.cx-prosa strong { font-weight: 700; }
.cx-prosa ul, .cx-prosa ol { padding-left: 1.4em; }
.cx-prosa ul { list-style: disc; }
.cx-prosa ol { list-style: decimal; }
.cx-prosa li + li { margin-top: 0.35em; }
.cx-prosa img {
  /* block: die *Bildunterschrift* in derselben Markdown-Zeile rutscht darunter.
     max-height deckelt vor allem Hochformat (ein Schild-Foto würde sonst den
     ganzen Bildschirm füllen); Klick öffnet die Galerie in voller Größe. */
  display: block;
  border-radius: 16px;
  margin: 1.6em auto;
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
  cursor: zoom-in;
}
.cx-prosa blockquote {
  border-left: 3px solid #2BA8A8;
  padding: 0.15em 0 0.15em 1.1em;
  color: #7A6C60;
  font-style: italic;
}
.cx-prosa hr { border: 0; border-top: 1px solid #F3F4F6; margin: 2.2em 0; }
.cx-prosa code {
  background: rgba(122, 108, 96, 0.10);
  border-radius: 6px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}
.cx-prosa pre { background: #2C2C2C; color: #F6F3EE; border-radius: 12px; padding: 1em 1.2em; overflow-x: auto; }
.cx-prosa pre code { background: none; padding: 0; color: inherit; }
.cx-prosa table { width: 100%; border-collapse: collapse; font-size: 0.95em; display: block; overflow-x: auto; }
.cx-prosa th, .cx-prosa td { border: 1px solid #F3F4F6; padding: 0.55em 0.8em; text-align: left; }
.cx-prosa th { background: #FAF8F5; font-weight: 700; }

/* Bildunterschriften: Hermes setzt "*Unterschrift*" direkt unters Bild —
   die kursive Zeile nach einem Bild wird zur Caption. */
.cx-prosa img + em {
  display: block;
  margin-top: -1.1em;
  margin-bottom: 1.6em;
  font-size: 0.85em;
  font-style: normal;
  color: #7A6C60;
  text-align: center;
}

/* Entwurfs-Vorschau: referenziertes, noch nicht hochgeladenes Bild */
.cx-bild-folgt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  margin: 1.6em 0;
  border: 2px dashed rgba(122, 108, 96, 0.35);
  border-radius: 16px;
  background: rgba(122, 108, 96, 0.06);
  color: #7A6C60;
  font-size: 0.9em;
  font-weight: 600;
  padding: 1em;
  text-align: center;
}
.cx-bild-folgt + em {
  display: block;
  margin-top: -1.1em;
  margin-bottom: 1.6em;
  font-size: 0.85em;
  font-style: normal;
  color: #7A6C60;
  text-align: center;
}

/* Die YouTube-Klick-Fassade (.cx-video*) liegt in main.css — Blog und
   Spot-Galerie teilen sie sich. */

/* ── Kapitel-Leiste am Blog-Beitrag (ab xl, seitlich) ─────────────────
   Eingeklappt nur die Wegpunkte (einer je Hauptüberschrift), beim
   Drüberfahren klappt sie zum Panel mit den Titeln auf. Der Abschnitt,
   in dem der Leser gerade ist, ist eingefärbt (data-aktiv, Scroll-Spy).
   Die geteilten Selektoren (.cx-toc-panel, .cx-toc-mobil) gehören zur
   mobilen Fassung weiter unten — gleiche Wegpunkt-Optik, andere Hülle. */
.cx-toc {
  /* KEIN position hier: das Markup setzt sticky (Tailwind), und diese Datei
     lädt nach tailwind.css — ein position:relative würde das Kleben
     überschreiben. sticky ist selbst Bezug für die ::before-Routenlinie. */
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 58px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  overflow: hidden;
  transition: width 250ms cubic-bezier(0.16, 1, 0.3, 1), background 200ms, box-shadow 200ms, border-color 200ms;
}
/* Die Route: gestrichelte Linie hinter den Wegpunkten, vom Start bis zum Zelt. */
.cx-toc::before,
.cx-toc-panel::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 32px;
  bottom: 32px;
  border-left: 2px dashed #DDD6CC;
}
.cx-toc:hover,
.cx-toc:focus-within {
  width: 272px;
  background: #fff;
  border-color: #F3F4F6;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.18);
}
.cx-toc a,
.cx-toc-panel a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 10px;
  text-decoration: none;
}
.cx-toc a:hover,
.cx-toc-panel a:hover { background: #FAF8F5; }
/* Wegpunkt: runder Marker, deckt die Route ab; aktiv = gefüllt türkis. */
.cx-toc .cx-toc-punkt,
.cx-toc-mobil .cx-toc-punkt {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid #E4DED5;
  color: #8B7F73;
  transition: background 200ms, border-color 200ms, color 200ms, transform 200ms;
}
.cx-toc a:hover .cx-toc-punkt,
.cx-toc-panel a:hover .cx-toc-punkt { border-color: #2BA8A8; color: #2BA8A8; }
.cx-toc a[data-aktiv] .cx-toc-punkt,
.cx-toc-panel a[data-aktiv] .cx-toc-punkt {
  background: #2BA8A8;
  border-color: #2BA8A8;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 10px -3px rgba(43, 168, 168, 0.55);
}
/* Das Ziel der Route: der Campingplatz, etwas größer. */
.cx-toc .cx-toc-spot .cx-toc-punkt,
.cx-toc-panel .cx-toc-spot .cx-toc-punkt { width: 36px; height: 36px; margin-left: -2px; }
.cx-toc .cx-toc-label,
.cx-toc-panel .cx-toc-label {
  font-size: 13px;
  font-weight: 600;
  color: #7A6C60;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 200ms, transform 200ms, color 200ms;
}
.cx-toc:hover .cx-toc-label,
.cx-toc:focus-within .cx-toc-label { opacity: 1; transform: none; }
.cx-toc a[data-aktiv] .cx-toc-label,
.cx-toc-panel a[data-aktiv] .cx-toc-label { color: #2BA8A8; }
.cx-toc a:hover .cx-toc-label,
.cx-toc-panel a:hover .cx-toc-label { color: #2C2C2C; }
.cx-toc .cx-toc-spot,
.cx-toc-panel .cx-toc-spot { margin-top: 8px; }

/* ── Kapitel-Route mobil (unter xl) ───────────────────────────────────
   Seitlich ist unter xl kein Platz. Stattdessen: schmaler Balken, der
   unterm Header kleben bleibt (sticky aus dem Markup, deshalb auch hier
   KEIN position auf .cx-toc-mobil) und immer den Abschnitt zeigt, in dem
   der Leser gerade ist. Ein Tipp klappt die volle Route als Panel auf,
   ein Tipp aufs Ziel springt hin und klappt zu. */
.cx-tm-knopf {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 8px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid #F3F4F6;
  border-radius: 9999px;
  box-shadow: 0 10px 28px -16px rgba(0, 0, 0, 0.28);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
/* Der Punkt im Balken ist immer der aktuelle Wegpunkt: gefüllt türkis. */
.cx-tm-knopf .cx-toc-punkt {
  width: 28px;
  height: 28px;
  background: #2BA8A8;
  border-color: #2BA8A8;
  color: #fff;
}
.cx-tm-stand {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #2C2C2C;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cx-tm-pfeil { flex: none; color: #8B7F73; transition: transform 200ms; }
.cx-toc-mobil[data-offen] .cx-tm-pfeil { transform: rotate(180deg); }
/* Aufgeklappte Route: legt sich über den Text statt ihn zu verschieben.
   Wegpunkte und Titel teilen sich die Regeln mit der Desktop-Leiste oben. */
.cx-toc-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: #fff;
  border: 1px solid #F3F4F6;
  border-radius: 18px;
  box-shadow: 0 26px 52px -22px rgba(0, 0, 0, 0.32);
  max-height: 70vh;
  overflow-y: auto;
}
/* display:flex oben schlaegt sonst das [hidden] aus dem Tailwind-Preflight
   (gleiche Spezifitaet, diese Datei laedt spaeter) — zu heisst zu. */
.cx-toc-panel[hidden] { display: none; }
.cx-toc-panel .cx-toc-label { opacity: 1; transform: none; }
.cx-toc-panel a[data-aktiv] { background: rgba(43, 168, 168, 0.08); }

/* Sprungziele: unter der festen Navigation landen, nicht dahinter.
   Unter xl klebt zusätzlich der Kapitel-Balken unterm Header — die Ziele
   brauchen dort mehr Abstand, sonst verschwindet die Überschrift darunter. */
.cx-prosa h2, #spot-box { scroll-margin-top: 140px; }
@media (min-width: 1280px) {
  .cx-prosa h2, #spot-box { scroll-margin-top: 110px; }
}
