/**
 * RSW S-Worx Case Studies
 * Values measured from the live site on 25 Sep 2026 (docs/measurements.md).
 * Breakpoints follow Beaver Builder: medium <= 992px, responsive <= 768px.
 */

.sworx-cs-grid,
.sworx-cs-filter,
.sworx-cs-hero,
.sworx-cs-story,
.sworx-cs-facts,
.sworx-cs-buttons,
.sworx-cs-gallery {
	--sworx-cs-cyan: #0fbbb1;
	--sworx-cs-cyan-hover: #0ea098;
	--sworx-cs-cyan-dark: #0ca098;
	--sworx-cs-ink: #0d1127;
	--sworx-cs-heading: #0a0d1f;
	--sworx-cs-text: #5c6672;
	--sworx-cs-display: "Space Grotesk", sans-serif;
}

.sworx-cs-grid *,
.sworx-cs-filter *,
.sworx-cs-hero *,
.sworx-cs-story *,
.sworx-cs-facts *,
.sworx-cs-buttons *,
.sworx-cs-gallery *,
.sworx-cs-lb * {
	box-sizing: border-box;
}

.sworx-cs-grid a:focus-visible,
.sworx-cs-filter .sworx-cs-filter__btn:focus-visible,
.sworx-cs-hero a:focus-visible,
.sworx-cs-story a:focus-visible,
.sworx-cs-buttons a:focus-visible,
.sworx-cs-gallery a:focus-visible {
	outline: 2px solid var(--sworx-cs-cyan);
	outline-offset: 2px;
}

.sworx-cs-buttons .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------
 * Grid and cards
 * ---------------------------------------------------------------- */

.sworx-cs-grid {
	display: grid;
	grid-template-columns: repeat(var(--sworx-cs-cols, 3), minmax(0, 1fr));
	gap: 30px 20px;
}

.sworx-cs-card {
	position: relative;
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 0 0 30px;
	background: #fff;
	border-radius: 16px;
	transition: transform 0.3s ease, filter 0.3s ease;
}

.sworx-cs-card:hover {
	transform: translateY(-4px);
	filter: drop-shadow(0 4px 4px rgba(13, 17, 39, 0.14));
}

.sworx-cs-card__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 16px;
}

.sworx-cs-card__thumb {
	margin: 0 0 18px;
	line-height: 0;
}

.sworx-cs-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 16px 16px 0 0;
}

.sworx-cs-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
}

.sworx-cs-card__body a {
	position: relative;
	z-index: 2;
}

.sworx-cs-card .sworx-cs-pill {
	display: inline-block;
	margin: 0 20px 12px;
	padding: 5px 15px;
	font-family: var(--sworx-cs-display);
	font-size: 10px;
	font-weight: 700;
	line-height: 17px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--sworx-cs-cyan-dark);
	background: #e6faf9;
	border-radius: 50px;
}

.sworx-cs-card .sworx-cs-card__title {
	margin: 0 20px 10px;
	padding: 0;
	font-family: var(--sworx-cs-display);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	color: var(--sworx-cs-heading);
}

.sworx-cs-card .sworx-cs-card__title {
	overflow-wrap: break-word;
	hyphens: auto;
}

.sworx-cs-card .sworx-cs-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s linear;
}

.sworx-cs-card .sworx-cs-card__title a:hover {
	color: var(--sworx-cs-cyan-hover);
	text-decoration: none;
}

.sworx-cs-card .sworx-cs-card__summary {
	margin: 0 20px 22px;
	font-size: 15px;
	line-height: 24px;
	color: #5f6573;
}

.sworx-cs-card .sworx-cs-card__btn {
	display: inline-block;
	margin: auto 20px 10px;
	padding: 12px 26px;
	font-family: var(--sworx-cs-display);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--sworx-cs-ink);
	text-decoration: none;
	background: var(--sworx-cs-cyan);
	border: 0;
	border-radius: 6px;
	transition: all 0.2s linear;
}

.sworx-cs-card .sworx-cs-card__btn:hover,
.sworx-cs-card .sworx-cs-card__btn:focus {
	color: var(--sworx-cs-ink);
	text-decoration: none;
	background: var(--sworx-cs-cyan-dark);
}

