/**
 * Service Page Styles — pixel-matched to Figma "services" frame.
 *
 * Shares CSS custom properties from header.css (:root):
 *   --h-font, --h-max, --h-pad, --h-dark, --h-white, --h-accent
 *
 * New tokens specific to service pages are prefixed --sp-*
 */

/* ── Tokens ── */
:root {
	--sp-blue:        #4f8ef5;
	--sp-body:        #5f6368;
	--sp-accent:      #ff4a34;
	--sp-hero-bg:     #1b4d5c;  /* was #e03a28 (crimson) */
	--sp-dark:        #1f1f1f;
	--sp-white:       #ffffff;
	--sp-card-radius: 4px;
	--sp-pad:         20px;   /* mobile */
	--sp-max:         1440px;
	--sp-hero-height: 400px;  /* mobile */
}
@media (min-width: 768px) {
	:root {
		--sp-pad:         40px;
		--sp-hero-height: 460px;
	}
}
@media (min-width: 1200px) {
	:root {
		--sp-pad:         47px;
		--sp-hero-height: 513px;
	}
}


/* ══════════════════════════════════════════════════════════════════════════
   MAIN WRAPPER
   ══════════════════════════════════════════════════════════════════════════ */
main.sp {
	background: var(--sp-white);
	overflow: hidden; /* contain masked images */
}


/* ══════════════════════════════════════════════════════════════════════════
   HERO
   Figma: 768px red panel / 1152px image at 1920px viewport = 40% / 60%
   ══════════════════════════════════════════════════════════════════════════ */
.sp-hero {
	position: relative;
	width: 100%;
	min-height: var(--sp-hero-height);
	display: flex;
	flex-direction: column;
}
@media (min-width: 768px) {
	.sp-hero {
		flex-direction: row;
	}
}

