/* =====================================================
   Portfolio – öffentliche Übersicht und Galerie-Seiten.
   Nutzt die Kopf-/Fußzeile der Webseite (ws.css); hier steht nur der Inhalt.
   ===================================================== */
.pf {
  --pf-ink: #16181d;
  --pf-muted: #6b7280;
  --pf-line: rgba(0,0,0,.09);
  --pf-bg: #fff;   /* wie die Webseite (weiß), damit Portfolio nahtlos anschließt */
  font-family: var(--font-content, 'Lato','Segoe UI',system-ui,Arial,sans-serif);
  color: var(--pf-ink);
  background: var(--pf-bg);
  min-height: 60vh;
}
.pf *, .pf *::before, .pf *::after { box-sizing: border-box; }
.pf-in { max-width: 1280px; margin: 0 auto; padding: 48px 24px 80px; }
/* Übersicht wie im Vorbild: jedes Banner fast bildschirmfüllend, nur ein schmaler
   Rand rundherum. Sehr breit UND sehr hoch – ein Banner pro Blick. */
.pf-list .pf-in { max-width: calc(100% - 32px); padding-left: 0; padding-right: 0; }
/* Kopf (Titel + Filter) bleibt ruhig zentriert und schmaler. */
.pf-list .pf-head, .pf-list .pf-filter { max-width: 1180px; margin-left: auto; margin-right: auto; }

/* ── Übersicht ─────────────────────────────────────── */
.pf-head { text-align: center; margin-bottom: 30px; }
/* Kicker einheitlich wie alle Bausteine: 13px, fett, .18em, Akzentfarbe. */
.pf-kick { font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--lp-accent, var(--pf-muted)); margin-bottom: 14px; }
.pf-h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -.02em; margin: 8px 0 0; }

.pf-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 34px; }
.pf-fbtn {
  border: 1px solid var(--pf-line); background: #fff; color: var(--pf-muted);
  padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .14s;
}
.pf-fbtn:hover { color: var(--pf-ink); border-color: #bbb; }
.pf-fbtn.is-on { background: var(--pf-ink); border-color: var(--pf-ink); color: #fff; }

/* Große Vollbild-Banner, untereinander gestapelt. Jedes Banner = eine Galerie:
   Kicker links oben, Name mittig, Pfeil rechts. */
/* Deck-/Stapel-Effekt: jedes Banner bleibt beim Scrollen oben "kleben", das
   naechste schiebt sich darueber. Reines CSS (position:sticky), kein JS.
   Deshalb KEIN gap – die Banner sollen luecklos uebereinander stapeln. */
.pf-banners { display: block; }
.pf-banner {
  position: sticky; top: 0;
  display: block; overflow: hidden; text-decoration: none; color: #fff;
  /* Fast bildschirmfüllend wie im Vorbild – hohe, grosse Banner. Nach oben durch
     die Breite begrenzt (16/9), damit auf sehr breiten Monitoren nicht zu hoch. */
  height: min(92vh, 56.25vw); background: #23261f;
}
/* Ein kleiner Abstand nach unten trennt die gestapelten Banner leicht, ohne die
   sticky-Wirkung zu brechen (margin statt gap). */
.pf-banner + .pf-banner { margin-top: 14px; }
.pf-banner-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.6,.2,1);
}
.pf-banner:hover .pf-banner-img { transform: scale(1.04); }
/* Leichte Abdunklung, damit weiße Schrift auf jedem Bild sitzt. */
.pf-banner-shade { position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 50%, rgba(0,0,0,.15), rgba(0,0,0,.42)); }

.pf-banner-kick {
  position: absolute; top: 40px; left: 44px;
  font-size: 13px; letter-spacing: .28em; text-transform: uppercase; opacity: .9; font-weight: 500;
}
.pf-banner-title {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: clamp(26px, 3.4vw, 46px); font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  text-align: center; text-shadow: 0 2px 20px rgba(0,0,0,.35); white-space: nowrap;
}
.pf-banner-arrow {
  position: absolute; right: 44px; top: 50%; transform: translateY(-50%);
  color: #fff; opacity: .9; transition: transform .3s;
}
.pf-banner:hover .pf-banner-arrow { transform: translateY(-50%) translateX(8px); }

