<div class="social-links{% if class %} {{ class }}{% endif %}">
  {% if heading %}<p class="pd-hand mb-3 text-xl text-accent">{{ heading }}</p>{% endif %}
  <ul class="flex {% if style == "stack" %}flex-col gap-2{% else %}flex-wrap items-center gap-3{% endif %}">
    {% for link in links %}{% if link.url %}
    <li>
      <a href="{{ link.url }}" target="_blank" rel="noopener" aria-label="{{ link.label|default:link.network }}" class="inline-flex items-center gap-2 rounded-full border border-dashed border-border text-foreground transition-colors hover:border-accent hover:text-accent {% if style == "stack" %}w-full px-4 py-2{% else %}p-2.5{% endif %}">
        {% if link.network %}<svg class="h-5 w-5" aria-hidden="true"><use href="/icons/{{ link.network|split:":"|first }}.svg#{{ link.network|split:":"|last }}"></use></svg>{% endif %}
        {% if style == "stack" and link.label %}<span class="pd-body text-sm font-medium">{{ link.label }}</span>{% endif %}
      </a>
    </li>
    {% endif %}{% endfor %}
  </ul>
</div>
