<section id="community" class="py-16 bg-gray-50">
  <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
    <div class="text-center mb-12" data-aos="fade-up">
      <h2 class="text-3xl md:text-4xl font-bold text-gray-900 mb-4">
        🌟 {{ sections.community.title }}
      </h2>
      <p class="text-base text-gray-600 max-w-2xl mx-auto">
        {{ sections.community.subtitle }}
      </p>
    </div>
    
    {% if sections.community.liveActivity %}
    <div class="bg-blue-100 p-6 rounded-xl mb-12 text-center max-w-2xl mx-auto shadow-sm" data-aos="fade-up">
      <div class="flex items-center justify-center gap-3 mb-3">
        <span class="w-3 h-3 bg-green-500 rounded-full animate-pulse"></span>
        <span class="font-semibold text-gray-900">{{ sections.community.liveActivity.onlineMembers }} members online</span>
      </div>
      <p class="text-gray-700">🎉 {{ sections.community.liveActivity.recentJoiner }} from {{ sections.community.liveActivity.location }} just joined!</p>
    </div>
    {% endif %}
    
    {% if sections.community.stats %}
    <div class="grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12">
      {% for stat in sections.community.stats %}
      <div class="text-center p-6 bg-white rounded-xl shadow-sm" data-aos="fade-up" data-aos-delay="{{ loop.index0 * 100 }}">
        <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4">
          <i class="{{ stat.icon | default('ri-user-line') }} text-blue-600 text-lg"></i>
        </div>
        
        <div class="text-2xl font-semibold text-gray-900 mb-2">{{ stat.value }}</div>
        <div class="text-sm font-semibold text-gray-700 mb-1">{{ stat.label }}</div>
        <p class="text-xs text-gray-600">{{ stat.description }}</p>
      </div>
      {% endfor %}
    </div>
    {% endif %}
    
    {% if sections.community.highlights %}
    <div class="grid md:grid-cols-3 gap-8 mb-12">
      {% for highlight in sections.community.highlights %}
      <div class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition-shadow duration-300" data-aos="fade-up" data-aos-delay="{{ loop.index0 * 100 }}">
        <div class="w-10 h-10 bg-blue-600 rounded-full flex items-center justify-center mb-4">
          <i class="{{ highlight.icon | default('ri-chat-3-line') }} text-white"></i>
        </div>
        
        <h3 class="text-lg font-semibold text-gray-900 mb-3">{{ highlight.title }}</h3>
        <p class="text-gray-600 text-sm mb-4">{{ highlight.description }}</p>
        <div class="text-sm text-blue-600 font-semibold">👥 {{ highlight.members }} members</div>
      </div>
      {% endfor %}
    </div>
    {% endif %}
    
    {% if sections.community.cta %}
    <div class="text-center" data-aos="fade-up">
      <a href="{{ sections.community.cta.url }}" 
         class="bg-blue-600 text-white px-6 py-3 rounded-full font-semibold shadow-md hover:shadow-lg transform hover:scale-105 transition-all duration-300 inline-block">
        {{ sections.community.cta.label }} 🚀
      </a>
    </div>
    {% endif %}
  </div>
</section>
