/**
 * Homepage "Our Services" band â€” hover-expanding accordion.
 *
 * A full-bleed navy section under the milestones: a skyline strip on top,
 * a centered title/description, then a horizontal accordion whose panels
 * share the width until one is hovered/focused â€” that panel expands while
 * the others contract (flex). On touch the same band becomes a sideways
 * scroll-snap swipe strip (each slide ~84% wide, a peek of the next one).
 *
 * Approved from prototype/service-slider.html and scoped to the theme brand
 * palette (--sfm-navy / --sfm-green / --sfm-font-sans).
 */

.svc-section {
	position: relative;
	overflow: hidden;
	background: #000d37;
	color: #fff;
	padding-bottom: 48px;
}

.svc-section * {
	box-sizing: border-box;
}

/* Buildings skyline â€” section header strip. The PNG is a navy (#000d37)
   skyline on a transparent "sky"; the empty sky space is white so the
   buildings keep their natural colour and read clearly, and the dark
   #000d37 section band continues below. */
.svc-skyline {
	position: relative;
	width: 100%;
	height: 120px;
	background-image: url("../img/buildings.png"),
		linear-gradient(to bottom, #ffffff 0%, #ffffff 70%, #000d37 100%);
	background-repeat: no-repeat;
	background-position: center bottom;
	background-size: cover, 100% 100%;
	background-color: #fff;
}

.svc-inner {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header --------------------------------------------------------------- */

.svc-header {
	margin: 50px auto 50px;
	text-align: center;
}

.svc-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 0 0 24px;
	font-family: var(--sfm-font-sans);
	font-size: 34px;
	font-weight: var(--sfm-weight-bold);
	letter-spacing: 0.3px;
	color: #fff;
}

.svc-title::before,
.svc-title::after {
	content: "";
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--sfm-green);
	flex: none;
}

.svc-desc {
	margin: 0 auto;
	color: rgba(255, 255, 255, 0.72);
	font-size: 17px;
	line-height: 1.6;
	font-weight: var(--sfm-weight-medium);
}

/* =====================================================================
   Accordion slider â€” horizontal flex accordion
   ===================================================================== */

.svc-slider {
	display: flex;
	width: 100%;
	height: min(45vh, 440px);
	min-height: 0;
	overflow: hidden;
	background: var(--sfm-navy-deep);
	isolation: isolate;
}

