{% block element_hero %}
{% block element_hero_button_var %}
{% set button = element.config.button.value %}
{% endblock %}
{% set image_desktop = element.data.get('images').image_1_desktop %}
{% set image_mobile = element.data.get('images').image_2_mobile %}
{% set heroUrlActive = element.config.hero_url.value %}
{% set heroUrl = element.config.hero_url_text.value %}
{% if element.config.hero_url.value %}
<a class="block h-full w-full" href="{{ element.config.hero_url_text.value }}">
{% endif %}
<div class="hero-container relative">
<div class="hero-images ratio ratio_5x4 md:ratio_3x1 bg-grey-300">
{% sw_thumbnails 'cms-image-thumbnails' with {
media: image_desktop,
attributes: {
'class': 'hero-image-desktop hidden md:block',
'alt': (image_desktop.translated.alt ?: ''),
'title': (image_desktop.translated.title ?: '')
}
} %}
{% sw_thumbnails 'cms-image-thumbnails' with {
media: image_mobile,
attributes: {
'class': 'hero-image-mobile md:hidden',
'alt': (image_desktop.translated.alt ?: ''),
'title': (image_desktop.translated.title ?: '')
}
} %}
</div>
{% block hero_background_placeholder %}
<div class="hidden background-placeholder absolute inset-0 bg-[#000000]/[.3]"></div>
{% endblock %}
{% block element_hero_content %}
<div class="absolute top-0 left-0 w-full h-full p-4 flex flex-col justify-end {% if element.config.text_color.value %} text-grey-600 {% else %} text-white #{!important} {% endif %} md:justify-center md:px-8">
<div class="w-full h-full boxed-layout flex flex-col justify-end md:justify-center">
{% if element.config.subtitle.value %}
<div class="hero-label font-bold text-sm font-accent tracking-wider md:text-base">
{{ element.config.subtitle.value }}
</div>
{% endif %}
{% if element.config.title.value %}
<h1 class="hero-title font-display font-bold text-4xl tracking-tight md:text-6xl mt-2 -ml-0 md:-ml-1">
{{ element.config.title.value }}
</h1>
{% endif %}
{% if element.config.text.value %}
<div class="hero-description font-body text-sm max-w-[600px] md:text-base mt-2">
{{ element.config.text.value }}
</div>
{% endif %}
{% if element.config.button.value.active and not heroUrlActive %}
<span>
<a class="{% if elongated %} btn-link {% else %}btn rounded-sm {{ element.config.button.value.type }}{% endif %} tracking-wider mt-2 md:max-w-fit z-50"
href="{{ element.config.button.value.url }}"
{% if element.config.button.value.newtab %}target="_blank"{% endif %}>
{{ element.config.button.value.text }}
{% if not elongated %}
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor" class="w-4 h-4">
<path stroke-linecap="round" stroke-linejoin="round"
d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
</svg>
{% endif %}
</a>
</span>
{% endif %}
</div>
</div>
{% endblock %}
</div>
{% if element.config.hero_url.value %}
</a>
{% endif %}
{% endblock %}