{% set url = callToAction.url %}
{% if callToAction.document.path %}
{% set url = callToAction.document.publicUrl %}
{% endif %}
{% if callToAction.whiteRabbit %}
{% set url = path('app_download', {callToAction: callToAction.slug}) %}
{% endif %}
<div class="mb-4 {{ size }}">
{% if callToAction.ctaCover.path %}
<a href="{{ url }}" {% if not callToAction.whiteRabbit %}target="_blank"{% endif %} aria-label="{{ callToAction.title }}">
<img class="img-fluid" src="{{ callToAction.ctaCover.publicUrl }}" alt="{{ callToAction.title }}">
</a>
{% else %}
<div class="bg-primary p-3 p-lg-5 h-100">
<div class="row justify-content-between align-items-center">
<div class="col-lg-4">
<h3 class="fw-bold text-white">{{ callToAction.title }}</h3>
<p class="fs-lg mb-0 text-white">{{ callToAction.description }}</p>
</div>
<div class="col-lg-2 mt-3 mt-lg-0">
<a href="{{ url }}" {% if not callToAction.whiteRabbit %}target="_blank"{% endif %} class="btn btn-white fw-bold w-100">Scopri</a>
</div>
</div>
</div>
{% endif %}
</div>