/* Case Studies — tokens are this site's own live brand values (Roboto / #d0333a),
   structure/spacing/radii/ratios ported from the Figma reference file. */
.cs-scope {
	--cs-red: #d0333a;
	--cs-red-dark: #ad2a30;
	--cs-green: #7db439;
	--cs-text: #1a1a1a;
	--cs-body: #333333;
	--cs-white: #ffffff;
	--cs-card-bg: #f5f5f5;
	--cs-band-bg: #ebebeb;
	--cs-border: #e8e8e8;
	--cs-faded: #999999;
	--cs-radius-btn: 8px;
	--cs-radius-card: 12px;
	--cs-section-py: 112px;
	--cs-section-py-md: 60px;
	--cs-header-gap: 80px;
	--cs-font: 'Roboto', sans-serif;

	font-family: var(--cs-font);
	color: var(--cs-body);

	/* Impreza's header is position:fixed (120px desktop / 106px mobile) with
	   no automatic content offset — every builder page on this site clears
	   it by hand (e.g. Contact Us pads its first row by 192px). Our pages
	   have no builder row to carry that padding, so it's added here. */
	margin-top: 120px;
}

@media (max-width: 767px) {
	.cs-scope {
		margin-top: 106px;
	}
}

.cs-scope h1,
.cs-scope h2,
.cs-scope h3,
.cs-scope h4,
.cs-scope h5,
.cs-scope h6 {
	font-family: var(--cs-font);
	font-weight: 700;
	text-transform: none;
	color: var(--cs-text);
	letter-spacing: 0;
	margin: 0;
}

.cs-scope p {
	margin: 0;
}

.cs-scope img {
	max-width: 100%;
	display: block;
}

.cs-scope a {
	color: var(--cs-red);
}

.cs-scope a:hover {
	color: var(--cs-green);
}

/* Layout primitives */

.cs-section {
	width: 100%;
	padding: var(--cs-section-py) 0;
	position: relative;
}

.cs-section--band {
	background-color: var(--cs-band-bg);
}

.cs-container {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 80px;
	box-sizing: border-box;
}

@media (max-width: 767px) {
	.cs-section {
		padding: 64px 0;
	}
	.cs-container {
		padding: 0 20px;
	}
}

/* Buttons — outline is forced off with !important sitewide on <button>,
   so focus states below use box-shadow, and toggled visibility uses a
   class (not inline style) so it can't be blocked by an !important rule. */

.cs-btn {
	display: inline-block;
	background-color: var(--cs-red);
	font-family: var(--cs-font);
	font-weight: 500;
	font-size: 1rem;
	text-align: center;
	text-decoration: none;
	border: none;
	border-radius: var(--cs-radius-btn);
	padding: 8px 20px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

/* .cs-scope a sets link color with (class, tag) specificity, which beats a
   plain .cs-btn color rule — chain the ancestor class to win legitimately. */
.cs-scope .cs-btn,
.cs-scope .cs-btn:hover {
	color: var(--cs-white);
}

.cs-btn:hover {
	background-color: var(--cs-red-dark);
}

.cs-btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(208, 51, 58, 0.4);
}

.cs-btn--cta {
	padding: 12px 24px;
}

.cs-btn--load-more {
	display: none;
}

.cs-btn--load-more.is-visible {
	display: inline-block;
}

/* Banner */

.cs-banner {
	padding: 192px 15px;
	background-size: cover;
	background-position: center;
	background-color: #eaeaea;
	border-radius: 0 0 0 128px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cs-banner__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.4);
	border-radius: 0 0 0 128px;
}

.cs-banner__inner {
	position: relative;
	z-index: 1;
	max-width: 780px;
	padding: 0;
	text-align: center;
}

.cs-scope .cs-banner .cs-banner__title {
	color: var(--cs-white);
	font-size: 40px;
	line-height: 45px;
	text-shadow: 0 3px 6px rgba(0, 0, 0, 0.8);
}

