/* Home v2: banner, articolo in evidenza, ultimi articoli. Tutte le misure di testo vengono dalla scala di theme.json. */
.nty-home-hero { box-sizing: border-box; padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 4vw, 3rem) !important; margin-block-start: 0 !important; }
.nty-home-hero .wp-block-cover__inner-container { width: 100%; max-width: 76rem; margin-inline: auto; }
.nty-home-hero__title { margin: 0 !important; }
.nty-home-hero__intro { max-width: 46rem; margin: 1.25rem 0 0 !important; font-size: var(--wp--preset--font-size--large); line-height: 1.5; }

.nty-home { box-sizing: border-box; width: 100%; max-width: calc(76rem + 2 * clamp(1.25rem, 4vw, 3rem)) !important; margin: 0 auto !important; padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem) !important; }
.nty-home > * { max-width: none !important; margin-inline: 0 !important; }
.nty-home .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.nty-home .wp-block-post-template > li { margin: 0 !important; }

/* Etichette di meta: categoria verde, data grigia */
.nty-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin: 0 !important; }
.nty-meta > * { margin: 0 !important; }
.nty-meta__cat, .nty-meta__cat a { color: #4a6212; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.nty-meta__date { color: #5f6168; letter-spacing: .08em; text-transform: uppercase; }
.nty-meta__cat + .nty-meta__date::before { margin-right: .6rem; content: "·"; }
.nty-meta__when { display: flex; align-items: center; gap: .5rem; color: #5f6168; }
.nty-meta__when > * { margin: 0 !important; }

/* Articolo in evidenza */
.nty-feature { position: relative; display: grid !important; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden; border: 1px solid #f2ede9; border-radius: 1.2rem; background: #fff; }
.nty-feature__image { height: 100%; min-height: 24rem; margin: 0 !important; }
.nty-feature__image img { display: block; width: 100%; height: 100%; min-height: 24rem; object-fit: cover; }
.nty-feature__image:not(:has(img)) { background: #192847; }
.nty-feature__body { display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.5rem, 3.5vw, 3rem) !important; }
.nty-feature__body > * { margin: 0 !important; }
.nty-feature__title { color: #192847; }
.nty-feature__title a, .nty-card__title a { position: static; color: #192847; text-decoration: none; }
.nty-feature__title a::after, .nty-card__title a::after { position: absolute; z-index: 1; inset: 0; content: ""; }
.nty-feature__excerpt { color: #444; }
.nty-feature__foot { margin-top: auto !important; }

/* Piede delle schede: autore a sinistra, "Leggi" a destra */
.nty-feature__foot, .nty-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nty-feature__foot > *, .nty-card__foot > * { margin: 0 !important; }
.nty-feature__foot .wp-block-post-author-name a, .nty-card__foot .wp-block-post-author-name a { position: relative; z-index: 2; color: #11110f; font-weight: 500; text-decoration: none; }
.nty-feature__foot .wp-block-post-author-name a:hover, .nty-card__foot .wp-block-post-author-name a:hover { text-decoration: underline; }
.nty-readmore { margin-left: auto !important; color: #192847; font-weight: 700; text-align: right; }
.nty-home-cards .wp-block-post-template { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.nty-home-cards .wp-block-post-template > li { display: flex; min-width: 0; }
.nty-card { position: relative; display: flex !important; width: 100%; flex-direction: column; overflow: hidden; border: 1px solid #f2ede9; border-radius: 1.2rem; background: #fff; }
.nty-card__image { margin: 0 !important; }
.nty-card__image img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.nty-card__image:not(:has(img)) { aspect-ratio: 3/2; background: #192847; }
.nty-card__body { display: flex; flex: 1; flex-direction: column; gap: .6rem; padding: 1.5rem !important; }
.nty-card__body > * { margin: 0 !important; }
.nty-card__excerpt { color: #5f6168; }
.nty-card__excerpt .wp-block-post-excerpt__excerpt { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.nty-card__foot { margin-top: auto !important; padding-top: .75rem; }

.nty-home-more { margin-top: clamp(2rem, 4vw, 3rem) !important; }
.nty-home-more__button .wp-block-button__link { min-height: 56px; padding: 0 2rem; font-size: var(--wp--preset--font-size--medium); }

.nty-feature:focus-within, .nty-card:focus-within { outline: 3px solid #192847; outline-offset: 3px; }

@media (max-width: 1023px) {
	.nty-home-cards .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 781px) {
	.nty-feature { grid-template-columns: minmax(0, 1fr); }
	.nty-feature__image, .nty-feature__image img { min-height: 0; height: auto; aspect-ratio: 3/2; }
	.nty-home-cards .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
}
.nty-meta__when, .nty-meta__when * { font-size: var(--wp--preset--font-size--small); }