/* ------------------------------------------------------------------
 * Grid filter (filter="on")
 * ---------------------------------------------------------------- */

.sworx-cs-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 30px;
}

.sworx-cs-filter .sworx-cs-filter__label {
	margin: 0 6px 0 0;
	font-family: var(--sworx-cs-display);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sworx-cs-heading);
}

.sworx-cs-filter .sworx-cs-filter__btn {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 8px 18px;
	font-family: var(--sworx-cs-display);
	font-size: 12px;
	font-weight: 700;
	line-height: 17px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--sworx-cs-cyan-dark);
	background: #e6faf9;
	border: 0;
	border-radius: 50px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.sworx-cs-filter .sworx-cs-filter__btn:hover {
	color: var(--sworx-cs-cyan-dark);
	background: #c9f3f0;
}

.sworx-cs-filter .sworx-cs-filter__btn[aria-pressed="true"] {
	color: #fff;
	background: var(--sworx-cs-cyan);
}

.sworx-cs-filterable .sworx-cs-grid {
	position: relative;
	align-content: start;
}

/* While the grid eases to its new height, cards outside it stay hidden rather than overlap what follows. */
.sworx-cs-filterable .sworx-cs-grid.is-resizing {
	overflow-x: visible;
	overflow-y: clip;
}

.sworx-cs-grid .sworx-cs-card[hidden] {
	display: none;
}

/* A card fading out after a filter change, held at its old spot out of the flow. */
.sworx-cs-grid .sworx-cs-card.is-leaving {
	position: absolute;
	z-index: 0;
	margin: 0;
	pointer-events: none;
}

/* Narrow cards (5 or 6 columns): tighter type and insets so long words and pills fit. */
@container (max-width: 240px) {
	.sworx-cs-card .sworx-cs-pill {
		margin: 0 14px 10px;
		padding: 4px 10px;
		font-size: 9px;
		letter-spacing: 1.2px;
		white-space: normal;
	}

	.sworx-cs-card .sworx-cs-card__title {
		margin: 0 14px 8px;
		font-size: 17px;
	}

	.sworx-cs-card .sworx-cs-card__summary {
		margin: 0 14px 18px;
		font-size: 14px;
		line-height: 22px;
	}

	.sworx-cs-card .sworx-cs-card__btn {
		margin: auto 14px 6px;
		padding: 10px 18px;
		font-size: 13px;
	}
}

.sworx-cs-empty {
	padding: 20px;
	text-align: center;
	border: 1px dashed #c3c4c7;
}