@media (max-width: 767px) {
	.cs-banner {
		padding: 192px 15px;
	}
}

/* Filters */

.cs-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 24px;
	margin-bottom: 64px;
}

@media (max-width: 767px) {
	.cs-filters {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		margin-bottom: 32px;
	}
}

.cs-filter {
	font-family: var(--cs-font);
	font-size: 1rem;
	background: none;
	border: 1px solid transparent;
	color: var(--cs-text);
	padding: 8px 16px;
	border-radius: var(--cs-radius-btn);
	cursor: pointer;
	white-space: nowrap;
	flex: 0 0 auto;
}

.cs-filter:focus-visible {
	box-shadow: 0 0 0 3px rgba(208, 51, 58, 0.4);
}

.cs-filter.is-active {
	background-color: var(--cs-red);
	border-color: var(--cs-red);
	color: var(--cs-white);
}

/* Grid + cards */

.cs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}


@media (max-width: 991px) {
	.cs-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.cs-grid {
		grid-template-columns: 1fr;
	}
}

.cs-card {
	background-color: var(--cs-card-bg);
	border: 1px solid var(--cs-red);
	border-radius: var(--cs-radius-card);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.cs-card__image {
	display: block;
	aspect-ratio: 405.333 / 300;
	overflow: hidden;
	background-color: var(--cs-border);
}

.cs-card__image img,
.cs-card__image picture {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cs-card__body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cs-card__category {
	font-size: 14px;
	font-weight: 500;
	color: var(--cs-body);
}

.cs-scope .cs-card .cs-card__title {
	font-size: 22px;
	line-height: 1.3;
}

.cs-card__title a {
	color: var(--cs-red);
	text-decoration: none;
}

.cs-card__excerpt {
	color: var(--cs-body);
	font-size: 16px;
	line-height: 1.5;
}

.cs-card__body .cs-btn {
	align-self: flex-start;
	margin-top: 16px;
}

@media (max-width: 767px) {
	.cs-scope .cs-card .cs-card__title {
		font-size: 20px;
	}
}

/* Grid footer / pagination */

.cs-grid__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	margin-top: 48px;
}

.cs-grid__count {
	color: var(--cs-faded);
	font-size: 14px;
}

/* CTA band */

.cs-cta {
	background-color: var(--cs-white);
}

.cs-cta__inner {
	display: flex;
	align-items: center;
	gap: 80px;
}

.cs-cta__text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 20px;
	align-items: flex-start;
}

.cs-scope .cs-cta .cs-cta__heading {
	font-size: 50px;
	color: var(--cs-red);
}

@media (max-width: 767px) {
	.cs-scope .cs-cta .cs-cta__heading {
		font-size: 36px;
	}
}

.cs-cta__description {
	font-size: 16px;
	line-height: 1.5;
}

.cs-cta__image {
	flex: 1;
}

.cs-cta__image img {
	width: 100%;
	aspect-ratio: 335 / 218;
	object-fit: cover;
	border-radius: var(--cs-radius-card);
}

@media (max-width: 767px) {
	.cs-cta__inner {
		flex-direction: column;
		gap: 32px;
	}
}

/* Detail — header */

.cs-detail-header {
	background-color: var(--cs-card-bg);
}

.cs-detail-header__row {
	display: flex;
	justify-content: space-between;
	gap: 80px;
}

