{% extends '@nucleus/partials/particle.html.twig' %}

{% block stylesheets %}
{% if particle.particle_title_color or particle.particle_title_fontsize or particle.customize_title_color or particle.customize_title_fontsize or particle.customize_content_color or particle.customize_content_fontsize or particle.customize_meta_color or particle.customize_meta_fontsize %}
<style>
{% if particle.particle_title_color or particle.particle_title_fontsize %}
#{{ id }}.g5-particle-title { {% if particle.particle_title_color %}color: {{ particle.particle_title_color }};{% endif %}{% if particle.particle_title_fontsize %} font-size: {{particle.particle_title_fontsize}}px;{% endif %} }
{% endif %}
{% if particle.customize_title_color or particle.customize_title_fontsize %}
#{{ id }} .tm-title { {% if particle.customize_title_color %}color: {{particle.customize_title_color}};{% endif %}{% if particle.customize_title_fontsize %} font-size: {{particle.customize_title_fontsize}}px;{% endif %} }
{% endif %}
{% if particle.customize_content_color or particle.customize_content_fontsize %}
#{{ id }} .tm-content { {% if particle.customize_content_color %}color: {{particle.customize_content_color}};{% endif %}{% if particle.customize_content_fontsize %} font-size: {{particle.customize_content_fontsize}}px;{% endif %} }
{% endif %}
{% if particle.customize_meta_color or particle.customize_meta_fontsize %}
#{{ id }} .tm-meta { {% if particle.customize_meta_color %}color: {{particle.customize_meta_color}};{% endif %}{% if particle.customize_meta_fontsize %} font-size: {{particle.customize_meta_fontsize}}px;{% endif %} }
{% endif %}
</style>
{% endif %}
{% endblock %}

