<div class="elementCardItem h-100" data-ec-49123>
  <section class="card elementCard h-100">
    <div class="card-body">
      {# if date is defined %}
        <p class="elementCard__date mb-0">
          {% if date.day is defined %}
            {{ date.day }}
          {% endif %}
          {% if date.month is defined %}
            {{ date.month }}
          {% endif %}
          {% if date.year is defined %}
            {{ date.year }}
          {% endif %}
        </p>
      {% endif #}

      {% if category is defined %}
        {% if (category|length) > 0 %}
          {% set color = category.fieldColor ?? category.color %}
          {% if (category.url|length) > 0 %}
            <p class="text-start ">
              <a href="{{ category.url }}"
                class="elementCard__category">
                {{ category.title ?? null }}
              </a>
            </p>
          {% else %}
            <p class="text-start elementCard__category">
              {{ category.title }}
            </p>
          {% endif %}
        {% endif %}
      {% endif %}
      {% if description is defined %}
        <p class="elementCard__description col-12 col-md-11 text-center mt-0">
          {{ description }}
          {% if url %}
            <a href="{{ url }}" class="elementCard__description--link">
              {{ 'Seguir leyendo'|t }}
            </a>
          {% endif %}
        </p>
      {% endif %}
      {% if title and url %}
        <p class="elementCard__contentTitle col-12 col-md-11 mx-auto mb-0">
          <a href="{{ url }}" class="elementCard__title">{{ title }}</a>
        </p>
      {% endif %}
    </div>
    <div class="card-header">
      {% if img %}
        {% include 'components/_imageTransformsSimple' with {
          img: img,
          setClass: 'img-absolute bg-img',
          alt: title,
          transforms: {
            '(min-width: 2301px)': {
              width: 750
            },
            '(min-width: 1300px)': {
              width: 500,
              height: 300
            }
          },
          default: {
            width: 560
          }
        } only %}
      {% endif %}
      {% if url %}
        <a href="{{ url }}" class="cardElement__link">
          {{ 'Seguir leyendo'|t }}
        </a>
      {% endif %}
    </div>
  </section>
</div>
