@font-face {
    font-family: 'dtl';
    src: url('../fonts/dtl/dtldocumentast-webfont.woff2') format('woff2'),
         url('../fonts/dtl/dtldocumentast-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

 /* style.css – Filmfest Bildergalerie
 *
 * Alle Farben, Schriften und Abstände sind als CSS-Variablen oben definiert.
 * Zum Anpassen an das bestehende Design von filmfest.li genügt es meist,
 * die Werte im Abschnitt ":root" zu ändern.
 */

:root {
  --ffg-bg: #fff;
  --ffg-text: “#000”;
  --ffg-text-gedaempft: #333;
  --ffg-akzent: #333;       /* Akzentfarbe, z.B. für aktiven Menupunkt / Hover */
  --ffg-kachel-luecke: 4px;    /* Abstand zwischen den Kacheln */
  --ffg-kachel-min: 200px;     /* Mindestbreite einer Kachel, bevor umgebrochen wird */
  --ffg-schrift: "dtl", "Helvetica Neue", Arial, sans-serif;
  --ffg-transition: 220ms ease;
}

/* Wird die Galerie in eine bestehende Seite eingebettet, können die
   folgenden body/html-Regeln entfernt werden – dort übernimmt dann das
   bestehende Seitenlayout den schwarzen Hintergrund. */
html, body {
  margin: 0;
  padding: 0;
  background: var(--ffg-bg);
}

.ffg {
  box-sizing: border-box;
  font-family: var(--ffg-schrift);
  color: var(--ffg-text);
  background: var(--ffg-bg);
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.ffg *,
.ffg *::before,
.ffg *::after {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------------
   Kopfbereich / Navigation (Jahrgänge)
   --------------------------------------------------------------------- */

.ffg-kopf {
  margin-bottom: 32px;
}

.ffg-titel {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 20px;
  color: var(--ffg-text);
}

.ffg-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 4px;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ffg-nav-link {
  display: inline-block;
  padding: 10px 18px;
  color: var(--ffg-text-gedaempft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-bottom: 2px solid transparent;
  transition: color var(--ffg-transition), border-color var(--ffg-transition);
}

.ffg-nav-link:hover,
.ffg-nav-link:focus-visible {
  color: var(--ffg-text);
}

.ffg-nav-link.ist-aktiv {
  color: var(--ffg-akzent);
  border-bottom-color: var(--ffg-akzent);
}

.ffg-status {
  min-height: 1.2em;
  color: var(--ffg-text-gedaempft);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.ffg-hinweis {
  color: var(--ffg-text-gedaempft);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------------------
   Bilder-Grid: quadratische Kacheln, formatfüllend (object-fit: cover)
   --------------------------------------------------------------------- */

.ffg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--ffg-kachel-min), 1fr));
  gap: var(--ffg-kachel-luecke);
}

.ffg-kachel {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  margin: 0;
  border: 0;
  background: #111;
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
}

.ffg-kachel img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* formatfüllend / zugeschnitten in der Kachel */
  display: block;
  transition: transform 420ms ease, opacity var(--ffg-transition);
}

.ffg-kachel:hover img,
.ffg-kachel:focus-visible img {
  transform: scale(1.06);
}

.ffg-kachel:focus-visible {
  outline: 2px solid var(--ffg-akzent);
  outline-offset: 2px;
}

/* Kleiner dunkler Verlauf beim Hover, damit die Kachel als "klickbar" wirkt */
.ffg-kachel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 40%);
  opacity: 0;
  transition: opacity var(--ffg-transition);
  pointer-events: none;
}

.ffg-kachel:hover::after,
.ffg-kachel:focus-visible::after {
  opacity: 1;
}

/* ---------------------------------------------------------------------
   Lightbox: ganzes Bild auf schwarzem Hintergrund (object-fit: contain)
   --------------------------------------------------------------------- */

.ffg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background:white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  transition: opacity 200ms ease;
  /* Die Lightbox liegt im Markup ausserhalb von <section class="ffg">, erbt
     die Schriftart also nicht von dort automatisch (z.B. in Chrome fällt
     sie sonst auf die Standard-Schrift des Browsers zurück, oft eine
     Serifenschrift wie Times New Roman) - deshalb hier explizit setzen. */
  font-family: var(--ffg-schrift);
  color: var(--ffg-text);
  box-sizing: border-box;
}

.ffg-lightbox *,
.ffg-lightbox *::before,
.ffg-lightbox *::after {
  box-sizing: border-box;
}

/* Browser (v.a. Chrome) weisen <button>-Elementen von sich aus eine eigene
   Schriftart zu, die NICHT automatisch vererbt wird, selbst wenn eine
   Schriftart auf einem Elternelement gesetzt ist. Ohne diese Regel würden
   z.B. die Pfeil-Symbole in Chrome in einer anderen Schrift erscheinen als
   der Rest der Galerie. */
.ffg button,
.ffg-lightbox button {
  font-family: inherit;
}

.ffg-lightbox[hidden] {
  display: none;
}

.ffg-lightbox.ist-sichtbar {
  opacity: 1;
}

.ffg-lb-figur {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ffg-lb-figur img {
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;  /* ganzes Bild sichtbar, nichts wird beschnitten */
  display: block;
  background: #000;
}

.ffg-lb-figur figcaption {
  color: var(--ffg-text-gedaempft);
  font-size: 0.9rem;
  text-align: center;
}

.ffg-lb-schliessen,
.ffg-lb-zurueck,
.ffg-lb-weiter {
  position: fixed;
  background: transparent;
  border: 0;
  color: var(--ffg-text);
  cursor: pointer;
  transition: color var(--ffg-transition), opacity var(--ffg-transition);
  opacity: 0.75;
}

.ffg-lb-schliessen:hover,
.ffg-lb-zurueck:hover,
.ffg-lb-weiter:hover,
.ffg-lb-schliessen:focus-visible,
.ffg-lb-zurueck:focus-visible,
.ffg-lb-weiter:focus-visible {
  opacity: 1;
  color: var(--ffg-akzent);
}

.ffg-lb-schliessen {
  top: 16px;
  right: 20px;
  font-size: 2.4rem;
  line-height: 1;
  padding: 8px 12px;
}

.ffg-lb-zurueck,
.ffg-lb-weiter {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  line-height: 1;
  padding: 12px 18px;
}

.ffg-lb-zurueck {
  left: 4px;
}

.ffg-lb-weiter {
  right: 4px;
}

@media (max-width: 640px) {
  :root {
    --ffg-kachel-min: 130px;
    --ffg-kachel-luecke: 2px;
  }

  .ffg {
    padding: 28px 12px 56px;
  }

  .ffg-lb-zurueck,
  .ffg-lb-weiter {
    font-size: 2rem;
    padding: 8px 10px;
  }

  .ffg-lb-figur img {
    max-height: calc(100vh - 110px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ffg-kachel img,
  .ffg-lightbox {
    transition: none;
  }
}
