/* Explore Services
   Every rule is scoped under .spark-exs, so nothing here affects the rest of the site.
   See README.md in this folder for what each class/variable controls. */

/* ==========================================================================
   1. BASE: quick settings (colours, sizes, fonts)
   ========================================================================== */
.spark-exs {
	--exs-heading: var(--e-global-color-text, #1A1919);
	--exs-label: var(--e-global-color-text, #1A1919);
	--exs-card-bg: #FFFFFF;
	--exs-card-border: #FBE7AD;
	--exs-hover-bg: #FDF4E0;
	--exs-hover-border: #FFC300;
	--exs-tile-bg: #FDF4E0;
	--exs-tile-border: #E2B33C;
	--exs-icon: #D4A514;
	--exs-button-bg: var(--e-global-color-primary, #FFC300);
	--exs-button-text: #1A1919;
	--exs-muted: #6B6A68;
	--exs-gap: 20px;
	--exs-radius: 12px;
	--exs-tile: 50px;
	--exs-icon-size: 24px;
	--exs-heading-font: var(--e-global-typography-secondary-font-family, "Cooper Light BT"), "Cooper Lt BT", Georgia, "Times New Roman", serif;
	--exs-body-font: var(--e-global-typography-text-font-family, "SF Pro Display"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	box-sizing: border-box;
	padding: 72px 0 80px;
	color: var(--exs-label);
	font-family: var(--exs-body-font);
}

.spark-exs *,
.spark-exs *::before,
.spark-exs *::after {
	box-sizing: border-box;
}

.spark-exs .spark-exs__title,
.spark-exs .spark-exs__label {
	overflow-wrap: break-word;
}

/* No side padding on any device: the Elementor container around the widget provides the
   same side spacing as the site header, so the section lines up with the header. */
.spark-exs__inner {
	max-width: 1175px;
	margin: 0 auto;
	padding: 0;
}

/* ==========================================================================
   2. HEADING
   ========================================================================== */
.spark-exs .spark-exs__title {
	margin: 0 0 44px;
	padding: 0;
	color: var(--exs-heading);
	font-family: var(--exs-heading-font);
	font-size: 34px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: center;
}

/* ==========================================================================
   3. CARDS: a centred, wrapping grid; each card hugs its content
   ========================================================================== */
.spark-exs__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--exs-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.spark-exs__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.spark-exs .spark-exs__card {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 84px;
	padding: 16px 20px;
	border: 1px solid var(--exs-card-border);
	border-radius: var(--exs-radius);
	background: var(--exs-card-bg);
	color: var(--exs-label);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.spark-exs a.spark-exs__card:hover,
.spark-exs a.spark-exs__card:focus-visible {
	background: var(--exs-hover-bg);
	border-color: var(--exs-hover-border);
	color: var(--exs-label);
	box-shadow: 0 -3px 12px 0 #96968F14, 0 3px 16px 0 #8D8D8629;
}

.spark-exs a.spark-exs__card:focus-visible {
	outline: 2px solid var(--exs-label);
	outline-offset: 3px;
}

/* Icon tile */
.spark-exs__tile {
	display: grid;
	flex: none;
	place-items: center;
	width: var(--exs-tile);
	height: var(--exs-tile);
	border: 1px solid var(--exs-tile-border);
	border-radius: 12px;
	background: var(--exs-tile-bg);
	color: var(--exs-icon);
	font-size: var(--exs-icon-size);
	line-height: 1;
}

.spark-exs__tile svg {
	display: block;
	width: var(--exs-icon-size);
	height: var(--exs-icon-size);
}

/* Font Awesome icons are single-colour shapes: they take the icon colour. An uploaded SVG keeps the
   colours it sets itself (fill="none", stroke="#..."); one that sets no fill takes the icon colour. */
.spark-exs__tile svg.e-font-icon-svg,
.spark-exs__tile svg:not(.e-font-icon-svg):not([fill]) {
	fill: currentColor;
}

/* An uploaded SVG that already includes the rounded square is shown as it is, at the tile size. The
   tile colour sits behind it with the same corner radius as the drawing (--exs-own-ratio is its
   share of the width, set by the widget), and the drawing is never clipped. */
.spark-exs__tile--own {
	width: auto;
	height: auto;
	border: 0;
	border-radius: calc(var(--exs-tile) * var(--exs-own-ratio, 0.24));
	background: var(--exs-tile-bg);
}

.spark-exs__tile--own svg {
	width: var(--exs-tile);
	height: var(--exs-tile);
	overflow: visible;
}

.spark-exs .spark-exs__label {
	margin: 0;
	color: var(--exs-label);
	font-family: var(--exs-heading-font);
	font-size: 20px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0;
}

/* "View more" is for mobile only. */
.spark-exs .spark-exs__more {
	display: none;
}

/* ==========================================================================
   4. BUTTON
   ========================================================================== */
.spark-exs__cta {
	margin-top: 45px;
	text-align: center;
}

.spark-exs .spark-exs__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 0 36px;
	border: 0;
	border-radius: 999px;
	background: var(--exs-button-bg);
	color: var(--exs-button-text);
	font-family: var(--exs-body-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.2s ease;
}

.spark-exs a.spark-exs__button:hover,
.spark-exs a.spark-exs__button:focus-visible {
	background: var(--exs-button-bg);
	color: var(--exs-button-text);
	filter: brightness(0.95);
}

.spark-exs a.spark-exs__button:focus-visible {
	outline: 2px solid var(--exs-button-text);
	outline-offset: 3px;
}

/* ==========================================================================
   5. TABLET (768px – 1024px): same layout, a little tighter
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1024px) {
	.spark-exs {
		padding: 64px 0 72px;
	}

	.spark-exs .spark-exs__title {
		font-size: 30px;
		margin-bottom: 36px;
	}

	.spark-exs__list {
		gap: 16px;
	}

	.spark-exs__cta {
		margin-top: 36px;
	}
}

/* ==========================================================================
   6. MOBILE (767px and below): full-width cards, the first few, then "View more"
   ========================================================================== */
@media (max-width: 767px) {
	.spark-exs {
		padding: 48px 0;
	}

	.spark-exs .spark-exs__title {
		margin-bottom: 24px;
		font-size: 24px;
	}

	.spark-exs__list {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 16px;
	}

	.spark-exs__item {
		width: 100%;
	}

	.spark-exs .spark-exs__card {
		width: 100%;
	}

	/* Cards after the first few wait behind "View more". */
	.spark-exs:not(.is-expanded) .spark-exs__item--extra {
		display: none;
	}

	.spark-exs .spark-exs__more {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		margin: 16px auto 0;
		padding: 4px 8px;
		border: 0;
		border-radius: 0;
		background: transparent;
		color: var(--exs-muted);
		font-family: var(--exs-body-font);
		font-size: 16px;
		font-weight: 400;
		line-height: 1.2;
		text-transform: none;
		cursor: pointer;
	}

	.spark-exs .spark-exs__more:hover,
	.spark-exs .spark-exs__more:focus {
		background: transparent;
		color: var(--exs-label);
	}

	.spark-exs .spark-exs__more:focus-visible {
		outline: 2px solid var(--exs-label);
		outline-offset: 2px;
	}

	.spark-exs__chevron {
		flex: none;
		transition: transform 0.2s ease;
	}

	.spark-exs.is-expanded .spark-exs__chevron {
		transform: rotate(180deg);
	}

	.spark-exs__cta {
		margin-top: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spark-exs * {
		transition: none !important;
	}
}
