{% macro card_grid(heading, subtitle, features) %}

	{% if heading %}
	<h3 class="text-center">{{ heading }}</h3>
	{% endif %}
	{% if subtitle %}
	<p class='lead text-center'>{{ subtitle }}</p>
	{% endif %}
	<div class="row {{ 'mt-5' if heading else 'mt-4' }}">
		{% for card in features %}
		<div class='col-sm-4 mb-4'>
			{% if card.url %}
			<a href="{{ card.url }}" class='card h-100'>
			{% else %}
			<div class='card h-100'>
			{% endif %}
				<div class='card-body text-left'>
					<h5 class='card-title'>{{ card.title }}</h5>
					<div>{{ card.content }}</div>
				</div>
			{% if card.url %}
			</a>
			{% else %}
			</div>
			{% endif %}
		</div>
		{% endfor %}
	</div>

{% endmacro %}
