.gallery-marque img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.gallery-marque a { display: block; overflow: hidden; }
.gallery-marque img { transition: transform .35s ease; }
.gallery-marque a:hover img { transform: scale(1.035); }

/* ===== TICKER-ГАЛЕРЕЯ ===== */
.gallery-marque-ticker-wrap {
  position: relative;
  overflow: hidden;
  /* маски-тени по краям */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  cursor: grab;
  user-select: none;
}
.gallery-marque-ticker-wrap:active { cursor: grabbing; }

.gallery-marque-ticker {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: ticker-scroll 40s linear infinite;
  will-change: transform;
}
.gallery-marque-ticker.paused { animation-play-state: paused; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  flex: 0 0 280px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.ticker-item:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 24px 56px rgba(0,0,0,.38);
}
.ticker-item a { display: block; }
.ticker-item img {
  width: 280px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  transition: transform .35s ease;
}
.ticker-item:hover img { transform: scale(1.06); }

/* подпись при наведении */
.ticker-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(31,31,31,.88));
  color: var(--paper);
  font-size: var(--fs-xs);
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 24px 12px 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.ticker-item:hover .ticker-caption { opacity: 1; transform: translateY(0); }

/* ===== УПРАВЛЕНИЕ ===== */
.gallery-marque-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.ctrl-btn:hover { background: var(--accent); color: var(--ink); transform: scale(1.1); }
.ctrl-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ползунок скорости */
.speed-label {
  font-family: "Barlow Condensed", sans-serif;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink);
}
.speed-range {
  -webkit-appearance: none;
  appearance: none;
  width: 120px; height: 4px;
  border-radius: 2px;
  background: var(--muted);
  outline: none;
  cursor: pointer;
}
.speed-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform .2s;
}
.speed-range::-webkit-slider-thumb:hover { transform: scale(1.25); }
.speed-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--ink);
  cursor: pointer;
}

/* индикатор прогресса */
.ticker-progress {
  width: 100%;
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
  position: relative;
}
.ticker-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .1s linear;
}

@media (max-width: 767px) {
  .ticker-item { flex: 0 0 220px; }
  .ticker-item img { width: 220px; height: 160px; }
  .section-pad { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-marque-ticker { animation: none !important; }
}
