/* =============================================================
   Fiestalimo · Galerie-Seite  ·  "Visual Diary"-Layout
   Schwebende Karte + Coverflow-Karussell im Creme/Gold-Markenlook.
   ============================================================= */

.gallery-page {
  --header-height: 76px;
  background:
    radial-gradient(1200px 620px at 50% -8%, rgba(196, 138, 54, 0.14), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--cream) 46%, #f0e7d8 100%);
}

.galpage {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--header-height) + clamp(24px, 4vw, 60px)) clamp(14px, 3vw, 40px) clamp(48px, 6vw, 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

/* Weich verwaschener Marken-Hintergrund hinter der Karte */
.gal-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("https://ext.same-assets.com/837752646/515040996.jpeg") center/cover no-repeat;
  filter: blur(34px) saturate(1.1) brightness(1.08);
  opacity: 0.14;
  transform: scale(1.15);
}

/* ---------- Schwebende Karte ---------- */
.gal-panel {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 3.6vw, 54px) clamp(22px, 3.4vw, 60px) clamp(26px, 3vw, 44px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: clamp(20px, 2.4vw, 34px);
  box-shadow:
    0 2px 6px rgba(46, 32, 16, 0.04),
    0 40px 90px rgba(46, 32, 16, 0.16);
  overflow: hidden;
}

.gal-panel__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(20px, 2.6vw, 32px);
}

.gal-panel .kicker {
  justify-content: center;
  margin-bottom: 12px;
}

.gal-panel__title {
  margin: 0;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(2rem, 3.8vw, 3.05rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.gal-panel__title em {
  font-style: italic;
  color: var(--gold);
}

.gal-panel__sub {
  margin: 10px auto 0;
  max-width: 520px;
  color: var(--ink-soft);
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  line-height: 1.55;
}

/* ---------- Filter-Pills ---------- */
.gal-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: clamp(16px, 2vh, 28px);
}

.gal-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    background 240ms var(--ease-premium, ease),
    color 240ms ease,
    border-color 240ms ease,
    transform 240ms ease,
    box-shadow 240ms ease;
}

.gal-chip:hover {
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-1px);
}

/* Aktiver Filter: dunkle Pille (wie in der Vorlage) */
.gal-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 18, 12, 0.24);
}

/* "Mehr"-Pille mit Pfeil (gold) */
.gal-chip--more {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-color: transparent;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(196, 138, 54, 0.3);
}

.gal-chip--more:hover {
  filter: brightness(1.05);
  color: #fff;
  transform: translateY(-1px);
}

.gal-chip--more svg {
  width: 15px;
  height: 15px;
}

/* ---------- Coverflow-Karussell ---------- */
.cf {
  position: relative;
}

.cf-stage {
  position: relative;
  height: clamp(220px, 34vh, 400px);
}

.cf-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(280px, 46%, 580px);
  height: 88%;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--sand);
  box-shadow: 0 26px 60px rgba(38, 26, 12, 0.28);
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition:
    transform 560ms var(--ease-premium, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity 480ms ease;
  will-change: transform, opacity;
}

.cf-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cf-item.is-center {
  cursor: zoom-in;
}

/* Bild-Beschriftung (nur auf dem zentralen Bild sichtbar) */
.cf-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 22px 20px 18px;
  background: linear-gradient(180deg, rgba(20, 13, 6, 0) 0%, rgba(20, 13, 6, 0.72) 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.cf-item.is-center .cf-cap {
  opacity: 1;
  transform: translateY(0);
}

.cf-cap__tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(196, 138, 54, 0.92);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cf-cap__title {
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  line-height: 1.2;
}

.cf-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 300ms ease, transform 300ms ease;
}

.cf-item.is-center .cf-zoom {
  opacity: 1;
  transform: scale(1);
}

.cf-zoom svg {
  width: 18px;
  height: 18px;
}

/* Navigation – seitlich mittig, damit ohne Scrollen sichtbar */
.cf-nav {
  display: contents;
}

.cf-arrow {
  position: absolute;
  top: 48%;
  transform: translateY(-50%);
  z-index: 14;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(38, 26, 12, 0.18);
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.cf [data-cf-prev] { left: clamp(-6px, 0.4vw, 14px); }
.cf [data-cf-next] { right: clamp(-6px, 0.4vw, 14px); }

.cf-arrow:hover {
  background: var(--gold);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 30px rgba(196, 138, 54, 0.34);
}

.cf-arrow svg {
  width: 22px;
  height: 22px;
}

.gal-none {
  margin: 24px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Empty-State ---------- */
.galpage-empty {
  max-width: 460px;
  margin: 10px auto 24px;
  padding: 40px 28px;
  text-align: center;
}

.galpage-empty__ic {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(196, 138, 54, 0.12);
  color: var(--gold-dark);
}

.galpage-empty__ic svg { width: 30px; height: 30px; }
.galpage-empty h2 { margin: 0 0 8px; color: var(--ink); font-family: "Playfair Display", Georgia, serif; font-weight: 600; }
.galpage-empty p { margin: 0 0 22px; color: var(--ink-soft); }

/* ---------- Lightbox ---------- */
.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
}

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

.gal-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 4, 0.9);
  backdrop-filter: blur(6px);
  animation: galFade 260ms ease both;
}

@keyframes galFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gal-lightbox__stage {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gal-lightbox__stage img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: galZoom 320ms var(--ease-premium, ease) both;
}

@keyframes galZoom {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.gal-lightbox__cap {
  max-width: 70ch;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  text-align: center;
}

.gal-lightbox__cap:empty { display: none; }

.gal-lightbox__close {
  position: absolute;
  z-index: 2;
  top: clamp(12px, 2vw, 24px);
  right: clamp(12px, 2vw, 24px);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.gal-lightbox__close:hover { background: rgba(255, 255, 255, 0.24); transform: rotate(90deg); }
.gal-lightbox__close svg { width: 22px; height: 22px; }

.gal-lightbox__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 200ms ease;
}

.gal-lightbox__nav:hover { background: var(--gold); border-color: transparent; }
.gal-lightbox__nav svg { width: 24px; height: 24px; }
.gal-lightbox__nav--prev { left: clamp(8px, 2vw, 28px); }
.gal-lightbox__nav--next { right: clamp(8px, 2vw, 28px); }

.gal-lightbox__counter {
  position: absolute;
  z-index: 2;
  bottom: clamp(12px, 2vw, 26px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .cf-item { width: 74%; height: 84%; }
  .cf-arrow { width: 44px; height: 44px; }
  .gal-chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .gal-chip { flex: 0 0 auto; }
}

@media (max-width: 480px) {
  .cf-item { width: 82%; }
  .cf-stage { height: clamp(240px, 62vw, 320px); }
}

/* Niedrige Viewports (Laptops): kompakter, damit alles ohne Scrollen passt */
@media (max-height: 780px) {
  .gal-panel__sub { display: none; }
  .cf-stage { height: clamp(200px, 32vh, 330px); }
}

@media (prefers-reduced-motion: reduce) {
  .cf-item,
  .cf-cap,
  .gal-lightbox__backdrop,
  .gal-lightbox__stage img { transition: none; animation: none; }
}
