/**
 * PATTERN: TRENDING POSTS
 * Desktop → 4 colonne
 * Tablet → 2-3 colonne
 * Mobile → 1 colonna automaticamente
*/



/* Transitions */
.syt-latest-articles a,
.syt-trending-grid .wp-block-post-title a,
.syt-latest-articles .wp-block-post-excerpt__more-text a,
.popular-posts .wpp-post-title {
    transition: color .2s ease-in-out;
}





.syt-trending-posts-section{
    padding: 20px 0 40px 0;
    margin: 0px 0 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.syt-trending-grid {
    display: grid;
    gap: 2rem; /* spazio tra le colonne */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* 
Forzo l'aspect ratio delle immagini
per uniformare le featured images
*/

.syt-trending-grid .wp-block-post-featured-image{
	overflow: hidden;
    margin-bottom: 10px;
}

.syt-trending-grid .wp-block-post-featured-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9; /* puoi cambiare a 4/3 o 1/1 */
    object-fit: cover;
    display: block;
}

.syt-trending-grid .wp-block-post-title{
	margin-bottom: 0;
}

.syt-trending-grid .wp-block-post-title a{
    font-family: "Playfair Display", serif;
	font-size: 15px;
    font-weight: 400;
	display: block;
	color: #222;
	margin-top: 15px;
	margin-bottom: 5px;
	padding: 0 var(--std-spacing);
}

.syt-trending-grid .wp-block-post-title a:hover{
    color: #e6c55d;
}

.syt-trending-grid .wp-block-post-date{
	text-transform: uppercase;
	color: #777;
	font-size: 11px;
}



/*
Trasformo in slider su mobile
*/
@media (max-width: 768px) {
    .syt-trending-grid {
        display: flex;             /* cambia da grid a flex */
        overflow-x: auto;          /* abilita swipe orizzontale */
        -webkit-overflow-scrolling: touch; /* scroll più fluido su iOS */
        scroll-snap-type: x mandatory;    /* snap automatico */
        gap: 1rem;                 /* spazio tra le slide */
    }

    .syt-trending-grid .wp-block-post {
        min-width: 80%;            /* larghezza minima di ogni “slide” */
        scroll-snap-align: start;  /* inizio dello snap */
        flex: 0 0 auto;            /* blocco non si restringe */
    }
}



/**
 * PATTERN: LATEST ARTICLES
 * Ultimi 4 articoli, Layout a 1 colonna
*/

.syt-latest-articles{
    max-width: var(--std-content-width);
    margin: 0 auto;
}

.syt-latest-articles a{
    display: block;
    color: #222;
    font-family: "Playfair Display", serif;
    overflow: hidden;
}

.syt-latest-articles a:hover{
}

.syt-latest-articles .taxonomy-category a{
    display: inline-block;
    background-color: var(--orange);
    font-size: 11px;
    text-transform: uppercase;
    border: 2px solid #fff;
    color: #fff;
    padding: 0 10px;
    font-weight: bold;
}



/* Sequenza ultimi 4 articoli */
.syt-latest-articles .wp-block-post {
    margin-bottom: 20px;
    width: 100%;
}

.syt-latest-articles .wp-block-post-featured-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.syt-latest-articles .syt-post-category {
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
    color: #555;
    margin-top: -5px;
    z-index: 1000;
    position: relative;
}


.syt-latest-articles .syt-post-category .wp-block-post-terms__separator{
    display: none;
}

/* Meta autore + data in linea centrata */
.syt-latest-articles .syt-post-meta {
    display: flex;
    justify-content: center; /* centra orizzontalmente */
    align-items: center;     /* allinea verticalmente */
    gap: 1rem;               /* spazio tra autore e data */
    margin: 15px auto;
}

.syt-latest-articles .syt-post-meta p{
    margin: 0;
}

.syt-latest-articles .syt-post-author,
.syt-latest-articles .syt-post-date {
    margin: 0; /* rimuove eventuali margini di default */
    font-size: 12px;
    font-style: italic;
    text-transform: capitalize;
    line-height: 1;
    color: #aaa;
}

.syt-latest-articles .syt-post-author p{
    margin-bottom: 0;
    border-right: 1px solid #f0f0f0;
    padding-right: 10px;
    font-size: 12px;
}

.syt-latest-articles .wp-block-separator{
    height: 1px;
    margin: 15px auto 25px;
    width: 50px;
    border: 0;
    border-top-width: 0px;
    border-top-style: none;
    border-top-color: currentcolor;
    border-top: 1px solid #f0f0f0;
}

.syt-latest-articles .wp-block-post-excerpt {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
    text-align: justify;    
    color: #777;
}

.syt-latest-articles .wp-block-post-excerpt__more-text a{
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color:  #222;
    margin-top: 20px;
}

.syt-latest-articles .wp-block-post-excerpt__more-text a:hover{
    color: #e6c55d;
}

.syt-latest-articles .syt-post-share {
    margin-top: 1rem;
}

.syt-latest-articles .syt-related-articles {
    margin-top: 2rem;
}


/***
 * SHARE BAR
 */
.heateor_sss_sharing_container {
    padding: 15px;
    border: 1px solid #f0f0f0;
    margin-top: 25px;
}

.heateor_sss_sharing_ul a span svg{
    transition: opacity .2s ease-in-out;
}

.heateor_sss_sharing_ul a span svg:hover *{
    opacity: .8;
}




/***
 * POST CORRELATI
 */
.related-posts{
    margin: 40px auto 0 auto;
}




/***
 * TITOLO CON LINEE LATERALI
 */

.title-lines {
  display: flex;
  align-items: center;
  text-align: center;
  gap: 20px;
  font-size: 16px;
  margin-top: -8px;
  margin-bottom: 30px;
  font-weight: normal;
  letter-spacing: 2px;
}

.title-lines::before,
.title-lines::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #f0f0f0;
}



