/* Alte Schnitterkate / Grav 2: fingergeführte mobile Galerie.
   Nur dieser Bereich wird gestylt; Desktop-Hintergrundgalerie bleibt unverändert. */
.ht-mobile-gallery { display: none; }
@media screen and (max-width: 775px) {
  .content > .ht-mobile-gallery,
  .content .ht-mobile-gallery {
    display: block !important;
    position: relative !important;
    box-sizing: border-box;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    min-height: 0;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    background: #eee;
    isolation: isolate;
  }
  .ht-mobile-gallery .ht-gallery-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y; /* Wischen horizontal, Seite weiterhin vertikal scrollbar */
    user-select: none;
    -webkit-user-select: none;
  }
  .ht-mobile-gallery .ht-gallery-photo {
    display: none !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    margin: 0;
    padding: 0;
    border: 0;
  }
  /* Vor dem Start von JavaScript bleibt das erste Bild sichtbar. */
  .ht-mobile-gallery .ht-gallery-photo.is-active {
    display: block !important;
  }
  /* Nach Initialisierung werden die Bilder nebeneinander verschiebbar. */
  .ht-mobile-gallery .ht-gallery-track {
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
    gap: 0;
    padding: 0;
    margin: 0;
    will-change: transform;
    transform: translate3d(0,0,0);
  }
  .ht-mobile-gallery.is-ready .ht-gallery-track .ht-gallery-photo {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    flex: 0 0 100% !important;
    min-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    -webkit-user-drag: none;
  }
  .ht-mobile-gallery .ht-gallery-control {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 50 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    appearance: none;
    background: rgba(35,35,35,.4);
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
  }
  .ht-mobile-gallery .ht-gallery-back { left: 8px !important; right: auto !important; }
  .ht-mobile-gallery .ht-gallery-forward { right: 8px !important; left: auto !important; }
  .ht-mobile-gallery .ht-gallery-control svg {
    display: block;
    width: 28px;
    height: 28px;
    pointer-events: none;
  }
  .ht-mobile-gallery .ht-gallery-control:focus-visible {
    outline: 2px solid #ffcb33;
    outline-offset: 2px;
  }
}
