/* ═══════════════════════════════════════════════════════════════════════════
   PROBLEM CARDS — two-up coloured card grid with a diamond backdrop
   Used by the EYFS page and the English and literacy page. Both class names
   are listed on every rule so the EYFS markup did not have to change.
   ═══════════════════════════════════════════════════════════════════════════ */

.ce-eyfs-problems,
.ce-problem-cards {
	background: #fff;
	padding: 5rem 0;
	position: relative;
	overflow: clip;
	transform: translateZ(0);
	-webkit-transform: translateZ(0);
	backdrop-filter: blur(0px);
	-webkit-backdrop-filter: blur(0px);
}

	/* ── "What you get" on the English page ─────────────────────────────────
	   Joins the lists below rather than restating the values, so it cannot
	   drift from "Why embedded English works better" further up the same
	   page — the two sit one after the other and are meant to read as one
	   surface. .ce-feature-list sets a flat #f9f9f9; this wins on source
	   order, since problem-cards.css is enqueued with ce-feature-list as a
	   dependency and therefore loads after it. */
.ce-eng-what-you-get {
	background: #fff;
	position: relative;
	overflow: clip;
}

.ce-eyfs-problems::before,
.ce-problem-cards::before,
.ce-eng-what-you-get::before {
	content: '';
	position: absolute;
	width: 450px;
	height: 450px;
	background: #f9f9f9;
	border-radius: 2.75rem;
	transform: rotate(45deg);
	top: -80px;
	left: -90px;
	pointer-events: none;
	z-index: 0;
}

.ce-eyfs-problems::after,
.ce-problem-cards::after,
.ce-eng-what-you-get::after {
	content: '';
	position: absolute;
	width: 260px;
	height: 260px;
	background: #f9f9f9;
	border-radius: 2rem;
	transform: rotate(45deg);
	top: 420px;
	left: 178px;
	pointer-events: none;
	z-index: 0;
}

.ce-eyfs-problems .site-container,
.ce-problem-cards .site-container,
.ce-eng-what-you-get .site-container {
	position: relative;
	z-index: 1;
}

.ce-eyfs-problems .ce-feature-list__item--linked,
.ce-problem-cards .ce-feature-list__item--linked {
	position: relative;
}

.ce-eyfs-problems .ce-stretched-link::after,
.ce-problem-cards .ce-stretched-link::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 1.5rem;
	z-index: 1;
}

.ce-eyfs-problems__title-row,
.ce-problem-cards__title-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	margin-bottom: 0.75rem;
}

.ce-eyfs-problems__heading,
.ce-problem-cards__heading {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-h2);
	font-weight: 700;
	color: #646464;
	margin: 0;
	line-height: 1.25;
}

.ce-eyfs-problems__sub,
.ce-problem-cards__sub {
	font-family: var(--ci-font-primary);
	font-size: var(--ci-text-body);
	color: #7a8a9a;
	text-align: center;
	margin: 0 auto 3rem;
	line-height: 1.7;
}

.ce-eyfs-problems__grid,
.ce-problem-cards__grid {
	grid-template-columns: repeat(2, 1fr);
}

/* The English cards are header-plus-paragraph, so feature-list.css aligns
   their paragraphs across each row automatically. The EYFS cards carry a third
   child, .ce-cc-card-link-wrap, so that rule's shape test excludes them and
   they are left as they were — see the note in feature-list.css. */
.ce-eyfs-problems__grid .ce-feature-list__item,
.ce-problem-cards__grid .ce-feature-list__item {
	gap: 0.5rem;
	padding: 1.25rem 1.5rem;
	min-height: auto !important;
}

.ce-eyfs-problems__card-header,
.ce-problem-cards__card-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.ce-eyfs-problems__card-header .ce-feature-list__title,
.ce-problem-cards__card-header .ce-feature-list__title {
	margin: 0;
}

.ce-eyfs-problems__grid .ce-feature-list__desc,
.ce-problem-cards__grid .ce-feature-list__desc {
	flex: 1;
}

.ce-eyfs-problems__grid .ce-cc-card-link-wrap,
.ce-problem-cards__grid .ce-cc-card-link-wrap {
	margin-top: 0;
}

/* Accent colour text links — colour at rest, darkened on hover */
.ce-eyfs-problems__grid .ce-feature-list__item:nth-child(4n+1) .ce-cc-card-link,
.ce-problem-cards__grid .ce-feature-list__item:nth-child(4n+1) .ce-cc-card-link { color: var(--ci-color-engage); }
.ce-eyfs-problems__grid .ce-feature-list__item:nth-child(4n+1) .ce-cc-card-link:hover,
.ce-problem-cards__grid .ce-feature-list__item:nth-child(4n+1) .ce-cc-card-link:hover { color: #d97e10; }
.ce-eyfs-problems__grid .ce-feature-list__item:nth-child(4n+2) .ce-cc-card-link,
.ce-problem-cards__grid .ce-feature-list__item:nth-child(4n+2) .ce-cc-card-link { color: var(--ci-color-develop); }
.ce-eyfs-problems__grid .ce-feature-list__item:nth-child(4n+2) .ce-cc-card-link:hover,
.ce-problem-cards__grid .ce-feature-list__item:nth-child(4n+2) .ce-cc-card-link:hover { color: #8a3a5c; }
.ce-eyfs-problems__grid .ce-feature-list__item:nth-child(4n+3) .ce-cc-card-link,
.ce-problem-cards__grid .ce-feature-list__item:nth-child(4n+3) .ce-cc-card-link { color: var(--ci-color-innovate); }
.ce-eyfs-problems__grid .ce-feature-list__item:nth-child(4n+3) .ce-cc-card-link:hover,
.ce-problem-cards__grid .ce-feature-list__item:nth-child(4n+3) .ce-cc-card-link:hover { color: #3a6e87; }
.ce-eyfs-problems__grid .ce-feature-list__item:nth-child(4n+4) .ce-cc-card-link,
.ce-problem-cards__grid .ce-feature-list__item:nth-child(4n+4) .ce-cc-card-link { color: #71947e; }
.ce-eyfs-problems__grid .ce-feature-list__item:nth-child(4n+4) .ce-cc-card-link:hover,
.ce-problem-cards__grid .ce-feature-list__item:nth-child(4n+4) .ce-cc-card-link:hover { color: #557060; }

@media (max-width: 680px) {
	.ce-eyfs-problems,
	.ce-problem-cards {
		padding: 3rem 0;
	}

	.ce-eyfs-problems__grid,
	.ce-problem-cards__grid {
		grid-template-columns: 1fr;
	}
}
