/* Galerie-Seiten (bilder-<jahr>.html, erzeugt von werkzeuge/galerie-bauen.py). Lightbox: assets/photoswipe/ */

/* Probe-Hinweis (nur bei galerie-bauen.py --probe mit nicht freigegebenen Fotografen) */
.g-probe {
  max-width: 1240px; margin: 16px auto 0; padding: 10px 16px; background: var(--gelb); color: var(--pink);
  font-weight: 800; text-transform: uppercase; letter-spacing: .03em; box-shadow: var(--schatten-hart-klein);
}

/* Fotografen unter der Unterzeile */
.g-fotografen { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: .95rem; }
.g-fotografen b { font-weight: 800; }
.g-fotografen a { color: var(--gelb); text-decoration: none; font-weight: 600; }
.g-fotografen a:hover, .g-fotografen a:focus-visible { text-decoration: underline; }

/* Filter + Zähler */
.g-galerie { padding-top: clamp(28px, 4vw, 44px); }
.s-filter__chip small { margin-left: 4px; font-size: .78em; opacity: .75; }
.g-zaehler { margin: 18px 0 0; font-size: .9rem; font-weight: 600; opacity: .85; }

/* Tage */
.g-tag { margin-top: clamp(28px, 4vw, 44px); }
.g-tag[hidden] { display: none; }
.g-tag__titel { font-size: clamp(1.6rem, 4vw, 2.6rem); }

/* Raster: gleich hohe Zeilen, Breite nach Seitenverhältnis (--r = Breite/Höhe, steht am Foto) – ohne Skript */
.g-raster {
  --zeile: clamp(118px, 17vw, 240px);
  display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none;
}
.g-raster::after { content: ""; flex-grow: 999999; }   /* letzte Zeile nicht aufblähen */
.g-foto { position: relative; flex: var(--r) 1 calc(var(--r) * var(--zeile)); overflow: hidden; background: var(--pink-dunkel); }
.g-foto[hidden] { display: none; }
.g-foto a { display: block; outline-offset: -4px; }
.g-foto img { display: block; width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: scale .4s, filter .3s; }
.g-foto a:hover img, .g-foto a:focus-visible img { scale: 1.04; filter: brightness(.8); }
.g-foto__name {
  position: absolute; left: 8px; bottom: 6px; right: 8px; font-size: .78rem; font-weight: 700; color: var(--weiss);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .7); opacity: 0; transition: opacity .25s; pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g-foto a:hover .g-foto__name, .g-foto a:focus-visible .g-foto__name { opacity: 1; }
@media (hover: none) { .g-foto__name { display: none; } }
@media (prefers-reduced-motion: reduce) { .g-foto img { transition: none; } }

/* Nach der Galerie */
.g-danach a { color: var(--gelb); font-weight: 700; }

