/**
 * CSCS card pages and the cards hub.
 *
 * Everything is prefixed .acadame and anything touching a heading carries !important, because
 * site.min.css sets heading colour, size and margin with !important and would otherwise win.
 *
 * The cards themselves do most of the work here. They are wide, flat rectangles at 856 by 540, so
 * the layouts are built around that shape rather than around a square image well.
 */

/* ---------------------------------------------------------------- hero */

.acadame .cscs-hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 28px 44px; align-items: center; }
.acadame .cscs-hero-in.solo { grid-template-columns: minmax(0, 1fr); }
.acadame .cscs-hero-in.solo h1 { max-width: 20ch; }
.acadame .cscs-hero-art { margin: 0; }
.acadame .cscs-art { display: block; width: 100%; height: auto; border-radius: 14px; }
.acadame .cscs-art-hero { box-shadow: 0 26px 60px rgba(15, 48, 105, .26); }

/* ---------------------------------------------------------------- the fact strip */

.acadame .cscs-facts { background: var(--light); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.acadame .cscs-facts dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; }
.acadame .cscs-facts dl > div { padding: 18px 20px; border-left: 1px solid var(--border); }
.acadame .cscs-facts dl > div:first-child { border-left: 0; padding-left: 0; }
.acadame .cscs-facts dt { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--red-ink); }
.acadame .cscs-facts dd { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--primary); font-weight: 600; }

/* ---------------------------------------------------------------- what changed */

.acadame .cscs-changed { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: start; padding: 20px 22px; border: 1px solid #F3C9CF; border-left: 4px solid var(--red); border-radius: 12px; background: var(--lr); }
.acadame .cscs-changed strong { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--red-ink); padding-top: 2px; }
.acadame .cscs-changed p { margin: 0 !important; max-width: 72ch; color: var(--primary); }

/* ---------------------------------------------------------------- the pathway */

.acadame .cscs-steps { margin: 0 !important; padding: 0 !important; list-style: none !important; counter-reset: none; }
.acadame .cscs-steps > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; margin: 0 0 26px; padding: 0 0 26px; border-bottom: 1px solid var(--border); }
.acadame .cscs-steps > li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.acadame .cscs-steps b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--primary); color: #fff; font-size: 17px; font-weight: 800; }
.acadame .cscs-steps h3 { margin: 6px 0 8px !important; }
.acadame .cscs-steps p { margin: 0 !important; max-width: 68ch; }
.acadame .cscs-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px; }
.acadame .cscs-go { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--red-ink); text-decoration: none; }
.acadame .cscs-go::after { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.acadame .cscs-go:hover { text-decoration: underline; }
.acadame .cscs-need { margin-top: 26px; padding: 22px 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--light); }
.acadame .cscs-need h3 { margin: 0 0 10px !important; }

/* ---------------------------------------------------------------- same day, GQA, renewal */

