/* Wolfgang Zechmann — horizontales Fluxus-Portfolio
   Bereinigte Fassung, November 2026
   Klassen entsprechen dem bestehenden PHP/JS-Markup. */

.wz-horizontal-gallery {
  --wz-ink: #191919;
  --wz-muted: #858585;
  --wz-border: #e8e8e8;
  --wz-art-gap: 16px;
  --wz-site-header: 100px;
  --wz-gallery-header: 76px;
  --wz-gallery-footer: 60px;
  --wz-art-height: min(760px, calc(100dvh - var(--wz-site-header) - var(--wz-gallery-header) - var(--wz-gallery-footer) - 85px));
  width: 100%;
  max-width: none;
  margin-top: 0 !important;
  padding-top: 0 !important;
  background: #fff;
  color: var(--wz-ink);
  font-family: Arial, Helvetica, sans-serif;
}
.wz-horizontal-gallery *,
.wz-horizontal-gallery *::before,
.wz-horizontal-gallery *::after { box-sizing: border-box; }

/* Kopfzeile */
.wz-horizontal-gallery .wz-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 0;
  margin: 0 !important;
  padding: 8px 30px 12px !important;
  border-bottom: none;
}
.wz-horizontal-gallery .wz-eyebrow { display: none !important; }
.wz-horizontal-gallery .wz-gallery-heading { margin: 0; padding: 0; }
.wz-horizontal-gallery .wz-gallery-heading h1 {
  margin: 0 !important;
  padding: 0 !important;
  color: #174d5b;
  font: 500 32px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: -.8px;
}

