/* ==========================================================================
   ZHL Medienausleihe – EINE Design-Quelle für Web UND PDF.
   Inhalt steht jetzt im Markdown-Body; dieses CSS gibt allen Body-Elementen
   (h2, h3, table, ol, blockquote, img) ein einheitliches, festes Aussehen.
   ========================================================================== */

/* Design-Tokens 1:1 aus der LibreBooking-/ZHL-Medienausleihe (zhl-theme.css /
   zhl-start) übernommen, damit die Anleitungen wie Teil der Buchungsseite wirken. */
:root {
  --gruen: #009260;          /* UBT-Grün */
  --gruen-dunkel: #007a50;
  --grad: linear-gradient(135deg, #009260 0%, #007a50 100%);
  --tinte: #2d3748;
  --grau: #6b7a72;
  --linie: #e3eae6;
  --flaeche: #f5f8f6;
  --karte: #fff;
  --warn-bg: #fffbeb;
  --warn-rand: #e8a33d;
  --radius: 14px;
  --radius-sm: 10px;
  --schatten: 0 2px 8px rgba(20, 40, 30, .06);
  --schatten-lg: 0 16px 40px rgba(0, 116, 76, .14);
  /* Hind ist die Hausschrift von LibreBooking; identischer System-Fallback. */
  --serif: 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sans: 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--tinte);
  line-height: 1.6;
  background: var(--flaeche);
}

.page { max-width: 880px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.page-wide { max-width: 1180px; }

.doc { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); }
body.print .doc { border: none; border-radius: 0; box-shadow: none; }

/* ========================================================================
   Detail-Layout: Inhalt links, feststehende Aktions-Box rechts.
   Box steht im DOM VOR dem Inhalt -> auf Mobil oben (Buchungs-CTA zuerst).
   ======================================================================== */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.6rem; align-items: start; }
.doc-layout > .doc { grid-column: 1; grid-row: 1; }
.doc-layout > .side-actions { grid-column: 2; grid-row: 1; }

.side-actions {
  position: sticky; top: 5rem;
  background: var(--karte); border: 1px solid var(--linie);
  border-radius: var(--radius); box-shadow: var(--schatten); padding: 1.1rem;
}
.side-title {
  margin: 0 0 .8rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--grau);
}
.btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .8rem 1rem; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none; text-align: center; line-height: 1.2;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--schatten); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: var(--flaeche); color: var(--gruen-dunkel); border: 1px solid var(--linie); margin-top: .6rem; }
.btn-secondary:hover { background: #eef4f1; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-layout > .doc, .doc-layout > .side-actions { grid-column: 1; grid-row: auto; }
  .side-actions { position: static; }
}

/* ========================================================================
   ZHL-Chrome: Navbar + Footer (Optik aus zhl-chrome.css; Layout hier, da wir
   ohne Bootstrap arbeiten). Wird nur in der Web-Ansicht gerendert, nie im PDF.
   ======================================================================== */
.zhl-navbar { position: sticky; top: 0; z-index: 50; padding: .55rem 0; }
.zhl-nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.zhl-nav-right { display: flex; align-items: center; gap: .4rem; }
.zhl-navbar .nav-link { display: inline-block; padding: .5rem .8rem; text-decoration: none; }
.zhl-navbar-brand { display: inline-flex; align-items: center; }

.zhl-footer { padding: 1.6rem 1.5rem; text-align: center; margin-top: 2.5rem; }
.zhl-foot-inner { max-width: 1100px; margin: 0 auto; }
.zhl-footer a { text-decoration: none; }
.zhl-footer .mb-1 { margin-bottom: .35rem; font-weight: 600; }

/* ---- Kopf ---- */
.doc-header { border-bottom: 4px solid var(--gruen); }
.doc-header .hero {
  display: block; width: 100%; height: 240px; object-fit: cover; background: var(--flaeche);
}
.doc-title { padding: 1.6rem 2rem; }
.kat {
  display: inline-block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--gruen-dunkel); background: rgba(0,146,96,.1);
  padding: .2rem .6rem; border-radius: 99px; margin-bottom: .6rem;
}
.doc-title h1 { font-family: var(--serif); font-size: 2rem; line-height: 1.15; margin: 0 0 .4rem; }
.lead { font-size: 1.08rem; color: var(--grau); margin: 0; }