@media (max-width: 720px) {
  .pf-banner { height: min(78vh, 125vw); }   /* auf dem Handy hochformatig, gross */
  .pf-banner-kick { top: 24px; left: 22px; }
  .pf-banner-arrow { right: 22px; }
}

.pf-empty { text-align: center; color: var(--pf-muted); padding: 60px 0; }

/* Hintergrund pro Galerie (Standard hell). Beige & dunkel als Alternativen. */
.pf-bg-hell   { background: var(--pf-bg); }
.pf-bg-beige  { background: #efe9e0; }
.pf-bg-dunkel { background: #17181b; color: #f3f3f2; }
.pf-bg-dunkel .pf-g-title { color: #fff; }
.pf-bg-dunkel .pf-g-kick, .pf-bg-dunkel .pf-g-intro,
.pf-bg-dunkel .pf-back { color: rgba(255,255,255,.62); }
.pf-bg-dunkel .pf-back:hover { color: #fff; }
.pf-bg-dunkel .pf-g-cell, .pf-bg-dunkel .pf-g-cover { background: #26282c; }
.pf-bg-dunkel .pf-lock-form input { background: #26282c; border-color: rgba(255,255,255,.2); color: #fff; }

/* ── Passwort-Tor ──────────────────────────────────── */
.pf-lock { max-width: 420px; margin: 30px auto 40px; text-align: center; }
.pf-lock-ico { color: var(--pf-muted); display: flex; justify-content: center; margin-bottom: 12px; }
.pf-lock-h { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.pf-lock-p { color: var(--pf-muted); margin: 0 0 20px; }
.pf-lock-form { display: flex; gap: 8px; justify-content: center; }
.pf-lock-form input {
  flex: 1; max-width: 260px; padding: 11px 14px; border: 1px solid var(--pf-line);
  border-radius: 8px; font-size: 15px; font-family: inherit; background: #fff;
}
.pf-lock-form button {
  padding: 11px 20px; border: none; border-radius: 8px; background: var(--pf-ink); color: #fff;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.pf-lock-form button:hover { opacity: .88; }
.pf-lock-err { color: #b91c1c; font-size: 14px; margin-top: 12px; }

/* ── Galerie-Seite ─────────────────────────────────── */
.pf-back { display: inline-block; margin-bottom: 26px; color: var(--pf-muted);
  text-decoration: none; font-size: 14px; font-weight: 600; }
.pf-back:hover { color: var(--pf-ink); }

/* Die Galerie-Seite nutzt fast die ganze Fensterbreite (randlos), damit die
   Bilder gross wirken. Der Kopf (Titelbild + Text) bleibt etwas schmaler und
   ruhig; nur das Bildraster geht auf die volle Breite. */
.pf-g { --pf-col: min(1600px, calc(100% - 48px)); }
.pf-g .pf-in { max-width: var(--pf-col); }
/* Kopf ruhig halten – nicht bis ganz aussen ziehen. */
.pf-g .pf-g-head { max-width: 1180px; margin-left: auto; margin-right: auto; }

/* Kopf: Titelbild links, Text rechts – rechtsbündig ans Bild, vertikal mittig.
   Viel Weißraum, dezente geschwungene Linie. */
.pf-g-head {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 540px) 1fr; gap: clamp(30px, 5vw, 60px);
  align-items: center;
  margin: 30px 0 clamp(70px, 10vw, 120px);
}
.pf-g-cover { border-radius: 4px; overflow: hidden; background: #e6e6e3; align-self: center; }
.pf-g-cover img { width: 100%; height: auto; display: block; }
.pf-g-meta { position: relative; z-index: 2; text-align: right; }
.pf-g-kick {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--pf-muted); margin-bottom: 16px; font-weight: 500;
}
.pf-g-title {
  font-size: clamp(28px, 4vw, 46px); font-weight: 800; line-height: 1.08;
  letter-spacing: .03em; text-transform: uppercase; margin: 0;
}
.pf-g-intro { font-size: 16px; line-height: 1.75; color: var(--pf-muted); margin: 20px 0 0 auto; max-width: 46ch;
  text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }

/* Dezente geschwungene Linie oben rechts – wie im Vorbild. Rein dekorativ. */
.pf-g-head::after {
  content: ''; position: absolute; top: -30px; right: -10px; width: min(38%, 360px); height: 240px;
  pointer-events: none; opacity: .5; z-index: 1;
  background: no-repeat right top / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 240' fill='none' stroke='%23c9c9c4' stroke-width='1'%3E%3Cpath d='M6 150 C 120 40, 200 250, 320 120 S 360 20, 300 60'/%3E%3C/svg%3E");
}
@media (max-width: 760px) { .pf-g-head::after { display: none; } }

/* Masonry-Raster (versetzt, wie Pinterest): jedes Bild behält sein echtes
   Seitenverhältnis, unterschiedlich hohe Bilder greifen lückenlos ineinander.
   Umgesetzt mit CSS-columns – kein JavaScript nötig. 3 Spalten auf dem Desktop. */
.pf-g-grid { columns: 3; column-gap: clamp(20px, 2vw, 30px); }
/* Einstellbare Spaltenzahl der Galerie (2–5); Standard 3. */
.pf-g-grid.pf-g-c2 { columns: 2; }
.pf-g-grid.pf-g-c3 { columns: 3; }
.pf-g-grid.pf-g-c4 { columns: 4; }
.pf-g-grid.pf-g-c5 { columns: 5; }
/* Wrapper = das Masonry-Element (trägt Abstand + Umbruchschutz + Herz-Anker). */
.pf-g-cellwrap { position: relative; margin: 0 0 clamp(20px, 2vw, 30px);
  break-inside: avoid; line-height: 0; }
.pf-g-cell {
  border: none; padding: 0; margin: 0; background: #e6e6e3; cursor: zoom-in;
  border-radius: 3px; overflow: hidden; display: block; line-height: 0; width: 100%;
}
.pf-g-cell img { width: 100%; height: auto; display: block;
  transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.pf-g-cell:hover img { transform: scale(1.04); }

/* Herz zum Sammeln – oben rechts, erscheint beim Überfahren, gefüllt wenn aktiv. */
.pf-heart { position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; line-height: 0;
  background: rgba(0,0,0,.42); color: #fff; backdrop-filter: blur(4px);
  opacity: 0; transform: scale(.85); transition: opacity .18s, transform .18s, background .18s; }
.pf-g-cellwrap:hover .pf-heart, .pf-heart.is-on { opacity: 1; transform: scale(1); }
.pf-heart svg { fill: none; stroke: currentColor; stroke-width: 2; }
.pf-heart:hover { background: rgba(0,0,0,.6); }
.pf-heart.is-on { background: #B9552B; }
.pf-heart.is-on svg { fill: #fff; stroke: #fff; }
.pf-heart-pop { animation: pf-heart-pop .3s ease; }
@keyframes pf-heart-pop { 0%{transform:scale(1)} 40%{transform:scale(1.3)} 100%{transform:scale(1)} }

/* Schwebende Sammel-Leiste unten mittig (Container mit PDF-Knopf + „×"). */
/* hidden muss gewinnen – sonst zeigt inline-flex die Leiste trotz [hidden]. */
.pf-collect[hidden] { display: none !important; }
.pf-collect { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50;
  display: inline-flex; align-items: stretch; border-radius: 999px; color: #fff; background: #16181d;
  box-shadow: 0 10px 30px rgba(0,0,0,.28); transition: transform .15s, box-shadow .15s; overflow: hidden; }
.pf-collect:hover { transform: translateX(-50%) translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,.34); }
.pf-collect-main { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font: inherit;
  padding: 12px 18px 12px 20px; border: 0; background: transparent; color: inherit; }
.pf-collect-main svg { fill: #B9552B; stroke: #B9552B; }
.pf-collect-t { font-size: 14.5px; font-weight: 600; }
.pf-collect-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: #B9552B; color: #fff; font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.pf-collect-clear { border: 0; cursor: pointer; font: inherit; color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.08); padding: 0 16px; font-size: 22px; line-height: 1;
  border-left: 1px solid rgba(255,255,255,.14); transition: background .15s, color .15s; }
.pf-collect-clear:hover { background: rgba(255,255,255,.16); color: #fff; }

/* Hinweis-Box über dem Bildraster (erklärt die Sammel-Funktion). */
.pf-collect-hint { display: flex; align-items: flex-start; gap: 12px; max-width: 760px;
  margin: 0 auto clamp(22px, 3vw, 34px); padding: 16px 20px; border-radius: 14px;
  background: color-mix(in srgb, #B9552B 8%, transparent); border: 1px solid color-mix(in srgb, #B9552B 22%, transparent); }
.pf-collect-hint svg { fill: #B9552B; stroke: #B9552B; flex-shrink: 0; margin-top: 1px; }
.pf-collect-hint p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--pf-ink, #2a2a2a); }
.pf-bg-dunkel .pf-collect-hint p { color: rgba(255,255,255,.9); }

/* Sanftes Einblenden beim Scrollen (per JS: .is-in). --d staffelt die Bilder. */
.pf-reveal { opacity: 0; transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.6,.2,1); transition-delay: var(--d, 0ms); }
.pf-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .pf-reveal { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 900px) {
  .pf-g-head { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .pf-g-cover { max-width: 320px; margin: 0 auto; }
  .pf-g-intro { margin-left: auto; margin-right: auto; }
  .pf-g-grid, .pf-g-grid.pf-g-c2, .pf-g-grid.pf-g-c3,
  .pf-g-grid.pf-g-c4, .pf-g-grid.pf-g-c5 { columns: 2; column-gap: 12px; }
  .pf-g-cell { margin-bottom: 12px; }
}
/* Tablet: hohe Spaltenzahlen (4/5) auf 3 reduzieren, damit Bilder nicht winzig werden. */
@media (min-width: 901px) and (max-width: 1200px) {
  .pf-g-grid.pf-g-c4, .pf-g-grid.pf-g-c5 { columns: 3; }
}

/* ── Lightbox ──────────────────────────────────────── */
.pf-lb {
  position: fixed; inset: 0; z-index: 1000; background: rgba(12,13,15,.94);
  display: flex; align-items: center; justify-content: center;
}
.pf-lb[hidden] { display: none; }
.pf-lb-img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 3px; }
.pf-lb-x {
  position: absolute; top: 18px; right: 22px; width: 44px; height: 44px;
  border: none; background: rgba(255,255,255,.12); color: #fff; border-radius: 50%;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.pf-lb-x:hover { background: rgba(255,255,255,.24); }
.pf-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
}
.pf-lb-nav:hover { background: rgba(255,255,255,.24); }
.pf-lb-prev { left: 20px; }
.pf-lb-next { right: 20px; }

@media (max-width: 600px) {
  .pf-lb-nav { width: 42px; height: 42px; font-size: 24px; }
  .pf-lb-prev { left: 8px; } .pf-lb-next { right: 8px; }
}

/* Folgt auf den Kopf ein Credits-Block, dessen grossen Kopf-Abstand kleiner
   machen – sonst klafft über „Credits" zu viel Luft. Gleicher Abstand oben/unten. */
.pf-g-head:has(+ .pf-credits-wrap) { margin-bottom: clamp(34px, 5vw, 56px); }
/* Beteiligte („Credits") – zentriert über dem Hinweis/Bildraster. */
.pf-credits-wrap { max-width: 820px; margin: 0 auto clamp(34px, 5vw, 56px); text-align: center; }
.pf-credits-h { font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; letter-spacing: -.01em;
  color: var(--pf-ink, #16181d); margin: 0 0 18px; }
.pf-credits { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: 14px 40px; }
.pf-credit { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1.3; }
.pf-credit-role { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--pf-muted); }
.pf-credit-name { font-size: 16px; font-weight: 600; color: var(--pf-ink, #16181d); }
.pf-credit-name a { color: inherit; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; transition: opacity .15s; }
.pf-credit-name a:hover { opacity: .6; }
.pf-bg-dunkel .pf-credits-h { color: #fff; }
.pf-bg-dunkel .pf-credit-name { color: #fff; }
.pf-bg-dunkel .pf-credit-role { color: rgba(255,255,255,.6); }

/* Ausgewogene Zeilenumbrüche (systemweit): Überschriften gleichmäßig, Fließtext ohne Einzelwort am Ende. */
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