/* Red panel */
.sp-hero__red {
	position: relative;
	z-index: 2;
	background: linear-gradient(135deg, #14383f 0%, var(--sp-hero-bg) 100%);
	padding: 80px var(--sp-pad) 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
@media (min-width: 768px) {
	.sp-hero__red {
		width: 45%;
		min-height: var(--sp-hero-height);
		padding: 0 48px 0 var(--sp-pad);
	}
}
@media (min-width: 1200px) {
	.sp-hero__red {
		width: 40%;
		/* no max-width: panel grows on wide viewports so text never crunches */
		padding-left: max(var(--h-pad), calc((100vw - var(--h-max)) / 2 + var(--h-pad)));
		padding-right: 67px;
	}
}
@media (min-width: 1600px) {
	.sp-hero__red {
		padding-right: 48px;
	}
}

/* Badge pill */
.sp-hero__badge {
	display: inline-block;
	width: fit-content;
	background: var(--sp-dark);
	color: var(--sp-white);
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 20px;
	padding: 7px 21px;
	border-radius: 50px;
	margin-bottom: 20px;
}

/* Title */
.sp-hero__title {
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 36px;
	font-weight: 400;
	line-height: 1.0;
	color: var(--sp-white);
	margin: 0 0 20px;
	max-width: 634px;
}
@media (min-width: 768px) {
	.sp-hero__title {
		font-size: 44px;
	}
}
@media (min-width: 1200px) {
	.sp-hero__title {
		font-size: 58px;
	}
}

/* Intro */
.sp-hero__intro {
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 16px;
	font-weight: 400;
	line-height: 28px;
	color: var(--sp-white);
	margin: 0;
	max-width: 598px;
}
@media (min-width: 1200px) {
	.sp-hero__intro {
		font-size: 18px;
	}
}

/* Hero image (right panel) */
.sp-hero__image {
	position: relative;
	z-index: 1;
	min-height: 240px;
	overflow: hidden;
}
@media (min-width: 768px) {
	.sp-hero__image {
		flex: 1;
		min-width: 40%; /* image never less than 40% of hero width */
		min-height: var(--sp-hero-height);
	}
}
.sp-hero__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	position: absolute;
	inset: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   BREADCRUMBS
   Figma: y=662, x=47, 14px Aeonik Medium
   ══════════════════════════════════════════════════════════════════════════ */
.sp-breadcrumbs {
	max-width: var(--sp-max);
	margin: 0 auto;
	padding: 20px var(--sp-pad) 0;
}
.sp-breadcrumbs ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.sp-breadcrumbs li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
}
.sp-breadcrumbs a {
	color: var(--sp-body);
	text-decoration: none;
}
.sp-breadcrumbs a:hover {
	text-decoration: underline;
}
.sp-breadcrumbs span[aria-current="page"] {
	color: var(--sp-dark);
}
.sp-breadcrumbs__sep {
	display: block;
	flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   CONTENT BLOCKS (3 alternating sections)
   Figma: image left / content right, then reversed, then back again.
   Desktop: ~40% image, ~55% content, ~5% gap
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Scroll-reveal animation ───────────────────────────────────────── */
@keyframes sp-fadeUp {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* First block: start at partial opacity so content is hinted before scroll */
@keyframes sp-fadeUpFromHint {
	from {
		opacity: 0.4;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sp-block__image,
.sp-block__content {
	opacity: 0;
	transform: translateY(40px);
}

/* First block starts slightly visible (content hint) */
.sp-block:first-of-type .sp-block__image,
.sp-block:first-of-type .sp-block__content {
	opacity: 0.4;
	transform: translateY(20px);
}

.sp-block.sp-block--visible .sp-block__image {
	animation: sp-fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.sp-block.sp-block--visible .sp-block__content {
	animation: sp-fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

/* First block: animate from hint to full opacity */
.sp-block:first-of-type.sp-block--visible .sp-block__image {
	animation: sp-fadeUpFromHint 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.sp-block:first-of-type.sp-block--visible .sp-block__content {
	animation: sp-fadeUpFromHint 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

/* Reversed blocks: content appears first (it's visually on the left) */
.sp-block--reversed.sp-block--visible .sp-block__content {
	animation-delay: 0s;
}
.sp-block--reversed.sp-block--visible .sp-block__image {
	animation-delay: 0.15s;
}

/* No-JS fallback: make everything visible if JS doesn't load */
.no-js .sp-block__image,
.no-js .sp-block__content {
	opacity: 1;
	transform: none;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.sp-block__image,
	.sp-block__content {
		opacity: 1;
		transform: none;
	}
	.sp-block.sp-block--visible .sp-block__image,
	.sp-block.sp-block--visible .sp-block__content {
		animation: none;
	}
}

/* ── Base block layout ─────────────────────────────────────────────── */
.sp-block {
	display: flex;
	flex-direction: column;
	margin-top: 60px;
	padding-top: 60px;
}
/* Thin separator between blocks (not on the first one) */
.sp-block + .sp-block {
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}
@media (min-width: 768px) {
	.sp-block {
		flex-direction: row;
		align-items: flex-start;
		gap: 40px;
		margin-top: 48px;
		padding-top: 48px;
		padding-left: var(--sp-pad);
		padding-right: var(--sp-pad);
	}
}
@media (min-width: 1200px) {
	.sp-block {
		max-width: var(--sp-max);
		margin-left: auto;
		margin-right: auto;
		margin-top: 80px;
		padding-top: 80px;
		gap: 100px;
	}
	.sp-block + .sp-block {
		border-top: none; /* cleaner on desktop — spacing is enough */
	}
}

/* Reversed section (section 2) — swap order */
@media (min-width: 768px) {
	.sp-block--reversed {
		flex-direction: row-reverse;
	}
}

/* Image column */
.sp-block__image {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 6px;
}
@media (min-width: 768px) {
	.sp-block__image {
		width: 42%;
		flex-shrink: 0;
		border-radius: 8px;
	}
}
@media (min-width: 1200px) {
	.sp-block__image {
		width: 37.5%; /* ~720/1920 */
		border-radius: 10px;
	}
}
.sp-block__image img {
	display: block;
	width: 100%;
	height: auto;
	min-height: 300px;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.sp-block__image:hover img {
	transform: scale(1.03);
}
@media (min-width: 1200px) {
	.sp-block__image img {
		min-height: 600px;
		max-height: 903px;
	}
}

/* Consistent padding within the centered container */
@media (min-width: 1200px) {
	.sp-block:not(.sp-block--reversed) {
		padding-left: var(--sp-pad);
		padding-right: var(--sp-pad);
	}
	.sp-block--reversed {
		padding-left: var(--sp-pad);
		padding-right: var(--sp-pad);
	}
}

/* Content column */
.sp-block__content {
	padding: 32px var(--sp-pad) 0;
}
@media (min-width: 768px) {
	.sp-block__content {
		flex: 1;
		padding: 0;
	}
}
@media (min-width: 1200px) {
	.sp-block__content {
		max-width: 813px;
		padding-top: 0;
	}
}

/* Subtitle with teal accent bar */
.sp-block__subtitle {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 20px;
	font-weight: 500;
	line-height: 35px;
	color: var(--sp-hero-bg);
	margin-bottom: 8px;
}
.sp-block__subtitle::before {
	content: '';
	display: block;
	width: 32px;
	height: 2px;
	background: var(--sp-hero-bg);
	flex-shrink: 0;
	opacity: 0.5;
}
@media (min-width: 1200px) {
	.sp-block__subtitle {
		font-size: 30px;
		gap: 18px;
	}
	.sp-block__subtitle::before {
		width: 40px;
	}
}

/* Section heading */
.sp-block__heading {
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 32px;
	font-weight: 500;
	line-height: 1.15;
	color: var(--sp-dark);
	margin: 0 0 24px;
	max-width: 813px;
}
@media (min-width: 1200px) {
	.sp-block__heading {
		font-size: 58px;
		line-height: 60px;
		margin-bottom: 32px;
	}
}

/* Body text */
.sp-block__body {
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.75;
	color: var(--sp-body);
	max-width: 808px;
	margin-bottom: 32px;
}
@media (min-width: 1200px) {
	.sp-block__body {
		font-size: 18px;
		line-height: 1.8;
	}
}

/* Bullet list */
.sp-block__bullets {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
	border-left: 2px solid rgba(20, 56, 63, 0.12);
	padding-left: 24px;
}
.sp-block__bullets li {
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 17px;
	font-weight: 500;
	line-height: 22px;
	color: var(--sp-body);
	margin-bottom: 16px;
	transition: color 0.2s ease;
}
.sp-block__bullets li:last-child {
	margin-bottom: 0;
}
.sp-block__bullets li:hover {
	color: var(--sp-dark);
}
@media (min-width: 1200px) {
	.sp-block__bullets {
		padding-left: 28px;
	}
	.sp-block__bullets li {
		font-size: 20px;
		margin-bottom: 18px;
	}
}
.sp-block__bullets li svg {
	flex-shrink: 0;
}

/* CTA text */
.sp-block__cta-text {
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--sp-dark);
	max-width: 673px;
	margin: 0 0 24px;
}
@media (min-width: 1200px) {
	.sp-block__cta-text {
		font-size: 30px;
		margin-bottom: 32px;
	}
}

/* CTA button (red pill) */
.sp-block__button {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: var(--sp-accent);
	color: var(--sp-white);
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 20px;
	padding: 14px 28px;
	border: none;
	border-radius: 50px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
	white-space: nowrap;
}
.sp-block__button:hover {
	background: #e63228;
	box-shadow: 0 4px 16px rgba(255, 74, 52, 0.3);
	transform: translateY(-1px);
}
.sp-block__button:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(255, 74, 52, 0.2);
}
.sp-block__button svg {
	flex-shrink: 0;
	transition: transform 0.25s ease;
}
.sp-block__button:hover svg {
	transform: translateX(4px);
}


/* ══════════════════════════════════════════════════════════════════════════
   INSIGHTS SECTION (within service page wrapper)
   Inherits core styles from the shared template part.
   Scoped overrides under .sp-insights.
   ══════════════════════════════════════════════════════════════════════════ */
.sp-insights {
	padding: 80px var(--sp-pad);
	background: var(--sp-white);
}
@media (min-width: 1200px) {
	.sp-insights {
		padding: 120px var(--sp-pad);
	}
}

.sp-insights .esi-insights__header {
	max-width: var(--sp-max);
	margin: 0 auto 48px;
}
@media (min-width: 1200px) {
	.sp-insights .esi-insights__header {
		margin-bottom: 64px;
	}
}

.sp-insights .esi-insights__heading {
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 32px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--sp-dark);
	margin: 8px 0 0;
	max-width: 644px;
}
@media (min-width: 1200px) {
	.sp-insights .esi-insights__heading {
		font-size: 58px;
		line-height: 60px;
	}
}

/* Grid */
.sp-insights .esi-insights__grid {
	max-width: 1840px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}
@media (min-width: 768px) {
	.sp-insights .esi-insights__grid {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: auto auto;
	}
	.sp-insights .esi-insights__card--lg {
		grid-column: 2;
		grid-row: 1 / 3;
	}
}
@media (min-width: 1200px) {
	.sp-insights .esi-insights__grid {
		grid-template-columns: 442fr 442fr 901fr;
		grid-template-rows: auto;
	}
	.sp-insights .esi-insights__card--sm:nth-child(1) {
		grid-column: 1 / 2;
		grid-row: 1;
	}
	.sp-insights .esi-insights__card--sm:nth-child(2) {
		grid-column: 2 / 3;
		grid-row: 1;
	}
	.sp-insights .esi-insights__card--lg {
		grid-column: 3;
		grid-row: 1;
	}
}

/* Cards */
.sp-insights .esi-insights__card {
	border-radius: var(--sp-card-radius);
	overflow: hidden;
	background: #f8f9fa;
	display: flex;
	flex-direction: column;
}
.sp-insights .esi-insights__card a {
	text-decoration: none;
	color: inherit;
}
.sp-insights .esi-insights__card-link {
	display: flex;
	flex-direction: column;
	flex: 1;
}
.sp-insights .esi-insights__card-img {
	width: 100%;
	padding-top: 67.6%;
	background-color: #e8eaed; /* fallback for posts with no featured image */
	background-size: cover;
	background-position: center;
}
.sp-insights .esi-insights__card--lg .esi-insights__card-img {
	padding-top: 67%;
}
.sp-insights .esi-insights__card-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 20px 8px;
}
.sp-insights .esi-insights__tag {
	display: inline-block;
	background: var(--sp-hero-bg);
	color: var(--sp-white);
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 12px;
	font-weight: 500;
	padding: 4px 12px;
	border-radius: 50px;
	line-height: 1.3;
}
.sp-insights .esi-insights__date {
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 14px;
	font-weight: 400;
	color: var(--sp-body);
}
.sp-insights .esi-insights__card-title {
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--sp-dark);
	padding: 0 20px 24px;
	margin: 0;
}
@media (min-width: 1200px) {
	.sp-insights .esi-insights__card--lg .esi-insights__card-title {
		font-size: 22px;
	}
}

/* Section label (blue) — shared with insights template part */
.sp-insights .hp-section-label {
	display: block;
	font-family: var(--h-font, 'Aeonik', sans-serif);
	font-size: 30px;
	font-weight: 500;
	line-height: 35px;
	color: var(--sp-hero-bg);
	margin-bottom: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   TRUST BAR (within service page wrapper)
   ══════════════════════════════════════════════════════════════════════════ */
.sp-trust {
	padding: 60px var(--sp-pad);
}
.sp-trust .esi-trust-bar {
	max-width: var(--sp-max);
	margin: 0 auto;
}


/* ══════════════════════════════════════════════════════════════════════════
   ELEMENTOR / PARENT THEME OVERRIDES
   Same approach as header.css — high-specificity overrides to break out
   of Elementor wrappers on the service page template.
   ══════════════════════════════════════════════════════════════════════════ */
#service-page {
	max-width: none !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}
