/* Natige — recipes rail.
   One scroll-snapping row instead of the masonry grid, with the category chips
   above it doubling as the filter. */

.recipe-cats {
	--recipe-blue: #0064b0;
	--recipe-lime: #8dc331;
	margin: 0 0 32px;
	padding: 16px 8px 8px;
	background: rgba(255, 255, 255, 0.94);
	border-radius: 24px;
}

.recipe-cats__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.recipe-cats__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 108px;
	padding: 4px 8px 8px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.recipe-cats__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 80px;
	color: var(--recipe-blue);
	transition: color 180ms ease, transform 180ms ease;
}

.recipe-icon {
	width: 80px;
	height: 80px;
	display: block;
}

.recipe-icon__blob {
	fill: #f3efe4;
	transition: fill 180ms ease;
}

.recipe-cats__label {
	max-width: 9em;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	color: #343a40;
}

.recipe-cats__item:hover .recipe-cats__mark,
.recipe-cats__item.is-active .recipe-cats__mark {
	color: var(--recipe-lime);
	transform: translateY(-2px);
}

.recipe-cats__item.is-active .recipe-icon__blob {
	fill: #eaf6c9;
}

.recipe-cats__item:hover .recipe-cats__label,
.recipe-cats__item.is-active .recipe-cats__label {
	color: var(--recipe-blue);
}

.recipe-cats__item:active .recipe-cats__mark {
	transform: translateY(0) scale(0.97);
}

.recipe-cats__item:focus-visible {
	outline: 2px solid var(--recipe-lime);
	outline-offset: 4px;
	border-radius: 12px;
}

.recipe-page {
	padding-bottom: 80px;
	background:
		radial-gradient(1200px 420px at 50% -80px, rgba(141, 195, 49, 0.12), transparent 70%),
		#fbfaf6;
}

.recipe-page__head {
	text-align: center;
	padding: 24px 0 8px;
}

.recipe-page__eyebrow {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--recipe-lime, #8dc331);
}

.recipe-page__title {
	margin: 0 0 24px;
	font-size: 36px;
	font-weight: 700;
	line-height: 1.15;
	color: #0064b0;
}

.recipe-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px 24px;
	margin: 0;
	padding: 0 0 16px;
	list-style: none;
}

.recipe-card__body {
	display: block;
	margin-top: 14px;
}

.recipe-card__facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 10px;
	color: rgba(52, 58, 64, 0.72);
}

.recipe-card__fact {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	color: rgba(52, 58, 64, 0.72);
}

.recipe-card__fact + .recipe-card__fact {
	padding-left: 16px;
	border-left: 1px solid rgba(52, 58, 64, 0.16);
}

.recipe-grid__item[hidden],
.recipe-rail__item[hidden] {
	display: none !important;
}

.recipe-card__fact .recipe-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	color: #0064b0;
}

.recipe-card__title {
	display: block;
	margin-top: 0;
}

@media (max-width: 991.98px) {
	.recipe-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 16px;
	}
	.recipe-page__title {
		font-size: 28px;
	}
	.recipe-cats__item {
		min-width: 92px;
	}
}

@media (max-width: 575.98px) {
	.recipe-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.recipe-cats__list {
		justify-content: flex-start;
	}
}

/* translate-top-200 shifts the row up without shrinking its layout box, which
   left 200px of dead space once the grid became a single row. Applied to the
   inner wrapper regardless of $dest, because the homepage path is not always '/'. */
.section-background-3 > .px-xl-2.translate-top-200,
.recipe-rail-section {
	margin-bottom: -200px;
}

.recipe-rail {
	position: relative;
	--rail-gap: 30px;
	--rail-cols: 4;
	--rail-ease: cubic-bezier(0.35, 0, 0.14, 1);
}

.recipe-rail__track {
	display: flex;
	gap: var(--rail-gap);
	margin: 0;
	padding: 0 0 18px;
	list-style: none;
	overflow-x: auto;
	overflow-y: hidden;
	/* Proximity, not mandatory: snapping must not fight the arrow paging, which
	   scrolls to a card's own offset. */
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-color: rgba(52, 58, 64, 0.28) transparent;
	scrollbar-width: thin;
}
.recipe-rail__track::-webkit-scrollbar {
	height: 4px;
}
.recipe-rail__track::-webkit-scrollbar-track {
	background: rgba(52, 58, 64, 0.08);
	border-radius: 4px;
}
.recipe-rail__track::-webkit-scrollbar-thumb {
	background: rgba(52, 58, 64, 0.28);
	border-radius: 4px;
}