.acadame .cscs-sameday { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; padding: 26px 28px; border-radius: 16px; background: linear-gradient(120deg, #0C2755 0%, var(--primary) 62%, #143A7C 100%); }
.acadame .cscs-sameday h2 { margin: 0 0 8px !important; color: #fff !important; }
.acadame .cscs-sameday p { margin: 0 !important; max-width: 62ch; color: rgba(255, 255, 255, .84); }
.acadame .cscs-sameday .acts { margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }

.acadame .cscs-gqa { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 26px 44px; align-items: center; }
.acadame .cscs-gqa figure { margin: 0; }
.acadame .cscs-gqa p { max-width: 62ch; }

.acadame .cscs-renew { max-width: 74ch; }

/* ---------------------------------------------------------------- the card grid */

.acadame .cscs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 20px; }
.acadame .cscs-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 18px; border: 1px solid var(--border); border-radius: 16px; background: #fff; text-decoration: none; box-shadow: var(--sh); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.acadame .cscs-tile:hover { transform: translateY(-2px); border-color: #C6D5EA; box-shadow: 0 16px 36px rgba(15, 48, 105, .14); }
.acadame .cscs-tile .cscs-art { margin-bottom: 8px; }
.acadame .cscs-tile strong { font-size: 15px; line-height: 1.3; color: var(--primary); }
.acadame .cscs-tile span { font-size: 13.5px; line-height: 1.5; color: var(--text); }
.acadame .cscs-tile em { margin-top: auto; padding-top: 8px; font-style: normal; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--red-ink); }

/* ---------------------------------------------------------------- NVQ to card */

.acadame .cscs-routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.acadame .cscs-trade { padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.acadame .cscs-trade h3 { margin: 0 0 10px !important; }
.acadame .cscs-trade ul { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.acadame .cscs-trade li { padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.45; }
.acadame .cscs-trade li:first-child { border-top: 0; }
.acadame .cscs-trade li a { color: var(--primary); font-weight: 600; text-decoration: none; }
.acadame .cscs-trade li a:hover { text-decoration: underline; }
.acadame .cscs-trade li span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text); }

/* ---------------------------------------------------------------- the checker */

.acadame .cscs-checker { padding: 26px 28px; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: var(--sh); }
.acadame .ck-trail { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.acadame .ck-back { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--light); font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; }
.acadame .ck-back:hover { border-color: #C6D5EA; color: var(--primary); }
.acadame .ck-back::before { content: "\2190"; margin-right: 6px; }
.acadame .ck-q { margin: 0 0 6px !important; font-size: 19px !important; }
.acadame .ck-q:focus-visible, .acadame .ck-result h3:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.acadame .ck-help { margin: 0 0 16px !important; font-size: 14px; color: var(--text); max-width: 68ch; }
.acadame .ck-opts { display: grid; gap: 10px; }
.acadame .ck-opt { display: block; width: 100%; padding: 15px 44px 15px 18px; border: 1px solid var(--border); border-radius: 13px; background: #fff; font: inherit; font-size: 14.5px; line-height: 1.45; font-weight: 600; color: var(--primary); text-align: left; cursor: pointer; position: relative; transition: border-color .14s ease, background .14s ease; }
.acadame .ck-opt::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -5px; border-top: 2px solid var(--red-ink); border-right: 2px solid var(--red-ink); transform: rotate(45deg); }
.acadame .ck-opt:hover { border-color: var(--red); background: var(--lr); }
.acadame .ck-opt:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.acadame .ck-result { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 22px 30px; align-items: center; }
.acadame .ck-art { margin: 0; }
.acadame .ck-art img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 18px 40px rgba(15, 48, 105, .2); }
.acadame .ck-result h3 { margin: 0 0 8px !important; font-size: 21px !important; }
.acadame .ck-result p { margin: 0 0 10px !important; max-width: 56ch; }
.acadame .ck-note { padding: 12px 14px; border-left: 3px solid var(--red); border-radius: 0 8px 8px 0; background: var(--lr); font-size: 14px; color: var(--primary); }
.acadame .ck-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 14px 0 !important; }
.acadame .ck-facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--red-ink); }
.acadame .ck-facts dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; color: var(--primary); }
.acadame .ck-result .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 900px) {
	.acadame .cscs-hero-in,
	.acadame .cscs-gqa,
	.acadame .ck-result { grid-template-columns: minmax(0, 1fr); }
	.acadame .cscs-sameday { grid-template-columns: minmax(0, 1fr); }
	.acadame .cscs-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.acadame .cscs-facts dl > div { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; }
	.acadame .cscs-facts dl > div:nth-child(-n+2) { border-top: 0; }
	.acadame .ck-art { max-width: 340px; }
}
@media (max-width: 560px) {
	.acadame .cscs-checker { padding: 20px 18px; }
	.acadame .cscs-steps > li { grid-template-columns: 36px minmax(0, 1fr); gap: 14px; }
	.acadame .cscs-steps b { width: 36px; height: 36px; border-radius: 11px; font-size: 15px; }
	.acadame .cscs-facts dl { grid-template-columns: minmax(0, 1fr); }
	.acadame .cscs-facts dl > div:nth-child(-n+2) { border-top: 1px solid var(--border); }
	.acadame .cscs-facts dl > div:first-child { border-top: 0; }
}