.svc-panel {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	display: block;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	outline: none;
	overflow: hidden;
	background-color: var(--sfm-navy-deep);
	background-image: linear-gradient(160deg, #12315f 0%, #0a1c42 55%, #071633 100%);
	transition:
		flex 700ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
		min-height 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-panel + .svc-panel {
	border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.svc-panel:hover,
.svc-panel:focus-visible,
.svc-panel.is-open {
	flex: 2.2;
}

/* Focus ring, inset so it stays clipped inside the panel. */
.svc-panel:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

/* Panels are links â€” the theme's global `a:hover { color: green }` must
   never tint the slide copy. Force white in every state. */
.svc-panel,
.svc-panel:hover,
.svc-panel:focus-visible,
.svc-panel.is-open {
	color: #fff;
}

.svc-panel:hover .svc-card-title,
.svc-panel:focus-visible .svc-card-title,
.svc-panel.is-open .svc-card-title,
.svc-panel:hover .svc-card-type,
.svc-panel:focus-visible .svc-card-type,
.svc-panel.is-open .svc-card-type,
.svc-panel:hover .svc-card-desc,
.svc-panel:focus-visible .svc-card-desc,
.svc-panel.is-open .svc-card-desc,
.svc-panel:hover .svc-card-cta,
.svc-panel:focus-visible .svc-card-cta,
.svc-panel.is-open .svc-card-cta {
	color: #fff;
}

/* Background image â€” fills the panel, subtly scales when active. */
.svc-media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
	transform: scale(1);
	transition: transform 950ms cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.svc-panel:hover .svc-media,
.svc-panel:focus-visible .svc-media,
.svc-panel.is-open .svc-media {
	transform: scale(1.04);
}

/* Layered cinematic overlay â€” lightens on the active panel. */
.svc-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		180deg,
		rgba(9, 22, 47, 0.40) 0%,
		rgba(6, 16, 40, 0.54) 46%,
		rgba(3, 9, 29, 0.84) 100%
	);
	transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
	background: linear-gradient(
		180deg,
		rgba(13, 31, 64, 0.24) 0%,
		rgba(9, 22, 50, 0.32) 46%,
		rgba(5, 13, 37, 0.64) 100%
	);
}

.svc-panel:hover .svc-overlay::after,
.svc-panel:focus-visible .svc-overlay::after,
.svc-panel.is-open .svc-overlay::after {
	opacity: 1;
}

/* Title + type â€” dead-centre when at rest. On hover the whole copy block
   slides up and the description/CTA fade in beneath it, keeping the two
   close together. */
.svc-copy {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 0 30px;
	text-align: center;
	pointer-events: none;
	transform: translateY(0);
	transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.svc-panel:hover .svc-copy,
.svc-panel:focus-visible .svc-copy,
.svc-panel.is-open .svc-copy {
	transform: translateY(-46px);
}

.svc-card-title {
	margin: 0;
	font-family: var(--sfm-font-sans);
	font-size: clamp(18px, 1.75vw, 27px);
	font-weight: var(--sfm-weight-bold);
	line-height: 1.18;
	letter-spacing: 0.01em;
	text-shadow: 0 2px 18px rgba(0, 6, 20, 0.55);
}

.svc-card-type {
	margin: 0;
	font-family: var(--sfm-font-sans);
	font-size: clamp(10.5px, 0.85vw, 13px);
	font-weight: var(--sfm-weight-bold);
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

/* Extra content â€” hidden at rest; fades/slides in just below the title,
   once the panel is hovered, so the description sits close to it. */
.svc-extras {
	position: absolute;
	top: 55%;
	left: 0;
	right: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 0 34px;
	text-align: center;
	pointer-events: none;
}

.svc-card-desc {
	max-width: 80%;
	margin: 0;
	font-family: var(--sfm-font-sans);
	font-size: var(--sfm-text-base);
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.90);
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity 400ms cubic-bezier(0.22, 1, 0.36, 1),
		transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-card-cta {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 10px 24px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 999px;
	font-family: var(--sfm-font-sans);
	font-size: var(--sfm-text-xs);
	font-weight: var(--sfm-weight-bold);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity 400ms cubic-bezier(0.22, 1, 0.36, 1),
		transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
		background-color 300ms ease,
		color 300ms ease,
		border-color 300ms ease;
}

.svc-card-cta svg {
	transition: transform 300ms ease;
}

.svc-panel:hover .svc-card-desc,
.svc-panel:focus-visible .svc-card-desc,
.svc-panel.is-open .svc-card-desc {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 120ms;
}

.svc-panel:hover .svc-card-cta,
.svc-panel:focus-visible .svc-card-cta,
.svc-panel.is-open .svc-card-cta {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 240ms;
}

/* CTA micro-interaction â€” only the arrow slides; the pill keeps its thin
   white border and white text (no fill swap). */
.svc-panel:hover .svc-card-cta svg,
.svc-panel:focus-visible .svc-card-cta svg,
.svc-panel.is-open .svc-card-cta svg {
	transform: translateX(5px);
}

/* Bottom CTA + hairline --------------------------------------------------- */

.svc-cta {
	display: flex;
	justify-content: center;
	margin-top: 44px;
}

.svc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-width: 353px;
	height: 60px;
	padding: 0 32px;

	background: var(--sfm-green);
	color: #fff;

	border: 0;
	border-radius: 999px;

	font-family: var(--sfm-font-sans);
	font-size: var(--sfm-text-lg);
	font-weight: var(--sfm-weight-medium);
	text-decoration: none;

	position: relative;
	transition: all 0.25s ease;
}

/* Outer ring â€” appears on hover/focus, mirroring the "What We Do" button. */
.svc-btn::after {
	content: "";
	position: absolute;
	inset: -9px;
	border: 1px solid #b9c5dc;
	border-radius: 999px;
	opacity: 0;
	transform: scale(0.97);
	transition:
		opacity 0.25s ease,
		transform 0.25s ease;
	pointer-events: none;
}

.svc-btn:hover::after,
.svc-btn:focus-visible::after {
	opacity: 1;
	transform: scale(1);
}

.svc-btn:hover,
.svc-btn:focus-visible {
	color: #fff;
	outline: none;
}

.svc-bottom {
	height: 1px;
	margin: 52px 0 0;
	background: rgba(255, 255, 255, 0.16);
}

/* =====================================================================
   Tablet â€” softer expansion + slightly smaller type
   ===================================================================== */

@media (max-width: 1180px) {
	.svc-panel:hover,
	.svc-panel:focus-visible,
	.svc-panel.is-open {
		flex: 1.9;
	}

	.svc-card-title { font-size: clamp(17px, 2vw, 22px); }
	.svc-card-desc { font-size: var(--sfm-text-base); }
}

/* =====================================================================
   Mobile â€” horizontal swipe strip.
   No hover/accordion on touch: the strip scrolls sideways with scroll-snap,
   each slide ~84% of the screen showing a peek of the next one â€” same
   language as the hero slider. All slide content stays visible.
   ===================================================================== */

@media (max-width: 820px) {
	.svc-section {
		padding-bottom: 30px;
	}

	.svc-skyline {
		height: 64px;
		background-size: cover, 100% 100%;
	}

	.svc-header {
		margin-top: 14px;
		margin-bottom: 22px;
	}

	.svc-title {
		font-size: 22px;
		gap: 10px;
		margin-bottom: 16px;
	}

	.svc-title::before,
	.svc-title::after {
		width: 9px;
		height: 9px;
	}

	.svc-desc {
	margin: 0 auto;
	color: rgba(255, 255, 255, 0.72);
	font-size: 17px;
	line-height: 1.6;
	font-weight: var(--sfm-weight-medium);
}

	.svc-slider {
		flex-direction: row;
		height: clamp(290px, 62vh, 380px);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		gap: 12px;
	}

	.svc-slider::-webkit-scrollbar {
		display: none;
	}

	.svc-panel,
	.svc-panel:hover,
	.svc-panel:focus-visible,
	.svc-panel.is-open {
		flex: none;
		width: 84%;
		min-height: 0;
		scroll-snap-align: center;
	}

	.svc-panel + .svc-panel {
		border-left: 0;
		border-top: 0;
	}

	.svc-copy {
		align-items: flex-start;
		justify-content: flex-start;
		gap: 6px;
		padding: 18px 20px 0;
		text-align: left;
		transform: none;
	}

	.svc-panel:hover .svc-copy,
	.svc-panel:focus-visible .svc-copy,
	.svc-panel.is-open .svc-copy {
		transform: none;
	}

	.svc-card-title {
		font-size: var(--sfm-text-lg);
		line-height: 1.25;
	}

	.svc-card-type {
		font-size: 10px;
	}

	.svc-extras {
		top: auto;
		bottom: 0;
		align-items: flex-start;
		justify-content: flex-end;
		text-align: left;
		gap: 16px;
		padding: 0 20px 24px;
	}

	.svc-card-desc,
	.svc-card-cta {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.svc-card-desc {
		max-width: none;
		font-size: 13px;
	}

	.svc-card-cta {
		gap: 8px;
		padding: 10px 20px;
		font-size: 11.5px;
	}

	.svc-cta {
		margin-top: 30px;
	}

	.svc-btn {
		min-width: 0;
		width: 100%;
		max-width: 100%;
		font-size: var(--sfm-text-base);
	}
}

/* =====================================================================
   Reduced motion
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}

	.svc-panel:hover .svc-media,
	.svc-panel:focus-visible .svc-media,
	.svc-panel.is-open .svc-media {
		transform: none;
	}
}