.cs-detail-header__main {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cs-scope .cs-detail-header .cs-detail-header__title {
	font-size: 38px;
	line-height: 1.2;
	color: var(--cs-red);
}

.cs-detail-header__excerpt {
	font-size: 16px;
	line-height: 1.5;
}

.cs-detail-header__meta {
	flex: 0 0 200px;
	display: flex;
	flex-direction: column;
	gap: 32px;
	text-align: right;
}

.cs-meta-item__label {
	font-weight: 700;
	font-size: 18px;
	color: var(--cs-text);
}

.cs-meta-item__value {
	font-size: 16px;
	color: var(--cs-body);
}

.cs-detail-header__image {
	margin-top: 80px;
	border-radius: var(--cs-radius-card);
	overflow: hidden;
}

/* Imagify can wrap the_post_thumbnail()/wp_get_attachment_image() output in
   <picture><source>...<img></picture>, moving the class we set onto the
   <picture> wrapper instead of the inner <img> — style both. */
.cs-detail-header__img,
.cs-detail-header__img img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--cs-radius-card);
	display: block;
}

@media (max-width: 767px) {
	.cs-detail-header__row {
		flex-direction: column;
		gap: 32px;
	}
	.cs-detail-header__meta {
		flex: none;
		text-align: left;
	}
	.cs-detail-header__image {
		margin-top: 48px;
	}
}

/* Tags */

.cs-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.cs-tags--centered {
	justify-content: center;
	margin-top: 24px;
}

.cs-tag {
	background-color: var(--cs-band-bg);
	color: var(--cs-text);
	font-size: 14px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 0;
}

/* Activities */

.cs-activities__row {
	display: flex;
	gap: 80px;
}

.cs-activities__intro {
	flex: 0 0 389px;
	font-size: 22px;
	font-weight: 700;
	color: var(--cs-text);
}

.cs-activities__list {
	flex: 1;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cs-activities__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 16px;
	color: var(--cs-text);
}

.cs-activities__icon {
	flex: 0 0 19px;
	width: 19px;
	height: 19px;
	margin-top: 2px;
	display: block;
}

/* Only used if the client-supplied check.png is ever missing. */
.cs-activities__icon--fallback {
	background-image: url('../icons/check.svg');
	background-size: contain;
	background-repeat: no-repeat;
}

@media (max-width: 767px) {
	.cs-activities__row {
		flex-direction: column;
		gap: 24px;
	}
	.cs-activities__intro {
		flex: none;
	}
}

/* Body content */

.cs-section--body {
	padding: var(--cs-section-py-md) 0;
	background-color: var(--cs-card-bg);
}

@media (max-width: 767px) {
	.cs-section--body {
		padding: 40px 0;
	}
}

.cs-body-content {
	max-width: 768px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.6;
	color: var(--cs-body);
}

/* .cs-scope p / .cs-scope h1-h6 (base resets above) are class+tag
   selectors, which beat a plain single-class rule here — chain the
   ancestor class again so this legitimately wins, per house convention. */
.cs-scope .cs-body-content > * + * {
	margin-top: 1.5em;
}

.cs-scope .cs-body-content h1,
.cs-scope .cs-body-content h2 {
	font-size: 38px;
	color: var(--cs-red);
}

.cs-scope .cs-body-content h3 {
	font-size: 28px;
	color: var(--cs-red);
}

.cs-scope .cs-body-content h4,
.cs-scope .cs-body-content h5,
.cs-scope .cs-body-content h6 {
	font-size: 20px;
	color: var(--cs-text);
}

.cs-body-content img {
	width: 100%;
	aspect-ratio: 768 / 400;
	object-fit: cover;
	border-radius: var(--cs-radius-card);
}

.cs-body-content figure {
	margin: 0;
}

.cs-body-content figcaption {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 8px;
	font-family: var(--cs-font);
	font-size: 14px;
	color: var(--cs-text);
}

.cs-body-content figcaption::before {
	content: '';
	flex: 0 0 2px;
	align-self: stretch;
	background-color: var(--cs-text);
}

.cs-body-content blockquote {
	position: static;
	margin: 0;
	padding: 0 0 0 24px;
	border-left: 2px solid var(--cs-text);
	font-style: italic;
	font-size: 20px;
	line-height: 1.4;
	color: var(--cs-text);
}