/* Jahresfilter: Text statt Schaltflächen */
.wz-horizontal-gallery .wz-year-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 25px;
  margin: 0;
  padding: 0;
}
.wz-horizontal-gallery .wz-year-nav .wz-year {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-block;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0 !important;
  padding: 5px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #333 !important;
  font: 400 13px/1.4 Arial, Helvetica, sans-serif;
  text-decoration: none !important;
  cursor: pointer;
  transition: color .25s ease;
}
.wz-horizontal-gallery .wz-year-nav .wz-year:hover { color: #111 !important; }
.wz-horizontal-gallery .wz-year-nav .wz-year.active,
.wz-horizontal-gallery .wz-year-nav .wz-year[aria-pressed="true"] { color: #a0a0a0 !important; }
.wz-horizontal-gallery .wz-year-nav .wz-year::before,
.wz-horizontal-gallery .wz-year-nav .wz-year::after { content: none !important; }

/* Horizontaler Bildstreifen */
.wz-horizontal-gallery .wz-gallery-stage {
  width: 100%;
  margin: 0;
  padding: 10px 0 0 !important;
  overflow: hidden;
}
.wz-horizontal-gallery .wz-horizontal-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: var(--wz-art-gap) !important;
  width: 100%;
  margin: 0;
  padding: 0 30px 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wz-horizontal-gallery .wz-horizontal-track::-webkit-scrollbar { display: none; }
.wz-horizontal-gallery .wz-slide {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start;
  flex: 0 0 auto !important;
  width: max-content !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  scroll-snap-align: start;
}
.wz-horizontal-gallery .wz-slide[hidden] { display: none !important; }
.wz-horizontal-gallery .wz-art-open {
  display: block !important;
  flex: 0 0 auto;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
  cursor: zoom-in;
}
.wz-horizontal-gallery .wz-art-image {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: var(--wz-art-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain !important;
  object-position: center;
  transition: opacity .35s ease;
}
.wz-horizontal-gallery .wz-art-open:hover .wz-art-image { opacity: .9; }
.wz-horizontal-gallery .wz-art-caption {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 9px 0 0;
  line-height: 1.4;
}
.wz-horizontal-gallery .wz-art-caption strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.wz-horizontal-gallery .wz-art-caption span {
  display: block;
  margin-top: 2px;
  color: #888;
  font-size: 11px;
}

/* Galerie-Navigation und Bildzähler — Layout nicht erzwingen */
.wz-horizontal-gallery .wz-gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 0;
  margin: 0;
  padding: 10px 30px 14px;
  border-top: 1px solid #eee;
}
.wz-horizontal-gallery .wz-gallery-counter {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  font-variant-numeric: tabular-nums;
}
.wz-horizontal-gallery .wz-separator { padding: 0 8px; color: #aaa; }
.wz-horizontal-gallery .wz-scroll-hint {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #888;
  font-size: 10px;
  letter-spacing: 2px;
}
.wz-horizontal-gallery .wz-scroll-hint span:last-child { font-size: 24px; line-height: 1; }
.wz-horizontal-gallery .wz-gallery-controls { display: flex; align-items: center; gap: 8px; }
.wz-horizontal-gallery .wz-gallery-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid #dedede;
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-size: 19px;
  font-weight: 300;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.wz-horizontal-gallery .wz-gallery-controls button:hover:not(:disabled) {
  background: #222;
  border-color: #222;
  color: #fff;
}
.wz-horizontal-gallery .wz-gallery-controls button:disabled { opacity: .25; cursor: default; }

/* Vollbild-Lightbox */
.wz-horizontal-gallery .wz-portfolio-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 65px 85px 45px !important;
  overflow: hidden !important;
  background: rgba(10,10,10,.97) !important;
  color: #fff !important;
}
.wz-horizontal-gallery .wz-portfolio-lightbox[hidden] { display: none !important; }
.wz-horizontal-gallery .wz-lb-content {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.wz-horizontal-gallery .wz-lb-content img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 195px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  object-fit: contain !important;
}
.wz-horizontal-gallery .wz-lb-caption {
  position: relative !important;
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 850px !important;
  margin: 18px auto 0 !important;
  padding: 0 15px 8px !important;
  color: #fff !important;
  font: 400 13px/1.6 Arial, sans-serif !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
.wz-horizontal-gallery .wz-portfolio-lightbox button {
  position: absolute !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.5) !important;
  border-radius: 50% !important;
  background: rgba(35,35,35,.85) !important;
  color: #fff !important;
  font: 300 26px/1 Arial, sans-serif !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer !important;
}
.wz-horizontal-gallery .wz-portfolio-lightbox button:hover {
  background: rgba(85,85,85,.95) !important;
  color: #fff !important;
}
.wz-horizontal-gallery .wz-portfolio-lightbox .wz-lb-close {
  position: fixed !important;
  top: 25px !important;
  right: 30px !important;
  bottom: auto !important;
  left: auto !important;
}
.wz-horizontal-gallery .wz-portfolio-lightbox .wz-lb-prev {
  position: fixed !important;
  top: 50% !important;
  left: 22px !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}
.wz-horizontal-gallery .wz-portfolio-lightbox .wz-lb-next {
  position: fixed !important;
  top: 50% !important;
  right: 22px !important;
  left: auto !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}
.wz-horizontal-gallery button:focus-visible,
.wz-horizontal-gallery .wz-horizontal-track:focus-visible {
  outline: 2px solid #666;
  outline-offset: 3px;
}

/* Tablet */
@media (max-width: 1000px) {
  .wz-horizontal-gallery { --wz-site-header: 85px; --wz-art-gap: 14px; }
  .wz-horizontal-gallery .wz-gallery-header { padding: 8px 20px 12px !important; }
  .wz-horizontal-gallery .wz-horizontal-track { padding: 0 20px 8px !important; }
  .wz-horizontal-gallery .wz-gallery-footer { padding: 10px 20px; }
}

/* Smartphone */
@media (max-width: 650px) {
  .wz-horizontal-gallery {
    --wz-site-header: 80px;
    --wz-gallery-header: 105px;
    --wz-gallery-footer: 60px;
    --wz-art-gap: 12px;
    --wz-art-height: calc(100dvh - 310px);
  }
  .wz-horizontal-gallery .wz-gallery-header {
    display: block;
    padding: 8px 16px 12px !important;
  }
  .wz-horizontal-gallery .wz-gallery-heading h1 { font-size: 27px; }
  .wz-horizontal-gallery .wz-year-nav {
    justify-content: flex-start;
    gap: 5px 20px;
    margin-top: 10px;
  }
  .wz-horizontal-gallery .wz-gallery-stage { padding-top: 8px !important; }
  .wz-horizontal-gallery .wz-horizontal-track {
    padding: 0 16px 8px !important;
    scroll-snap-type: x mandatory;
  }
  .wz-horizontal-gallery .wz-art-image { max-width: calc(100vw - 32px) !important; }
  .wz-horizontal-gallery .wz-gallery-footer { padding: 10px 16px; }
  .wz-horizontal-gallery .wz-scroll-hint { display: none; }
  .wz-horizontal-gallery .wz-portfolio-lightbox { padding: 65px 12px 90px !important; }
  .wz-horizontal-gallery .wz-lb-content img { max-height: calc(100dvh - 235px) !important; }
  .wz-horizontal-gallery .wz-lb-caption { font-size: 12px !important; margin-top: 14px !important; }
  .wz-horizontal-gallery .wz-portfolio-lightbox .wz-lb-close {
    top: 15px !important;
    right: 15px !important;
  }
  .wz-horizontal-gallery .wz-portfolio-lightbox .wz-lb-prev {
    top: auto !important;
    bottom: 20px !important;
    left: 20px !important;
    transform: none !important;
  }
  .wz-horizontal-gallery .wz-portfolio-lightbox .wz-lb-next {
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    transform: none !important;
  }
}

@media (max-height: 650px) and (min-width: 651px) {
  .wz-horizontal-gallery { --wz-art-height: calc(100dvh - 240px); }
}
@media (prefers-reduced-motion: reduce) {
  .wz-horizontal-gallery .wz-horizontal-track { scroll-behavior: auto; }
  .wz-horizontal-gallery *,
  .wz-horizontal-gallery *::before,
  .wz-horizontal-gallery *::after { transition: none !important; animation: none !important; }
}

/* Gutenberg-Shortcode-Block: internen Abstand entfernen */
.wp-block-shortcode:has(.wz-horizontal-gallery) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
