/* Fiberthree · Ergänzungen für die fertige Website */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); overflow-wrap: break-word; }
#white-paper .h4 { overflow-wrap: anywhere; hyphens: auto; }
[id] { scroll-margin-top: 24px; }

/* Header über Hintergrund-Ebenen, damit die Navigation klickbar bleibt */
.dt-nav { position: relative; z-index: 5; }

/* Sprachumschaltung im Header */
.f3-lang { display: inline-flex; gap: 8px; align-items: center; }
.f3-lang a { color: inherit; text-decoration: none; opacity: .7; padding: 4px 2px; border-bottom: 1px solid transparent; }
.f3-lang a:hover, .f3-lang a.is-active { opacity: 1; border-bottom-color: currentColor; }
.f3-lang__sep { opacity: .5; }

/* Footer: Link Datenschutz-Einstellungen */
.f3-consent-open { color: inherit; }

/* Aktuelles aus /_inc/ */
.f3-news-slot { display: contents; }
.f3-news-band > .f3-news { margin-left: 24px; margin-right: 24px; }

/* Karte */
.f3-map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; background: var(--surface); }

/* Formular: Feld gegen Spam, für Menschen unsichtbar */
.f3-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Rückmeldung nach dem Absenden: groß und mittig auf der Seite */
.f3-confirm-back { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(10, 10, 13, .55); }
.f3-confirm { box-sizing: border-box; width: 100%; max-width: 640px; padding: 48px 40px 40px; text-align: center;
  background: var(--surface-inverse); color: var(--ink-inverse); border-top: 6px solid var(--signal);
  box-shadow: 0 24px 64px rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: center; gap: 16px; outline: none; }
.f3-confirm.is-error { border-top-color: var(--alert); }
.f3-confirm__title { margin: 0; font: 400 40px/1.1 var(--font-display); letter-spacing: -0.04em; text-transform: uppercase; }
.f3-confirm__text { margin: 0; max-width: 44ch; font: 400 19px/1.5 var(--font-sans); }
.f3-confirm__btn { margin-top: 16px; min-height: 44px; padding: 10px 24px; font: 400 14px/1 var(--font-display); letter-spacing: .04em;
  text-transform: uppercase; background: none; color: inherit; border: 1px solid currentColor; border-radius: 2px; cursor: pointer; }
.f3-confirm__btn:hover, .f3-confirm__btn:focus-visible { background: var(--signal); color: #0a0a0d; border-color: var(--signal); }
@media (max-width: 720px) { .f3-confirm { padding: 36px 24px 28px; } .f3-confirm__title { font-size: 30px; } .f3-confirm__text { font-size: 17px; } }

/* Rote Platzhalter bleiben im Testbuild sichtbar, damit offene Punkte auffallen */

/* Handy: Hauptnavigation unter dem Logo als wischbare Zeile, Sprachwahl rechts neben dem Logo */
@media (max-width: 900px) {
  .dt-nav { grid-template-columns: 1fr auto; height: auto; row-gap: 10px; padding-top: 14px; padding-bottom: 10px; }
  .dt-nav__brand { grid-column: 1; grid-row: 1; font-size: 22px !important; min-width: 0; }
  .dt-nav__end { grid-column: 2; grid-row: 1; white-space: nowrap; }
  .dt-nav__links { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; gap: 18px; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .dt-nav__links::-webkit-scrollbar { display: none; }
  .dt-nav__links a { white-space: nowrap; flex: none; }

  /* Menü-Button mit Burger-Symbol; die Navigation klappt darunter auf */
  .f3-menu-btn { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 44px; padding: 0 14px; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 2px;
    font: inherit; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
  .f3-menu-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
  .f3-menu-btn__icon { width: 22px; height: 22px; flex: none; }
  .f3-menu-btn__icon .f3-x { display: none; }
  .dt-nav.is-open .f3-menu-btn__icon .f3-burger { display: none; }
  .dt-nav.is-open .f3-menu-btn__icon .f3-x { display: inline; }
  .dt-nav.has-menu .dt-nav__links { display: none; }
  .dt-nav.has-menu.is-open .dt-nav__links { grid-row: 3; display: flex; flex-direction: column; gap: 0; overflow: visible; padding: 4px 0 0;
    border-top: 1px solid currentColor; }
  .dt-nav.has-menu.is-open .dt-nav__links a { display: flex; align-items: center; min-height: 48px; padding: 0 2px;
    border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent); white-space: normal; }
  .dt-nav.has-menu.is-open .dt-nav__links a.is-active { text-decoration: underline; text-underline-offset: 6px; }
}

/* Handy: Footer einspaltig oben, Linkspalten zu zweit */
@media (max-width: 720px) {
  .dt-footer { padding-left: 24px !important; padding-right: 24px !important; }
  .dt-footer__top { flex-direction: column; gap: 12px; }
  .dt-footer__claim { font-size: 28px; overflow-wrap: anywhere; }
  .dt-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; margin: 0 !important; column-gap: 16px !important; }
  .dt-footer__cols a { overflow-wrap: anywhere; }
}

/* ---------- Social Media: Feeds aus /data/social-feed.json ---------- */
.f3-feed:empty { min-height: 120px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 24px), var(--surface-sunken); }
.f3-feed__empty { margin: 0; padding: 20px 0; color: var(--ink-muted); }
.f3-feed-wrap { display: flex; flex-direction: column; gap: 24px; }

