/* Inula Texla — static photo gallery (Fotogalerie) with category filter + lightbox */

/* --- Full-width layout: let the Fotogalerie content span the whole screen --- */
/* (gallery.css only loads on the Fotogalerie pages, so this affects nothing else) */
#sp-main-body > .container { width:100% !important; max-width:100% !important; margin:0 !important; padding-left:0 !important; padding-right:0 !important; }
#sp-main-body .row { margin-left:0 !important; margin-right:0 !important; }
#sp-main-body #sp-left { display:none !important; }
#sp-main-body #sp-component { width:100% !important; max-width:100% !important; flex:0 0 100% !important; float:none !important; padding-left:0 !important; padding-right:0 !important; }
#sp-main-body #sp-component > .sp-column { padding:0 30px !important; }   /* 0 30px, like the header */

.foto-gallery { margin: 8px 0 30px; padding:0; }
.fg-filters { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:0 0 22px; }
.fg-filter {
  font-family: Overlock, "Segoe UI", sans-serif; font-size:15px; padding:8px 20px;
  border:1px solid #cfc9b4; background:#fff; color:#5a5a44; border-radius:30px;
  cursor:pointer; transition:background .15s,border-color .15s,color .15s;
}
.fg-filter:hover { border-color:#7e8446; color:#7e8446; }
.fg-filter.is-active { background:#7e8446; border-color:#7e8446; color:#fff; }

.fg-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; user-select:none; }
.fg-item {
  display:block; overflow:hidden; border-radius:4px; aspect-ratio:1/1;
  background:#e9e5d8; position:relative; cursor:zoom-in;
}
.fg-item img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .35s ease;
  -webkit-user-drag:none; user-drag:none; }
/* while dragging the slider, show the grabbing cursor everywhere */
html.fg-dragging, html.fg-dragging * { cursor:grabbing !important; }
/* loop clones: hidden in the desktop grid, shown only inside the mobile slider */
.fg-clone { display:none; }
.fg-item:hover img { transform:scale(1.07); }

/* dot navigation (only shown on mobile) */
.fg-dots { display:none; justify-content:center; flex-wrap:wrap; gap:8px; margin:16px 0 0; }
.fg-dot { width:9px; height:9px; border-radius:50%; border:0; padding:0; cursor:pointer;
  background:#cfc9b4; transition:background .2s, transform .2s; }
.fg-dot.is-active { background:#7e8446; transform:scale(1.3); }

/* lightbox */
.fg-lightbox {
  position:fixed; inset:0; z-index:100000; background:rgba(0,0,0,.97);
  display:flex; align-items:center; justify-content:center;
}
.fg-lightbox[hidden] { display:none; }
.fg-lb-img { max-width:90vw; max-height:88vh; object-fit:contain; box-shadow:0 6px 40px rgba(0,0,0,.6); }
.fg-lb-close, .fg-lb-prev, .fg-lb-next {
  position:absolute; background:none; border:0; color:#fff; cursor:pointer;
  line-height:1; padding:14px; opacity:.85; transition:opacity .15s; user-select:none;
}
.fg-lb-close:hover, .fg-lb-prev:hover, .fg-lb-next:hover { opacity:1; }
.fg-lb-close { top:6px; right:14px; font-size:44px; }
.fg-lb-prev { left:8px; top:50%; transform:translateY(-50%); font-size:48px; }
.fg-lb-next { right:8px; top:50%; transform:translateY(-50%); font-size:48px; }

/* --- Mobile: full-width, one-at-a-time swipe slider with dot nav --- */
@media (max-width:600px){
  .fg-grid {
    display:flex; grid-template-columns:none; gap:0;
    margin-left:-30px; margin-right:-30px;            /* full-bleed: cancel the column's 30px */
    overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
    touch-action:pan-y;                               /* JS handles horizontal drag; page still scrolls vertically */
    scrollbar-width:none; border-radius:0;
  }
  .fg-item { cursor:grab; }
  .fg-grid::-webkit-scrollbar { display:none; }
  .fg-item { flex:0 0 100%; scroll-snap-align:center; aspect-ratio:4/3; border-radius:0; }
  .fg-item.fg-clone { display:block; pointer-events:none; }   /* clones act as slides but aren't clickable */
  .fg-dots { display:flex; }
  .fg-lb-prev,.fg-lb-next{ font-size:34px; }
}
