/* ==========================================================================
   Villa Restaurant Sömmerda - Galerie
   Edles Mosaik-Raster mit variablen Kachelgroessen, Bereichsfilter und
   gestaffelter Reveal-Animation. Lightbox kommt aus reveal.js (.picture-wrap).
   ========================================================================== */

.galerie-section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero--galerie .hero__media img { object-position: center 60%; }

/* === Filter ============================================================== */

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--vr-space-2xs);
  margin: clamp(1.5rem, 3vw, 2.25rem) auto clamp(2rem, 4vw, 3rem);
}

.gallery-filter__btn {
  appearance: none;
  border: 1px solid var(--vr-linie);
  background: var(--vr-papier);
  color: var(--vr-text-secondary);
  font-family: var(--vr-font-display);
  font-size: var(--vr-text-base);
  font-weight: var(--vr-fw-medium);
  letter-spacing: 0.01em;
  padding: var(--vr-space-2xs) var(--vr-space-md);
  min-height: 44px;
  border-radius: var(--vr-radius-full);
  cursor: pointer;
  transition: background var(--vr-trans-base), color var(--vr-trans-base),
              border-color var(--vr-trans-base), transform var(--vr-trans-base), box-shadow var(--vr-trans-base);
}

@media (hover: hover) {
  .gallery-filter__btn:hover {
    color: var(--vr-burgund);
    border-color: var(--vr-gold);
    transform: translateY(-2px);
  }
}

.gallery-filter__btn:focus-visible {
  outline: var(--vr-focus-ring);
  outline-offset: 2px;
}

.gallery-filter__btn.is-active {
  background: linear-gradient(135deg, var(--vr-burgund) 0%, var(--vr-burgund-tief) 100%);
  color: var(--vr-creme);
  border-color: var(--vr-burgund);
  box-shadow: 0 6px 16px rgba(110, 26, 36, 0.26);
}

/* === Mosaik-Raster ======================================================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: clamp(140px, 44vw, 180px);
  grid-auto-flow: dense;
  gap: var(--vr-space-2xs);
}

@media (min-width: 760px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: clamp(170px, 22vw, 220px);
    gap: var(--vr-space-sm);
  }
}

@media (min-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(190px, 15vw, 240px);
  }
}

/* Variable Kachelgroessen */
.gallery-tile--wide { grid-column: span 2; }
.gallery-tile--tall { grid-row: span 2; }
.gallery-tile--big  { grid-column: span 2; grid-row: span 2; }

/* Auf 2 Spalten nichts breiter als der Inhalt; big bleibt Highlight (volle Breite, hoch) */
@media (max-width: 759px) {
  .gallery-tile--wide { grid-column: span 2; }
  .gallery-tile--big  { grid-column: span 2; grid-row: span 2; }
}

/* === Kachel ============================================================== */

/* .gallery-tile ist zugleich .picture-wrap (Lightbox aus reveal.js).
   Schatten hier bewusst leichter als der globale picture-wrap Default. */
main .gallery-tile.picture-wrap {
  margin: 0;
  height: 100%;
  border-radius: var(--vr-radius-md);
  border: 1px solid rgba(184, 146, 74, 0.30);
  box-shadow:
    0 1px 2px rgba(26, 20, 16, 0.10),
    0 10px 22px rgba(26, 20, 16, 0.14);
}

.gallery-tile[hidden] { display: none !important; }

.gallery-tile .gallery-tile__pic,
.gallery-tile picture,
.gallery-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* sanfter Zoom des Bildes beim Hover (Container ruhig, kein Zittern) */
.gallery-tile img {
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) {
  main .gallery-tile.picture-wrap:hover img { transform: scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-tile img { transition: none; }
}

.gallery-empty {
  text-align: center;
  color: var(--vr-text-muted);
  font-style: italic;
  margin-top: var(--vr-space-lg);
}
