/* Rocky Tops — Page Cards widget. Self-contained. */

.rt-pcards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

/* Whole card is the link. Featured image = background; overflow clips the
   hover zoom. */
.rt-pcard {
	position: relative;
	display: block;
	height: 420px;
	overflow: hidden;
	border-radius: 14px;
	text-decoration: none;
	color: #fff;
	background-color: #1A1916;
	isolation: isolate;
}

/* Zooming image layer. */
.rt-pcard__img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform .6s cubic-bezier(.2, .6, .2, 1);
	will-change: transform;
	z-index: 0;
}
.rt-pcard:hover .rt-pcard__img,
.rt-pcard:focus-visible .rt-pcard__img {
	transform: scale(1.08);
}

/* Readability gradient over the image. */
.rt-pcard__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, .72) 0%,
		rgba(0, 0, 0, .25) 42%,
		rgba(0, 0, 0, 0) 68%
	);
}

/* Bottom-left overlay box with the title + description. */
.rt-pcard__box {
	position: absolute;
	left: 18px;
	bottom: 18px;
	right: auto;
	z-index: 2;
	max-width: calc(82% - 36px);
	padding: 16px 18px;
	border-radius: 10px;
	background-color: rgba(20, 18, 16, .55);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	transition: background-color .35s ease, transform .35s ease;
}
.rt-pcard:hover .rt-pcard__box {
	background-color: rgba(20, 18, 16, .72);
}

.rt-pcard__title {
	margin: 0 0 6px;
	font-family: 'Fraunces', Georgia, serif;
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.15;
	color: #fff;
}

.rt-pcard__excerpt {
	margin: 0;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: .9rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, .9);
	/* Keep the box compact — clamp to a few lines. */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Editor-only notice */
.rt-pcards__notice {
	padding: 1rem 1.25rem;
	background: #FAF7F1;
	border: 1px dashed #D2C7B4;
	color: #6B6A63;
	font-size: .9rem;
}

@media (prefers-reduced-motion: reduce) {
	.rt-pcard__img,
	.rt-pcard__box { transition: none; }
	.rt-pcard:hover .rt-pcard__img { transform: none; }
}
