/* [federcori-posts] — scoped styles, all .fed-* prefixed */
.fed-posts-archive {
	font-family: var(--fed-font-body);
	font-size: var(--fed-fs-body);
	line-height: 1.5;
	color: var(--fed-ink);
	max-width: 1220px;
	margin: 0 auto;
}
.fed-posts-archive *,
.fed-posts-archive *::before,
.fed-posts-archive *::after {
	box-sizing: border-box;
}
.fed-posts-archive img {
	max-width: 100%;
	display: block;
}

/* Toolbar / search — matches [federcori-festivals] / [federcori-gallery] */
.fed-posts-archive .fed-toolbar {
	display: flex;
	gap: 12px;
	margin-bottom: 18px;
}
.fed-posts-archive .fed-search {
	position: relative;
	flex: 1;
}
.fed-posts-archive .fed-search .fed-icon-search {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 15px;
	height: 15px;
	color: var(--fed-gray);
	fill: currentColor;
}
.fed-posts-archive .fed-search-input {
	width: 100%;
	padding: 13px 16px 13px 40px;
	border: 1.5px solid var(--fed-line);
	border-radius: 12px;
	font: inherit;
	font-size: 0.875rem; /* 14px */
	color: var(--fed-ink);
	background: var(--fed-white);
}
.fed-posts-archive .fed-search-input:focus {
	outline: none;
	border-color: var(--fed-navy);
}

/* "Periodo" filter card — bordered/shadowed bar + label + reset, matching
   [federcori-events]'s topbar (not a bare inline pill row). */
.fed-filters-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px 20px;
	background: var(--fed-white);
	border: 1px solid var(--fed-line);
	border-radius: var(--fed-radius);
	padding: 16px 24px;
	box-shadow: var(--fed-shadow);
	margin-bottom: 28px;
}
.fed-filters-label {
	font-family: var(--fed-font-body);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fed-gray);
	white-space: nowrap;
}
/* real checkbox hidden; the pill fill below stands in for it — same trick as
   [federcori-events]'s "Periodo" facet. */
.fed-check-row input[type='checkbox'] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}
.fed-check-list[data-facet='anno'] {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 1;
	min-width: 0;
}
.fed-check-list[data-facet='anno'] .fed-check-row {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 13px;
	border: 1px solid var(--fed-line);
	border-radius: 999px;
	font-family: var(--fed-font-body);
	font-weight: 600;
	font-size: 0.8125rem;
	color: var(--fed-navy);
	cursor: pointer;
	user-select: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
/* active state — the site's signature gradient instead of a flat navy fill */
.fed-check-list[data-facet='anno'] .fed-check-row:has(input:checked) {
	background-color: var(--fed-navy);
	background-image:
		radial-gradient(circle at 20% 10%, rgba(226, 34, 43, 0.75), transparent 55%),
		radial-gradient(circle at 85% 90%, rgba(0, 150, 58, 0.7), transparent 55%);
	border-color: transparent;
	color: var(--fed-white);
}
.fed-check-list[data-facet='anno'] .fed-check-row:has(input:focus-visible) {
	outline: 2px solid var(--fed-navy);
	outline-offset: 2px;
}
.fed-filters-reset {
	flex: none;
	margin-left: auto;
	padding: 0;
	border: none;
	background: none;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--fed-red);
	cursor: pointer;
	white-space: nowrap;
}
.fed-filters-reset:hover {
	color: var(--fed-red-dark);
	text-decoration: underline;
}

/* Inline category pills — no sidebar */
.fed-pill-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 28px;
}
.fed-pill {
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--fed-ink-soft);
	background: var(--fed-white);
	border: 1.5px solid var(--fed-line);
	border-radius: 999px;
	padding: 8px 16px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.fed-pill:hover {
	border-color: var(--fed-navy);
	color: var(--fed-navy);
}
.fed-pill.is-active {
	background: var(--fed-navy);
	border-color: var(--fed-navy);
	color: var(--fed-white);
}

/* Grid — 3 cols → 2 (<=980px) → 1 (<=768px), text-forward blog cards */
.fed-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}

@media (max-width: 980px) {
	.fed-posts-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.fed-posts-grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}
}

.fed-posts-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	background: var(--fed-white);
	border: 1px solid var(--fed-line);
	border-radius: var(--fed-radius);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.fed-posts-card:hover {
	box-shadow: var(--fed-shadow-sm);
	transform: translateY(-2px);
}

.fed-posts-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--fed-bg-soft);
}
.fed-posts-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.fed-posts-card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--fed-bg-soft);
}

.fed-posts-card-tag {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--fed-white);
	color: var(--fed-navy);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 999px;
}

.fed-posts-card-body {
	position: relative;
	flex: 1 1 auto; /* fill leftover height when Grid stretches this card to match a taller sibling */
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px 22px 24px;
	background-color: var(--fed-white);
	background-image: none; /* only painted on hover — see below */
	background-size: 220% 220%;
	background-position: 120% -20%;
	background-repeat: no-repeat;
	transition: background-color 0.5s ease, background-position 0.5s ease;
}

.fed-posts-card:hover .fed-posts-card-body {
	background-color: var(--fed-navy-deep);
	background-image:
		radial-gradient(circle at 16% 14%, rgba(226, 34, 43, 0.55), transparent 56%),
		radial-gradient(circle at 88% 92%, rgba(0, 150, 58, 0.5), transparent 56%);
	background-position: 0% 100%;
	animation: fed-posts-meta-shift 3.5s ease-in-out infinite alternate;
}

@keyframes fed-posts-meta-shift {
	from {
		background-position: 0% 100%;
	}
	to {
		background-position: 20% 70%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fed-posts-card:hover .fed-posts-card-body {
		animation: none;
	}
}

.fed-posts-card-date {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--fed-gray);
	transition: color 0.3s ease;
}
.fed-posts-card:hover .fed-posts-card-date {
	color: rgba(255, 255, 255, 0.75);
}

.fed-posts-card-title {
	font-family: var(--fed-font-heading);
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
	color: var(--fed-navy);
	transition: color 0.3s ease;
}
.fed-posts-card:hover .fed-posts-card-title {
	color: var(--fed-white);
}

.fed-posts-card-excerpt {
	font-size: 14px;
	color: var(--fed-ink-soft);
	line-height: 1.55;
	transition: color 0.3s ease;
}
.fed-posts-card:hover .fed-posts-card-excerpt {
	color: rgba(255, 255, 255, 0.82);
}

/* Loading / empty — matches [federcori-festivals] / [federcori-gallery] */
.fed-posts-archive .fed-sentinel {
	height: 1px;
}
.fed-posts-archive .fed-loading {
	display: flex;
	justify-content: center;
	padding: 30px 0;
}
.fed-posts-archive .fed-spinner {
	width: 32px;
	height: 32px;
	animation: fed-posts-spin 0.85s linear infinite;
}
.fed-posts-archive .fed-spinner circle {
	fill: none;
	stroke: var(--fed-navy);
	stroke-width: 4;
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: 75;
}
@keyframes fed-posts-spin {
	to {
		transform: rotate(360deg);
	}
}
@media (prefers-reduced-motion: reduce) {
	.fed-posts-archive .fed-spinner {
		animation-duration: 2.4s;
	}
}
.fed-posts-archive .fed-empty {
	text-align: center;
	padding: 30px 0;
	font-size: 0.875rem; /* 14px */
	color: var(--fed-ink-soft);
}