@media (max-width: 992px) {
	.sworx-cs-grid {
		grid-template-columns: repeat(var(--sworx-cs-cols-md, 3), minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.sworx-cs-filter {
		gap: 8px;
	}

	.sworx-cs-filter .sworx-cs-filter__label {
		flex: 0 0 100%;
		margin: 0 0 2px;
	}

	.sworx-cs-filter .sworx-cs-filter__btn {
		padding: 7px 14px;
		font-size: 11px;
		letter-spacing: 1.5px;
	}

	.sworx-cs-grid {
		grid-template-columns: repeat(var(--sworx-cs-cols-sm, 1), minmax(0, 1fr));
		gap: 40px 20px;
	}

	.sworx-cs-grid--sm-1 .sworx-cs-card {
		justify-self: center;
		width: 100%;
		max-width: 360px;
	}

	.sworx-cs-card .sworx-cs-pill {
		line-height: 14.5px;
	}

	.sworx-cs-card .sworx-cs-card__title {
		font-size: 20px;
	}

	.sworx-cs-card .sworx-cs-card__btn {
		margin-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sworx-cs-card,
	.sworx-cs-gallery .sworx-cs-gallery__img {
		transition: none;
	}

	.sworx-cs-card:hover,
	.sworx-cs-gallery .sworx-cs-gallery__item:hover .sworx-cs-gallery__img {
		transform: none;
	}
}

/* ------------------------------------------------------------------
 * Single: hero
 * ---------------------------------------------------------------- */

.sworx-cs-hero {
	position: relative;
	padding: 116px 20px 84px;
	color: #fff;
	background-color: var(--sworx-cs-ink);
	background-image:
		linear-gradient(135deg, rgba(13, 17, 39, 0.9) 0%, rgba(13, 17, 39, 0.72) 100%),
		var(--sworx-cs-hero-bg, none);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

.sworx-cs-hero__inner {
	max-width: 1260px;
	margin: 0 auto;
}

.sworx-cs-hero__text {
	width: 51.75%;
}

.sworx-cs-hero .sworx-cs-hero__back,
.sworx-cs-hero .sworx-cs-hero__eyebrow {
	margin: 0 20px 18px;
	font-family: var(--sworx-cs-display);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.7;
	letter-spacing: 2.2px;
	text-transform: uppercase;
}

.sworx-cs-hero .sworx-cs-hero__back a {
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
}

.sworx-cs-hero .sworx-cs-hero__back a:hover {
	color: rgba(255, 255, 255, 0.6);
	text-decoration: underline;
}

.sworx-cs-hero .sworx-cs-hero__eyebrow {
	margin-bottom: 6px;
	color: var(--sworx-cs-cyan);
}

.sworx-cs-hero .sworx-cs-hero__title {
	margin: 0 20px 22px;
	padding: 0;
	font-family: var(--sworx-cs-display);
	font-size: 50px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02px;
	color: #fff;
	text-wrap: pretty;
}

.sworx-cs-hero .sworx-cs-hero__intro {
	margin: 0 20px 34px;
	font-size: 19px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.8);
	text-wrap: pretty;
}

/* Facts */

.sworx-cs-facts {
	display: flex;
	margin: 0;
	padding: 0;
}

/* Items carry no side spacing, so the flex shares equal BB's column widths (20% x 5, or 25/25/50
   with Scope). The 20px inset sits on the label and value, and the cyan rule is drawn to match. */
.sworx-cs-facts__item {
	flex: 1 1 0;
	min-width: 0;
	max-width: 25%; /* Five share the row at 20% each; fewer stop at a quarter, as on the live pages. */
	padding: 12px 0 0;
	background: linear-gradient(var(--sworx-cs-cyan), var(--sworx-cs-cyan)) 20px 0 / calc(100% - 40px) 2px no-repeat;
}

.sworx-cs-facts__item--wide {
	flex-grow: 2;
	max-width: 50%;
}

.sworx-cs-facts .sworx-cs-facts__label {
	margin: 0 20px 4px;
	font-family: var(--sworx-cs-display);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.7;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}

.sworx-cs-facts .sworx-cs-facts__value {
	margin: 0 20px;
	font-family: var(--sworx-cs-display);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.7;
	color: #fff;
}

/* Buttons */

.sworx-cs-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px 30px;
	margin: 36px 20px 35px;
}

.sworx-cs-buttons .sworx-cs-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 20px;
	font-family: var(--sworx-cs-display);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	border: 2px solid transparent;
	border-radius: 6px;
	transition: all 0.2s linear;
}

.sworx-cs-buttons .sworx-cs-btn:hover,
.sworx-cs-buttons .sworx-cs-btn:focus {
	text-decoration: none;
}

.sworx-cs-buttons .sworx-cs-btn--primary,
.sworx-cs-buttons .sworx-cs-btn--primary:hover,
.sworx-cs-buttons .sworx-cs-btn--primary:focus {
	color: #0c1127;
}

.sworx-cs-buttons .sworx-cs-btn--primary {
	background: var(--sworx-cs-cyan);
	border-color: #03afa5;
}

.sworx-cs-buttons .sworx-cs-btn--primary:hover {
	background: var(--sworx-cs-cyan-hover);
}

/* Font Awesome PDF icon, sized as on the live button (the 8px gap comes from the button). */
.sworx-cs-buttons .sworx-cs-btn .fl-button-icon {
	flex: none;
	margin: 0;
	font-size: 22.1px;
	line-height: 1;
	color: inherit;
}

.sworx-cs-buttons .sworx-cs-btn--outline,
.sworx-cs-buttons .sworx-cs-btn--outline:hover,
.sworx-cs-buttons .sworx-cs-btn--outline:focus {
	color: #fff;
}

.sworx-cs-buttons .sworx-cs-btn--outline {
	padding: 13px 55px;
	background: transparent;
	border-color: rgba(255, 255, 255, 0.56);
}

.sworx-cs-buttons .sworx-cs-btn--outline:hover {
	background: var(--sworx-cs-heading);
	border-color: var(--sworx-cs-cyan);
}

@media (max-width: 992px) {
	.sworx-cs-hero__text {
		width: auto;
	}
}

@media (max-width: 768px) {
	.sworx-cs-hero {
		padding: 58px 0 42px;
	}

	.sworx-cs-hero .sworx-cs-hero__back,
	.sworx-cs-hero .sworx-cs-hero__eyebrow,
	.sworx-cs-facts .sworx-cs-facts__label,
	.sworx-cs-facts .sworx-cs-facts__value {
		line-height: 1.45;
	}

	.sworx-cs-hero .sworx-cs-hero__title {
		font-size: 39px;
	}

	.sworx-cs-facts {
		display: block;
	}

	.sworx-cs-facts__item {
		max-width: 400px;
		margin: 0 auto;
		padding: 22px 30px 20px;
		background-position: 0 0;
		background-size: 100% 2px;
	}

	.sworx-cs-facts .sworx-cs-facts__label,
	.sworx-cs-facts .sworx-cs-facts__value {
		margin-right: 0;
		margin-left: 0;
	}

	.sworx-cs-buttons {
		justify-content: center;
		margin: 26px 20px 25px;
	}
}

/* ------------------------------------------------------------------
 * Single: story and gallery
 * ---------------------------------------------------------------- */

.sworx-cs-story {
	padding: 100px 20px;
	background: #fff;
}

.sworx-cs-story__inner {
	display: flex;
	align-items: flex-start;
	max-width: 1260px;
	margin: 0 auto;
}

.sworx-cs-story__main {
	display: flex;
	flex: 0 0 50%;
	flex-direction: column;
	min-width: 0;
}

.sworx-cs-story:not(.sworx-cs-story--has-gallery) .sworx-cs-story__main {
	flex-basis: 100%;
	max-width: 840px;
}

.sworx-cs-story__aside {
	position: sticky;
	top: 150px;
	flex: 0 0 50%;
	min-width: 0;
	padding-left: 60px;
}

.admin-bar .sworx-cs-story__aside {
	top: calc(150px + 32px);
}

.sworx-cs-section {
	display: flex;
	flex-direction: column;
}

.sworx-cs-story .sworx-cs-section__title,
.sworx-cs-gallery .sworx-cs-gallery__title {
	margin: 0 20px 12px;
	padding: 0;
	font-family: var(--sworx-cs-display);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	color: var(--sworx-cs-heading);
	text-wrap: pretty;
}

.sworx-cs-section + .sworx-cs-section .sworx-cs-section__title {
	margin-top: 30px;
}

.sworx-cs-section__body {
	margin: 0 20px 30px;
	font-size: 17px;
	line-height: 1.7;
	color: var(--sworx-cs-text);
}

.sworx-cs-story .sworx-cs-section__body p,
.sworx-cs-story .sworx-cs-section__body ul,
.sworx-cs-story .sworx-cs-section__body ol {
	margin: 0 0 16px;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	text-wrap: pretty;
}

/* Gallery */

.sworx-cs-gallery .sworx-cs-gallery__title {
	margin-bottom: 6px;
}

.sworx-cs-gallery .sworx-cs-gallery__help {
	margin: 0 20px;
	font-size: 15px;
	line-height: 1.7;
	color: var(--sworx-cs-text);
}

.sworx-cs-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: start;
	gap: 10px 2%;
	margin: 20px;
}

