/* Define the scrolling animation */
@keyframes scrollCarousel {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* Move to the left by half the width */
  }
}

#carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
  margin: 0 auto;
  background-color: var(--section-bg-color);
}

#carousel > div {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  width: max-content; /* Allow the container to be as wide as needed */
  animation: scrollCarousel 25s linear infinite; /* Add scrolling animation */
  padding: 5px 0;
}

/* Override the gradient effects from stylea.css */
#kali-tools > div::before,
#kali-tools > div::after {
  display: none !important;
  background-image: none !important;
  background: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Additional overrides for dark mode compatibility */
#kali-tools > div {
  background-color: var(--section-bg-color) !important;
}

#carousel a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 15px;
  text-decoration: none;
  color: var(--text-color);
  width: 100px;
  transition: transform 0.3s ease;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 10px;
  background-color: transparent;
}

#carousel a:hover {
  transform: scale(1.1);
}

#carousel img {
  width: 60px;
  height: 60px;
  margin-bottom: 8px;
  filter: grayscale(30%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

#carousel a:hover img {
  filter: grayscale(0%);
  transform: scale(1.1);
}

#carousel div div {
  font-size: 12px;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #carousel a {
    margin: 0 10px;
    width: 100px;
  }

  #carousel img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  #carousel a {
    margin: 0 5px;
    width: 80px;
  }

  #carousel img {
    width: 50px;
    height: 50px;
  }

  #carousel div div {
    font-size: 12px;
  }
}
