{# Reusable media display macro #}
{% macro display_media(media_items) %}
  {% if media_items %}
  <div class="note-media">
    {% for item in media_items %}
    <figure class="media-item">
      <img src="{{ url_for('public.media_file', path=item.path) }}"
           alt="{{ item.caption or 'Image' }}"
           class="u-photo"
           loading="lazy">
      {# No figcaption - caption is for alt text only #}
    </figure>
    {% endfor %}
  </div>
  {% endif %}
{% endmacro %}
