/* Background Words Animation Styles */
#home {
  position: relative;
  overflow-x: hidden !important; /* Prevent horizontal scroll */
  overflow-y: visible;
}

/* Ensure heroSlider doesn't hide the words */
#home .heroSlider {
  overflow-x: hidden !important; /* Prevent horizontal scroll */
  overflow-y: visible;
}

/* Ensure container content is above words */
#home .container {
  position: relative;
  z-index: 2 !important; /* Above words */
}

.background-words-container {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow-x: hidden !important; /* Prevent horizontal scroll */
  overflow-y: visible;
  z-index: 10 !important; /* Behind content, above background */
  pointer-events: none;
}

.background-word {
  position: absolute;
  font-size: 120px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.3) !important; /* Increased opacity */
  font-family: "Urbanist", sans-serif;
  white-space: nowrap;
  user-select: none;
  z-index: 0;
  will-change: transform, opacity;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2); /* Enhanced shadow */
  display: block !important;
  visibility: visible !important;
}

/* Animation: Slide from left to right */
@keyframes slideLeftToRight {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  20% {
    opacity: 0.3;
  }
  80% {
    opacity: 0.4;
  }
  100% {
    transform: translateX(calc(100% + 100px));
    opacity: 0;
  }
}

.background-word.animate-slide-left-right {
  animation: slideLeftToRight 15s linear infinite;
}

/* Animation: Slide from right to left */
@keyframes slideRightToLeft {
  0% {
    transform: translateX(calc(100% + 100px));
    opacity: 0;
  }
  20% {
    opacity: 0.3;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.background-word.animate-slide-right-left {
  animation: slideRightToLeft 15s linear infinite;
}

/* Animation: Fade in */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

.background-word.animate-fade-in {
  animation: fadeIn 8s ease-in-out infinite;
}

/* Animation: Fade out */
@keyframes fadeOut {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}

.background-word.animate-fade-out {
  animation: fadeOut 8s ease-in-out infinite;
}

/* Animation: Zoom in */
@keyframes zoomIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.background-word.animate-zoom-in {
  animation: zoomIn 10s ease-in-out infinite;
}

/* Animation: Zoom out */
@keyframes zoomOut {
  0% {
    transform: scale(2);
    opacity: 0;
  }
  50% {
    transform: scale(1);
    opacity: 0.3;
  }
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
}

.background-word.animate-zoom-out {
  animation: zoomOut 10s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .background-word {
    font-size: 80px;
  }
}

@media (max-width: 768px) {
  .background-word {
    font-size: 60px;
  }
}

@media (max-width: 576px) {
  .background-word {
    font-size: 40px;
  }
}