{# Set Viewport Height #}
{% if particle.viewport_height == 'full' %}
    {% set viewport_height = 'jl-height-viewport="offset-top: true;"' %}
{% elseif particle.viewport_height == 'percent' %}
    {% set viewport_height = 'jl-height-viewport="offset-top: true; offset-bottom: 20;"' %}
{% elseif particle.viewport_height == 'section' %}
    {% set viewport_height = 'jl-height-viewport="offset-top: true; offset-bottom: 50;"' %}
{% elseif particle.viewport_height == 'expand' %}
    {% set viewport_height = 'jl-height-viewport="expand: true;"' %}
{% endif %}

{# Set Title/Meta/Content Text Transform #}
{% set title_text_transform = particle.title_text_transform ? ' jl-text-' ~ particle.title_text_transform|e ~ '' %}
{% set meta_text_transform = particle.meta_text_transform ? ' jl-text-' ~ particle.meta_text_transform|e ~ '' %}
{% set content_text_transform = particle.content_text_transform ? ' jl-text-' ~ particle.content_text_transform|e ~ '' %}

{# Set Max-Width Content Section #}
{% set container_maxwidth = particle.container_maxwidth != 'default' ? 'jl-container jl-container-' ~ particle.container_maxwidth|e ~ '' : 'jl-container' %}

{# Set Padding #}
{% if particle.padding == 'default' %}
    {% set padding = ' jl-section' %}
{% elseif particle.padding == 'none' %}
    {% set padding = ' jl-section jl-padding-remove-vertical' %}
{% else %}
    {% set padding = ' jl-section jl-section-' ~ particle.padding|e ~ '' %}
{% endif %}

{# Set Background color #}
{% set parallax_bg_color = particle.parallax_bg_color ? 'style="background-color: ' ~ particle.parallax_bg_color ~ ';"' %}
{% set parallax_overlay = (particle.parallax_bg_overlay ? '<div class="jl-position-cover" style="background-color: '~ particle.parallax_bg_overlay ~';"></div>') %}
{% set parallax_easing = particle.parallax_easing ? 'easing:' ~ particle.parallax_easing / 10 ~ '' %}

{# Set Max-Width Content #}
{% set content_maxwidth %}
{% if particle.g_maxwidth != 'inherit' %} jl-width-{{particle.g_maxwidth}}{% if particle.g_maxwidth_breakpoint != 'always' %}@{{particle.g_maxwidth_breakpoint}}{% endif %}{% if particle.g_maxwidth_alignment == 'left' %}{% elseif particle.g_maxwidth_alignment == 'center' %} jl-margin-auto{% else %} jl-margin-auto-left{% endif %}{% endif %}
{% endset %}

{# Set Parallax Background #}
{% set parallaxbackground %}
{% if particle.parallax_image %}
<div data-src="{{ url(particle.parallax_image)|e }}" class="jl-background-norepeat{{ particle.parallax_bg_overlay ? ' jl-position-relative' : '' }}{{padding}} jl-background-{{particle.background_image_position|e}}{% if particle.background_image_size != 'auto' %} jl-background-{{particle.background_image_size|e}}{% endif %}{% if particle.parallax_bg_visibility != 'always' %} jl-background-image@{{particle.parallax_bg_visibility|e}}{% endif %}{% if particle.vertical_alignment != 'none' %} jl-flex jl-flex-{{particle.vertical_alignment|e}}{% endif %}{% if particle.parallax_text_color != 'default' %} jl-{{particle.parallax_text_color|e}}{% endif %}{% if particle.blendmode != 'inherit' %} jl-background-blend-{{particle.blendmode|e}}{% endif %}" {{parallax_bg_color|default('')|raw}}{% if particle.horizontal_start or particle.horizontal_end or particle.vertical_start or particle.vertical_end or particle.parallax_easing %} jl-parallax="{% if particle.horizontal_start or particle.horizontal_end %}bgx: {{particle.horizontal_start|e}},{{particle.horizontal_end|e}};{% endif %}{% if particle.vertical_start or particle.vertical_end %}bgy: {{particle.vertical_start|e}},{{particle.vertical_end|e}};{% endif %}{% if particle.parallax_bg_breakpoint != 'always' %} media: @{{particle.parallax_bg_breakpoint|e}};{% endif %}{{parallax_easing}}" {% endif %} jl-img {{viewport_height|raw}}>
{{parallax_overlay|raw}}
{% if particle.container_maxwidth != 'none' %}
<div class="{{container_maxwidth}}">
{% endif %}
{% endif %}
{% endset %}

{# End Parallax Background #}
{% set endparallaxbackground %}
{% if particle.parallax_image %}
{% if particle.container_maxwidth != 'none' %}
</div>
{% endif %}
</div>
{% endif %}
{% endset %}

{# Set Horizontal #}
{% set pahorizontal %}
{% if particle.pa_horizontal_start or particle.pa_horizontal_end %}x: {% if particle.pa_horizontal_start == '' %}0{% else %}{{particle.pa_horizontal_start }}{% endif %},{% if particle.pa_horizontal_end == '' %}0{% else %}{{particle.pa_horizontal_end }}{% endif %};{% endif %}
{% endset %}

{# Set Vertical #}
{% set pavertical %}
{% if particle.pa_vertical_start or particle.pa_vertical_end %}y: {% if particle.pa_vertical_start == '' %}0{% else %}{{particle.pa_vertical_start }}{% endif %},{% if particle.pa_vertical_end == '' %}0{% else %}{{particle.pa_vertical_end }}{% endif %};{% endif %}
{% endset %}

{# Set Scale #}
{% set scale %}
{% if particle.scale_start or particle.scale_end %}scale: {% if particle.scale_start == '' %}1{% else %}{{particle.scale_start / 100 }}{% endif %},{% if particle.scale_end == '' %}1{% else %} {{particle.scale_end / 100 }}{% endif %};{% endif %}
{% endset %}

{# Set Rotate #}
{% set rotate %}{% if particle.rotate_start or particle.rotate_end %}
rotate: {% if particle.rotate_start == '' %}0{% else %}{{particle.rotate_start}}{% endif %},{% if particle.rotate_end == '' %}0{% else %}{{particle.rotate_end}}{% endif %};{% endif %}
{% endset %}

{# Set Opacity #}
{% set opacity %}
{% if particle.opacity_start or particle.opacity_end %}opacity: {% if particle.opacity_start == '' %}1{% else %}{{particle.opacity_start / 100 }}{% endif %},{% if particle.opacity_end == '' %}1{% else %}{{particle.opacity_end / 100 }}{% endif %};{% endif %}
{% endset %}

{# Set Animation #}
{% set animation %}
{% if particle.animation != 'inherit' and particle.animation != 'parallax' %} jl-scrollspy="cls: jl-animation-{{particle.animation|e}};{% if particle.animation_repeat == 'enabled' %} repeat: true;{% endif %}{% if particle.animation_delay %} delay: {{particle.animation_delay|e}};{% endif %}"
{% elseif particle.animation == 'parallax' %}
{% if particle.pa_horizontal_start or particle.pa_horizontal_end or particle.pa_vertical_start or particle.pa_vertical_end or particle.scale_start or particle.scale_end or particle.rotate_start or particle.rotate_end or particle.opacity_start or particle.opacity_end or particle.easing or particle.pa_viewport or particle.pa_breakpoint %} jl-parallax="{{pahorizontal}}{{pavertical}}{{scale}}{{rotate}}{{opacity}}{% if particle.easing == '' %}{% else %}easing: {{ particle.easing / 100 }};{% endif %}{% if particle.pa_viewport != '' %}viewport:{{ particle.pa_viewport / 100 }};{% endif %}{% if particle.pa_breakpoint != 'always' %}media: @{{particle.pa_breakpoint|e}}{% endif %}"{% endif %}
{% endif %}
{% endset %}

{# set Particle Title Style #}
{% set particle_title_style %}
{% if particle.particle_title %}
<{{particle.particle_title_element|e}} id="{{ id }}" class="g5-particle-title{% if particle.particle_title_align != 'inherit' %} jl-text-{{particle.particle_title_align|e}}{% endif %}{% if particle.particle_predefined_color != 'default' %} jl-text-{{particle.particle_predefined_color|e}}{% endif %}{% if particle.particle_title_style != 'default' %} jl-{{particle.particle_title_style|e}}{% endif %}{% if particle.particle_title_decoration != 'none' %} jl-heading-{{particle.particle_title_decoration|e}}{% endif %}">
{% if particle.particle_title_decoration == 'line' %} <span>{{particle.particle_title|raw}}</span>
{% else %} {{particle.particle_title|raw}}
{% endif %}
</{{particle.particle_title_element|e}}>
{% endif %}
{% endset %}

{# Set Image Width/Height #}
{% set imagewidth = particle.image_width ? ' width="' ~ particle.image_width ~ '"' %}
{% set imageheight = particle.image_height ? ' height="' ~ particle.image_height ~ '"' %}

{% if particle.image_alignment == 'left' or particle.image_alignment == 'right' %}
{% set cover = (particle.image_padding and particle.style != 'blank') ? ' jl-cover' %}
{% endif %}

{% set image_grid_column_gap = particle.image_grid_column_gap != 'default' ? ' jl-grid-column-' ~ particle.image_grid_column_gap ~ '' %}
{% set image_grid_row_gap = particle.image_grid_row_gap != 'default' ? ' jl-grid-row-' ~ particle.image_grid_row_gap ~ '' %}

{% if ( particle.image_grid_column_gap == particle.image_grid_row_gap ) and not (particle.image_grid_column_gap == 'default' and particle.image_grid_row_gap == 'default') %}
    {% set image_grid_cr_gap = ' jl-grid-' ~ particle.image_grid_column_gap ~ '' %}
{% else %}
    {% set image_grid_cr_gap = image_grid_column_gap ~ image_grid_row_gap %}
{% endif %}

{# Set Link Scroll #}
{% set linkscroll = particle.buttonlink|e matches '/#/' ? ' jl-scroll' %}
{# Set Title hover #}
{% set title_hover = (particle.title_hover ? ' class="jl-link-'~ particle.title_hover ~'"') %}
{% set link_image_padding = (particle.link_image and particle.image_padding ? ' class="jl-display-block"') %}
{% set check_image_transition = particle.link_card or particle.link_image %}

{# Image Transition #}
{% if check_image_transition %}
{% set image_transition = particle.image_transition != 'none' ? ' jl-transition-' ~ particle.image_transition|e ~ ' jl-transition-opaque' %}
{% endif %}
 
{# Set Image Margin Top Class #}
{% if ( (particle.image_alignment == 'bottom' and particle.image_padding == false ) or ( particle.style == 'blank' and particle.image_alignment == 'bottom' ) or particle.image_alignment == 'between' ) %}
{% if check_image_transition and particle.image_transition != 'none' %}
{% set image_top_cls_transition %}
{% if particle.image_margin_top == 'default' %} jl-margin-top{% else %} jl-margin-{{ particle.image_margin_top|e }}-top{% endif %}
{% endset %}
{% else %}
{% set image_top_cls %}
{% if particle.image_margin_top == 'default' %} jl-margin-top{% else %} jl-margin-{{ particle.image_margin_top|e }}-top{% endif %}
{% endset %}
{% endif %}
{% endif %}

{# Set Image Border Class #}
{% if particle.style == 'blank' or ( particle.style != 'blank' and particle.image_padding == false ) %}
{% set image_border_cls = particle.image_border != 'none' ? ' jl-border-' ~ particle.image_border|e ~ '' %}
{% endif %}

{# Image Box Shadow #}
{% if particle.style == 'blank' %}
{% if check_image_transition %}
{% set img_boxshadow = particle.box_shadow != 'none' ? ' jl-box-shadow-' ~ particle.box_shadow|e ~ '' %}
{% set img_boxshadow_hover = particle.box_shadow_hover != 'none' ? ' jl-box-shadow-hover-' ~ particle.box_shadow_hover|e ~ '' %}
{% else %}
{% set image_boxshadow = particle.box_shadow != 'none' ? ' jl-box-shadow-' ~ particle.box_shadow|e ~ '' %}
{% set image_boxshadow_hover = particle.box_shadow_hover != 'none' ? ' jl-box-shadow-hover-' ~ particle.box_shadow_hover|e ~ '' %}
{% endif %}
{% endif %}

{% set link_transition = particle.link_card and particle.image_transition != 'none' ? ' jl-transition-toggle' %}

{# Set Image Left/Right #}
{% set image_lr %}

{% if particle.image_padding %}
{% if particle.link_image and particle.link_card == false %}<a{{link_image_padding|raw}} href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>{% if particle.image_transition != 'none' %}<div class="jl-inline-clip jl-transition-toggle{{img_boxshadow}}{{img_boxshadow_hover}}">{% endif %}{% endif %}

{% if particle.link_card and particle.image_transition != 'none' %}<div class="jl-inline-clip{{img_boxshadow}}{{img_boxshadow_hover}}">{% endif %}

<img class="tm-image{{image_border_cls}}{{image_transition}}" src="{{ url(particle.image)|e }}"{% if particle.image_alt %} alt="{{particle.image_alt|e}}"{% endif %}{{cover}}>
{% if particle.style != 'blank' %}
<img class="tm-image jl-invisible{{image_transition}}" src="{{ url(particle.image)|e }}"{% if particle.image_alt %} alt="{{particle.image_alt|e}}"{% endif %}>
{% endif %}
{% if particle.link_card and particle.image_transition != 'none' %}</div>{% endif %}

{% if particle.link_image and particle.link_card == false %}{% if particle.image_transition != 'none' %}</div>{% endif %}</a>{% endif %}
{% else %}
{% if particle.link_image and particle.link_card == false %}<a href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>{% if particle.image_transition != 'none' %}<div class="jl-inline-clip jl-transition-toggle{{img_boxshadow}}{{img_boxshadow_hover}}">{% endif %}{% endif %}
	{% if particle.link_card and particle.image_transition != 'none' %}<div class="jl-inline-clip{{img_boxshadow}}{{img_boxshadow_hover}}">{% endif %}
	<img{{imagewidth|raw}}{{imageheight|raw}} class="tm-image{{image_border_cls}}{{image_transition}}{{image_boxshadow}}{{image_boxshadow_hover}}" src="{{ url(particle.image)|e }}"{% if particle.image_alt %} alt="{{particle.image_alt|e}}"{% endif %}>
	{% if particle.link_card and particle.image_transition != 'none' %}</div>{% endif %}
{% if particle.link_image and particle.link_card == false %}{% if particle.image_transition != 'none' %}</div>{% endif %}</a>{% endif %}
{% endif %}

{% endset %}

{# Set Image Content #}
{% set image_default %}
{% if particle.link_image and particle.link_card == false %}<a href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>{% if particle.image_transition != 'none' %}<div class="jl-inline-clip jl-transition-toggle{{img_boxshadow}}{{img_boxshadow_hover}}{{image_top_cls_transition}}">{% endif %}{% endif %}
{% if particle.link_card and particle.image_transition != 'none' %}<div class="jl-inline-clip{{img_boxshadow}}{{img_boxshadow_hover}}{{image_top_cls_transition}}">{% endif %}
<img{{imagewidth|raw}}{{imageheight|raw}} class="tm-image{{image_top_cls}}{{image_border_cls}}{{image_transition}}{{image_boxshadow}}{{image_boxshadow_hover}}" src="{{ url(particle.image)|e }}"{% if particle.image_alt %} alt="{{particle.image_alt|e}}"{% endif %}>
{% if particle.link_card and particle.image_transition != 'none' %}</div>{% endif %}
{% if particle.link_image and particle.link_card == false %}{% if particle.image_transition != 'none' %}</div>{% endif %}</a>{% endif %}
{% endset %}

{# Set Title Content #}
{% set content_title %}
{% if particle.title %}
<{{particle.title_element|e}} class="tm-title jl-card-title jl-margin-remove-bottom{{title_text_transform}}{% if particle.title_margin_top == 'default' %} jl-margin-top{% else %} jl-margin-{{ particle.title_margin_top|e }}-top{% endif %}{% if particle.title_color != 'default' %} jl-text-{{particle.title_color|e}}{% endif %}{% if particle.title_style != 'default' %} jl-{{particle.title_style|e}}{% endif %}{% if particle.title_decoration != 'none' %} jl-heading-{{particle.title_decoration|e}}{% endif %}">
{% if particle.title_decoration == 'line' %}
<span>
{% endif %}
{% if particle.link_title and particle.link_card == false %}
<a{{ title_hover|raw }} href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>{{ particle.title|raw }}</a>
{% else %}
{{ particle.title|raw }}
{% endif %}
{% if particle.title_decoration == 'line' %}
</span>
{% endif %}
</{{particle.title_element|e}}>
{% endif %}
{% endset %}

{# Set Meta Content #}
{% set content_meta %}
{% if particle.meta %}
<div class="tm-meta{{meta_text_transform}}{% if particle.meta_margin_top == 'default' %} jl-margin-top{% else %} jl-margin-{{ particle.meta_margin_top|e }}-top{% endif %}{% if particle.meta_color != 'default' %} jl-text-{{ particle.meta_color|e }}{% endif %}{% if particle.meta_style != 'default' %} jl-{{ particle.meta_style|e }}{% endif %}">
	{{particle.meta|raw}}
</div>
{% endif %}
{% endset %}

{# Set Content #}
{% set content %}
{% if particle.content %}
<div class="tm-content jl-panel{{content_text_transform}}{% if particle.content_margin_top == 'default' %} jl-margin-top{% else %} jl-margin-{{ particle.content_margin_top|e }}-top{% endif %}{% if particle.content_style != 'default' %} jl-text-{{ particle.content_style|e }}{% endif %}{% if particle.content_text_color != 'default' %} jl-text-{{ particle.content_text_color|e }}{% endif %}">{{ particle.content|raw }}</div>
{% endif %}
{% endset %}

{# Set Button Class #}
{% set button_cls %}
{% if particle.buttonclass == 'link' %}jl-link{% elseif particle.buttonclass == 'link-muted' or particle.buttonclass == 'link-text' %}jl-{{particle.buttonclass|e}}{% else %}jl-button jl-button-{{particle.buttonclass|e}}{% endif %}
{% endset %}

{# Set Button Size #}
{% set button_size %}
{% if particle.buttonclass == 'link' or particle.buttonclass == 'link-muted' or particle.buttonclass == 'link-text' or particle.buttonclass == 'text' %}{% else %}{% if particle.link_button_size != 'default' %} jl-button-{{particle.link_button_size|e}}{% endif %}{% endif %}
{% endset %}

{# Set Button #}
{% set button %}
{% if particle.buttonlink and particle.buttontext %}
{% if particle.link_card %}
<div class="{% if particle.link_margin_top == 'default' %}jl-margin-top{% else %}jl-margin-{{ particle.link_margin_top|e }}-top{% endif %}">
<div class="{{button_cls}}{{button_size}}">{{ particle.buttontext|e }}</div>
</div>
{% else %}
<div class="{% if particle.link_margin_top == 'default' %}jl-margin-top{% else %}jl-margin-{{ particle.link_margin_top|e }}-top{% endif %}">
<a class="{{button_cls}}{{button_size}}" href="{{ particle.buttonlink|e }}" title="{{ particle.buttontext|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>{{ particle.buttontext|e }}</a>
</div>
{% endif %}
{% endif %}
{% endset %}
{# End Button #}

{# Set Particle Alignment #}
{% set particle_alignment %}
{% if particle.align != 'inherit' %} jl-text-{{particle.align|e}}{% if particle.breakpoint != 'always' %}@{{particle.breakpoint|e}}{% endif %}{% endif %}{% if particle.align != 'inherit' and particle.breakpoint != 'always' %}{% if particle.fallback != 'inherit' %} jl-text-{{particle.fallback|e}}{% endif %}{% endif %}
{% endset %}

{% block particle %}
{% if particle.enabled %}
{{parallaxbackground}}
{{particle_title_style}}
<div id="{{ id }}" class="tm-content-wrapper{{content_maxwidth}}{% if particle.class %} {{ particle.class }}{% endif %}{{particle_alignment}}{% if particle.margin == 'inherit' %}{% elseif particle.margin == 'default' %} jl-margin{% else %} jl-margin-{{particle.margin|e}}{% endif %}{% if particle.visibility != 'inherit' %} jl-visible@{{particle.visibility|e}}{% endif %}"{{animation}}>

{% if particle.image_alignment == 'top' or particle.image_alignment == 'bottom' or particle.image_alignment == 'between' %}

{# Default Style #}

{% if particle.style == 'blank' %}

{# Card Blank #}

{% if particle.link_card %}
    <a class="jl-panel jl-margin-remove-first-child jl-display-block jl-link-toggle{{link_transition}}" href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>
{% else %}
    <div class="jl-panel jl-margin-remove-first-child">
{% endif %}

{% if particle.image and particle.image_alignment == 'top' %}
    {{image_default}}
{% endif %}

{% if particle.meta_alignment == 'top' %}
    {{content_meta}}
{% endif %}

{{content_title}}

{% if particle.meta_alignment == 'bottom' %}
    {{content_meta}}
{% endif %}

{% if particle.image and particle.image_alignment == 'between' %}
    {{image_default}}
{% endif %}

{{content}}

{% if particle.meta_alignment == 'content' %}
    {{content_meta}}
{% endif %}

{{button}}

{% if particle.image and particle.image_alignment == 'bottom' %}
    {{image_default}}
{% endif %}

{% if particle.link_card %}
    </a>
{% else %}
    </div>
{% endif %}

{# End Card Blank #}

{% else %}

{# Card styles #}

{% if particle.image_padding %}

{% if particle.link_card %}
    <a class="jl-card jl-card-{{ particle.style }}{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %} jl-display-block jl-link-toggle{% if particle.style != 'hover' %} jl-card-hover{% endif %}{{link_transition}}" href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>
{% else %}
    <div class="jl-card jl-card-{{ particle.style }}{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %}">
{% endif %}

{% if particle.image and particle.image_alignment == 'top' %}
    <div class="jl-card-media-top">
        {{image_default}}
    </div>
{% endif %}

<div class="jl-card-body jl-margin-remove-first-child">

{% if particle.meta_alignment == 'top' %}
    {{content_meta}}
{% endif %}

{{content_title}}

{% if particle.meta_alignment == 'bottom' %}
    {{content_meta}}
{% endif %}

{% if particle.image and particle.image_alignment == 'between' %}
    {{image_default}}
{% endif %}

{{content}}

{% if particle.meta_alignment == 'content' %}
    {{content_meta}}
{% endif %}

{{button}}

</div>

{% if particle.image and particle.image_alignment == 'bottom' %}
    <div class="jl-card-media-bottom">
        {{image_default}}
    </div>
{% endif %}

{% if particle.link_card %}
    </a>
{% else %}
    </div>
{% endif %}

{% else %}

{% if particle.link_card %}
    <a class="jl-card jl-card-{{ particle.style }} jl-card-body{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %} jl-margin-remove-first-child jl-display-block jl-link-toggle{% if particle.style != 'hover' %} jl-card-hover{% endif %}{{link_transition}}" href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>
{% else %}
    <div class="jl-card jl-card-{{ particle.style }} jl-card-body{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %} jl-margin-remove-first-child">
{% endif %}

{% if particle.image and particle.image_alignment == 'top' %}
    {{image_default}}
{% endif %}

{% if particle.meta_alignment == 'top' %}
    {{content_meta}}
{% endif %}

{{content_title}}

{% if particle.meta_alignment == 'bottom' %}
    {{content_meta}}
{% endif %}

{% if particle.image and particle.image_alignment == 'between' %}
    {{image_default}}
{% endif %}

{{content}}

{% if particle.meta_alignment == 'content' %}
    {{content_meta}}
{% endif %}

{{button}}

{% if particle.image and particle.image_alignment == 'bottom' %}
    {{image_default}}
{% endif %}

{% if particle.link_card %}
    </a>
{% else %}
    </div>
{% endif %}

{% endif %}

{# End image padding #}

{# End card style #}

{% endif %}

{# End Default Style #}

{% else %}

{# Grid Style #}

{% if particle.style == 'blank' %}

{# Card Blank #}

{% if particle.image %}

{% if particle.link_card %}
    <a class="jl-panel jl-margin-remove-first-child jl-display-block jl-link-toggle{{link_transition}}" href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>
{% else %}
    <div class="jl-panel jl-margin-remove-first-child">
{% endif %}

<div class="jl-child-width-expand{{image_grid_cr_gap}}{% if particle.image_vertical_alignment %} jl-flex-middle{% endif %}" jl-grid>
<div class="jl-width-{{ particle.image_grid_width }}{% if particle.image_grid_breakpoint != 'default' %}@{{ particle.image_grid_breakpoint|e }}{% endif %}{% if particle.image_alignment == 'right' %} jl-flex-last{% if particle.image_grid_breakpoint != 'default' %}@{{ particle.image_grid_breakpoint|e }}{% endif %}{% endif %}">
    {% if particle.image %}
        {{image_lr}}
    {% endif %}
</div>

<div class="jl-margin-remove-first-child">

{% if particle.meta_alignment == 'top' %}
    {{content_meta}}
{% endif %}

{{content_title}}

{% if particle.meta_alignment == 'bottom' %}
    {{content_meta}}
{% endif %}

{{content}}

{% if particle.meta_alignment == 'content' %}
    {{content_meta}}
{% endif %}

{{button}}

</div>
</div>

{% if particle.link_card %}
    </a>
{% else %}
    </div>
{% endif %}

{% else %}

{# Card Blank #}
{% if particle.link_card %}
    <a class="jl-panel jl-margin-remove-first-child jl-display-block jl-link-toggle{{link_transition}}" href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>
{% else %}
    <div class="jl-panel jl-margin-remove-first-child">
{% endif %}

{% if particle.meta_alignment == 'top' %}
    {{content_meta}}
{% endif %}

{{content_title}}

{% if particle.meta_alignment == 'bottom' %}
    {{content_meta}}
{% endif %}

{{content}}

{% if particle.meta_alignment == 'content' %}
    {{content_meta}}
{% endif %}

{{button}}

{% if particle.link_card %}
    </a>
{% else %}
    </div>
{% endif %}

{# End Card Blank #}

{% endif %}

{# End Card Blank #}

{% else %}

{% if particle.image %}

{# Card styles #}

{% if particle.image_padding %}

{% if particle.link_card %}
    <a class="jl-card jl-card-{{ particle.style }}{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %} jl-display-block jl-link-toggle{% if particle.style != 'hover' %} jl-card-hover{% endif %}{{link_transition}}" href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>
{% else %}
    <div class="jl-card jl-card-{{ particle.style }}{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %}">
{% endif %}

{% if particle.image_padding %}
    <div class="jl-child-width-expand jl-grid-collapse jl-grid-match{% if particle.image_vertical_alignment == '1' %} jl-flex-middle{% endif %}" jl-grid>
{% else %}
    <div class="jl-child-width-expand{{image_grid_cr_gap}}{% if particle.image_vertical_alignment %} jl-flex-middle{% endif %}" jl-grid>
{% endif %}

<div class="jl-width-{{ particle.image_grid_width }}{% if particle.image_grid_breakpoint != 'default' %}@{{ particle.image_grid_breakpoint|e }}{% endif %}{% if particle.image_alignment == 'right' %} jl-flex-last{% if particle.image_grid_breakpoint != 'default' %}@{{ particle.image_grid_breakpoint|e }}{% endif %}{% endif %}">
<div class="jl-cover-container jl-card-media-{{ particle.image_alignment }}">
    {% if particle.image %}
        {{image_lr}}
    {% endif %}
</div>
</div>

<div>
<div class="jl-card-body jl-margin-remove-first-child">

{% if particle.meta_alignment == 'top' %}
    {{content_meta}}
{% endif %}

{{content_title}}

{% if particle.meta_alignment == 'bottom' %}
    {{content_meta}}
{% endif %}

{{content}}

{% if particle.meta_alignment == 'content' %}
    {{content_meta}}
{% endif %}

{{button}}

</div>
</div>
</div>

{% if particle.link_card %}
    </a>
{% else %}
    </div>
{% endif %}

{% else %}

{% if particle.link_card %}
    <a class="jl-card jl-card-{{ particle.style }} jl-card-body{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %} jl-display-block jl-link-toggle{% if particle.style != 'hover' %} jl-card-hover{% endif %}{{link_transition}}" href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>
{% else %}
    <div class="jl-card jl-card-{{ particle.style }} jl-card-body{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %}">
{% endif %}

<div class="jl-child-width-expand{{image_grid_cr_gap}}{% if particle.image_vertical_alignment %} jl-flex-middle{% endif %}" jl-grid>
<div class="jl-width-{{ particle.image_grid_width }}{% if particle.image_grid_breakpoint != 'default' %}@{{ particle.image_grid_breakpoint|e }}{% endif %}{% if particle.image_alignment == 'right' %} jl-flex-last{% if particle.image_grid_breakpoint != 'default' %}@{{ particle.image_grid_breakpoint|e }}{% endif %}{% endif %}">
    {{image_default}}
</div>

<div class="jl-margin-remove-first-child">

{% if particle.meta_alignment == 'top' %}
    {{content_meta}}
{% endif %}

{{content_title}}

{% if particle.meta_alignment == 'bottom' %}
    {{content_meta}}
{% endif %}

{{content}}

{% if particle.meta_alignment == 'content' %}
    {{content_meta}}
{% endif %}

{{button}}

</div>

</div>

{% if particle.link_card %}
    </a>
{% else %}
    </div>
{% endif %}

{% endif %}

{# End card style #}

{% else %}

{% if particle.link_card %}
    <a class="jl-card jl-card-{{ particle.style }} jl-card-body{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %} jl-margin-remove-first-child jl-display-block jl-link-toggle{% if particle.style != 'hover' %} jl-card-hover{% endif %}{{link_transition}}" href="{{ particle.buttonlink|e }}" target="{{ particle.buttontarget|default('_self')|e }}"{{linkscroll}}>
{% else %}
    <div class="jl-card jl-card-{{ particle.style }} jl-card-body{% if particle.cardsize != 'default' %} jl-card-{{ particle.cardsize }}{% endif %} jl-margin-remove-first-child">
{% endif %}

{% if particle.meta_alignment == 'top' %}
    {{content_meta}}
{% endif %}

{{content_title}}

{% if particle.meta_alignment == 'bottom' %}
    {{content_meta}}
{% endif %}

{{content}}

{% if particle.meta_alignment == 'content' %}
    {{content_meta}}
{% endif %}

{{button}}

{% if particle.link_card %}
    </a>
{% else %}
    </div>
{% endif %}

{% endif %}

{% endif %}

{# End Grid style #}

{% endif %}

</div>

{{endparallaxbackground}}
{% endif %}
{% endblock %}