/* Pure JS Card Marquee - No CSS Animation Conflicts */
.card-marquee {
  position: relative;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.card-marquee:active,
.card-marquee.dragging {
  cursor: grabbing;
}

.card-marquee .main-marq {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.card-marquee .main-marq .slide-har {
  display: flex;
  width: fit-content;
  will-change: transform;
}

.card-marquee .main-marq .box {
  display: flex;
  flex-shrink: 0;
}

.card-marquee .main-marq .box .item {
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-drag: none;
  flex-shrink: 0;
  touch-action: none;
  position: relative;
  overflow: hidden;
  min-width: 250px;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: transform 0.3s ease;
}

.card-marquee .main-marq .box .item span {
  display: inline-block;
  pointer-events: none;
}

/* Remove CSS animations - handled by JavaScript now */
.card-marquee .slide-har.st1 .box,
.card-marquee .slide-har.st2 .box {
  animation: none !important;
}

/* Hover animation */
.card-marquee.hover-animation .item:hover {
  transform: translateY(-10px);
}

/* Smooth dragging experience */
.card-marquee.dragging .slide-har {
  transition: none; /* Remove transitions during drag for immediate response */
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .card-marquee .item {
    min-width: 200px;
  }
  
  /* Disable hover effects on touch devices */
  .card-marquee.hover-animation .item:hover {
    transform: none;
  }
}

/* Prevent text selection during drag */
.card-marquee * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.card-marquee .item {
  justify-content: space-around;
}

/* Focus styles for accessibility */
.card-marquee .item:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* Performance optimizations */
.card-marquee,
.card-marquee .slide-har,
.card-marquee .box {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Ensure smooth transforms */
.card-marquee .slide-har {
  transform-style: preserve-3d;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .card-marquee {
    /* Animation speed will be controlled by JavaScript */
  }
}


// Slider

.card-slider a {
  display: block;
}
.card-slider .item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.card-slider .item {
  position: relative;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  display: block;
  transition: all 0.3s ease;
}
.card-slider .item .title {
  margin: 0;
  z-index: 2;
  position: relative;
}
.card-slider .item .description {
  margin: 0;
  z-index: 2;
  position: relative;
}
.icon {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 2;
}
.card-slider .item:hover {
  transform: translateY(-10px);
}
