{# LIBRARIES #}
{% extends "@molecules/tm-bs/card/card.twig" %}

{# VARIABLES #}
{% set card_class = 'explore-card horizontal-card' %}
{% set link_scope = 'card' %}
{% set show_header = false %}
{% set show_footer = false %}
{% set link_attributes = link_attributes|default(create_attribute()) %}
{% set link_class = [
  link_class,
  'btn',
  'cta-dark' in cta_class ? 'btn-light',
  'cta-light' in cta_class ? 'btn-default',
  'cta-plain' in cta_class ? 'btn-outline-default',
  not cta_class ? 'btn-default',
] %}

{# BLOCKS #}
{% block card_body %}
  <div class="row">
    <div class="col-md-6">
      {# Left column: Text content. Render the body content if provided. #}
      {% if title %}
        <h2>
          {{ title|raw }}
        </h2>
      {% endif %}
      {% if body %}
        <p>
          {{ body|raw }}
        </p>
      {% endif %}
      {% if link_url and link_title %}
        {% include "@atoms/tm-links/standard/standard.twig" with {
          "url": link_url,
          "text": link_title,
          "class": link_class|join(' '),
          "attributes": link_attributes,
        } only %}
      {% endif %}
    </div>
    <div class="col-md-6">
      {# Right column: Image content. Use "image" variable if available or include the image template using img_url and img_alt. #}
      <a href="{{ link_url }}" class="card-image">
        {% if type == 'image' and img_render %}
          {{ img_render }}
        {% endif %}
      </a>
    </div>
  </div>
{% endblock %}