/* YouTube: hervorgehobenes Video, daneben die weiteren */
.f3-feed--yt { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px 48px; align-items: start; }
.f3-feed--yt[data-f3-feed-state="empty"] { display: block; }
.f3-feed__stage { margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.f3-feed__caption { display: flex; flex-direction: column; gap: 4px; }
.f3-feed__date { color: var(--ink-subtle); }
.f3-feed__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.f3-feed__list li { border-bottom: 1px solid var(--line); }
.f3-feed__pick { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; color: var(--ink); }
.f3-feed__pick img, .f3-feed__noimg { width: 128px; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--surface-sunken); }
.f3-feed__pick-text { display: flex; flex-direction: column; gap: 4px; }
.f3-feed__pick-title { font-weight: 500; }
.f3-feed__pick:hover .f3-feed__pick-title { text-decoration: underline; }
.f3-feed__pick:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
@media (max-width: 900px) { .f3-feed--yt { grid-template-columns: minmax(0, 1fr); } }

.f3-yt { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.f3-yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.f3-yt__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-height: 44px; padding: 0 22px;
  font: 500 15px/1 var(--font-sans); color: #fff; background: rgba(0, 0, 0, .55); border: 1px solid #fff; cursor: pointer; }
.f3-yt__play:hover, .f3-yt__play:focus-visible { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.f3-yt__note { position: absolute; left: 16px; right: 16px; bottom: 12px; margin: 0; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }

/* Instagram-Raster */
.f3-ig-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.f3-ig { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-sunken); }
.f3-ig img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.f3-ig:hover img { transform: scale(1.03); }
.f3-ig:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
@media (max-width: 900px) { .f3-ig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .f3-ig:nth-child(n+7) { display: none; } }
@media (max-width: 560px) { .f3-ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .f3-ig img { transition: none; } .f3-ig:hover img { transform: none; } }

/* Startseite: ein Video, zwei Beiträge */
.f3-feed--home { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.f3-feed--home[hidden] { display: none; }
.f3-home-video { position: relative; flex: 2 1 480px; min-width: 0; aspect-ratio: 16 / 9; display: block; overflow: hidden; background: #000; color: #fff; text-decoration: none; }
.f3-home-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.f3-home-video__label { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.f3-home-ig { flex: 1 1 220px; min-width: 0; }

/* Social Media: Status der Einwilligung */
.f3-status i { background: var(--ink-subtle); }
.f3-status.is-on i { background: var(--success); }
.f3-status b { font-weight: inherit; }

/* ---------- Sehr breite Monitore: Inhalt bleibt so kompakt wie auf einem ca. 1980 px breiten Bildschirm ----------
   Hintergründe, Raster und Bänder laufen weiter über die volle Breite, nur der Inhalt rückt zur Mitte. */
@media (min-width: 2100px) {
  #f3-root section,
  #f3-root header.dt-nav,
  #f3-root .dt-footer,
  footer.dt-footer {
    padding-left: calc((100% - 1932px) / 2) !important;
    padding-right: calc((100% - 1932px) / 2) !important;
  }
}

/* Menü-Button nur auf schmalen Bildschirmen */
@media (min-width: 901px) { .f3-menu-btn { display: none !important; } }

/* Handy: Startseiten-Feed nur mit dem Video, ohne Instagram-Kacheln */
@media (max-width: 720px) {
  [data-f3-feed="home"] .f3-home-ig { display: none !important; }
}

/* Menü-Button auf sehr schmalen Handys: nie breiter als der Bildschirm, langer Seitenname wird gekürzt */
@media (max-width: 900px) {
  .f3-menu-btn { box-sizing: border-box; min-width: 0; max-width: 100%; }
  .f3-menu-btn__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  header.dt-nav { min-width: 0; }
}
@media (max-width: 360px) { .f3-menu-btn { letter-spacing: 0; padding: 0 12px; } }

/* Video-Platzhalter: Button und Hinweis stehen untereinander in der Mitte und überlagern sich nie */
.f3-yt:not(.is-playing) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; box-sizing: border-box; }
.f3-yt:not(.is-playing) > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.f3-yt:not(.is-playing) .f3-yt__play { position: relative; left: auto; top: auto; transform: none; flex: none; }
.f3-yt:not(.is-playing) .f3-yt__note { position: relative; left: auto; right: auto; bottom: auto; max-width: 36ch; text-align: center; }
@media (max-width: 720px) {
  .f3-yt:not(.is-playing) { gap: 8px; padding: 8px 12px; }
  .f3-yt:not(.is-playing) .f3-yt__note { font-size: 12px; line-height: 1.35; }
  /* Handy: nur das aktuelle Video, ohne Liste weiterer Videos */
  [data-f3-feed="youtube"] .f3-feed__list { display: none; }
}
