/* Icons Carousel Section */

.icons-carousel-section {
  padding: 3rem 0;
  background: var(--white);
  overflow: hidden;
}

.icons-carousel {
  position: relative;
  overflow: hidden;
  padding: 1rem 0;
  max-width: 1400px;
  margin: 0 auto;
}

.icons-carousel-track {
  display: flex;
  gap: 2rem;
  /* Track must be as wide as its content, otherwise it would take the width
     of its container and the scroll distance below would be meaningless. */
  width: max-content;
  will-change: transform;
  /* Duration is a fallback: icons-carousel.js recomputes it from the track
     width to hold a constant scroll speed in px/s. */
  animation: continuousScroll 15s linear infinite;
}

@keyframes continuousScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    /* --carousel-distance is set by icons-carousel.js to the exact width of
       one copy of the list (gap included); 50% is the no-JS fallback. */
    transform: translateX(calc(-1 * var(--carousel-distance, 50%)));
  }
}

.carousel-icon-item {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.carousel-icon-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.carousel-icon-item:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 24px rgba(41, 128, 185, 0.2);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary-blue) 20%, transparent);
}

.carousel-icon-item:hover::before {
  opacity: 0.1;
}

.carousel-icon-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: filter 0.3s ease;
}

.carousel-icon-item:hover img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Gradient Fade Edges removed */

/* Continuous scroll animation is defined above with the track */

/* Accessibility: no auto-scrolling for users who ask for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .icons-carousel-track {
    animation: none;
  }

  .icons-carousel {
    overflow-x: auto;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .icons-carousel-section {
    padding: 2rem 0;
  }

  .carousel-icon-item {
    width: 60px;
    height: 60px;
    padding: 0.75rem;
  }

  .icons-carousel-track {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .carousel-icon-item {
    width: 50px;
    height: 50px;
    padding: 0.5rem;
  }

  .icons-carousel-track {
    gap: 0.75rem;
  }
}
