<?php get_header(); ?>


<!--
================================
SEZIONE HERO
================================
-->
<section class="hero hero--page">

    <div class="hero__sfondo" style="background-image: url(<?php the_field('sfondo_categoria','option'); ?>)" data-enllax-ratio=".175"></div>

    <div class="hero--page--title">
        <div class="linea_blu animazione--appare--up"></div>
        <h1 class="animazione--appare--up"><?php echo  single_cat_title(); ?></h1>
        <div class="linea_blu animazione--appare--up"></div>
    </div>

</section>


<!-- archivio articoli -->

<section class="news_home padding-top-azienda  padding--vh mb-5 animazione--appare--up">

    <div class="container-80">
        <!-- LOOP POST EVENTI -->

        <div class="row">
            <?php while ( have_posts() ) : the_post(); ?>
            <div class="col-md-6 col-lg-4 col-xl-3 mb-3">


                <a href=" <?php the_permalink(); ?>">
                    <div class="news_item">
                        <div class="slide_news__img">
                            <img src="<?php echo get_the_post_thumbnail_url(get_the_ID(),'large'); ?>" alt="" class="img-fluid">
                        </div>
                        <div class="slide_news__text">
                            <div>
                                <div class="news__data"> <?php the_field('luogo'); echo get_the_date(', d M Y'); ?>
                                </div>
                                <div class="news__title">
                                    <h2><?php the_title() ?></h2>
                                </div>
                            </div>

                            <div class="news__link"><a href="<?php the_permalink() ?>">&mdash; Leggi l'articolo</a></div>
                        </div>
                    </div>
                </a>


            </div>
            <?php endwhile; ?>

        </div>
    </div>


    <div class="clearfix"></div>
</section>


<?php get_footer(); ?>
