{% set allpress = craft.entries.section("pressReleasesEntries").orderBy('postDate desc').limit(3).collect() %}

{% set get_countSliders = allpress|length %} 
{% if get_countSliders > 0 %}
	<section class="masterHeadComponent" data-ms-28431>
		<section class="breadcrumb-spacing">
    <div class="header-spacing"
      style="background-color: var(--b-medianoche);"></div>
    <div class="container">
      <nav class="pt-5"
        style="--bs-breadcrumb-divider: url('/assets/img/path32.svg');"
        aria-label="breadcrumb">
        <ol class="breadcrumb">
            {% for page in ['home', 'pressReleases'] %}
                {% set get_page = craft.entries().section(page).one() ?? null %}
                {% if get_page %}
                  <li class="breadcrumb-item" aria-current="page">
                    <a href="{{ get_page.url }}">{{ get_page.title|upper }}</a>
                  </li>
                {% endif %}
              {% endfor %}
        </ol>
      </nav>
    </div>
</section> 
		<div style="--swiper-navigation-color: var(--a-blanco);" class="swiper masterHeadSlier" data-slider="{{ get_countSliders }}">
			<section class="swiper-wrapper">
				{% for slider in allpress %}
					<div class="swiper-slide">
						<section class="masterHeadSlier__bg">
							{% set img = slider.image[0] ?? null %}
							{% if img %}
								{% include 'components/_imageTransformsSimple' with {
                                img: img,
                                setClass: 'masterHeadSlier__img',
                                alt: slider.title ?? img.title
                                } only %}
							{% endif %}
						</section>
						<section class="container pt-5">
							{% if (slider.title|length) > 0 %}
								{% if loop.first %}
									<h1 class="title my-0 col-12 col-md-9 mx-auto">
										{{ slider.title }}
									</h1>
								{% else %}
									<p class="title my-0 col-12 col-md-9 mx-auto">
										{{ slider.title }}
									</p>
								{% endif %}
							{% endif %}
							{% if (slider.description|length) > 0 %}
								<div class="col-12 col-md-9 mx-auto description">
									{{ slider.description|chop(limit=140, unit='w') }}
								</div>
							{% endif %}
								<div class="d-inline-block mt-3">
									<a href="{{ slider.url }}" class="py-2 btnArrow btn_pink masterHeadSlier__btn btn">
											<span>{{ 'LEER MÁS'|t|upper }}</span>
										<img data-src="/assets/img/arrowhite.svg" src="" alt="btn" loading="lazy" class="lazyload img-fluid ms-3"/>
									</a>
								</div>
						</section>
					</div>
				{% endfor %}
			</section>
			<div class="swiper-button-next d-none {{
				        get_countSliders >= 4
				          ? 'd-lg-block'
				          : null
				        }}"></div>
			<div class="swiper-button-prev d-none {{
				        get_countSliders >= 4
				          ? 'd-lg-block'
				          : null
				        }}"></div>
			<div class="contentProgressBar d-none d-lg-block">
				<div class="swiper-progress-bar">
					<span class="slide_progress-bar"></span>
				</div>
			</div>
		</div>
		<div class="paginationSlider col-12">
			<section class="paginationSlider__content">
				<div class="col-12 col-lg-10 mx-auto">
					<section thumbsslider="" class="swiper masterHeadThumbs masterHeadThumbs_v2">
						<div class="swiper-wrapper">
							{% for slider in allpress %}
								<section class="swiper-slide">
									<span class="number me-lg-3 pt-1">
										{{ loop.index > 10 ? null : 0 }}{{ loop.index }}
									</span>
									<p class="title d-inline-block col-12 col-md-10">
										{{ slider.title }}
									</p>
								</section>
							{% endfor %}
						</div>
					</section>
				</div>
			</section>
		</div>
	</section>
{% endif %}
