/* -------------------------------------------------------------
   Work Feed — work posts with stats bar + landscape image
   Selectors scoped under .block__work-feed (WP inlines block CSS
   before the main stylesheet, so grid/global rules win otherwise)
   ------------------------------------------------------------- */

.block__work-feed .block__work-feed__intro {
	margin-bottom: 4rem;
}

/* "View all work" — centred beneath the grid */
.block__work-feed .block__work-feed__footer {
	align-items: center;
	margin-top: 4rem;

	.button {
		margin-top: 0; /* the footer handles the spacing */
	}
}

.block__work-feed .block__work-feed__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4rem;

	@media (min-width: 1200px) {
		grid-template-columns: repeat(2, 1fr);
		gap: 5rem 6rem;
	}
}

/* Related section on singles shows 3 across */
.single__related.block__work-feed .block__work-feed__grid {
	@media (min-width: 1024px) {
		grid-template-columns: repeat(3, 1fr);
		gap: 4rem 3rem;
	}
}

.block__work-feed .block__work-feed__card {
	display: block;
	text-decoration: none;
}

/* Info bar */
.block__work-feed .block__work-feed__bar {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1.6rem 2rem;
	margin-bottom: 1.2rem;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
}

.block__work-feed .block__work-feed__bar-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 2rem;
}

/* Work cards carry no stats line, so the bottom row holds the arrow alone —
   space-between would strand it on the left. */
.block__work-feed .block__work-feed__bar-row--end {
	justify-content: flex-end;
}

.block__work-feed .block__work-feed__title {
	margin: 0;
	color: var(--lightest);
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.2;
}

.block__work-feed .block__work-feed__year {
	color: var(--lightest);
	font-size: 1.6rem;
	font-weight: 700;
	white-space: nowrap;
}

.block__work-feed .block__work-feed__stats {
	margin: 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 1.5rem;

	strong {
		color: var(--lightest);
		font-weight: 700;
	}
}

.block__work-feed .block__work-feed__arrow {
	flex-shrink: 0;
	align-self: flex-end;
	width: 1.4rem;
	height: 1.4rem;
	color: var(--primary);
	rotate: 45deg; /* rests pointing bottom-right, matching the buttons */
	transition: rotate 300ms var(--cubic);
}

.block__work-feed .block__work-feed__card:hover .block__work-feed__arrow {
	rotate: 0deg;
}

/* Placeholder for posts with no featured image */
.block__work-feed .block__work-feed__image--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1a1a1a;
}

.block__work-feed .image-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.25);
}

.block__work-feed .image-placeholder svg {
	width: 4.8rem;
	height: 4.8rem;
}

/* Image */
.block__work-feed .block__work-feed__image {
	position: relative;
	aspect-ratio: 16 / 10;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	overflow: hidden;

	img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		opacity: 0.85;
		transform: scale(1);
		transition: opacity 500ms var(--cubic), transform 700ms var(--cubic);
	}
}

.block__work-feed .block__work-feed__card:hover .block__work-feed__image img {
	opacity: 1;
	transform: scale(1.06);
}

/* Hover panel — slides down from the top, excerpt fades in */
.block__work-feed .block__work-feed__panel {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	padding: 3rem;
	background: rgba(17, 24, 32, 0.8);
	transform: translateY(-100%);
	transition: transform 500ms var(--cubic);
}

.block__work-feed .block__work-feed__excerpt {
	margin: 0;
	color: var(--lightest);
	font-size: 2.2rem;
	line-height: 1.3;
	opacity: 0;
	transition: opacity 400ms var(--cubic) 150ms;
}

.block__work-feed .block__work-feed__card:hover .block__work-feed__panel {
	transform: translateY(0);
}

.block__work-feed .block__work-feed__card:hover .block__work-feed__excerpt {
	opacity: 1;
}

.block__work-feed .block__work-feed__panel-arrow {
	position: absolute;
	right: 3rem;
	bottom: 3rem;
	width: 2.4rem;
	height: 2.4rem;
	color: var(--primary);
	rotate: 45deg; /* diagonal, pointing bottom-right */
	opacity: 0;
	transition: opacity 400ms var(--cubic) 150ms;
}

.block__work-feed .block__work-feed__card:hover .block__work-feed__panel-arrow {
	opacity: 1;
}

/* Light background variants — flip the bar/text colours */
.block__work-feed.block__bg--white .block__work-feed__bar {
	background: rgba(17, 24, 32, 0.04);
	border-color: rgba(17, 24, 32, 0.1);
}

.block__work-feed.block__bg--white .block__work-feed__title,
.block__work-feed.block__bg--white .block__work-feed__year,
.block__work-feed.block__bg--white .block__work-feed__stats strong {
	color: var(--darkest);
}

.block__work-feed.block__bg--white .block__work-feed__stats {
	color: rgba(17, 24, 32, 0.5);
}

.block__work-feed.block__bg--white .block__work-feed__image {
	border-color: rgba(17, 24, 32, 0.1);
}
