/* GOST – schlankes Stylesheet, angelehnt an das bisherige Design */
:root {
  --blue: #1967a9;
  --blue-light: #3180c2;
  --navy: #152c52;
  --text: #24303f;
  --muted: #5f6b7a;
  --line: #dde3ea;
  --bg-soft: #f3f6f9;
  --radius: 6px;
  --maxw: 1170px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--navy) url("bg.jpg") center top / cover fixed no-repeat;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-light); }

.wrap { max-width: var(--maxw); margin: 0 auto; background: #fff; box-shadow: 0 0 40px rgba(0,0,0,.35); min-height: 100vh; display: flex; flex-direction: column; }
.site-header .logo { display: block; line-height: 0; }
.site-header img { width: 100%; }

/* Navigation */
.nav { background: var(--blue); position: sticky; top: 0; z-index: 50; }
.nav > ul { list-style: none; margin: 0; padding: 0 12px; display: flex; flex-wrap: wrap; }
.nav li { position: relative; }
.nav a { display: block; color: #fff; text-decoration: none; padding: 13px 16px; font-weight: 500; font-size: 16px; }
.nav li:hover > a, .nav li.active > a { background: var(--blue-light); }
.nav li ul { list-style: none; margin: 0; padding: 4px 0; position: absolute; left: 0; top: 100%; min-width: 220px; background: var(--blue); box-shadow: 0 6px 16px rgba(0,0,0,.2); display: none; }
.nav li:hover > ul, .nav li:focus-within > ul { display: block; }
.nav li ul a { padding: 9px 16px; font-weight: 400; }
.nav-toggle, .sub-toggle { display: none; }

/* Inhalt */
.content { padding: 32px 48px 48px; flex: 1; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; }
h1 { font-size: 30px; margin: 0 0 18px; }
.prose h2 { font-size: 23px; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 19px; margin: 1.4em 0 .4em; }
.prose h4 { font-size: 17px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose img { border-radius: var(--radius); cursor: zoom-in; }
.prose table { border-collapse: collapse; margin: 1.2em 0; width: 100%; max-width: 640px; font-size: 15.5px; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.prose th { width: 30%; color: var(--navy); }
.prose iframe { max-width: 100%; border: 0; border-radius: var(--radius); }
.crumb { margin: 0 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.crumb a { text-decoration: none; }
.meta { color: var(--muted); font-size: 14px; margin: -10px 0 18px; }

/* Eingebettete Inhalte (erst nach Klick) */
.embed { margin: 1.4em 0; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.embed iframe { display: block; border: 0; }
.embed-hint { max-width: 460px; padding: 24px; text-align: center; font-size: 15px; }
.embed-hint p { margin: 0 0 10px; }
.embed-hint button { background: var(--blue); color: #fff; border: 0; border-radius: 4px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.embed-hint button:hover { background: var(--blue-light); }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 1.4em 0; }
.gallery figure { margin: 0; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--bg-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery.no-preview figure { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--bg-soft); }
.gallery.no-preview figure:has(figcaption) { aspect-ratio: auto; }
.prose img.nolb { cursor: default; }
.gallery figcaption { font-size: 13px; color: var(--muted); padding: 3px 2px 0; }

/* Karten (Übersichten) */
.cat-head { margin-bottom: 18px; }
.filter { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.filter a { display: block; padding: 5px 14px; border: 1px solid var(--blue); border-radius: 999px; text-decoration: none; font-size: 15px; }
.filter .on a { background: var(--blue); color: #fff; }
.card { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.card.no-img { grid-template-columns: 1fr; }
.card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card h2 { font-size: 21px; margin: 0 0 8px; }
.card h2 a { color: var(--navy); text-decoration: none; }
.card h2 a:hover { color: var(--blue); }
.card .meta { margin: -4px 0 8px; }
.card p { margin: 0 0 8px; }
.read-more { font-weight: 600; text-decoration: none; font-size: 15px; }
.home-news { margin-top: 36px; }
.home-news > h2 { font-size: 24px; margin-bottom: 4px; }
.more-link { border-top: 1px solid var(--line); padding-top: 14px; font-weight: 600; }
.more-link a { text-decoration: none; }

.pager { display: flex; gap: 6px; margin-top: 24px; }
.pager a, .pager span { min-width: 38px; text-align: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; }
.pager span { background: var(--blue); color: #fff; border-color: var(--blue); }

.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.post-nav a { text-decoration: none; max-width: 48%; }
.post-nav small { display: block; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.post-nav .next { text-align: right; margin-left: auto; }

.site-footer { background: var(--blue); color: #fff; padding: 16px 48px; font-size: 14px; }
.site-footer a { color: #fff; }

/* Lightbox */
.lb-overlay { position: fixed; inset: 0; background: rgba(8,15,28,.94); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lb-overlay img { max-width: 94vw; max-height: 86vh; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-overlay button { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; padding: 12px 18px; opacity: .8; }
.lb-overlay button:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #dfe6ee; font-size: 14px; }

/* Mobil */
@media (max-width: 800px) {
  body { font-size: 16px; background-attachment: scroll; }
  .content { padding: 22px 16px 36px; }
  .site-footer { padding: 14px 16px; }
  h1 { font-size: 25px; }
  .nav > ul { display: none; flex-direction: column; padding: 0 0 8px; }
  .nav.open > ul { display: flex; }
  .nav-toggle { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #fff; font: inherit; font-weight: 600; padding: 12px 16px; cursor: pointer; width: 100%; }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: #fff; position: relative; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
  .nav li:hover > ul { display: none; }
  .nav li ul { position: static; box-shadow: none; background: rgba(0,0,0,.12); min-width: 0; }
  .nav li.sub-open > ul { display: block; }
  .nav li ul a { padding-left: 32px; }
  .sub-toggle { display: block; position: absolute; right: 0; top: 0; width: 52px; height: 48px; background: none; border: 0; cursor: pointer; }
  .sub-toggle::after { content: ""; display: block; margin: 0 auto; width: 9px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
  .sub-open > .sub-toggle::after { transform: rotate(-135deg); margin-top: 6px; }
  .card { grid-template-columns: 1fr; gap: 12px; }
  .card-img { aspect-ratio: 16 / 9; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 5px; }
  .prose th { width: auto; }
}
