/* Druckansicht für barbarine.de
   Wird nur beim Drucken bzw. "Als PDF sichern" verwendet (media="print"). */

@page { size: A4; margin: 16mm 16mm 18mm; }

/* Grundgrößen: kompakter als am Bildschirm */
html { font-size: 10pt !important; scroll-padding-top: 0 !important; }
html, body { background: #fff !important; color: #222 !important; }
body { font-size: 10.5pt !important; line-height: 1.5 !important; overflow: visible !important; }
:root { padding: 0 !important; }

/* Keine Animationen, nichts darf unsichtbar bleiben */
*, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
.reveal, .js .reveal, .hero-in > * { opacity: 1 !important; transform: none !important; }

/* Nur für den Bildschirm: Navigation, Buttons, Spielereien, Werbung, Statistik */
#progress, #totop, #lb, .falcon-glide, #tl-fill,
#hdr nav > div, #hdr nav > a.nav-cta, #hdr > div,
.hero-in > div, #falko, #gaestehaus, #statistik,
.footer-ad, main.legal > a:first-child { display: none !important; }

/* Kopfzeile: nur das Logo, nicht mehr klebend */
#hdr { position: static !important; background: none !important; border-bottom: 1pt solid #2D5A27 !important; padding: 0 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
#hdr nav { height: auto !important; padding: 0 0 3mm !important; max-width: none !important; }
#hdr nav > a img { height: 9mm !important; }

/* Abstände und Breiten zusammenziehen */
.max-w-6xl, .max-w-3xl, .max-w-2xl, .max-w-xl { max-width: none !important; }
.px-5 { padding-left: 0 !important; padding-right: 0 !important; }
section, section > div, main.legal { padding-top: 0 !important; padding-bottom: 0 !important; }
section { border: 0 !important; margin-top: 7mm !important; background: none !important; }
.min-h-\[80vh\] { min-height: 0 !important; }
main.legal, main > section:first-of-type { margin-top: 6mm !important; }
.mt-16, .mt-10, .mt-8 { margin-top: 5mm !important; }
.mt-6, .mt-5 { margin-top: 3mm !important; }
.gap-10, .gap-12, .gap-8 { gap: 5mm !important; }

/* Überschriften */
h1 { font-size: 22pt !important; line-height: 1.15 !important; }
h1 > span { font-size: 11pt !important; margin-bottom: 1mm !important; }
.legal h1 { font-size: 20pt !important; }
main h2, .legal h2 { font-size: 16pt !important; line-height: 1.2 !important; margin-top: 6mm !important; }
h3 { font-size: 12.5pt !important; line-height: 1.3 !important; }
h4 { font-size: 11pt !important; }
h1, h2, h3, h4 { color: #2D5A27 !important; break-after: avoid; page-break-after: avoid; }
p, li { orphans: 3; widows: 3; }
.text-lg, .text-xl, .stat-hello { font-size: 10.5pt !important; line-height: 1.5 !important; }
.text-4xl { font-size: 15pt !important; line-height: 1.2 !important; }

/* Startbereich: Text links, Bild klein rechts */
main > section:first-of-type { display: grid !important; grid-template-columns: 1fr 55mm !important; gap: 6mm !important; align-items: start !important; }
main > section:first-of-type > div { grid-column: auto !important; }
main > section:first-of-type img { width: 55mm !important; height: 45mm !important; object-fit: cover !important; }

/* Bilder: klein halten, nicht über Seiten zerreißen */
img { max-width: 100% !important; break-inside: avoid; page-break-inside: avoid; }
figure { break-inside: avoid; page-break-inside: avoid; margin-top: 3mm !important; }
figure img, img.zoomable { max-height: 60mm !important; width: auto !important; margin-left: 0 !important; }
figcaption { font-size: 8pt !important; color: #555 !important; }
/* Ortslage: Bild rechts neben den Text, Sonnenaufgang kleiner */
#ortslage-bild { float: right; width: 62mm !important; margin: 1mm 0 3mm 5mm !important; }
#ortslage-bild img, #sonnenaufgang-bild img { max-height: 45mm !important; }
#ortslage-bild img { width: 100% !important; max-height: none !important; }
#geschichte .max-w-3xl::after { content: ""; display: block; clear: both; }

/* Zweispaltige Bereiche */
.md\:grid-cols-2, .md\:grid-cols-3 { display: grid !important; }
.md\:grid-cols-2 { grid-template-columns: 1fr 1fr !important; }
.md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.md\:mt-11 { margin-top: 0 !important; }
.md\:grid-cols-3 > .md\:col-span-2 { grid-column: span 2 / span 2 !important; }
main > section:first-of-type .rounded-2xl { border: 0 !important; }

/* Timeline: alle Einträge aufgeklappt, Text links, Bild rechts */
#timeline { border-left: 0 !important; margin-left: 0 !important; }
#timeline > li { padding-left: 0 !important; margin-top: 4mm !important; border-top: 0.5pt solid #c9d6c6; }
#timeline > li > span:first-child { display: none !important; }
#timeline button { padding: 2mm 0 1mm !important; cursor: default; break-after: avoid; page-break-after: avoid; }
#timeline button span:first-child { font-size: 13pt !important; }
#timeline .panel, .js #timeline .panel { display: block !important; }
#timeline .panel > div { overflow: visible !important; }
#timeline .panel .grid { display: grid !important; grid-template-columns: 1fr 50mm !important; gap: 5mm !important; padding-bottom: 0 !important; }
#timeline .panel .grid > .md\:col-span-5 { grid-column: 1 / -1 !important; }
#timeline .panel .grid > .md\:col-span-2:empty { display: none !important; }
#timeline .panel .grid:has(> .md\:col-span-2:empty) { grid-template-columns: 1fr !important; }
#timeline figure img { max-height: 55mm !important; max-width: 50mm !important; }
#timeline .max-w-xl figure img { max-width: 80mm !important; }

/* Farbige Kästen: Hintergründe druckt der Browser meist nicht, daher Rahmen statt Fläche */
.bg-moss, .bg-white\/60, .stay-card, .stat-tile, .warn, .sage, .bg-moss\/10 { background: none !important; }
.bg-moss { color: #222 !important; border: 1pt solid #2D5A27 !important; }
.text-sand { color: #222 !important; }
.bg-white\/60, .rounded-2xl { border: 0.75pt solid #c9d6c6 !important; }
.p-8, .md\:p-12, .p-6, .md\:p-10 { padding: 4mm 5mm !important; }
/* Nur kleine Kästen zusammenhalten, große dürfen umbrechen (sonst entstehen halbleere Seiten) */
.warn, #spuren .grid > div, .steps li { break-inside: avoid; page-break-inside: avoid; }
.warn { border-left: 3pt solid #9b2c2c !important; padding: 3mm 4mm !important; margin-top: 5mm !important; }
.sage { color: #333 !important; border: 0.75pt solid #b8975f !important; outline: 0 !important; padding: 4mm 5mm !important; font-size: 10.5pt !important; line-height: 1.55 !important; }
.sage::first-letter { font-size: 22pt !important; }
.sage::after { margin-top: 1mm !important; font-size: 11pt !important; }
#spuren .grid > div, #spuren .grid > div > div:first-child { transform: none !important; }

/* Links: Quellen-URLs ausschreiben, damit man sie auf Papier nachschlagen kann */
a { color: inherit !important; text-decoration: none !important; }
#quellen .src a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; word-break: break-all; }
#quellen, #quellen .text-sm { font-size: 9pt !important; }
#quellen li { break-inside: avoid; page-break-inside: avoid; }
sup a { text-decoration: none !important; }

/* Fußzeile mit Herkunft */
footer { border-top: 1pt solid #2D5A27 !important; margin-top: 8mm !important; font-size: 8.5pt !important; }
footer > div { padding: 2mm 0 0 !important; max-width: none !important; }
footer > div:first-child a::after { content: ": www.barbarine.de/" attr(href); }
footer > div:last-child::after { content: " · Ausgedruckt von https://www.barbarine.de"; }
