{% load static %}
<footer class="bg-white text-slate-900">
  <div class="max-w-5xl mx-auto px-4 py-12 grid grid-cols-2 lg:grid-cols-4 gap-8 text-sm">
    <div>
      <h3 class="font-semibold mb-4">Product</h3>
      <ul class="space-y-2">
        {% if settings.GOBII_PROPRIETARY_MODE %}
          <li><a href="{% url 'proprietary:pricing' %}" class="text-slate-700 hover:text-blue-600">Pricing</a></li>
        {% endif %}
        <li><a href="{% url 'agents' %}" class="text-slate-700 hover:text-blue-600">My Agents</a></li>
        <li><a href="https://github.com/gobii-ai/gobii-platform" class="text-slate-700 hover:text-blue-600" title="Self-Host Gobii">Self-Host</a></li>
        {% if settings.GOBII_PROPRIETARY_MODE and settings.REWARDFUL_AFFILIATE_LINK %}
          <li><a href="{{ settings.REWARDFUL_AFFILIATE_LINK }}" class="text-slate-700 hover:text-blue-600" title="Gobii Affiliate Program" target="_blank" rel="noopener">Affiliate Program</a></li>
        {% endif %}
      </ul>
    </div>
    {% if settings.GOBII_PROPRIETARY_MODE %}
    <div>
      <h3 class="font-semibold mb-4">Company</h3>
      <ul class="space-y-2">
        <li><a href="{% url 'proprietary:about' %}" class="text-slate-700 hover:text-blue-600">About</a></li>
        <li><a href="{% url 'proprietary:team' %}" class="text-slate-700 hover:text-blue-600">Team</a></li>
        <li><a href="{% url 'proprietary:careers' %}" class="text-slate-700 hover:text-blue-600">Careers</a></li>
        <li><a href="{% url 'proprietary:blog_index' %}" class="text-slate-700 hover:text-blue-600">Blog</a></li>
        <li><a href="{% url 'proprietary:contact' %}" class="text-slate-700 hover:text-blue-600">Contact</a></li>
      </ul>
    </div>
    {% endif %}
    <div>
      <h3 class="font-semibold mb-4">Resources</h3>
      <ul class="space-y-2">
        <li><a href="https://docs.gobii.ai/getting-started/introduction" class="text-slate-700 hover:text-blue-600">Documentation</a></li>
        <li><a href="https://docs.gobii.ai/api-reference" class="text-slate-700 hover:text-blue-600" target="_blank" rel="noopener">API Reference</a></li>
        {% if settings.PUBLIC_GITHUB_URL %}
          <li><a href="{{ settings.PUBLIC_GITHUB_URL }}" class="text-slate-700 hover:text-blue-600" target="_blank" rel="noopener">GitHub</a></li>
        {% endif %}
      </ul>
    </div>
    <div>
      <h3 class="font-semibold mb-4">Support</h3>
      <ul class="space-y-2">
        {% if settings.GOBII_PROPRIETARY_MODE %}
          <li><a href="{% url 'proprietary:support' %}" class="text-slate-700 hover:text-blue-600">Email</a></li>
        {% elif settings.PUBLIC_SUPPORT_EMAIL %}
          <li><a href="mailto:{{ settings.PUBLIC_SUPPORT_EMAIL }}" class="text-slate-700 hover:text-blue-600">Email</a></li>
        {% endif %}
        {% if settings.PUBLIC_DISCORD_URL %}
          <li><a href="{{ settings.PUBLIC_DISCORD_URL }}" class="text-slate-700 hover:text-blue-600" target="_blank" rel="noopener">Discord</a></li>
        {% endif %}
      </ul>
    </div>
  </div>
  
  <!-- Social Media Links -->
  <div class="max-w-5xl mx-auto py-6 flex justify-center">
    <div class="flex items-center space-x-6">
      {% if settings.PUBLIC_DISCORD_URL %}
        <a href="{{ settings.PUBLIC_DISCORD_URL }}" target="_blank" rel="noopener" aria-label="Join our Discord server" class="text-slate-700 hover:text-[#5865F2] transition-colors">
          <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
            <path d="M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"/>
          </svg>
        </a>
      {% endif %}
      {% if settings.PUBLIC_X_URL %}
        <a href="{{ settings.PUBLIC_X_URL }}" target="_blank" rel="noopener" aria-label="Follow us on X (Twitter)" class="text-slate-700 hover:text-black transition-colors">
          <svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
            <path d="M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"/>
          </svg>
        </a>
      {% endif %}
      <!-- You can add more social icons here in the future -->
    </div>
  </div>
  
  <div class="py-6 text-center text-xs text-slate-500 space-x-2">
    <span>&copy; {% now "Y" %} {{ settings.PUBLIC_BRAND_NAME }}. All rights reserved.</span>
    {% if settings.GOBII_PROPRIETARY_MODE %}
    <span>&bull;</span>
    <a href="{% url 'proprietary:tos' %}" class="hover:text-blue-600 underline">Terms&nbsp;of&nbsp;Service</a>
    <span>&bull;</span>
    <a href="{% url 'proprietary:privacy' %}" class="hover:text-blue-600 underline">Privacy&nbsp;Policy</a>
    <span>&bull;</span>
    <a href="{% url 'proprietary:data_deletion' %}" class="hover:text-blue-600 underline">Data&nbsp;Deletion&nbsp;Policy</a>
    {%  endif %}
  </div>
</footer> 
