/*
 * Installation Guide page. Builds on solution-pages.css (fonts, colours, breadcrumb, hero, buttons,
 * section bands) and adds the layouts from the page proof: video pair, text and picture split with
 * hairline rows, numbered stages, support cards, set-up questions as cards, closing band.
 */

.nj-ig .nj-sp-hero {
	min-height: 480px;
}

.nj-ig-lede {
	max-width: 640px;
	color: var(--cs-mid);
}

.nj-sp-section--dark .nj-ig-lede {
	color: rgba(255, 255, 255, 0.72);
}

/* Videos */
.nj-ig-vids {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
	margin-top: 32px;
}

.nj-ig-vid__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
}

.nj-ig-vid__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.nj-ig-vid h3 {
	margin-top: 16px;
}

.nj-ig-vid p {
	margin: 6px 0 0;
	font-size: 15px;
}

/* Text and picture */
.nj-ig-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 64px;
	align-items: start;
}

.nj-ig-rows {
	margin-top: 28px;
}

.nj-ig-row {
	border-top: 1px solid var(--cs-border);
	padding: 16px 0;
}

.nj-ig-row:last-child {
	border-bottom: 1px solid var(--cs-border);
}

.nj-ig-row h3 {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 4px;
}

.nj-ig-row p {
	margin: 0;
	font-size: 15px;
}

.nj-ig-figure {
	margin: 0;
}

.nj-ig-figure img {
	display: block;
	width: 100%;
	height: auto;
	background: var(--cs-white);
}

.nj-ig-figure figcaption {
	margin-top: 10px;
	font-size: 14px;
	color: var(--cs-muted);
}

/* Five stages */
.nj-ig-stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
	gap: 40px;
	align-items: center;
	background: var(--cs-white);
	border-left: 3px solid var(--cs-orange);
	padding: 28px;
	margin-top: 22px;
}

.nj-ig-stage img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 320px;
	object-fit: contain;
}

.nj-ig-stage .nj-ig-stage__num {
	font-family: "Jost", sans-serif;
	font-size: 40px;
	font-weight: 600;
	line-height: 1;
	color: var(--sp-orange-text); /* #b84a00, orange text on white (5.2:1), like the solution page step numbers */
	margin: 0 0 8px;
}

.nj-ig-stage h3 {
	font-size: 22px;
	margin-bottom: 10px;
}

.nj-ig-stage p {
	font-size: 15px;
	margin: 0 0 10px;
}

.nj-ig-stage p:last-child {
	margin-bottom: 0;
}

.nj-ig-stage strong {
	color: var(--cs-dark);
}

/* Support cards: follows the white snow band, so no second top gap */
.nj-ig .nj-ig-support {
	padding-top: 0;
}

.nj-ig-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.nj-ig-cards--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nj-ig-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--cs-border);
	border-top: 3px solid var(--cs-orange);
	padding: 28px;
	background: var(--cs-white);
}

.nj-ig-card h3 {
	margin-bottom: 8px;
}

.nj-ig-card p {
	flex: 1;
	font-size: 15px;
}

.nj-ig-link {
	align-self: flex-start;
	font-family: "Jost", sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: var(--cs-dark);
	text-decoration: none;
	border-bottom: 2px solid var(--cs-orange);
	padding-bottom: 2px;
}

.nj-ig-link:hover {
	color: var(--sp-orange-text);
}

/* Set-up questions: white cards on the grey band, three across, each opens on its own */
.nj-ig-faq__cols {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3px;
	margin-top: 32px;
	align-items: start;
}

.nj-ig-faq__item {
	background: var(--cs-white);
	padding: 0 20px;
	min-width: 0;
}

.nj-ig-faq__item[open] {
	box-shadow: inset 3px 0 0 var(--cs-orange);
}

.nj-ig-faq__item summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 72px;
	padding: 16px 0;
	font-family: "Jost", sans-serif;
	font-size: 17px;
	font-weight: 500;
	color: var(--cs-dark);
}

.nj-ig-faq__item summary::-webkit-details-marker {
	display: none;
}

.nj-ig-faq__item summary::after {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--cs-orange);
	border-bottom: 2px solid var(--cs-orange);
	transform: rotate(45deg) translateY(-3px);
	transition: transform 0.2s;
}

.nj-ig-faq__item[open] summary::after {
	transform: rotate(-135deg) translateY(-1px);
}

.nj-ig-faq__item p {
	margin: 0;
	padding: 0 0 20px;
	font-size: 15px;
}

/* Closing band */
.nj-ig-end__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 32px 64px;
	align-items: center;
}

.nj-ig-end h2 {
	max-width: 22ch;
	font-weight: 600;
	margin-bottom: 14px;
}

.nj-ig-end h2 span {
	color: var(--cs-orange);
}

.nj-ig-end p {
	max-width: 54ch;
	margin: 0;
}

/* Keep the button its own width when the grid collapses to one column */
.nj-ig-end__grid .nj-sp-btn {
	justify-self: start;
}

@media (max-width: 960px) {
	.nj-ig-faq__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.nj-ig-split,
	.nj-ig-stage,
	.nj-ig-end__grid {
		grid-template-columns: 1fr;
	}

	.nj-ig-split {
		gap: 32px;
	}

	.nj-ig-stage {
		gap: 18px;
		padding: 20px;
	}

	.nj-ig-cards,
	.nj-ig-cards--two {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	.nj-ig-vids {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 620px) {
	.nj-ig-faq__cols {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nj-ig-faq__item summary::after {
		transition: none;
	}
}
