/* CoPlaNet Suite 6.3.30 — Archivi/categorie: card allineate */

body.archive .entries,
body.category .entries,
body.tax-category .entries {
    align-items: stretch;
}

/* Prova a coprire i wrapper articolo tipici di Blocksy/Gutenberg senza toccare la homepage */
body.archive article,
body.category article,
body.tax-category article {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Area titolo: altezza coerente fino a 3 righe */
body.archive article .entry-title,
body.category article .entry-title,
body.tax-category article .entry-title {
    line-height: 1.35;
    min-height: 4.05em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Immagini tutte con lo stesso rapporto */
body.archive article .ct-media-container,
body.category article .ct-media-container,
body.tax-category article .ct-media-container,
body.archive article .wp-post-image,
body.category article .wp-post-image,
body.tax-category article .wp-post-image {
    width: 100%;
}

body.archive article .ct-media-container,
body.category article .ct-media-container,
body.tax-category article .ct-media-container {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

body.archive article .ct-media-container img,
body.category article .ct-media-container img,
body.tax-category article .ct-media-container img,
body.archive article img.wp-post-image,
body.category article img.wp-post-image,
body.tax-category article img.wp-post-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Estratto massimo 4 righe per mantenere la griglia regolare */
body.archive article .entry-excerpt,
body.category article .entry-excerpt,
body.tax-category article .entry-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta in fondo alla card, quando il markup lo consente */
body.archive article .entry-meta:last-child,
body.category article .entry-meta:last-child,
body.tax-category article .entry-meta:last-child {
    margin-top: auto;
}

@media (max-width: 689px) {
    body.archive article .entry-title,
    body.category article .entry-title,
    body.tax-category article .entry-title {
        min-height: auto;
        -webkit-line-clamp: 3;
    }
}


/* 6.3.32 — centra realmente il media block nella colonna della card */
body.archive article .ct-media-container,
body.category article .ct-media-container,
body.tax-category article .ct-media-container,
body.archive article > a:has(img.wp-post-image),
body.category article > a:has(img.wp-post-image),
body.tax-category article > a:has(img.wp-post-image) {
    margin-left: auto;
    margin-right: auto;
}

body.archive article img.wp-post-image,
body.category article img.wp-post-image,
body.tax-category article img.wp-post-image {
    margin-left: auto;
    margin-right: auto;
}
