/**
 * Continuous Auto-Sliding Image Carousel Stylesheet
 * Plugin: Our Memories – Virrat Global
 * Features: Seamless infinite loop, exactly 6 images in 1 row on desktop, pause on hover/touch, clean images with rounded corners.
 */

.our-memories-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 40px 0;
  background: #f2f2f2;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.our-memories-wrapper *,
.our-memories-wrapper *::before,
.our-memories-wrapper *::after {
  box-sizing: border-box;
}

/* Hide any legacy headers or taglines */
.our-memories-header,
.our-memories-tagline,
.our-memories-heading {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

/* Carousel Outer Wrapper */
.om-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 10px 0;
  --om-gap: 16px;
  --om-card-width: calc((100vw - 48px) / 4);
  --om-speed: 55s;
}

/* Responsive fallback widths when JS hasn't run */
@media (min-width: 1025px) {
  .om-carousel-wrapper {
    --om-gap: 16px;
    --om-card-width: calc((100vw - 48px) / 4);
  }
}

@media (max-width: 1024px) and (min-width: 768px) {
  .om-carousel-wrapper {
    --om-gap: 16px;
    --om-card-width: calc((100vw - 16px) / 2);
  }
}

@media (max-width: 767px) {
  .om-carousel-wrapper {
    --om-gap: 12px;
    --om-card-width: 100vw;
  }
}

/* Track containing both group clones */
.om-carousel-track {
  display: flex;
  width: max-content;
  overflow: hidden;
  will-change: transform;
}

/* Each animated group of cards */
.om-carousel-group {
  display: flex;
  flex-shrink: 0;
  gap: var(--om-gap, 16px);
  padding-right: var(--om-gap, 16px);
  animation: om-marquee-slide var(--om-speed, 55s) linear infinite;
  will-change: transform;
}

/* Seamless infinite right-to-left linear slide */
@keyframes om-marquee-slide {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

/* Pause on hover (Mouse interaction) */
.om-carousel-wrapper:hover .om-carousel-group {
  animation-play-state: paused !important;
}

/* Pause on touch (Mobile/Tablet interaction) */
.om-carousel-wrapper.is-paused .om-carousel-group {
  animation-play-state: paused !important;
}

/* Individual Image Card */
.om-carousel-card {
  position: relative;
  flex: 0 0 var(--om-card-width, 280px);
  width: var(--om-card-width, 280px);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background-color: #d8d8d8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  cursor: pointer;
}

.om-carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

/* Clean image only, no distortion, object-fit cover */
.om-carousel-card img {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 14px;
}

/* Accessibility: reduce motion support */
@media (prefers-reduced-motion: reduce) {
  .om-carousel-group {
    animation-duration: 90s;
  }
}
