/* ============================================================
   Scheicher – WordPress Gallery als Slideshow
   ============================================================ */

/* --- Galerie-Container ---
   overflow: visible damit Pfeile außerhalb sichtbar sind
   padding-bottom für die Dots                              */
figure.wp-block-gallery {
  position: relative !important;
  display: block !important;
  overflow: visible !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-bottom: 36px !important; /* Platz für Dots */
}

/* --- Alle figure-Items verstecken --- */
figure.wp-block-gallery > figure.wp-block-image {
  display: none !important;
  margin: 0 !important;
  width: 100% !important;
}

/* --- Aktives Item sichtbar --- */
figure.wp-block-gallery > figure.wp-block-image.is-active {
  display: block !important;
}

/* --- Bild volle Breite --- */
figure.wp-block-gallery > figure.wp-block-image img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  cursor: zoom-in !important;
}

/* --- Pfeil-Buttons: außerhalb via negativem translate --- */
.gallery-arrow {
  position: absolute;
  top: 50%;
  /* nach oben um halbe Höhe + halbe Dots-Höhe korrigieren */
  transform: translateY(calc(-50% - 18px));
  z-index: 10;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.gallery-arrow:hover { opacity: 1; }

/* Pfeile links/rechts außerhalb des Bildes */
.gallery-arrow.prev { right: 100%; margin-right: 12px; left: auto; }
.gallery-arrow.next { left: 100%; margin-left: 12px; right: auto; }

.gallery-arrow svg {
  width: 28px;
  height: 28px;
  stroke: #1a1a1a;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Dots: im flow, unten links bündig mit Bildkante --- */
.gallery-dots {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  padding: 0;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8c4bd;
  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.gallery-dot.is-active {
  background: #1a1a1a;
  transform: scale(1.35);
}

/* --- Lightbox – weißer Hintergrund, Bild rechts, 25% Platz links --- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox-inner {
  width: 75%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  box-sizing: border-box;
}

.gallery-lightbox-inner img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(0.97);
  transition: transform 0.35s ease;
}

.gallery-lightbox.is-open .gallery-lightbox-inner img {
  transform: scale(1);
}

/* Schließen */
.gallery-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 2;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.gallery-lightbox-close:hover { opacity: 1; }

.gallery-lightbox-close svg {
  width: 26px;
  height: 26px;
  stroke: #1a1a1a;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* Lightbox Pfeile */
.gallery-lightbox .gallery-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  opacity: 0.35;
}

.gallery-lightbox .gallery-arrow:hover { opacity: 0.9; }
.gallery-lightbox .gallery-arrow svg   { stroke: #1a1a1a; }
.gallery-lightbox .gallery-arrow.prev  { left: 20px; right: auto; }
.gallery-lightbox .gallery-arrow.next  { right: 20px; left: auto; }

/* Lightbox Dots – unten links */
.gallery-lightbox .gallery-dots {
  position: fixed;
  bottom: 24px;
  left: 32px;
  margin: 0;
}

.gallery-lightbox .gallery-dot          { background: #c8c4bd; }
.gallery-lightbox .gallery-dot.is-active { background: #1a1a1a; }
