/* Runtime pro weby převedené z Wixu (tools/wix-export). Nahrazuje wixové skripty. */

/* ---------- Galerie ---------- */
.wx-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ar);
  overflow: hidden;
}
.wx-gi {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  display: block;
  box-sizing: border-box;
  border: 1px solid #fff;
  overflow: hidden;
  cursor: pointer;
}
.wx-gi img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
}
.wx-gi:hover img,
.wx-gi:focus-visible img {
  transform: scale(1.04);
  filter: brightness(0.92);
}
.wx-strip {
  position: relative;
  width: 100%;
}
.wx-strip-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.wx-strip-scroll::-webkit-scrollbar {
  display: none;
}
.wx-strip .wx-gallery {
  width: var(--sw);
}
.wx-strip-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #1b1b1b;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s;
}
.wx-strip-nav[hidden] {
  display: none;
}
.wx-strip-nav svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: auto;
}
.wx-strip-prev {
  left: 16px;
}
.wx-strip-next {
  right: 16px;
}
@media (max-width: 750px) {
  .wx-gallery {
    aspect-ratio: var(--ar-m, var(--ar));
  }
  .wx-gi {
    left: var(--xm, var(--x));
    top: var(--ym, var(--y));
    width: var(--wm, var(--w));
    height: var(--hm, var(--h));
    display: var(--dm, block);
  }
  .wx-strip .wx-gallery {
    width: var(--sw-m, var(--sw));
  }
  .wx-strip-nav {
    width: 34px;
    height: 34px;
    margin-top: -17px;
  }
}

/* ---------- Lightbox ---------- */
.wx-lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  transition: opacity 0.2s;
  touch-action: pan-y;
}
.wx-lb.wx-on {
  opacity: 1;
}
.wx-lb img {
  max-width: calc(100vw - 140px);
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.wx-lb button {
  position: absolute;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0.8;
}
.wx-lb button:hover,
.wx-lb button:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}
.wx-lb svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
}
.wx-lb-close {
  top: 14px;
  right: 14px;
}
.wx-lb-prev {
  left: 14px;
  top: 50%;
  margin-top: -24px;
}
.wx-lb-next {
  right: 14px;
  top: 50%;
  margin-top: -24px;
}
.wx-lb-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  padding: 0 60px;
  color: #fff;
  font: 14px/1.4 Madefor-Text, Arial, sans-serif;
  text-align: center;
  opacity: 0.85;
}
@media (max-width: 750px) {
  .wx-lb img {
    max-width: 100vw;
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
  }
  .wx-lb-prev,
  .wx-lb-next {
    top: auto;
    bottom: 6px;
    margin: 0;
  }
}
html.wx-lb-open,
html.wx-menu-open {
  overflow: hidden;
}

/* ---------- Posuvník před / po ---------- */
.wx-ba {
  --pos: 50%;
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  background: #111;
}
.wx-ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.wx-ba-before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.wx-ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  outline: none;
}
.wx-ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  margin: -22px 0 0 -22px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cpath d='M15 12l-7 7 7 7zM23 12l7 7-7 7z' fill='%23fff'/%3E%3C/svg%3E")
    center / 100% no-repeat;
  box-shadow: 0 0 12px rgba(51, 51, 51, 0.5);
}
.wx-ba-handle:focus-visible::after {
  box-shadow: 0 0 0 3px rgba(94, 151, 255, 0.9);
}

/* ---------- YouTube ---------- */
.wx-youtube {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Přepínač jazyků ---------- */
[data-wx-lang] [role='menu'] {
  display: none;
}
[data-wx-lang].wx-open [role='menu'] {
  display: flex;
}
[data-wx-lang] [role='menuitem'][data-href] {
  cursor: pointer;
}

/* Plynulé skoky na kotvy; hlavička je přes obsah, proto odsazení. */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
