.mse-brand-slider {
  overflow: hidden;
  width: 100%;
  /* Added modern styling with subtle shadow and rounded corners */
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 20px 0;
  position: relative;
  /* Enhanced cursor styles for better drag feedback */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Added active state for dragging */
.mse-brand-slider.active {
  cursor: grabbing;
}

.mse-brand-slider:active {
  cursor: grabbing;
}

/* Added subtle gradient overlays on sides for modern effect */
.mse-brand-slider::before,
.mse-brand-slider::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.mse-brand-slider::before {
  left: 0;
  background: linear-gradient(to right, rgba(248, 249, 250, 0.9), transparent);
}

.mse-brand-slider::after {
  right: 0;
  background: linear-gradient(to left, rgba(248, 249, 250, 0.9), transparent);
}

.mse-brand-slider .mse-brand-track {
  display: flex;
  flex-wrap: nowrap;
  animation: mse-brand-scroll 25s linear infinite;
  /* Enhanced transition for smoother drag interactions */
  transition: transform 0.1s ease-out, animation-play-state 0.3s ease;
  will-change: transform;
}

/* Updated hover behavior to work with drag functionality */
.mse-brand-slider:hover:not(.active) .mse-brand-track {
  animation-play-state: paused;
}

.mse-brand-slider .mse-brand-logo {
  flex: 0 0 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 35px;
  /* Added smooth transitions and hover effects */
  transition: all 0.3s ease;
  border-radius: 8px;
  position: relative;
  /* Prevent pointer events during drag for smoother interaction */
  pointer-events: none;
}

/* Re-enable pointer events when not dragging */
.mse-brand-slider:not(.active) .mse-brand-logo {
  pointer-events: auto;
}

/* Enhanced hover effect with subtle background */
.mse-brand-slider .mse-brand-logo:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .mse-brand-slider .mse-brand-logo {
    flex: 0 0 33.33%;
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .mse-brand-slider .mse-brand-logo {
    flex: 0 0 50%;
    padding: 10px 15px;
  }

  /* Reduced gradient overlay on mobile */
  .mse-brand-slider::before,
  .mse-brand-slider::after {
    width: 30px;
  }
}

.mse-brand-slider .mse-brand-logo img {
  width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  /* Enhanced filter effects and smoother transitions */
  filter: grayscale(100%) brightness(0.8) contrast(1.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  /* Prevent image dragging for better UX */
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* Added touch-action for better mobile drag support */
.mse-brand-slider {
  touch-action: pan-x;
}

/* Improved loading state with drag consideration */
.mse-brand-slider.loading {
  cursor: wait;
}

.mse-brand-slider.loading .mse-brand-track {
  animation-play-state: paused;
  opacity: 0.7;
  pointer-events: none;
}

/* Smoother animation with slight speed variation */
@keyframes mse-brand-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@media (max-width: 768px) {
  .mse-brand-slider .mse-brand-track {
    animation-duration: 20s;
  }
}

@media (max-width: 480px) {
  .mse-brand-slider .mse-brand-track {
    animation-duration: 15s;
  }
}