/* Impreza's own blockquote style adds a large decorative Georgia quote
   glyph via ::before — this design has no such glyph, so clear it. */
.cs-body-content blockquote::before {
	content: none;
	display: none;
}

/* A bold, heading-6-sized lead-in paragraph (not a real heading) and a
   secondary-colour emphasis paragraph, both applied via a Gutenberg
   paragraph block's "additional CSS class" field. */
.cs-body-content .cs-lead {
	font-weight: 700;
	font-size: 18px;
	color: var(--cs-text);
}

.cs-body-content .cs-emphasis {
	color: var(--cs-red);
}

.cs-body-content ul,
.cs-body-content ol {
	padding-left: 1.25em;
}

/* Share row — same section as the body content in the design (grey
   background continues, no seam), with the label stacked above the
   button row, both centered. */

.cs-share {
	padding-top: 0;
	background-color: var(--cs-card-bg);
}

.cs-share__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 48px;
}

.cs-share__social {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.cs-share__row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cs-share__label {
	font-weight: 600;
	font-size: 18px;
	color: var(--cs-text);
}

.cs-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 64px;
	background-color: var(--cs-card-bg);
	border: none;
	cursor: pointer;
	color: var(--cs-text);
	position: relative;
	padding: 4px;
}

.cs-scope .cs-share .cs-share-btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(208, 51, 58, 0.4);
}

/* Icons are masked (not background-image) so :hover can recolour them,
   matching this site's existing link-hover convention instead of the
   glow/shadow treatment the design doesn't actually show. */
.cs-share-btn__icon {
	width: 24px;
	height: 24px;
	display: inline-block;
	background-color: var(--cs-text);
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	transition: background-color 0.15s ease;
}

.cs-scope .cs-share .cs-share-btn:hover .cs-share-btn__icon {
	background-color: var(--cs-red);
}

.cs-icon-link { -webkit-mask-image: url('../icons/link.svg'); mask-image: url('../icons/link.svg'); }
.cs-icon-linkedin { -webkit-mask-image: url('../icons/linkedin.svg'); mask-image: url('../icons/linkedin.svg'); }
.cs-icon-x { -webkit-mask-image: url('../icons/x.svg'); mask-image: url('../icons/x.svg'); }
.cs-icon-facebook { -webkit-mask-image: url('../icons/facebook.svg'); mask-image: url('../icons/facebook.svg'); }

.cs-share-btn__confirm {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-4px);
	background-color: var(--cs-text);
	color: var(--cs-white);
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.cs-share-btn--copy.is-copied .cs-share-btn__confirm {
	opacity: 1;
}

/* Related */

.cs-related {
	background-color: var(--cs-red);
}

.cs-related__header {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin-bottom: 64px;
}

.cs-scope .cs-related .cs-related__heading {
	color: var(--cs-white);
	font-size: 50px;
}

.cs-related__subheading {
	color: var(--cs-white);
	font-size: 18px;
	line-height: 1.5;
}

/* Body content: core Button block (e.g. "Explore our Full List of Services")
   styled to match .cs-btn; quote citation. */
.cs-scope .cs-body-content .wp-block-button__link {
	display: inline-block;
	background-color: var(--cs-red);
	color: var(--cs-white);
	font-family: var(--cs-font);
	font-weight: 500;
	font-size: 1rem;
	text-decoration: none;
	border: none;
	border-radius: var(--cs-radius-btn);
	padding: 12px 24px;
	transition: background-color 0.2s ease;
}

.cs-scope .cs-body-content .wp-block-button__link:hover {
	background-color: var(--cs-red-dark);
	color: var(--cs-white);
}

.cs-scope .cs-body-content blockquote p + p {
	margin-top: 1em;
}

.cs-scope .cs-body-content blockquote cite {
	display: block;
	margin-top: 16px;
	font-style: normal;
	font-weight: 700;
	font-size: 16px;
	color: var(--cs-text);
}
