/* ===================================================================
   LIGHTWEIGHT HERO SLIDER - REPLACES REVOLUTION SLIDER
   Simple CSS-based rotating words animation
   =================================================================== */

.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(41, 46, 49, 0.25);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.rotating-words {
  display: inline-block;
  position: relative;
  min-width: 250px; /* Fixed width to prevent shifting */
  vertical-align: top;
  text-align: left;
}

.rotating-words .word {
  position: absolute;
  top: 0;
  left: 0;
  color: #e5cb35eb;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 1.2s ease-in-out; /* Slower, smoother crossfade */
}

/* Show first word by default */
.rotating-words .word:first-child {
  opacity: 1;
}

/* Active word (controlled by JavaScript) */
.rotating-words .word.active {
  opacity: 1;
}

/* Crossfade effect - word fading out */
.rotating-words .word.fade-out {
  opacity: 0;
  transition: opacity 0.8s ease-out; /* Slightly faster fade out */
}

/* Crossfade effect - word fading in */
.rotating-words .word.fade-in {
  opacity: 1;
  transition: opacity 1.0s ease-in; /* Smooth fade in */
}

@keyframes wordFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wordFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
}

/* Character animation effect (optional enhancement) */
.rotating-words .word.char-animation {
  animation: none;
}

.rotating-words .word.char-animation.active {
  opacity: 1;
}

.rotating-words .word.char-animation .char {
  display: inline-block;
  opacity: 0;
  animation: charFadeIn 0.5s ease-out forwards;
}

@keyframes charFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-content {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
}

/* Smooth fade-in for the entire hero section */
.hero-section {
  animation: heroFadeIn 1.5s ease-out;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
