/* layout */
.work-scroll-block {
	padding: 40px 0 140px;
}

.container {
	max-width: 1350px;
	margin: 0 auto;
	margin-top: 10rem;
}

/* give the section enough scroll length for sticky stacking */
.work-collection {
	position: relative;
}

/* sticky cards */
.work-card {
	position: sticky;
	top: calc(180px + (var(--i) * 18px));
	margin: 0 auto 28px;
	border-radius: 28px;
	transform-origin: 50% 80%;
	will-change: transform;
}

/* intro card */
.work-card--intro {
	display: grid;
	place-items: center;
	min-height: 60vh;
	padding: 64px 48px;
	border-radius: 28px;
	margin-bottom: 120px;
}

.work-card--intro .intro-content {
	max-width: 720px;
	text-align: center;
}

.work-card--intro h2 {
	margin: 0 0 16px;
	font-size: clamp(36px, 6vw, 64px);
	letter-spacing: -0.02em;
}

.card-title h2 {
	font-family: "Dongle", sans-serif;
	font-size: 3rem;
	color: #fff;
}

.card-sub p {
	font-family: "Montserrat", system-ui, sans-serif;
	font-size: 18px;
	font-weight: bold;
	color: var(--accent);
}

.work-card--intro p {
	margin: 0;
	font-size: 18px;
	line-height: 1.6;
	opacity: 0.85;
}

/* media */
.work-media {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.work-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.work-media::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1; /* overlay layer */
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 20%,
		rgba(0, 0, 0, 0.1) 40%,
		rgba(0, 0, 0, 0.35) 70%,
		rgba(0, 0, 0, 0.85) 100%
	);
}

/* meta should be ABOVE overlay */
.card-meta {
	display: flex;
	position: absolute;
	left: 18px;
	right: 18px;
	top: 18px;
	padding: 14px 16px;
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.14);
	z-index: 2; /* <-- add this */
}

/* meta */
.work-meta {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 16px 6px 2px;
}

.title {
	font-size: 20px;
}
.tag {
	font-size: 14px;
}

/* make sure intro has no media */
.work-card--intro .work-media {
	display: none;
}

.actives {
	box-shadow: 0 40px 80px rgba(0, 0, 0, 0.65);
	transition:
		box-shadow 0.35s ease,
		transform 0.35s ease;
}

.actives:hover {
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.work-media {
	position: relative;
	overflow: hidden; /* clip gradient netjes in card */
}

.work-media::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;

	/* radial gradient: midden transparant → randen donker */
	background: radial-gradient(
		circle at center,
		rgba(0, 0, 0, 0) 55%,
		rgba(0, 0, 0, 0.5) 75%,
		rgba(0, 0, 0, 0.9) 100%
	);

	z-index: 1; /* boven image */
}

.work-media img {
	position: relative;
	z-index: 0;
}

.card-meta {
	position: absolute;
	z-index: 2; /* boven gradient */
}

.clickme {
	padding: 8px 12px;
	cursor: pointer;

	align-self: center;

	margin-left: auto; /* ⬅️ duwt dit item naar rechts */
}
.clickme a {
	text-decoration: none;
	color: #fff;
}

/* Mobile: make cards static while scrolling and improve layout for small screens */
@media (max-width: 600px) {
	/* disable sticky stacking on small screens so cards scroll naturally */
	.work-card {
		position: static !important;
		top: auto !important;
		margin: 0 0 20px;
		border-radius: 12px;
		transform: none !important;
		will-change: auto;
	}

	/* Make intro card more compact */
	.work-card--intro {
		min-height: auto;
		padding: 28px 20px;
		margin-bottom: 40px;
		border-radius: 12px;
	}

	/* media should be slightly taller and full width on mobile */
	.work-media {
		aspect-ratio: 4 / 3;
		border-radius: 12px;
	}

	/* keep card-meta visible ON the media: absolute with higher z-index
	   keep work-meta relative for layout blocks that sit below media */
	.card-meta {
		position: absolute;
		left: 12px;
		right: 12px;
		top: 12px;
		margin: 0;
		padding: 10px 12px;
		border-radius: 10px;
		background: rgba(0, 0, 0, 0.45);
		border: 1px solid rgba(255, 255, 255, 0.06);
		z-index: 3; /* above the media overlay */
		display: flex;
		gap: 8px;
		align-items: center;
	}

	.work-meta {
		position: relative;
		margin: 10px 12px 0 12px;
		padding: 10px 12px;
		border-radius: 10px;
		background: rgba(0, 0, 0, 0.35);
		border: 1px solid rgba(255, 255, 255, 0.06);
	}

	/* slightly larger, more readable type on touch devices */
	.title {
		font-size: 1.25rem;
	}
	.tag {
		font-size: 0.95rem;
	}

	/* reduce container padding on small screens */
	.container {
		padding: 0 12px;
	}

	/* tighten overall spacing */
	.work-scroll-block {
		padding: 20px 0 80px;
	}
}
