.item {
  transition: color 3s ease, font-size 3s ease;
  color: rgb(123, 123, 123); /* Initial text color */
  font-weight: bold;
}

.item:hover {
  color: white; /* Text color on hover */
  font-size: large; /* Larger text on hover */
  font-weight: bold; /* Bold text on hover */
}

.carousel-wrapper {
  width: 520px;
  height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 5px 5px 25px 0px rgba(46, 61, 73, 0.2);
  border-radius: 20px;
  margin: auto;
}

.carousel-container {
  width: 400px;
  height: 250px;
  overflow: hidden;
  margin: 0 auto;
}

.carousel {
  display: flex;
  width: 1200px;
  animation: sliding 16s linear infinite; /* Continuous animation */
}
.carousel:hover {
  animation-play-state: paused;
}

.carousel div {
  width: 400px;
  height: 250px;
  background-size: cover;
  background-position: center;
}

.carousel .image-one {
  background-image: url("https://images.unsplash.com/photo-1480936600919-bffa6b7ecf1e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60");
}

.carousel .image-two {
  background-image: url("https://images.unsplash.com/photo-1475053081036-c8eb31d187b3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60");
}

.carousel .image-three {
  background-image: url("https://images.unsplash.com/photo-1525278070609-779c7adb7b71?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60");
}

@keyframes sliding {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-400px);
  }
  40% {
    transform: translateX(-800px);
  }
  60% {
    transform: translateX(-400px);
  }
  100% {
    transform: translateX(0);
  }
}

/* Responsive for smaller screens */
@media screen and (max-width: 768px) {
  .carousel-wrapper {
    width: 312px;
    height: 210px;
  }

  .carousel-container {
    width: 240px;
    height: 150px;
  }

  .carousel {
    width: 720px;
  }

  .carousel > div {
    width: 240px;
    height: 150px;
  }

  @keyframes sliding {
    0% {
      transform: translateX(0);
    }
    20% {
      transform: translateX(-240px);
    }
    40% {
      transform: translateX(-480px);
    }
    60% {
      transform: translateX(-240px);
    }
    100% {
      transform: translateX(0);
    }
  }
}
