/* Draggable image track with parallax (motion kit). Adapted from Harshit Kumar Singh's "Sliding Image Track".
   Drag (mouse or touch), trackpad-swipe or arrow keys move a row of tall photos sideways; each photo pans
   inside its frame as the row moves.
   Usage in Elementor: outer container class m-track (the visible window), inner container class m-track-inner
   (a row of Image widgets, or of small containers holding an image + caption). */

.m-track {
  position: relative;             /* measuring context for the parallax */
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;            /* vertical page scroll stays native on phones */
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.m-track.m-track-dragging { cursor: grabbing; }
.m-track:focus-visible { box-shadow: inset 0 0 0 3px #F3763A; }

.m-track-inner {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--track-gap, 3vmin);
  width: max-content;
  will-change: transform;
}

.m-track-frame {
  display: block;
  position: relative;
  width: var(--track-w, 34vmin);
  height: var(--track-h, 48vmin);
  overflow: hidden;
  border-radius: var(--track-radius, 22px);
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* keep the rounded clip in Safari while the image moves */
}
/* the photo is enlarged evenly (--track-zoom) and slides sideways inside its frame as the card crosses the
   screen, against the row: that's the parallax. Works with any photo shape, portrait included. */
.m-track .m-track-frame img {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(0, -50%);
  width: calc(100% * var(--track-zoom, 1.5));
  height: calc(100% * var(--track-zoom, 1.5));
  max-width: none;
  object-fit: cover;
  display: block;
  pointer-events: none;           /* drag the row, never the image */
  -webkit-user-drag: none;
  will-change: transform;
}

/* Elementor containers: keep the inner one a single unwrapped row as wide as its photos */
.e-con.m-track-inner { flex-direction: row !important; flex-wrap: nowrap !important; width: max-content !important;
  max-width: none !important; gap: var(--track-gap, 3vmin) !important; --padding-top: 0; --padding-right: 0; --padding-bottom: 0; --padding-left: 0; }
.m-track-inner > .elementor-widget { flex: none; width: auto; }

@media (max-width: 767px) {
  .m-track-frame { --track-w: 62vw; --track-h: 84vw; }
}
