/* Archivio categorie / tag / autori */

.ab-archive-wrap {
	background: var(--ab-bg);
	min-height: 60vh;
	padding: 56px 0 80px;
}

.ab-archive-inner {
	max-width: 1120px;
	margin: 0 auto;
	/* padding laterale ereditato da body .wrap in tokens.css */
}

/* ---- Intestazione archivio ---- */
.ab-archive-header {
	margin-bottom: 48px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--ab-line);
}

.ab-archive-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .6px;
	color: var(--ab-accent-hover);
	margin: 0 0 8px;
}

.ab-archive-title {
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.5px;
	color: var(--ab-ink);
	margin: 0 0 10px;
	line-height: 1.2;
}

.ab-archive-desc {
	font-size: 15px;
	color: var(--ab-ink-soft);
	margin: 0;
	line-height: 1.6;
	max-width: 600px;
}

/* ---- Lista articoli ---- */
.ab-post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---- Singola riga ---- */
.ab-post-list { margin: 0 -48px; } /* estendi ai bordi per sfondi full-bleed */

.ab-post-row {
	display: grid;
	grid-template-columns: 340px 1fr;
	gap: 48px;
	align-items: center;
	padding: 52px 48px;
	background: #fff;
}

.ab-post-list > li:nth-child(even) { background: var(--ab-bg); }

.ab-post-row--flip {
	grid-template-columns: 1fr 340px;
}

.ab-post-row--flip .ab-post-thumb { order: 2; }
.ab-post-row--flip .ab-post-body  { order: 1; }

/* ---- Immagine ---- */
.ab-post-thumb {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #eef2f1, #e3ebe9);
	flex-shrink: 0;
}

/* neutralizza il <figure> che the_post_thumbnail() inietta */
.ab-post-thumb figure,
.ab-post-thumb .wp-post-image {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
}

.ab-post-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.ab-post-thumb:hover img { transform: scale(1.04); }

.ab-post-thumb--empty { aspect-ratio: 16 / 9; }

/* ---- Contenuto testuale ---- */
.ab-post-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Badge categoria */
.ab-post-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ab-post-cat {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--ab-accent-hover);
	background: var(--ab-accent-soft);
	padding: 3px 10px;
	border-radius: 12px;
	text-decoration: none;
	transition: background .15s, color .15s;
}

.ab-post-cat:hover {
	background: var(--ab-accent);
	color: #fff;
}

/* Titolo */
.ab-post-title {
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -0.3px;
	color: var(--ab-ink);
	line-height: 1.3;
	margin: 0;
}

.ab-post-title a {
	color: var(--ab-ink);
	text-decoration: none;
}

.ab-post-title a:hover { color: var(--ab-accent-hover); }

/* Estratto */
.ab-post-excerpt {
	font-size: 14px;
	line-height: 1.7;
	color: var(--ab-ink-soft);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Meta: autore · data */
.ab-post-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 13px;
	color: var(--ab-ink-soft);
}

.ab-post-sep { opacity: .4; }

.ab-post-author {
	font-weight: 600;
	color: var(--ab-ink);
}

/* Footer riga: pulsante + badge tempo lettura */
.ab-post-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.ab-post-readmore {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 7px;
	background: var(--ab-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s;
}

.ab-post-readmore:hover { background: var(--ab-accent-hover); }

.ab-post-readtime {
	font-size: 12px;
	font-weight: 600;
	color: var(--ab-ink-soft);
	background: var(--ab-line);
	padding: 5px 10px;
	border-radius: 20px;
	white-space: nowrap;
}

/* ---- Paginazione ---- */
.ab-pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
}

.ab-pagination .nav-links {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ab-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid var(--ab-line);
	font-size: 14px;
	font-weight: 500;
	color: var(--ab-ink);
	text-decoration: none;
	background: #fff;
}

.ab-pagination .page-numbers:hover {
	border-color: var(--ab-accent);
	color: var(--ab-accent-hover);
}

.ab-pagination .page-numbers.current {
	background: var(--ab-accent);
	border-color: var(--ab-accent);
	color: #fff;
}

.ab-pagination .page-numbers.dots {
	border: none;
	background: none;
}

/* ---- Vuoto ---- */
.ab-archive-empty {
	font-size: 15px;
	color: var(--ab-ink-soft);
	padding: 40px 0;
}

/* ---- Responsive ---- */
@media (max-width: 800px) {
	.ab-post-list { margin: 0 -28px; }

	.ab-post-row,
	.ab-post-row--flip {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 36px 28px;
	}

	.ab-post-row--flip .ab-post-thumb,
	.ab-post-row--flip .ab-post-body { order: unset; }

	.ab-post-thumb { aspect-ratio: 16 / 7; }
	.ab-archive-title { font-size: 26px; }
	.ab-post-title    { font-size: 18px; }
}

@media (max-width: 480px) {
	.ab-archive-wrap  { padding: 36px 0 56px; }
	.ab-post-list     { margin: 0 -16px; }
	.ab-post-row,
	.ab-post-row--flip { padding: 28px 16px; }
	.ab-post-footer   { flex-wrap: wrap; }
}
