.carousel-section {
  font-family: Arial, sans-serif;
  text-align: center;
  max-width: 100%;
  background-color: #dee8fd;
  padding: 20px;
  border-radius: 10px;
  box-sizing: border-box;
}

.carousel-section h2 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #333;
}

.carousel-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.carousel {
  text-align: center;
  width: 100%;
  max-width: 350px; 
  text-decoration: none; 
  color: inherit;
  transition: transform 0.2s ease-in-out; 
}

.carousel .image-container {
  position: relative;
  width: 100%;
  max-width: 350px; 
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.carousel .image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease-in-out;
}

.carousel .image-container img.second {
  opacity: 0;
}

.carousel .image-container:hover img.first {
  opacity: 0;
}

.carousel .image-container:hover img.second {
  opacity: 1;
}

.carousel h3 {
  margin-top: 15px;
  font-size: 20px;
  color: #333;
}

.carousel a {
  text-decoration: none; 
}


@media (max-width: 768px) {
  .carousel-section {
    padding: 10px;
  }

  .carousel-section h2 {
    font-size: 24px;
  }

  .carousel-container {
    gap: 10px;
  }

  .carousel {
    width: 100%;
    max-width: 300px;
  }

  .carousel .image-container {
    max-width: 300px;
    aspect-ratio: 1 / 1;
  }

  .carousel h3 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .carousel-section h2 {
    font-size: 20px;
  }

  .carousel {
    max-width: 250px;
  }

  .carousel .image-container {
    max-width: 250px;
  }

  .carousel h3 {
    font-size: 16px;
  }
}