/* Lightbox (PhotoSwipe) im CD: dunkles Pink statt Schwarz, Text unten */
.pswp { --pswp-bg: #1f0413; --pswp-placeholder-bg: #3a0a26; --pswp-icon-color: var(--weiss); --pswp-icon-color-secondary: var(--pink-dunkel); }
.g-lb-text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px var(--rand) calc(14px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; color: var(--weiss); font-family: var(--schrift);
  font-size: .95rem; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none;
  transition: opacity .25s;
}
.pswp:not(.pswp--ui-visible) .g-lb-text { opacity: 0; }   /* Antippen blendet Text + Knöpfe gemeinsam aus */
.g-lb-text[hidden] { display: none; }                     /* Highlights: ohne Bildunterschrift */
.g-lb-text a { color: var(--gelb); font-weight: 700; text-decoration: none; pointer-events: auto; }
.g-lb-text a:hover, .g-lb-text a:focus-visible { text-decoration: underline; }
.g-lb-text__zeit { opacity: .75; font-size: .85em; }

/* ---------- Highlight-Seite /bilder/ (werkzeuge/bilder-bauen.py) ---------- */
/* Kopf: Text links, drei gefächerte Sofortbilder rechts (Handy: darunter) */
.b-kopf { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.b-kopf__facher, .b-galerie__facher { position: relative; height: clamp(200px, 24vw, 340px); }
.b-kopf__facher img, .b-galerie__facher img {
  position: absolute; width: 60%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  padding: clamp(3px, .35vw, 5px) clamp(3px, .35vw, 5px) clamp(10px, 1.2vw, 16px); background: var(--weiss);
  box-shadow: var(--schatten-hart); transition: rotate .4s cubic-bezier(.2,1.4,.4,1), translate .4s cubic-bezier(.2,1.4,.4,1);
}
.b-kopf__facher img:nth-child(1), .b-galerie__facher img:nth-child(1) { left: 0; top: 16%; rotate: -8deg; }
.b-kopf__facher img:nth-child(2), .b-galerie__facher img:nth-child(2) { left: 20%; top: 0; rotate: 3deg; z-index: 1; }
.b-kopf__facher img:nth-child(3), .b-galerie__facher img:nth-child(3) { right: 0; top: 26%; rotate: 9deg; z-index: 2; }
@media (max-width: 760px) {
  .b-kopf { grid-template-columns: minmax(0, 1fr); }
  .b-kopf__facher { height: 54vw; margin: 4px 6px 0; }
}

/* Highlights: Sofortbilder (weißer Rand, harter Schatten, leicht schräg) in gleich hohen Zeilen; breit = werkzeuge/bilder.json */
.b-highlights { padding-top: clamp(36px, 5vw, 64px); }
.b-raster {
  --zeile: clamp(88px, 15vw, 230px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 1.8vw, 24px); margin: 0; padding: 0; list-style: none;
}
.b-foto {
  --rahmen: clamp(3px, .35vw, 5px);   /* weißer Rand (Sven: schmal) */
  flex: var(--r) 1 calc(var(--r) * var(--zeile) + 2 * var(--rahmen));
  max-width: calc(1.5 * var(--r) * var(--zeile) + 2 * var(--rahmen));   /* letzte Zeile: höchstens 1,5× groß, mittig */
  position: relative; padding: var(--rahmen); background: var(--weiss); box-shadow: 6px 6px 0 var(--pink-dunkel);
  rotate: var(--dreh); transition: rotate .3s cubic-bezier(.2,1.4,.4,1), translate .3s cubic-bezier(.2,1.4,.4,1), box-shadow .3s;
}
.b-foto:hover, .b-foto:focus-within { rotate: 0deg; translate: -3px -5px; box-shadow: 10px 12px 0 rgba(0, 0, 0, .22); z-index: 1; }
.b-foto a { display: block; }
.b-foto img { display: block; width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; }
.b-foto--breit { flex: 1 1 100%; max-width: none; rotate: calc(var(--dreh) / 3); }
.b-foto--breit img { aspect-ratio: 2.3; }
@media (max-width: 600px) { .b-foto--breit img { aspect-ratio: var(--r); } }   /* Handy: nichts abschneiden */
@media (prefers-reduced-motion: reduce) { .b-foto, .b-kopf__facher img, .b-galerie__facher img { transition: none; } }

/* Zwischenruf Tickets */
.b-zwischen {
  max-width: 680px; margin: clamp(44px, 6vw, 76px) auto; padding: clamp(22px, 3vw, 34px); text-align: center;
  background: var(--pink-dunkel); rotate: -1deg; box-shadow: 8px 8px 0 rgba(0, 0, 0, .2);
}
.b-zwischen__text { margin: 0; font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 900; text-transform: uppercase; line-height: 1; }
.b-zwischen__text em { font-style: normal; color: var(--gelb); }
.b-zwischen p:not(.b-zwischen__text) { margin: 10px 0 20px; font-weight: 600; }

/* Galerie-Karten (je Jahr) */
.b-galerien__liste { display: grid; gap: 28px; margin-top: 30px; }
.b-galerie {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(20px, 3.5vw, 40px); background: var(--pink-dunkel); color: var(--weiss); text-decoration: none;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .2); transition: translate .3s, box-shadow .3s;
}
.b-galerie:hover, .b-galerie:focus-visible { translate: -3px -5px; box-shadow: 12px 14px 0 rgba(0, 0, 0, .22); }
.b-galerie:hover .b-galerie__facher img:nth-child(1) { rotate: -13deg; translate: -10px 0; }
.b-galerie:hover .b-galerie__facher img:nth-child(3) { rotate: 14deg; translate: 10px 0; }
.b-galerie__text b { display: block; font-size: clamp(3.2rem, 9vw, 6.5rem); font-weight: 900; line-height: .85; color: var(--gelb); text-shadow: 4px 4px 0 rgba(0, 0, 0, .2); }
.b-galerie__text span { display: block; margin: 14px 0 22px; font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 600; }
.b-galerie__text .knopf { display: inline-block; margin: 0; }
@media (max-width: 760px) { .b-galerie { grid-template-columns: minmax(0, 1fr); } .b-galerie__facher { height: 50vw; } }

.b-weiter__knoepfe { display: flex; flex-wrap: wrap; gap: 14px 18px; margin: 24px 0 0; }
.b-raster + .b-raster { margin-top: clamp(12px, 1.8vw, 24px); }   /* gleicher Abstand wie innerhalb des Rasters */
