.carousel {
  position: relative;
  width: 100%;
  margin: 100px 0;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  height: auto; /* Dynamic height based on content */
}

.carousel-inner {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  height: auto; /* Flexible height */
}

.carousel-item {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  align-items: flex-start; /* Align content at the top */
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  position: relative;
  overflow: hidden;
  flex-direction: column;
  height: fit-content; /* Adjust height based on content */
}

.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-content {
  z-index: 1;
  padding: 30px;
  width: 80%;
  height: auto;
  text-align: center;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.carousel-item-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.carousel-item-content .first-line {
  position: relative;
  padding-left: 3rem;
}

.carousel-item-content .first-line::before {
  content: "“";
  font-size: 6rem;
  color: var(--primary-color);
  position: absolute;
  left: 0;
  top: -2rem;
  line-height: 1;
}

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

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

.carousel-control {
  background: rgba(255, 140, 0, 0.7);
  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;
}

.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);
}

@media (max-width: 768px) {
  .carousel-item {
    flex-direction: column;
    text-align: center;
  }

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

@media (max-width: 480px) {
  .carousel-item-content {
    padding: 0px;
  }

  .first-line::before {
    content: "" !important;
  }

  .first-line {
    padding-left: 0 !important;
  }
}

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

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