<section id="hero" class="relative h-screen min-h-700px flex items-center justify-center overflow-hidden bg-gray-900 text-white font-sans">
  
  <div id="hero-bg" class="absolute inset-0 z-0">
    <img 
      src="<?= base_url('assets/images/mount-kenya-hero.jpg') ?>" 
      alt="Mount Kenya" 
      class="w-full h-full object-cover scale-110 transition-transform duration-700 ease-out"
    >
    <div class="absolute inset-0 bg-black/20"></div>
    
    <div class="absolute inset-0 bg-gradient-to-b from-black/60 via-transparent to-black/80"></div>
    
    <div class="absolute inset-0 bg-[radial-gradient(circle,_var(--tw-gradient-stops))] from-black/40 via-transparent to-transparent"></div>
  </div>

  <div class="container relative z-10 px-6 text-center">
    <div class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-black/50 backdrop-blur-md border border-white/20 mb-8 animate-fade-in">
      <span class="w-2 h-2 rounded-full bg-yellow-400"></span>
      <span class="text-xs font-bold tracking-widest uppercase text-white">Expert-Led 2025 Expeditions</span>
    </div>

    <h1 class="text-5xl md:text-8xl font-black tracking-tighter leading-none mb-6 drop-shadow-[0_4px_12px_rgba(0,0,0,0.8)]">
      Climb <span class="text-transparent bg-clip-text bg-gradient-to-r from-yellow-400 to-orange-500">Mount Kenya</span>
    </h1>

    <p id="hero-subtext" class="text-lg md:text-2xl text-white max-w-2xl mx-auto mb-10 font-medium opacity-0 transition-opacity duration-1000 drop-shadow-[0_2px_8px_rgba(0,0,0,0.8)]">
      Guided expeditions to <span id="route-text" class="text-yellow-400 font-bold border-b-2 border-yellow-400/50 transition-opacity duration-200">Mount Kenya and beyond.</span> Safe, certified, and unforgettable.
    </p>

    <div class="flex flex-col sm:flex-row gap-4 justify-center items-center">
      <a href="<?= base_url('tours') ?>" 
         class="px-10 py-4 bg-yellow-500 hover:bg-yellow-400 text-black font-black rounded-xl transition-all duration-300 transform hover:-translate-y-1 shadow-xl">
        Book Your Trek
      </a>
      
      <button onclick="document.getElementById('seasons').scrollIntoView({behavior: 'smooth'})" 
              class="px-10 py-4 bg-white hover:bg-gray-100 text-black font-bold rounded-xl transition-all shadow-xl">
        Plan Trip
      </button>
    </div>
  </div>
</section>

<script>
  document.addEventListener('DOMContentLoaded', () => {
    const heroImg = document.querySelector('#hero-bg img');
    const heroSubtext = document.querySelector('#hero-subtext');
    const routeText = document.querySelector('#route-text');
    const routeSelector = document.querySelector('#route-selector'); 

    // 1. Reveal Subtext
    setTimeout(() => {
      if(heroSubtext) heroSubtext.classList.replace('opacity-0', 'opacity-100');
    }, 300);

    // 2. Parallax and Content Fade on Scroll
    window.addEventListener('scroll', () => {
      const scrollValue = window.scrollY;
      if (scrollValue < window.innerHeight) {
        heroImg.style.transform = `scale(${1.1 + scrollValue * 0.0003}) translateY(${scrollValue * 0.1}px)`;
        document.querySelector('#hero .container').style.opacity = 1 - (scrollValue / 700);
      }
    });

    // 3. Reactive Text
    if (routeSelector && routeText) {
      routeSelector.addEventListener('change', (e) => {
        routeText.style.opacity = '0';
        setTimeout(() => {
          routeText.innerText = e.target.value;
          routeText.style.opacity = '1';
        }, 200);
      });
    }
  });
</script>