/**
 * [npt_resources] — filterable brochure library.
 * Sticky filter sidebar + 2-column card grid. Whole card links to the PDF.
 * Palette mirrors .npt-catalog (catalog-search.css): blue #0057B8, ink #111.
 */

.npt-resources-wrap {
	--npt-blue: #0057B8;
	--npt-lime: #DFFF00;
	--npt-ink: #111111;
	--npt-line: #e2e5ea;
	--npt-muted: #6b7280;
	font-family: "Source Sans Pro", system-ui, -apple-system, sans-serif;
	display: flex;
	align-items: flex-start;
	gap: 32px;
	color: var(--npt-ink);
}

/* An element with an explicit `display` (e.g. .npt-res-card{display:flex})
   ignores the UA [hidden] rule, so the JS filter's card.hidden=true would do
   nothing. Force it. */
.npt-resources-wrap [hidden] { display: none !important; }

/* ---- Sidebar ---------------------------------------------------------- */
.npt-res-sidebar {
	flex: 0 0 240px;
	box-sizing: border-box;
	position: sticky;
	top: 24px;
	padding: 22px 20px;
	background: #f3f4f6;
	border-radius: 12px;
}

.npt-res-search { margin-bottom: 20px; }

.npt-res-search__input {
	width: 100%;
	box-sizing: border-box;
	padding: .6rem .8rem;
	font-size: .95rem;
	border: 1px solid var(--npt-line);
	border-radius: 8px;
	background: #fff;
}

.npt-res-search__input:focus {
	outline: none;
	border-color: var(--npt-blue);
}

.npt-res-group { margin-bottom: 22px; }

.npt-res-group__title {
	margin: 0 0 10px;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--npt-muted);
}

/* Prefixed with .npt-resources-wrap to outrank the theme's `.entry-content ul`
   (which otherwise adds left margin/padding). */
.npt-resources-wrap .npt-res-group__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.npt-res-group__item { margin: 0 0 6px; }

.npt-res-check {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: .95rem;
	line-height: 1.3;
}

.npt-res-check input { accent-color: var(--npt-blue); margin: 0; }

.npt-res-check__name { flex: 1; }

.npt-res-count { color: var(--npt-muted); font-size: .85rem; }

.npt-res-clear {
	margin-top: 4px;
	padding: .45rem .9rem;
	font-family: inherit;
	font-size: .85rem;
	font-weight: 700;
	color: var(--npt-blue);
	background: #fff;
	border: 1px solid var(--npt-line);
	border-radius: 999px;
	cursor: pointer;
}

.npt-res-clear:hover { border-color: var(--npt-blue); }

/* ---- Results ---------------------------------------------------------- */
.npt-res-main { flex: 1 1 auto; min-width: 0; }

.npt-res-empty {
	margin: 0 0 20px;
	padding: 16px 18px;
	background: #f3f4f6;
	border-radius: 10px;
	color: var(--npt-muted);
	font-weight: 600;
}

.npt-resources {
	display: grid;
	grid-template-columns: repeat(var(--npt-cols, 2), minmax(0, 1fr));
	gap: 28px;
}

/* ---- Card (entire card is one link) ----------------------------------- */
.npt-res-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--npt-line);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .15s, transform .15s, border-color .15s;
}

.npt-res-card:hover {
	border-color: var(--npt-lime);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}

.npt-res-card__thumb {
	display: block;
	background: #f4f5f7;
	aspect-ratio: 762 / 458;
}

.npt-res-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.npt-res-card__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 14px 16px 0;
}

.npt-res-pill {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--npt-blue);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1.5;
}

.npt-res-card__title {
	padding: 10px 16px 18px;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.3;
}

.npt-res-card:hover .npt-res-card__title { color: var(--npt-blue); }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
	.npt-resources-wrap { flex-direction: column; }
	.npt-res-sidebar {
		position: static;
		flex-basis: auto;
		width: 100%;
	}
	.npt-res-group__list {
		display: flex;
		flex-wrap: wrap;
		gap: 4px 16px;
	}
}

@media (max-width: 600px) {
	.npt-resources { grid-template-columns: 1fr; }
}
