<section id="cta" class="py-20 bg-gradient-to-r from-primary/20 to-secondary/20">
  <div class="container mx-auto px-4">
    <div class="max-w-4xl mx-auto text-center">
      <h2 class="text-4xl md:text-5xl font-bold mb-6">{{ sections.cta.title }}</h2>
      <p class="text-lg text-gray-600 mb-8">{{ sections.cta.description }}</p>
      <div class="flex flex-col sm:flex-row justify-center gap-4">
        <a href="#" class="group relative inline-flex items-center justify-center px-8 py-4 rounded-xl font-semibold text-center whitespace-nowrap transition-all duration-300 transform hover:scale-105 hover:shadow-lg focus:outline-none focus:ring-4 focus:ring-primary/20 bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-md hover:from-blue-700 hover:to-purple-700">
          {{ sections.cta.buttons[0].label }}
          <svg class="w-5 h-5 ml-2 group-hover:translate-x-1 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"></path>
          </svg>
        </a>
      </div>
      <p class="mt-6 text-sm text-gray-500">{{ sections.cta.finalMessage.description }}</p>
    </div>
  </div>
  <div id="signupModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
    <div class="bg-white rounded-lg w-full max-w-md mx-4 overflow-hidden">
      <div class="p-6">
        <div class="flex justify-between items-center mb-6">
          <h3 class="text-2xl font-bold text-gray-900">{{ sections.cta.buttons[0].label }}</h3>
          <button id="closeModal" class="text-gray-500 hover:text-gray-700">
            <span class="w-6 h-6 flex items-center justify-center"><i class="ri-close-line ri-lg"></i></span>
          </button>
        </div>
        <form id="signupForm" class="space-y-4">
          {% for button in sections.cta.buttons %}
          <div>
            <label for="name" class="block text-sm font-medium text-gray-700 mb-1">{{ sections.cta.buttons[0].label }}</label>
            <input type="text" id="name" name="name" class="w-full px-4 py-2 border border-gray-300 rounded focus:ring-primary focus:border-primary" required>
          </div>
          {% endfor %}

          <div class="pt-2">
            <button type="submit" class="group relative w-full inline-flex items-center justify-center px-8 py-4 rounded-xl font-semibold text-center whitespace-nowrap transition-all duration-300 transform hover:scale-105 hover:shadow-lg focus:outline-none focus:ring-4 focus:ring-primary/20 bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-md hover:from-blue-700 hover:to-purple-700">
              Submit
              <svg class="w-5 h-5 ml-2 group-hover:translate-x-1 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"></path>
              </svg>
            </button>
          </div>
        </form>
      </div>
    </div>
  </div>

  <!-- Success Modal -->
  <div id="successModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
    <div class="bg-white rounded-lg w-full max-w-md mx-4 overflow-hidden">
      <div class="p-6 text-center">
        <div class="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
          <span class="w-8 h-8 flex items-center justify-center text-green-500"><i class="ri-check-line ri-2x"></i></span>
        </div>
        <h3 class="text-2xl font-bold text-gray-900 mb-2">Thank You!</h3>
        <p class="text-gray-600 mb-6">Your information has been submitted successfully. Our team will contact you shortly.</p>
        <button id="closeSuccessModal" class="group relative inline-flex items-center justify-center px-6 py-3 rounded-xl font-semibold text-center whitespace-nowrap transition-all duration-300 transform hover:scale-105 hover:shadow-lg focus:outline-none focus:ring-4 focus:ring-primary/20 bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-md hover:from-blue-700 hover:to-purple-700">
          Close
          <svg class="w-4 h-4 ml-2 group-hover:translate-x-1 transition-transform duration-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"></path>
          </svg>
        </button>
      </div>
    </div>
  </div>

</section>
