/* ==================================================================
   Ergänzungen für WordPress: Inhalte aus dem Editor, Filter-Links,
   Seitenzahlen, Videos. Baut auf style.css auf.
   ================================================================== */

/* Angemeldet: Platz für die WordPress-Leiste */
.admin-bar .kopf { top: 32px; }
@media (max-width: 782px) { .admin-bar .kopf { top: 46px; } }

/* ---------- Filter als Links ---------- */
.filter a {
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0.6rem 1.15rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.9rem; font-weight: 500; color: #d9d4cb;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 160ms var(--raus);
}
.filter a:active { transform: scale(0.97); }
.filter a[aria-current] { background: #fff; color: var(--schwarz); border-color: #fff; }
.hell .filter a { border-color: rgba(0, 0, 0, 0.22); color: #3d3933; }
.hell .filter a[aria-current] { background: var(--schwarz); color: #fff; border-color: var(--schwarz); }
@media (hover: hover) and (pointer: fine) { .filter a:not([aria-current]):hover { border-color: currentColor; } }

/* ---------- Seitenzahlen ---------- */
.blaettern { margin-top: clamp(2.5rem, 5vw, 4rem); }
.blaettern ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.blaettern a, .blaettern span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.9rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22); font-weight: 600; font-size: 0.925rem; font-variant-numeric: tabular-nums;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.blaettern .current { background: #fff; color: var(--schwarz); border-color: #fff; }
.blaettern .dots { border-color: transparent; }
.hell .blaettern a, .hell .blaettern span { border-color: rgba(0, 0, 0, 0.22); }
.hell .blaettern .current { background: var(--schwarz); color: #fff; border-color: var(--schwarz); }
@media (hover: hover) and (pointer: fine) { .blaettern a:hover { border-color: currentColor; } }

/* ---------- Termine auf der Startseite ---------- */
.termin .marke { min-width: 4rem; font-variant-numeric: tabular-nums; }

/* ---------- Inhalte aus dem Editor ---------- */
.inhalt { display: grid; gap: 1.25rem; max-width: 68ch; }
.inhalt > * { margin: 0; min-width: 0; }
.inhalt p, .inhalt li { color: #d9d4cb; font-size: 1.0625rem; line-height: 1.7; }
.bericht__text.inhalt > p:first-child { color: #fff; font-size: clamp(1.2rem, 1.7vw, 1.45rem); line-height: 1.5; }
.inhalt strong { color: #fff; font-weight: 600; }
.inhalt a { text-decoration: underline; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) { .inhalt a:hover { color: #ff6a55; } }
.inhalt h2, .inhalt h3, .inhalt h4 { font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 1; margin-top: 1.25rem; }
.inhalt h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.inhalt h3 { font-size: 1.6rem; }
.inhalt h4 { font-size: 1.3rem; }
.inhalt ul, .inhalt ol { display: grid; gap: 0.5rem; padding-left: 1.3rem; }
.inhalt ul { list-style: square; }
.inhalt ol { list-style: decimal; }
.inhalt li::marker { color: var(--rot); }
.inhalt blockquote { margin: 0; padding-left: 1.25rem; border-left: 1px solid var(--linie); color: #fff; font-size: 1.2rem; }
.inhalt hr { width: 100%; border: 0; border-top: 1px solid var(--linie); }

/* Bilder, Galerien, Videos dürfen breiter sein als der Text */
.inhalt figure, .inhalt .wp-block-gallery, .inhalt .wp-block-video, .inhalt .wp-block-embed, .inhalt .video-klick, .inhalt .wp-block-jetpack-tiled-gallery, .inhalt .wp-block-table { max-width: none; width: min(100%, 60rem); }
.inhalt--seite { max-width: 60rem; }
.inhalt--seite > p, .inhalt--seite > ul, .inhalt--seite > ol, .inhalt--seite > h2, .inhalt--seite > h3 { max-width: 68ch; }
.inhalt img { border-radius: 10px; height: auto; }
.inhalt figcaption { margin-top: 0.5rem; color: var(--grau); font-size: 0.875rem; }
.inhalt video, .inhalt iframe { display: block; width: 100%; border: 0; border-radius: var(--radius); background: #000; }
.inhalt video { height: auto; }
.inhalt iframe { aspect-ratio: 16 / 9; height: auto; }
.inhalt .wp-block-embed__wrapper { position: relative; }

/* Galerie-Block von WordPress und ältere Galerien */
.inhalt .wp-block-gallery, .inhalt .gallery, .inhalt .tiled-gallery__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.5rem, 1vw, 0.9rem); }
.inhalt .tiled-gallery__row, .inhalt .tiled-gallery__col { display: contents; }
.inhalt .wp-block-gallery figure, .inhalt .gallery figure, .inhalt .gallery-item, .inhalt .tiled-gallery__item { width: auto !important; margin: 0 !important; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--asche); }
.inhalt .wp-block-gallery img, .inhalt .gallery img, .inhalt .tiled-gallery__item img { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0; transition: transform 500ms var(--raus); }
.inhalt .wp-block-gallery figcaption { display: none; }
@media (hover: hover) and (pointer: fine) { .inhalt a:hover img, .galerie__raster a:hover img { transform: scale(1.03); } }
@media (max-width: 620px) { .inhalt .wp-block-gallery, .inhalt .gallery, .inhalt .tiled-gallery__gallery { grid-template-columns: 1fr 1fr; } }

/* Galerie des bisherigen Themes */
.galerie__raster a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--asche); cursor: zoom-in; }
.galerie__raster a img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--raus); }

/* Tabellen (Bautagebuch, alte Seiten) */
.inhalt table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.inhalt th, .inhalt td { padding: 0.9rem 1rem 0.9rem 0; border-top: 1px solid var(--linie); text-align: left; vertical-align: top; color: #d9d4cb; }
.inhalt th { color: #fff; font-weight: 600; }
.inhalt td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: #fff; font-weight: 600; }
.inhalt .wp-block-table { overflow-x: auto; }

/* Video erst nach Klick */
.video-klick { display: grid; place-items: center; align-content: center; gap: 0.9rem; aspect-ratio: 16 / 9; padding: 1.5rem; border-radius: var(--radius); background: var(--kohle); border: 1px solid var(--linie); text-align: center; }
.video-klick p { color: var(--grau); font-size: 0.875rem; max-width: 34ch; }
.video-klick.geladen { display: block; padding: 0; border: 0; background: none; aspect-ratio: auto; }

/* „Teilen“-Leisten und Ähnliches von Plugins passen nicht ins Design */
.inhalt .sharedaddy, .inhalt .jp-relatedposts { display: none; }

/* Auf hellen Abschnitten */
.hell .inhalt p, .hell .inhalt li, .hell .inhalt td { color: #3d3933; }
.hell .inhalt strong, .hell .inhalt th, .hell .inhalt td:first-child { color: var(--schwarz); }