/* ---- Video ---- */
.video-wrap { padding: 1.4rem 2rem 0; }
.video-card {
  display: flex; align-items: center; gap: .9rem; text-decoration: none;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1rem 1.2rem; color: var(--tinte); font-weight: 600;
}
.video-card .play {
  flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--gruen);
  color: #fff; display: grid; place-items: center; font-size: 1rem;
}

/* Eingebetteter Player (YouTube/Vimeo-iframe oder <video>), responsiv 16:9 */
.video-embed {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: var(--radius); overflow: hidden; background: #000;
}
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-caption { margin: .5rem 0 0; color: var(--grau); font-size: .9rem; }
.video-caption .video-link { display: none; }  /* URL nur im PDF zeigen */

/* Bildergalerie (weitere Gerätefotos), responsives Raster */
.galerie {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .8rem; padding: 1.4rem 2rem 0;
}
.galerie img {
  width: 100%; height: 220px; object-fit: contain; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: var(--radius-sm); padding: .4rem;
}

/* ==========================================================================
   .prose – der gerenderte Markdown-Body. Hier wird aus normalem Markdown ein
   einheitliches Layout. Das ist die Stelle, die "immer gleich" garantiert.
   ========================================================================== */
.prose { padding: .4rem 2rem 2rem; }

/* h2 = Abschnitt (Überblick, Technische Daten, Objektive, ...) */
.prose h2 {
  font-family: var(--serif); font-size: 1.3rem; margin: 1.8rem 0 1rem;
  padding: 1.4rem 0 0 .7rem; border-top: 1px solid var(--linie);
  border-left: 4px solid var(--gruen); border-left-width: 0;
  position: relative;
}
.prose h2::before {
  content: ''; position: absolute; left: 0; top: 1.4rem; bottom: 0; width: 4px;
  background: var(--gruen); border-radius: 2px;
}
.prose h2 { padding-left: 1rem; }
.prose > h2:first-child { margin-top: .4rem; padding-top: 0; border-top: none; }
.prose > h2:first-child::before { top: 0; }

/* h3 = einzelnes Objektiv / Zubehörteil */
.prose h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; }

.prose p { margin: 0 0 .9rem; }
.prose strong { color: var(--gruen-dunkel); }

/* Bilder (Objektiv-/Zubehörfotos) – einheitlich begrenzt */
.prose img {
  display: block; max-width: 340px; width: 100%; height: auto;
  border-radius: 8px; border: 1px solid var(--linie); background: var(--flaeche);
  margin: .3rem 0 .8rem;
}

/* Technische-Daten-Tabelle */
.prose table { width: 100%; border-collapse: collapse; margin: .4rem 0 1rem; }
.prose th, .prose td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.prose thead th { color: var(--grau); font-weight: 600; border-bottom: 2px solid var(--linie); }
.prose tbody th { color: var(--grau); font-weight: 600; width: 42%; }

/* Nummerierte Schritt-für-Schritt-Liste */
.prose ol { counter-reset: s; list-style: none; padding: 0; margin: .5rem 0; }
.prose ol li { counter-increment: s; position: relative; padding: .2rem 0 .9rem 2.4rem; }
.prose ol li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--gruen); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .85rem;
}
.prose ul { padding-left: 1.2rem; margin: .5rem 0; }

/* Blockquote = Hinweis-/Warnungs-Kasten (Warnung beginnt im Text mit ⚠) */
.prose blockquote {
  margin: .8rem 0; padding: .7rem 1rem; border-left: 4px solid var(--warn-rand);
  background: var(--warn-bg); border-radius: 4px;
}
.prose blockquote p { margin: 0; }

.prose a { color: var(--gruen-dunkel); }
