/* Categoria (e tag/archivi): banner, evidenza, elenco a righe, barra laterale. Misure di testo dalla scala di theme.json. */
.nty-cat-banner { box-sizing: border-box; display: flex; min-height: 300px; align-items: center; margin-block-start: 0 !important; padding: 2.5rem clamp(1.25rem, 4vw, 3rem); background: #192847; color: #fff; }
.nty-cat-banner__inner { width: 100%; max-width: 76rem; margin-inline: auto; }
.nty-cat-banner .wp-block-query-title { margin: 0 0 1rem !important; color: #fff; }

.nty-cat-banner .wp-block-post-title { margin: 0 0 1rem !important; color: #fff; }
.nty-cat-banner__text { max-width: 46rem; margin: 0 !important; color: rgba(255,255,255,.88); line-height: 1.5; }
.nty-cat-banner__text > * { margin: 0; }
.nty-cat-banner .wp-block-term-description { max-width: 46rem; margin: 0 !important; color: rgba(255,255,255,.88); line-height: 1.5; }
.nty-cat-banner .wp-block-term-description:empty { display: none; }

.nty-cat { 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, 3.5rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem) !important; }
.nty-cat > * { max-width: none !important; margin-inline: 0 !important; }
.nty-cat__grid { display: grid !important; grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); align-items: start; gap: clamp(1.5rem, 3vw, 2.5rem); }
.nty-cat__primary, .nty-cat__aside { min-width: 0; max-width: none !important; margin: 0 !important; }
.nty-cat .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.nty-cat .wp-block-post-template > li { margin: 0 0 1.25rem !important; }

/* Evidenza: scheda bianca con la foto dentro */
.nonestinguerti-archive-featured { margin: 0 0 1.25rem !important; }
.nonestinguerti-archive-featured .wp-block-post-template > li { margin: 0 !important; }
.nty-cat-feature { position: relative; display: flex !important; flex-direction: column; gap: 1.25rem; padding: clamp(1.25rem, 3vw, 2.5rem) !important; border: 1px solid #f2ede9; border-radius: 1.2rem; background: #fff; }
.nty-cat-feature > * { margin: 0 !important; }
.nty-cat-feature__title a, .nty-cat-row__title a { position: static; color: #11110f; text-decoration: none; }
.nty-cat-feature__title a::after, .nty-cat-row__title a::after { position: absolute; z-index: 1; inset: 0; content: ""; }
.nty-cat-feature__image img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: .9rem; }
.nty-cat-feature__image:not(:has(img)) { aspect-ratio: 16/10; border-radius: .9rem; background: #192847; }
.nty-cat-feature__excerpt { color: #5f6168; }
.nty-cat-feature__foot { padding-top: 1.25rem; border-top: 1px solid #f2ede9; }

/* Righe: miniatura a sinistra, testo a destra */
.nty-cat-row { position: relative; display: grid !important; grid-template-columns: minmax(10rem, .38fr) minmax(0, 1fr); align-items: center; gap: clamp(1rem, 2.5vw, 2rem); padding: 1.25rem !important; border: 1px solid #f2ede9; border-radius: 1.2rem; background: #fff; }
.nty-cat-row > * { min-width: 0; margin: 0 !important; }
.nty-cat-row__image img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: .9rem; }
.nty-cat-row__image:not(:has(img)) { aspect-ratio: 3/2; border-radius: .9rem; background: #192847; }
.nty-cat-row__body { display: flex; min-width: 0; flex-direction: column; gap: .65rem; }
.nty-cat-row__body > * { margin: 0 !important; }
.nty-cat-row__meta { align-items: center; color: #5f6168; }
.nty-cat-row__title { color: #192847; }
.nty-cat-row__excerpt { color: #5f6168; }
.nty-cat-row__foot { margin-top: .25rem !important; }
.nty-cat-feature__foot, .nty-cat-row__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nty-cat-feature__foot > *, .nty-cat-row__foot > * { margin: 0 !important; }
.nty-cat-row__foot .wp-block-post-author-name a { position: relative; z-index: 2; color: #11110f; font-weight: 500; text-decoration: none; }
.nty-cat-row__foot .wp-block-post-author-name a:hover { text-decoration: underline; }
.nty-cat-feature:focus-within, .nty-cat-row:focus-within { outline: 3px solid #192847; outline-offset: 3px; }
.nty-readmore { margin-left: auto !important; color: #192847; font-weight: 700; text-align: right; }
.nty-meta__when { display: flex; align-items: center; gap: .5rem; color: #5f6168; }
.nty-meta__when, .nty-meta__when * { margin: 0; font-size: var(--wp--preset--font-size--small); }

/* Paginazione a numeri */
.nty-cat-pagination { gap: 1rem; margin-top: 1.75rem; }
.nty-cat-pagination a, .nty-cat-pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; color: #192847; font-weight: 600; text-decoration: none; }
.nty-cat-pagination .page-numbers.current { border-radius: 999px; background: #192847; color: #fff; }

/* Barra laterale */
.nty-cat__aside { display: flex !important; flex-direction: column; gap: 1.5rem; }
.nty-cat__aside > * { margin: 0 !important; }
.nty-cat-search .wp-block-search__inside-wrapper { display: flex; min-height: 52px; align-items: center; border: 1px solid #f2ede9; border-radius: 999px; background: #fff; overflow: hidden; }
.nty-cat-search .wp-block-search__input { min-width: 0; flex: 1; border: 0; background: transparent; padding: 0 1.25rem; font: inherit; }
.nty-cat-search .wp-block-search__button { display: grid; width: 44px; height: 44px; margin: 0 .25rem 0 0; place-items: center; border: 0; border-radius: 50%; background: transparent !important; color: #11110f !important; padding: 0; }
.nty-cat-module { padding: 1.75rem !important; border: 1px solid #f2ede9; border-radius: 1.2rem; background: #fff; }
.nty-cat-module > h2 { position: relative; margin: 0 0 .75rem !important; padding-top: 1rem; }
.nty-cat-module > h2::before { position: absolute; top: 0; left: 0; width: 2rem; height: 3px; background: #95c11f; content: ""; }
.nty-cat-list-links { margin: 0 !important; padding: 0 !important; list-style: none; }
.nty-cat-list-links li { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: .75rem; margin: 0; padding: .35rem 0; border-bottom: 1px solid #f2ede9; color: #5f6168; font-size: var(--wp--preset--font-size--small); }
.nty-cat-list-links li:last-child { border-bottom: 0; }
.nty-cat-list-links a { color: #11110f; font-size: var(--wp--preset--font-size--medium); text-decoration: none; }
.nty-cat-list-links a:hover { text-decoration: underline; }
.nty-cat-about { position: relative; padding: 1.75rem !important; border-radius: 1.2rem; background: #192847; color: #fff; }
.nty-cat-about > * { margin: 0 0 .75rem !important; }
.nty-cat-about__kicker { color: #c4f351; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nty-cat-about__text { color: rgba(255,255,255,.82); }
.nty-cat-about__button .wp-block-button__link { min-height: 48px; background: #c4f351 !important; color: #11110f !important; }

@media (max-width: 900px) {
	.nty-cat__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.nty-cat-row { grid-template-columns: minmax(7rem, .36fr) minmax(0, 1fr); padding: 1.25rem !important; }
	.nty-cat-row__meta { flex-wrap: wrap; }
}
@media (max-width: 520px) { .nty-cat-row { grid-template-columns: minmax(0, 1fr); } .nty-cat-row__image img, .nty-cat-row__image:not(:has(img)) { aspect-ratio: 16/9; } }
.nty-cat-module__all { margin: .75rem 0 0 !important; } .nty-cat-module__all a { color: #192847; font-weight: 700; text-decoration: none; } .nty-cat-module__all a:hover { text-decoration: underline; }
.nty-cat-empty { margin: 0 !important; padding: 2rem; border: 1px solid #f2ede9; border-radius: 1.2rem; background: #fff; color: #5f6168; }
.nonestinguerti-author-articles .nty-cat-list .wp-block-post-template > li { margin: 0 0 1.25rem !important; } .nonestinguerti-author-articles .nty-cat-list .wp-block-post-template { margin: 0; padding: 0; list-style: none; }
.nty-cat-row:not(:has(.nty-cat-row__image img)) { grid-template-columns: minmax(0, 1fr); }
.nty-rubriche .nty-count { display: grid; min-width: 1.75rem; height: 1.75rem; padding: 0 .4rem; place-items: center; border: 1px solid #f2ede9; border-radius: 999px; background: #faf7f6; color: #5f6168; font-size: var(--wp--preset--font-size--label); }
.nty-rubriche a[aria-current="page"] { font-weight: 700; }

/* Banner di rubrica con immagine (variabili impostate da inc/banner.php) */
.nty-banner-art .nty-cat-banner { position: relative; isolation: isolate; overflow: hidden; min-height: clamp(320px, 30vw, 420px); background-color: var(--nty-banner-bg, #192847); color: var(--nty-banner-ink, #fff); }
.nty-banner-art .nty-cat-banner::before { position: absolute; top: 0; right: 0; bottom: 0; left: auto; z-index: -1; width: auto; max-width: none; aspect-ratio: 2134 / 737; background: var(--nty-banner-img) no-repeat center / 100% 100%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24%); mask-image: linear-gradient(to right, transparent 0, #000 24%); content: ""; }
.nty-banner-art .nty-cat-banner .wp-block-query-title.has-white-color, .nty-banner-art .nty-cat-banner .wp-block-term-description.has-white-color, .nty-banner-art .nty-cat-banner .wp-block-term-description { color: var(--nty-banner-ink, #fff) !important; }
.nty-banner-art .nty-cat-banner__inner { max-width: 76rem; }
.nty-banner-art .nty-cat-banner .wp-block-term-description { max-width: min(36rem, 52%); }
@media (max-width: 900px) {
	.nty-banner-art .nty-cat-banner { display: block; min-height: 0; padding: 0 0 2rem; }
	.nty-banner-art .nty-cat-banner::before { position: static; display: block; width: 100%; aspect-ratio: auto; height: clamp(170px, 46vw, 260px); margin-bottom: 1.5rem; background-position: right center; background-size: auto 100%; -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent); mask-image: linear-gradient(to bottom, #000 78%, transparent); }
	.nty-banner-art .nty-cat-banner__inner { padding-inline: clamp(1.25rem, 4vw, 3rem); }
	.nty-banner-art .nty-cat-banner .wp-block-term-description { max-width: none; }
}

/* Banner della home: stesso sistema delle rubriche, titolo e frase al posto di query-title/term-description */
.nty-cat-banner .nty-home-banner__title { margin: 0 0 1rem !important; }
.nty-cat-banner .nty-home-banner__intro { max-width: 46rem; margin: 0 !important; line-height: 1.5; }
.nty-banner-art .nty-cat-banner .nty-home-banner__title.has-white-color, .nty-banner-art .nty-cat-banner .nty-home-banner__intro.has-white-color { color: var(--nty-banner-ink, #fff) !important; }
.nty-banner-art .nty-cat-banner .nty-home-banner__intro { max-width: min(36rem, 52%); }
@media (max-width: 900px) { .nty-banner-art .nty-cat-banner .nty-home-banner__intro { max-width: none; } }
.nty-banner-art .nty-cat-banner :is(.wp-block-post-title, .wp-block-post-content, .nty-cat-banner__text) { color: var(--nty-banner-ink, #fff) !important; }
.nty-banner-art .nty-cat-banner .nty-cat-banner__text { max-width: min(36rem, 52%); }
@media (max-width: 900px) { .nty-banner-art .nty-cat-banner .nty-cat-banner__text { max-width: none; } }
