/* Scrolling Image List — frontend styles
   Ported from the original "RPC Custom Widgets" plugin's style.css, with all
   classes renamed rpc- -> rpcg- so this can't collide with that plugin's
   CSS if both are ever active on the same site. */

.rpcg-scroll-list {
	display: flex;
	align-items: stretch;
	width: 100%;
	column-gap: 60px;
}

.rpcg-scroll-list * {
	box-sizing: border-box;
}

/* ---------- Image column (desktop) ---------- */

.rpcg-scroll-image-col {
	position: relative;
	flex-shrink: 0;
	/* Stretches to match the (taller) text column's height, giving the
	   sticky child room to stay pinned while the page scrolls past it. */
	align-self: stretch;
}

.rpcg-scroll-sticky-wrap {
	position: sticky;
	width: 100%;
	overflow: hidden;
	background-color: #efece3;
}

.rpcg-scroll-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	opacity: 0;
	transition: opacity 0.6s ease;
	will-change: opacity;
}

.rpcg-scroll-image.rpcg-active {
	opacity: 1;
	z-index: 1;
}

/* ---------- Content / list column ---------- */

.rpcg-scroll-content-col {
	display: flex;
	flex-direction: column;
	width: 100%;
	row-gap: 140px;
}

.rpcg-scroll-item {
	opacity: 0.35;
	transition: opacity 0.4s ease;
}

.rpcg-scroll-item.rpcg-item-active {
	opacity: 1;
}

.rpcg-scroll-item-inner {
	display: flex;
	align-items: flex-start;
}

.rpcg-scroll-number {
	flex: 0 0 70px;
	max-width: 70px;
	line-height: 1;
	transition: color 0.4s ease;
}

.rpcg-scroll-text {
	flex: 1;
	min-width: 0;
}

.rpcg-scroll-title {
	margin: 0 0 14px 0;
	transition: color 0.4s ease;
}

.rpcg-scroll-description {
	margin: 0;
	transition: color 0.4s ease;
}

/* ---------- Per-item button ---------- */

.rpcg-scroll-button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
	padding: 16px 20px;
	background-color: #e9e9e7;
	color: #1a1a1a;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}

.rpcg-scroll-button-text {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.rpcg-scroll-button-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 0;
}

.rpcg-scroll-button-icon svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.rpcg-scroll-button-icon i {
	font-size: 18px;
}

/* Mobile-only inline image, hidden on desktop */

.rpcg-scroll-mobile-image {
	display: none;
	width: 100%;
	object-fit: cover;
	object-position: center center;
}

/* ---------- Mobile layout (below 1025px) ---------- */

@media (max-width: 1024px) {

	.rpcg-scroll-list {
		flex-direction: column;
		column-gap: 0;
	}

	.rpcg-scroll-image-col {
		display: none;
	}

	.rpcg-scroll-content-col {
		width: 100%;
	}

	.rpcg-scroll-item {
		opacity: 1;
	}

	.rpcg-scroll-mobile-image {
		display: block;
		margin-bottom: 20px;
	}
}
