/* =====================================================================
   FRAGMENT SCROLLER (Video-Thumbnails) – NACH deinem Theme-CSS laden.
   Selektoren sind bewusst "doppelt" (.hscroll.hscroll), damit sie deine
   Theme-Regeln für ul/li (float, 33.33% Breite, Padding) sicher schlagen.
   ===================================================================== */

.hscroll {
  position: relative;
  display: flow-root;
  width: 100%;
  clear: both;
  --card: clamp(260px, 30vw, 460px);    /* Breite eines Thumbnails */
  --gap: 30px;                          /* Abstand dazwischen */
  --pad: clamp(16px, 0, 40px);        /* Abstand links/rechts am Rand */
}

/* ---------- Spur (deine <ul>) ---------- */
.hscroll.hscroll > ul.hs_track {
  float: none;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px var(--pad) 30px;        /* oben/unten Luft für Tilt */
  display: flex;
  flex-wrap: nowrap;
  gap: var(--gap);
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--pad);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
  outline: none;
}
.hscroll.hscroll > ul.hs_track::-webkit-scrollbar { display: none; }
.hscroll.hscroll > ul.hs_track.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.hscroll.hscroll > ul.hs_track.is-dragging * { user-select: none; cursor: grabbing; }
.hscroll.hscroll > ul.hs_track:focus-visible { box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }

/* ---------- Karte = dein <a>, darin das <li> ---------- */
.hscroll.hscroll > .hs_track > a.hs_item {
  display: block;
  box-sizing: border-box;
  flex: 0 0 var(--card);
  width: var(--card);
  scroll-snap-align: start;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-user-drag: none;
}
.hscroll.hscroll > .hs_track > a.hs_item:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
.hscroll.hscroll > .hs_track > a.hs_item > li {
  float: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Bild: volle Breite, nichts abschneiden ---------- */
.hscroll.hscroll .hs_item .image { position: relative; border-radius: 5px; overflow: hidden; }
.hscroll.hscroll .hs_item .image > img {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  -webkit-user-drag: none;
}

/* ---------- Fancy: 3D-Tilt folgt der Maus ---------- */
.hscroll.hscroll .hs_item > li > .list_inner {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}
.hscroll.hscroll .hs_item.is-tilting > li > .list_inner { transition: transform .08s linear; }

/* ---------- Fancy: Lichtreflex, der dem Cursor folgt ---------- */
.hscroll .hs_glare {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  opacity: 0; transition: opacity .35s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.32), transparent 55%);
  mix-blend-mode: overlay;
}
.hscroll .hs_item:hover .hs_glare { opacity: 1; }

/* ---------- Play-Button: dauerhaft sichtbar, YouTube-rot, weicher Glow ----------
   Bewusst ohne backdrop-filter und ohne Pop-in-Animation (das flackerte beim Tilt). */
.hscroll .hs_play {
  position: absolute; left: 50%; top: 50%; z-index: 5; pointer-events: none;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(230, 20, 20, .82);
  box-shadow: 0 0 0 6px rgba(230, 20, 20, .22), 0 6px 24px rgba(230, 20, 20, .55);
  transform: scale(.92);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.hscroll .hs_play svg { width: 24px; height: 24px; margin-left: 3px; fill: #fff; }
.hscroll .hs_item:hover .hs_play,
.hscroll .hs_item:focus-visible .hs_play {
  transform: scale(1.06);
  box-shadow: 0 0 0 9px rgba(230, 20, 20, .28), 0 8px 30px rgba(230, 20, 20, .7);
}

/* ---------- Runde Pfeil-Buttons (wie beim News-Scroller) ---------- */
.hscroll > .hs_btn {
  position: absolute; top: 50%; z-index: 6; transform: translateY(-50%);
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(66,66,66,1); background: rgba(0,0,0,1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .2s, opacity .2s, transform .2s;
}
.hscroll > .hs_btn:hover { background: rgba(255,255,255,.15); transform: translateY(-50%) scale(1.08); }
.hscroll > .hs_btn[disabled] { opacity: 0; cursor: default; pointer-events: none; }
.hscroll > .hs_prev { left: 14px; top: -25px; }
.hscroll > .hs_next { right: 14px; top: -25px; }

@media (prefers-reduced-motion: reduce) {
  .hscroll.hscroll .hs_item > li > .list_inner { transform: none !important; }
  .hscroll .hs_play::after { animation: none; }
}