.sworx-cs-gallery--cols-2 .sworx-cs-gallery__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Masonry (set by sworx-cs-gallery.js): 1px rows, each tile spans its own height plus the gutter. */
.sworx-cs-gallery__grid.is-masonry {
	grid-auto-rows: 1px;
	row-gap: 0;
}

.sworx-cs-gallery .sworx-cs-gallery__item {
	display: block;
	padding: 2px;
	line-height: 0;
	border-radius: 10px;
}

/* The frame clips the zoom to the rounded corners; its own layer keeps the zoom smooth. */
.sworx-cs-gallery .sworx-cs-gallery__frame {
	display: block;
	overflow: hidden;
	border-radius: 10px;
	isolation: isolate;
	transform: translateZ(0);
}

/* Two classes deep so lazy-load plugins (Smush's .lazyloaded sets transition: opacity) can't
   replace the zoom transition. */
.sworx-cs-gallery .sworx-cs-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	transform: scale(1);
	transition: transform 1s ease, opacity 0.4s ease;
	will-change: transform;
}

.sworx-cs-gallery .sworx-cs-gallery__item:hover .sworx-cs-gallery__img,
.sworx-cs-gallery .sworx-cs-gallery__item:focus-visible .sworx-cs-gallery__img {
	transform: scale(1.3);
}

