/*
 * [dpx-home] — the dpxarts.com museum directory block (includes/museum-directory.php).
 * LAYOUT ONLY. Font, colours, inputs and buttons come from the THEME, so the directory
 * wears the brand instead of carrying a second copy of it (the hand-built page drifted —
 * Hayden 2026-10-06). Lines/tints derive from the inherited text colour via color-mix.
 */
.dpx-home {
	--dpx-home-line: color-mix(in srgb, currentColor 18%, transparent);
	--dpx-home-tint: color-mix(in srgb, currentColor 6%, transparent);
}
.dpx-home *,
.dpx-home *::before,
.dpx-home *::after { box-sizing: border-box; }

/* Rows (Featured · Popular · New): one horizontally scrolling strip each, snap per card.
   The heading is a plain <h2> so it wears the theme's heading style. */
.dpx-home__row { margin: 0 0 28px; }
.dpx-home__row-title { margin: 0 0 10px; }
.dpx-home__strip {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(250px, 78%);
	gap: 18px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	padding: 2px 2px 10px; /* room for the hover lift + focus ring */
}
.dpx-home__strip > .dpx-home__card { scroll-snap-align: start; }

.dpx-home__search { display: flex; gap: 8px; max-width: 520px; margin: 0 0 8px; }
.dpx-home__search input { flex: 1; min-width: 0; }
.dpx-home__sr {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.dpx-home__count { margin: 16px 0 12px; opacity: .75; font-size: .9em; }
.dpx-home__empty { padding: 32px 0; opacity: .75; }

.dpx-home__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
	gap: 18px;
	margin: 0 0 24px;
}
.dpx-home__card {
	display: block;
	color: inherit;
	text-decoration: none;
	border: 1px solid var(--dpx-home-line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--dpx-home-tint);
	transition: transform .15s, border-color .15s;
}
.dpx-home__card:hover,
.dpx-home__card:focus-visible { transform: translateY(-2px); border-color: currentColor; }
.dpx-home__cover {
	aspect-ratio: 16 / 9;
	background: var(--dpx-home-tint) center / cover no-repeat;
}
.dpx-home__body { display: flex; gap: 12px; align-items: center; padding: 12px 14px 14px; }
.dpx-home__avatar {
	width: 48px; height: 48px; flex: none;
	margin-top: -30px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--dpx-home-line);
	background: var(--dpx-home-tint);
}
.dpx-home__name { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.dpx-home__host { font-size: .85em; opacity: .8; overflow-wrap: anywhere; }
.dpx-home__badge {
	display: inline-block;
	margin-top: 4px;
	padding: 1px 8px;
	font-size: .7em;
	letter-spacing: .08em;
	text-transform: uppercase;
	border: 1px solid var(--dpx-home-line);
	border-radius: 999px;
	opacity: .8;
}

.dpx-home__pager { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 8px 0 24px; }
.dpx-home__pager a {
	padding: 8px 14px;
	color: inherit;
	text-decoration: none;
	border: 1px solid var(--dpx-home-line);
	border-radius: 8px;
}
.dpx-home__pager a:hover,
.dpx-home__pager a:focus-visible { border-color: currentColor; }

@media (prefers-reduced-motion: reduce) {
	.dpx-home__card { transition: none; }
	.dpx-home__card:hover,
	.dpx-home__card:focus-visible { transform: none; }
}
