.text-carousel-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 0;
}

.text-carousel-content {
  margin: 0;
  line-height: 1.2;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3em;
}

.static-text {
  color: inherit;
}

.carousel-wrapper {
  position: relative;
  display: inline-block;
  min-width: 200px;
  height: 1.2em;
  overflow: hidden;
}

.carousel-word {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(100%);
  color: inherit;
}

.carousel-word.active {
  opacity: 1;
  transform: translateY(0);
}

.carousel-word.fading {
  opacity: 0.5;
  color: #999;
}

.carousel-word.hidden {
  opacity: 0;
  transform: translateY(-100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .text-carousel-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1em;
  }
  
  .carousel-wrapper {
    min-width: auto;
  }
}

/* Animation keyframes for smoother transitions */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}

.carousel-word.entering {
  animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.carousel-word.exiting {
  animation: slideOutUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}