@media (max-width: 992px) {
	.sworx-cs-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.admin-bar .sworx-cs-story__aside {
		top: calc(150px + 46px);
	}
}

@media (max-width: 768px) {
	.sworx-cs-story {
		padding: 48px 0 32px;
	}

	.sworx-cs-story__inner {
		display: block;
	}

	.sworx-cs-story__main,
	.sworx-cs-story__aside,
	.sworx-cs-story:not(.sworx-cs-story--has-gallery) .sworx-cs-story__main {
		max-width: 400px;
		margin: 0 auto;
	}

	.sworx-cs-story__aside,
	.admin-bar .sworx-cs-story__aside {
		position: static;
		padding-left: 0;
	}

	.sworx-cs-story .sworx-cs-section__title,
	.sworx-cs-gallery .sworx-cs-gallery__title {
		font-size: 20px;
	}

	.sworx-cs-section + .sworx-cs-section .sworx-cs-section__title {
		margin-top: 0;
	}

	.sworx-cs-gallery .sworx-cs-gallery__title {
		margin-top: 30px;
	}

	.sworx-cs-gallery .sworx-cs-gallery__help {
		line-height: 1.45;
	}
}

@media (max-width: 767px) {
	.sworx-cs-story .sworx-cs-section__title,
	.sworx-cs-gallery .sworx-cs-gallery__title {
		line-height: 1.4;
	}
}

/* ------------------------------------------------------------------
 * Built-in lightbox (only when PowerPack's Fancybox is unavailable)
 * ---------------------------------------------------------------- */

.sworx-cs-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 70px;
	background: rgba(58, 65, 80, 0.97);
}

.sworx-cs-lb[hidden] {
	display: none;
}

.sworx-cs-lb__figure {
	margin: 0;
	text-align: center;
}

.sworx-cs-lb__img {
	display: block;
	max-width: calc(100vw - 140px);
	max-height: calc(100vh - 140px);
	width: auto;
	height: auto;
	margin: 0 auto;
}

.sworx-cs-lb__counter {
	font-size: 14px;
	line-height: 1.4;
	color: #fff;
}


.sworx-cs-lb__counter {
	position: absolute;
	top: 18px;
	left: 20px;
	margin: 0;
}

.sworx-cs-lb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	font-size: 34px;
	line-height: 1;
	color: #fff;
	cursor: pointer;
	background: rgba(13, 17, 39, 0.5);
	border: 0;
	border-radius: 0;
}

.sworx-cs-lb__btn:hover,
.sworx-cs-lb__btn:focus-visible {
	background: rgba(13, 17, 39, 0.9);
	outline: 2px solid #0fbbb1;
	outline-offset: 0;
}

.sworx-cs-lb__btn[hidden] {
	display: none;
}

.sworx-cs-lb__close {
	top: 10px;
	right: 10px;
}

.sworx-cs-lb__prev,
.sworx-cs-lb__next {
	top: 50%;
	transform: translateY(-50%);
}

.sworx-cs-lb__prev {
	left: 10px;
}

.sworx-cs-lb__next {
	right: 10px;
}

@media (max-width: 768px) {
	.sworx-cs-lb {
		padding: 60px 10px;
	}

	.sworx-cs-lb__img {
		max-width: calc(100vw - 20px);
	}

	.sworx-cs-lb__prev,
	.sworx-cs-lb__next {
		top: auto;
		bottom: 10px;
		transform: none;
	}
}