/***
 * TITOLO CON LINEA LATERALE SINISTRA
 */

.title-line-left {
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 10px;
    font-size: 20px;
    margin-top: -8px;
    font-weight: normal;
}

.title-line-left strong{
    font-family: 'DM Serif Display';
    margin-left: -3px;
}

.title-line-left::before{
  content: "";
  width: 20px;
  height: 2px;
  background-color: #f0f0f0;
}





/***
 * POPULAR POSTS - FEATURED POSTS
 * Plugin WP Popular Posts
 */


.popular-posts{
    text-align: center;
}

.popular-posts .wpp-list{
    list-style-type: none;
    line-height: 100%;
}


.popular-posts .wpp-list a:not(.wpp-meta a){
    overflow: hidden;
    display: block;
    margin-bottom: 10px;
}

.popular-posts .wpp-thumbnail{
    display: block;
    float: none;
    margin: 0 auto;
}

.popular-posts .wpp-post-title{
    display: block;
    float: none;
    margin-bottom: 5px;
}

.embedded-post{
    text-align: center;
}

.popular-posts .wpp-post-title,
.embedded-post .embedded-post-title{
    font-size: 14px;
    font-family: "Playfair Display", serif;
    font-weight: 400;
    color: var(--black);
    /* margin: -40px 10% 0 10%; */
    margin: 0 auto;
    width: 80%;
    background-color: #fff;

    display: inline !important;
    line-height: 150%;
    background-image: linear-gradient(var(--orange), var(--orange));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0 1px;
    transition: background-size .4s;
}

.popular-posts .wpp-post-title:hover,
.embedded-post .embedded-post-title:hover{
    background-size: 100% 1px;
}

.popular-posts .wpp-meta{
    margin-top: 8px;
}

.wpp-meta, .post-stats {
  font-size: 11px;
}

.popular-posts .wpp-date,
.embedded-post .embedded-post-date{
    text-transform: uppercase;
    color: #777;
    font-size: 10px;
}

.popular-posts .wpp-taxonomy{
    color: #e6c55d;
}

.popular-posts .wpp-taxonomy:hover{
    color: #000;
}


/***
 * ZOOM ON HOVER
 */

.popular-posts .wpp-thumbnail,
.syt-latest-articles .wp-block-post-featured-image img{
    transition: all .5s ease-in-out;
}

.popular-posts .wpp-thumbnail:hover{
    transform: scale(1.05);
}

.syt-latest-articles .wp-block-post-featured-image img:hover {
    transform: scale(1.03);
}


