.boco-fa {
	--bfa-orange: var(--Orange-500, #ff6400);
	--bfa-radius: var(--border-radius-m, 20px);
	--bfa-gap-x: 40px;
	width: 100%;
}

/* Toolbar */
.boco-fa__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 64px;
}

.boco-fa__filters {
	display: flex;
	align-items: center;
	gap: 16px;
}

.boco-fa .boco-fa__pill {
	display: inline-flex;
	align-items: center;
	gap: 8.79px;
	padding: 8px 17.58px;
	border: 1px solid var(--Grey-900, #616161);
	border-radius: 20px;
	background: transparent;
	color: #414141;
	font: 500 14px/normal Montserrat, sans-serif;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
}

.boco-fa .boco-fa__pill.is-active {
	border-color: var(--bfa-orange);
	background: var(--bfa-orange);
	color: #fff;
}

.boco-fa .boco-fa__pill:focus-visible,
.boco-fa .boco-fa__layout:focus-visible,
.boco-fa__menu li:focus-visible,
.boco-fa__link:focus-visible {
	outline: 2px solid var(--Grey-1000, #262625);
	outline-offset: 2px;
}

.boco-fa__chevron,
.boco-fa__layout,
.boco-fa__cta-arrow {
	background-color: currentColor;
	-webkit-mask: var(--bfa-icon) center / contain no-repeat;
	mask: var(--bfa-icon) center / contain no-repeat;
}

.boco-fa__chevron {
	--bfa-icon: url("../img/icon-chevron.svg");
	width: 8.36px;
	height: 5.07px;
}

.boco-fa__trigger[aria-expanded="true"] .boco-fa__chevron {
	transform: rotate(180deg);
}

.boco-fa__dropdown {
	position: relative;
}

.boco-fa__menu {
	position: absolute;
	z-index: 20;
	top: calc(100% + 8px);
	left: 0;
	min-width: 100%;
	margin: 0;
	padding: 8px;
	list-style: none;
	border: 1px solid var(--Divider, #bec0bb);
	border-radius: var(--border-radius-s, 12px);
	background: var(--White, #fff);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.boco-fa__menu[hidden] {
	display: none;
}

.boco-fa__menu li {
	padding: 8px 12px;
	border-radius: var(--border-radius-xs, 8px);
	color: #414141;
	font: 500 14px/normal Montserrat, sans-serif;
	white-space: nowrap;
	cursor: pointer;
}

.boco-fa__menu li:hover,
.boco-fa__menu li:focus {
	background: var(--Grey-200, #f2f3f0);
	outline: none;
}

.boco-fa__menu li[aria-selected="true"] {
	font-weight: 700;
}

/* Layout toggle */
.boco-fa__layouts {
	display: flex;
	margin-left: auto;
	align-items: center;
	gap: 12px;
}

.boco-fa .boco-fa__layout {
	width: 30px;
	height: 29px;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: var(--Grey-600, #bec0bb);
	cursor: pointer;
}

.boco-fa .boco-fa__layout[aria-pressed="true"] {
	background-color: var(--Grey-1000, #262625);
}

.boco-fa .boco-fa__layout:not([aria-pressed="true"]) {
	background-color: var(--Grey-600, #bec0bb);
}

.boco-fa__layout--featured {
	--bfa-icon: url("../img/icon-layout-featured.svg");
	width: 28px;
	height: 28px;
}

.boco-fa__layout--grid {
	--bfa-icon: url("../img/icon-layout-grid.svg");
}

/* Cards */
.boco-fa__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px 20px;
}

.boco-fa[data-layout="grid"] .boco-fa__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--bfa-gap-x);
}

.boco-fa__item {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: var(--bfa-radius);
	overflow: clip;
	view-transition-class: boco-fa;
}

.boco-fa__item[hidden] {
	display: none;
}

.boco-fa[data-layout="grid"] .boco-fa__item {
	aspect-ratio: 400 / 500.5;
}

.boco-fa[data-layout="featured"] .boco-fa__item.is-featured {
	grid-column: 1 / -1;
	aspect-ratio: 1280 / 731.43;
}

.boco-fa .boco-fa__item > .elementor,
.boco-fa .boco-fa__item > .elementor > .e-con {
	height: 100% !important;
}

/* The carousel caps its card at 4:5 / 500px; here the grid decides the card size */
.elementor .boco-fa__item .case-study-card {
	max-height: none;
	aspect-ratio: auto;
}

/* Hover video fills the card. Lives here (not in the template's custom CSS) because Elementor prints
   that CSS inline with ">" escaped, which invalidates the rule. */
.boco-fa .boco-fa__item .case-study-video,
.boco-fa .boco-fa__item .case-study-video > .elementor-widget-container,
.boco-fa .boco-fa__item .case-study-video .elementor-wrapper {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

.boco-fa .boco-fa__item .case-study-video video,
.boco-fa .boco-fa__item .case-study-video img.tile-poster {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: var(--pos, center);
}

/* The full-card link sits above the card, so hover is driven from the item */
.boco-fa__item:hover .card-arrow {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

/* Featured image fills the card (the template's media wrapper is absolutely positioned) */
.boco-fa .boco-fa__item .case-study-media .elementor-widget-theme-post-featured-image {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100%;
	max-width: none;
}

.boco-fa .boco-fa__item .case-study-media .elementor-widget-theme-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Featured cards lead in the featured layout */
.boco-fa[data-layout="featured"] .boco-fa__item.is-featured {
	order: -1;
}

.boco-fa__link {
	position: absolute;
	inset: 0;
	z-index: 3;
	border-radius: var(--bfa-radius);
}

/* Featured "View Full Case Study" pill */
.boco-fa__cta {
	display: none;
	position: absolute;
	z-index: 2;
	right: 48px;
	bottom: 48px;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 257px;
	padding: 24px var(--scale-32, 32px);
	border: 1px solid #fff;
	border-radius: 100px;
	color: #fff;
	font: 600 16px/1.2 Montserrat, sans-serif;
	white-space: nowrap;
}

.boco-fa__cta-arrow {
	--bfa-icon: url("../img/icon-arrow.svg");
	width: 20px;
	height: 17px;
}

.boco-fa[data-layout="featured"] .boco-fa__item.is-featured .boco-fa__cta {
	display: flex;
}

@media (min-width: 1025px) {
	.boco-fa[data-layout="featured"] .boco-fa__item.is-featured .case-study-title .elementor-heading-title {
		font-size: 36px;
		letter-spacing: -0.72px;
	}

	/* keep long titles clear of the button */
	.boco-fa[data-layout="featured"] .boco-fa__item.is-featured .case-study-title-row {
		max-width: calc(100% - 305px);
	}
}

/* The template's hover arrow is replaced by the pill on the featured card */
.boco-fa[data-layout="featured"] .boco-fa__item.is-featured .card-arrow {
	display: none;
}

/* Layout / filter animation (View Transitions; browsers without support switch instantly) */
::view-transition-group(.boco-fa) {
	animation-duration: 0.55s;
	animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
	border-radius: 20px;
	overflow: clip;
}

::view-transition-old(.boco-fa),
::view-transition-new(.boco-fa) {
	height: 100%;
	object-fit: cover;
}

@media (max-width: 1024px) {
	/* the title runs the full card width here, so the button moves to the free top-right corner */
	.boco-fa__cta {
		top: 24px;
		right: 24px;
		bottom: auto;
		width: auto;
		padding: 12px 20px;
		font-size: 14px;
	}

	.boco-fa[data-layout="grid"] .boco-fa__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.boco-fa__toolbar {
		padding-bottom: 40px;
	}
}

@media (max-width: 640px) {
	.boco-fa__layouts {
		display: none;
	}

	.boco-fa__grid,
	.boco-fa[data-layout="grid"] .boco-fa__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.boco-fa__item,
	.boco-fa[data-layout="grid"] .boco-fa__item,
	.boco-fa[data-layout="featured"] .boco-fa__item.is-featured {
		aspect-ratio: 400 / 500.5;
	}

	.boco-fa__cta {
		display: none !important;
	}
}
