/* Proses Hover Reveal Cards — scoped, CSS-only */
.prhc {
	--prhc-cols: 4;
	--prhc-gap: 16px;
	--prhc-h: 320px;
	--prhc-radius: 12px;
	--prhc-dur: 450ms;
	--prhc-ease: cubic-bezier(.4, 0, .2, 1);
	--prhc-hover-scale: 1.05;
	--prhc-dim-opacity: .6;
	--prhc-dim-scale: .97;
	--prhc-dim-blur: 2px;
	--prhc-bg: #1a1d24;
	--prhc-ov-bottom: rgba(0, 0, 0, .8);
	--prhc-ov-mid: rgba(0, 0, 0, .4);
	--prhc-ov-top: rgba(0, 0, 0, 0);
	--prhc-focus: #12a488;
	--prhc-title-lines: 3;
	width: 100%;
}

.prhc .prhc__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--prhc-cols), minmax(0, 1fr));
	gap: var(--prhc-gap);
}

.prhc .prhc__item {
	margin: 0;
	padding: 0;
	min-width: 0;
	list-style: none;
}
.prhc .prhc__item::before,
.prhc .prhc__item::marker { content: none; }

.prhc .prhc__card {
	position: relative;
	z-index: 0;
	display: block;
	height: var(--prhc-h);
	overflow: hidden;
	isolation: isolate;
	border-radius: var(--prhc-radius);
	background: var(--prhc-bg);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .12), 0 4px 6px -4px rgba(0, 0, 0, .12);
	transition:
		transform var(--prhc-dur) var(--prhc-ease),
		opacity var(--prhc-dur) var(--prhc-ease),
		filter var(--prhc-dur) var(--prhc-ease);
	-webkit-tap-highlight-color: transparent;
}
a.prhc__card { cursor: pointer; }

.prhc .prhc__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	object-position: center;
}

.prhc .prhc__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(to top, var(--prhc-ov-bottom) 0%, var(--prhc-ov-mid) 50%, var(--prhc-ov-top) 100%);
}

.prhc .prhc__content {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 24px;
	color: #fff;
}

.prhc .prhc__subtitle {
	display: block;
	margin: 0;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.4;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .8);
}

.prhc .prhc__title {
	margin: 4px 0 0;
	padding: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.25;
	color: #fff;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--prhc-title-lines);
	overflow: hidden;
}

/* Keyboard focus — always on, independent of pointer type */
.prhc .prhc__card:focus { outline: none; }
.prhc .prhc__card:focus-visible {
	outline: 2px solid var(--prhc-focus);
	outline-offset: 3px;
	transform: scale(var(--prhc-hover-scale));
	z-index: 2;
}
.prhc-dim-yes .prhc .prhc__grid:has(.prhc__card:focus-visible) .prhc__card:not(:focus-visible) {
	opacity: var(--prhc-dim-opacity);
	transform: scale(var(--prhc-dim-scale));
	filter: blur(var(--prhc-dim-blur));
}

/* Hover — only for real pointers; touch devices keep every card crisp */
@media (hover: hover) and (pointer: fine) {
	.prhc .prhc__card:hover {
		transform: scale(var(--prhc-hover-scale));
		z-index: 2;
	}
	/* Dim siblings only while a CARD is hovered (not the gaps between them) */
	.prhc-dim-yes .prhc .prhc__grid:has(.prhc__card:hover) .prhc__card:not(:hover) {
		opacity: var(--prhc-dim-opacity);
		transform: scale(var(--prhc-dim-scale));
		filter: blur(var(--prhc-dim-blur));
	}
}

/* Fallback for browsers without :has() — original group-hover behaviour */
@supports not selector(:has(a)) {
	@media (hover: hover) and (pointer: fine) {
		.prhc-dim-yes .prhc .prhc__grid:hover .prhc__card:not(:hover) {
			opacity: var(--prhc-dim-opacity);
			transform: scale(var(--prhc-dim-scale));
			filter: blur(var(--prhc-dim-blur));
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.prhc .prhc__card {
		transition: opacity 150ms linear;
	}
	.prhc .prhc__card,
	.prhc .prhc__card:hover,
	.prhc .prhc__card:focus-visible,
	.prhc-dim-yes .prhc .prhc__grid .prhc__card:not(:hover) {
		transform: none !important;
		filter: none !important;
	}
}

.prhc__empty {
	padding: 16px;
	border: 1px dashed #c5cad1;
	border-radius: 8px;
	text-align: center;
	color: #5c6672;
}
