/* ============================================================
   Split with Checklist section
   Design ref: "Is Littledale For Me?" - designs/Homepage Design
   Desktop.jpg y700-1650, Mobile y830-2330.
   Image with offset grey underlay one side, content the other.
   Mobile: heading block > image > checklist > button (DOM order).
   ============================================================ */

.split-checklist {
	background: var(--color-light-grey);
	padding-block: var(--section-padding);
}

/* Cream band variant (pages that alternate bands, e.g. Programme & Approach) */
.split-checklist--cream {
	background: var(--color-cream-light);
}

.split-checklist__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
}

/* No-checklist splits (e.g. "The Setting"): the image leads on mobile.
   Splits WITH a checklist keep heading > image > checklist per their design. */
@media (max-width: 1023.98px) {
	.split-checklist--no-items .split-checklist__media {
		order: -1;
	}
}

/* ---- Content (eyebrow / heading / intro) ---- */

.split-checklist__heading {
	margin-bottom: var(--space-md);
}

.split-checklist__text {
	max-width: 60ch;
}

.split-checklist__text p {
	margin: 0 0 1em;
}

.split-checklist__text p:last-child {
	margin-bottom: 0;
}

/* ---- Media: photo with grey underlay offset up-left ---- */

.split-checklist__media {
	/* room for the underlay that extends beyond the photo's top-left */
	padding: 2rem 0 0 2rem;
}

.split-checklist__frame {
	position: relative;
}

.split-checklist__frame::before {
	content: "";
	position: absolute;
	top: -2rem;
	left: -2rem;
	right: 2rem;
	bottom: 2rem;
	background: var(--color-image-underlay);
	border-radius: var(--radius-sm);
}

.split-checklist__image {
	position: relative;
	width: 100%;
	height: auto;
	/* Design shows square images regardless of upload aspect */
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--radius-xs);
	box-shadow: var(--shadow-soft);
}

/* ---- Checklist ---- */

.split-checklist__items {
	list-style: none;
	margin: 0 0 var(--space-lg);
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

.split-checklist__item {
	display: flex;
	gap: var(--space-sm);
	align-items: flex-start;
}

.split-checklist__icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	color: var(--color-accent);
}

.split-checklist__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.split-checklist__item-title {
	margin-bottom: 0.25rem;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--color-heading);
}

.split-checklist__item-text {
	margin-bottom: 0;
}

/* Button: centred on mobile per the design, left-aligned on desktop */
.split-checklist__details {
	display: flex;
	flex-direction: column;
}

.split-checklist__button {
	align-self: center;
}

@media (min-width: 1024px) {
	.split-checklist__button {
		align-self: flex-start;
	}
}

/* ---- Desktop split ---- */

@media (min-width: 1024px) {
	/* Design breathes more here than the generic section padding */
	.split-checklist {
		padding-block: 7.5rem 9.5rem;
	}

	.split-checklist__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		column-gap: 5rem;
		row-gap: var(--space-md);
		align-items: start;
	}

	.split-checklist__media {
		grid-column: 1;
		grid-row: 1 / span 2;
		/* Vertically centred against the content column - at design width
		   this lands where the mockup places it (underlay ~heading level),
		   and it stays balanced when the viewport narrows and the text
		   column grows taller */
		align-self: center;
	}

	.split-checklist__content {
		grid-column: 2;
		grid-row: 1;
	}

	.split-checklist__details {
		grid-column: 2;
		grid-row: 2;
	}

	/* Modifier: image on the right instead */
	.split-checklist--image-right .split-checklist__media {
		grid-column: 2;
	}

	.split-checklist--image-right .split-checklist__content,
	.split-checklist--image-right .split-checklist__details {
		grid-column: 1;
	}
}
