/* Bildergalerie (/aktuelles/bilder/<URL-Name>) — Karussell, Bilderwand, Großansicht.
   Farben und Schrift kommen ausschließlich aus den Marken-Token in colors_and_type.css;
   hier stehen nur Maße, Raster und Zustände. */

/* ── Veranstaltungs-Karussell ─────────────────────────────────────────────────── */

.gal-auswahl {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border-default);
  padding: 40px 0 44px;
}

.gal-auswahl-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.gal-pfeile {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.gal-pfeil {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-1);
  color: var(--fg-1);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease;
}

.gal-pfeil:hover {
  border-color: var(--dakby-orange-100);
  color: var(--dakby-orange-100);
}

.gal-pfeil:focus-visible {
  outline: 2px solid var(--dakby-orange-100);
  outline-offset: 2px;
}

/* Die Bahn. `scroll-snap-type: x mandatory` lässt jede Karte bündig einrasten; die
   Bildlaufleiste wird ausgeblendet, weil die zwei Pfeilknöpfe (und die Tastatur) die
   sichtbare Bedienung sind. */
.gal-bahn {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.gal-bahn::-webkit-scrollbar {
  display: none;
}

.gal-karte {
  flex: 0 0 310px;
  scroll-snap-align: start;
  background: var(--bg-1);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  position: relative;
  color: inherit;
  transition:
    transform 180ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 180ms ease;
}

.gal-karte:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.gal-karte:focus-visible {
  outline: 2px solid var(--dakby-orange-100);
  outline-offset: 3px;
}

/* Der orange Rahmen der gewählten Karte liegt ÜBER dem Bild, nicht im Fluss — sonst
   verschöbe die Auswahl das Layout der Bahn um zwei Pixel. */
.gal-karte[aria-current='true']::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 2px solid var(--dakby-orange-100);
  pointer-events: none;
}

.gal-karte-bild {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-3);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.gal-karte-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Die neutrale Fläche, wenn es weder Titelbild noch eine erste Aufnahme gibt. */
.gal-karte-signet {
  width: 46px;
  height: auto;
  opacity: 0.14;
  object-fit: contain;
}

.gal-plakette {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--dakby-black);
  color: var(--dakby-white);
  border-radius: 999px;
  padding: 6px 12px;
}

.gal-karte-text {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--dakby-grey-10);
}

.gal-karte-datum {
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}

.gal-karte-titel {
  font-size: 19px;
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg-1);
}

.gal-karte-ort {
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 8px;
}

/* ── Bilderwand ───────────────────────────────────────────────────────────────── */

.gal-wand-abschnitt {
  background: var(--bg-1);
  padding: 52px 0 96px;
}

.gal-wand-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-default);
}

.gal-wand-titel {
  margin: 0;
  font-weight: var(--weight-bold);
  letter-spacing: -0.025em;
  line-height: 1;
  font-size: clamp(26px, 3vw, 40px);
}

.gal-wand-zahl {
  font-size: 13px;
  color: var(--fg-3);
  white-space: nowrap;
}

.gal-einleitung {
  max-width: 62ch;
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-2);
}

/* Das Spaltenraster. `column-count` ordnet SENKRECHT (Bild 1–n untereinander in der
   ersten Spalte) — das ist hier richtig und ausgesprochen: die Bilderwand ist eine
   benannte Ansicht, in der die Ansicht selbst die Ordnung ist. */
.gal-wand {
  column-count: 4;
  column-gap: 20px;
}

@media (max-width: 1100px) {
  .gal-wand {
    column-count: 3;
  }
}

@media (max-width: 760px) {
  .gal-wand {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .gal-wand {
    column-count: 1;
  }
}

.gal-kachel {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 20px;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--dakby-grey-10);
  cursor: zoom-in;
  position: relative;
  transition:
    transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 220ms ease;
}

.gal-kachel:hover {
  transform: scale(1.015);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
}

.gal-kachel:focus-visible {
  outline: 2px solid var(--dakby-orange-100);
  outline-offset: 3px;
}

.gal-kachel img {
  width: 100%;
  height: auto;
}

.gal-mehr {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* Der ruhige Hinweis, wenn es (noch) keine Galerie gibt — statt einer leeren Fläche. */
.gal-leer {
  border: 1px solid var(--border-default);
  border-radius: 16px;
  background: var(--bg-2);
  padding: 48px 32px;
  text-align: center;
}

.gal-leer h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: var(--weight-bold);
}

.gal-leer p {
  margin: 0;
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.6;
}

/* ── Großansicht ──────────────────────────────────────────────────────────────── */
/* modal.css ist auf 760 px Lesetext ausgelegt; eine Aufnahme braucht Bildmaße. */

.modal-dialog--bild {
  width: min(100%, 1180px);
  max-height: min(92vh, 92dvh);
  padding: 0;
  background: var(--dakby-black);
  color: var(--dakby-white);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-dialog--bild .modal-close {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--dakby-white);
  z-index: 2;
}

.gal-gross-buehne {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  background: var(--dakby-black);
}

.gal-gross-bild {
  max-width: 100%;
  max-height: min(72vh, 72dvh);
  width: auto;
  height: auto;
  object-fit: contain;
  /* Wischen darf das Bild nicht als Drag-Quelle aufnehmen. */
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.gal-gross-pfeil {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.55);
  color: var(--dakby-white);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    color 140ms ease;
}

.gal-gross-pfeil:hover {
  border-color: var(--dakby-orange-100);
  color: var(--dakby-orange-100);
}

.gal-gross-pfeil:focus-visible {
  outline: 2px solid var(--dakby-orange-100);
  outline-offset: 2px;
}

.gal-gross-pfeil.zurueck {
  left: 16px;
}

.gal-gross-pfeil.vor {
  right: 16px;
}

.gal-gross-fuss {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: var(--dakby-black);
}

.gal-gross-text {
  min-width: 0;
}

.gal-gross-unterschrift {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dakby-white);
  white-space: pre-line;
}

.gal-gross-nachweis {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.gal-gross-zaehler {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .modal-dialog--bild {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .gal-gross-bild {
    max-height: 62vh;
  }

  .gal-gross-pfeil {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gal-karte,
  .gal-kachel,
  .gal-pfeil,
  .gal-gross-pfeil {
    transition: none;
  }

  .gal-karte:hover,
  .gal-kachel:hover {
    transform: none;
  }

  /* Die Bahn springt beim Blättern, statt zu gleiten. */
  .gal-bahn {
    scroll-behavior: auto;
  }
}