.recipe-rail__item {
	flex: 0 0 auto;
	width: calc(
		(100% - (var(--rail-cols) - 1) * var(--rail-gap)) / var(--rail-cols)
	);
	scroll-snap-align: start;
}

.recipe-rail--filtered .recipe-rail__item:not([hidden]) {
	animation: recipe-rail-in 0.45s var(--rail-ease) both;
}

@keyframes recipe-rail-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.recipe-card,
.recipe-card:hover,
.recipe-card:focus,
.recipe-card:focus-visible {
	display: block;
	color: #343a40;
	text-decoration: none;
}

.recipe-card__media {
	position: relative;
	display: block;
	padding-top: 62%;
	overflow: hidden;
	border-radius: 12px;
	background-color: #f4f6f4;
}

/* Carries the white tag text over whatever the photo puts behind it */
.recipe-card__media::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 55%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
	transition: opacity 0.6s var(--rail-ease);
}

.recipe-card__img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1);
	transition: transform 0.9s var(--rail-ease);
}

.recipe-card__tag {
	position: absolute;
	right: 16px;
	bottom: 14px;
	z-index: 2;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--white);
	transition: opacity 0.4s var(--rail-ease), transform 0.5s var(--rail-ease);
}

.recipe-card__more {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 600;
	color: var(--white);
	transform: translateY(-50%) translateY(14px);
	opacity: 0;
	transition: transform 0.55s var(--rail-ease), opacity 0.4s var(--rail-ease);
}
.recipe-card__more i {
	color: var(--primary);
}

.recipe-card__title {
	display: block;
	margin-top: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--dark);
	transition: color 0.4s var(--rail-ease);
}

.recipe-card:hover .recipe-card__img,
.recipe-card:focus-visible .recipe-card__img {
	transform: scale(1.06);
}
.recipe-card:hover .recipe-card__media::after,
.recipe-card:focus-visible .recipe-card__media::after {
	opacity: 0.85;
}
.recipe-card:hover .recipe-card__title,
.recipe-card:focus-visible .recipe-card__title {
	color: var(--primary);
}
.recipe-card:focus-visible .recipe-card__media {
	outline: 2px solid var(--primary);
	outline-offset: 4px;
}

.recipe-rail__nav {
	position: absolute;
	top: calc(36% - 22px);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--white);
	color: var(--dark);
	box-shadow: 0 10px 30px rgba(52, 58, 64, 0.18);
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.recipe-rail__nav i {
	font-size: 24px;
	line-height: 1;
}
.recipe-rail__nav--prev {
	left: -14px;
}
.recipe-rail__nav--next {
	right: -14px;
}
.recipe-rail__nav:hover {
	background-color: var(--primary);
	color: var(--white);
}
.recipe-rail__nav:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 3px;
}
.recipe-rail__nav[disabled] {
	opacity: 0;
	pointer-events: none;
}

.recipe-rail__empty {
	margin: 24px 0 0;
	text-align: center;
	font-size: 17px;
	color: var(--dark);
}

@media (max-width: 1199.98px) {
	.recipe-rail {
		--rail-cols: 3;
		--rail-gap: 24px;
	}
}

@media (max-width: 767.98px) {
	.recipe-rail {
		--rail-cols: 2;
		--rail-gap: 18px;
	}
	.recipe-card__title {
		font-size: 15px;
	}
	/* No hover on touch, so the tag has to stay put */
	.recipe-card__more {
		display: none;
	}
	.recipe-rail__nav {
		display: none;
	}
}

@media (max-width: 479.98px) {
	.recipe-rail {
		/* A fraction of a card peeks in to advertise the scroll */
		--rail-cols: 1.25;
	}
}

@media (prefers-reduced-motion: reduce) {
	.recipe-rail__track {
		scroll-behavior: auto;
	}
	.recipe-rail--filtered .recipe-rail__item:not([hidden]) {
		animation: none;
	}
	.recipe-card__img,
	.recipe-card__tag,
	.recipe-card__more,
	.recipe-card__title {
		transition: none;
	}
}
