.carousel {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 0 auto;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-item {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  position: relative;
  overflow: hidden;
}

.carousel-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 140, 0, 0.1),
    rgba(255, 129, 0, 0.1)
  );
  opacity: 0.5;
}

.carousel-item img {
  width: 350px;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 30px;
  margin-left: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.carousel-item:hover img {
  transform: scale(1.05);
}

.carousel-item-content {
  z-index: 1;
  padding: 30px;
  max-width: 60%;
}

.carousel-item-content h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.8rem;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.carousel-item-content a {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  margin: 20px 0 20px 0;
  animation: pulse 3s ease infinite;
}

.carousel-item-content a:hover {
  background-color: #ffa600;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 10;
}

.carousel-control {
  background: rgba(255, 140, 0, 0.4);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  cursor: pointer;
  margin: 0 5px;
}

.carousel-control:hover {
  background: var(--primary-color);
}

.carousel-controls button:hover ~ .carousel-inner .carousel-item img {
  transform: scale(1);
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-indicator.active {
  background-color: var(--primary-color);
}

.btn-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-container a {
  margin: 20px 0 20px 0;
  background-color: var(--primary-color) !important;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  animation: pulse 3s ease infinite;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 1.2rem;
}

.btn-container a:hover {
  background-color: var(--secondary-color) !important;
}

@media (max-width: 768px) {
  .carousel-controls {
    top: 40%;
  }

  .carousel-item {
    flex-direction: column;
    text-align: center;
  }

  .carousel-item img {
    margin-right: 0;
    margin-left: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
  }

  .carousel-item-content {
    max-width: 100%;
    padding: 20px;
  }
}

@media screen and (max-width: 600px) {
  .carousel-controls {
    display: none;
  }

  .carousel-indicators {
    bottom: 20px;
  }

  .carousel-item {
    padding-bottom: 20px;
  }

  /* Put a max number line of 5 in mobile */
  .carousel-item-content p {
    line-clamp: 5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
  }
}
