/* Card grid and cost estimator with a path toggle (instrument rating cost page). Builds on path-sections.css */

/* Card grid: numbered cards, icon cards on a light blue band, numbered icon cards in a navy panel */
.card_grid__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.card_grid__card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 32px;
	border: 1px solid var(--gray-100);
	border-radius: var(--radius-2026);
	background: #ffffff;
	box-shadow: var(--shadow-2026-card);
}

.card_grid__number {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	background: var(--navy-600);
	color: #ffffff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}

.card_grid__icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: var(--radius-2026);
	background: var(--sky-50);
}

.card_grid__icon svg,
.card_grid__icon img {
	display: block;
}

.design_2026 .card_grid__card h3 {
	margin-top: 6px;
	font-size: 22px;
	line-height: 1.3;
	letter-spacing: 0;
}

.card_grid__card p {
	font-size: 17px;
	line-height: 1.55;
}

.design_2026 .card_grid__link {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: auto;
	padding-top: 4px;
	color: var(--sky-600);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
}

.design_2026 .card_grid__link:hover {
	color: var(--navy-600);
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* .design_2026 sits on the section itself, next to .card_grid, so these selectors chain the two classes */
.card_grid.design_2026 .path_head p a {
	color: var(--sky-600);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

.card_grid.design_2026 .path_head p a:hover {
	color: var(--navy-600);
}

/* Icon cards on a light blue band */
.card_grid_icons .card_grid__panel {
	padding: 56px 56px 60px;
	border-radius: var(--radius-2026);
	background: var(--sky-50);
}

.card_grid_icons .card_grid__card {
	border-color: #C9F1FC;
	box-shadow: 0 4px 12px rgba(15, 20, 45, 0.06), 0 1px 3px rgba(15, 20, 45, 0.04);
}

/* Numbered icon cards in a navy panel: icon on the left, number, title and text on the right */
.card_grid_navy .card_grid__panel {
	padding: 64px;
	border-radius: var(--radius-2026);
	background: var(--navy-600);
}

.card_grid_navy .design_2026_title {
	color: #ffffff;
}

.card_grid_navy .path_head p {
	color: var(--navy-100);
}

.card_grid_navy .card_grid__cards {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.card_grid_navy .card_grid__card {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	align-content: start;
	column-gap: 20px;
	row-gap: 0;
	padding: 28px;
	border-color: rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.06);
	box-shadow: none;
}

.card_grid_navy .card_grid__card > * {
	grid-column: 2;
}

.card_grid_navy .card_grid__card > .card_grid__icon {
	grid-column: 1;
	grid-row: 1 / span 4;
	border: 1px solid rgba(85, 211, 245, 0.35);
	border-radius: 999px;
	background: rgba(85, 211, 245, 0.12);
}

.design_2026 .card_grid__label {
	margin: 2px 0 4px;
	color: var(--sky-300);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.card_grid_navy.design_2026 .card_grid__card h3 {
	margin: 0 0 8px;
	color: #ffffff;
}

.card_grid_navy .card_grid__card p:not(.card_grid__label) {
	color: var(--navy-100);
}

/* Cost estimator: title and path cards on the left, the calculator of the chosen path on the right */
.cost_estimator__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 440px;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"head calculator"
		"paths calculator";
	align-items: start;
	column-gap: 64px;
}

.cost_estimator .path_head {
	grid-area: head;
	margin-bottom: 32px;
}

.cost_estimator__calculators {
	grid-area: calculator;
}

/* .path_estimator is a flex box, which would otherwise show the hidden calculators */
.cost_estimator .path_estimator[hidden] {
	display: none;
}

.cost_estimator__toggle {
	display: grid;
	grid-template-columns: repeat(var(--paths, 2), minmax(0, 1fr));
	padding: 4px;
	border: 1px solid var(--gray-100);
	border-radius: 999px;
	background: #F4F6FA;
}

.design_2026 .cost_estimator__toggle button {
	min-height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--gray-600);
	font-family: var(--font-2026);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.14s ease, color 0.14s ease;
}

.design_2026 .cost_estimator__toggle button:hover {
	color: var(--navy-600);
}

.design_2026 .cost_estimator__toggle button.is_active {
	background: var(--navy-600);
	color: #ffffff;
	box-shadow: 0 2px 6px rgba(15, 20, 45, 0.18);
}

.cost_estimator .path_estimator__title {
	margin-top: 6px;
}

.cost_estimator__paths {
	grid-area: paths;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cost_estimator__path {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px 28px;
	border: 1.5px solid var(--gray-100);
	border-radius: var(--radius-2026);
	background: #F4F6FA;
	transition: background-color 0.14s ease, border-color 0.14s ease;
}

.cost_estimator__path.is_active {
	border-color: var(--sky-400);
	background: var(--sky-50);
}

.cost_estimator__path_top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.design_2026 .cost_estimator__path h3 {
	font-size: 22px;
	line-height: 1.3;
	letter-spacing: 0;
}

.cost_estimator__tag {
	flex: none;
	padding: 4px 12px;
	border: 1px solid var(--gray-100);
	border-radius: 999px;
	background: #ffffff;
	color: var(--gray-700, #333B4C);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.cost_estimator__path p {
	font-size: 17px;
	line-height: 1.55;
}

.design_2026 .cost_estimator__link {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 4px;
	color: var(--sky-600);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
}

.design_2026 .cost_estimator__link:hover {
	color: var(--navy-600);
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (max-width: 1199px) {
	.card_grid__cards {
		gap: 20px;
	}

	.card_grid__card {
		padding: 28px;
	}

	.card_grid_icons .card_grid__panel,
	.card_grid_navy .card_grid__panel {
		padding: 48px 40px;
	}

	.cost_estimator__grid {
		grid-template-columns: minmax(0, 1fr) 400px;
		column-gap: 40px;
	}
}

@media (max-width: 991px) {
	.card_grid__cards,
	.card_grid_navy .card_grid__cards {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Calculator under the title, the path cards under the calculator */
	.cost_estimator__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto;
		grid-template-areas:
			"head"
			"calculator"
			"paths";
	}

	.cost_estimator .path_head {
		margin-bottom: 24px;
	}

	.cost_estimator__paths {
		width: 100%;
		max-width: 480px;
		margin: 16px auto 0;
	}
}

/* Phones */
@media (max-width: 767px) {
	/* The number or icon sits next to the title, the text runs below both */
	.card_grid__card,
	.card_grid_navy .card_grid__card {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-items: center;
		column-gap: 14px;
		row-gap: 10px;
		padding: 24px 20px;
	}

	.card_grid__card > *,
	.card_grid_navy .card_grid__card > * {
		grid-column: 1 / -1;
	}

	.card_grid__card > .card_grid__number,
	.card_grid__card > .card_grid__icon {
		grid-column: 1;
		grid-row: 1;
	}

	.card_grid__card > .card_grid__number + h3,
	.card_grid__card > .card_grid__icon + h3 {
		grid-column: 2;
		grid-row: 1;
	}

	.card_grid_numbers .card_grid__cards {
		gap: 20px;
	}

	.card_grid__number {
		width: 40px;
		height: 40px;
		font-size: 18px;
	}

	.card_grid__icon {
		width: 44px;
		height: 44px;
	}

	.design_2026 .card_grid__card h3 {
		margin-top: 0;
		font-size: 20px;
		line-height: 1.25;
	}

	.card_grid__card p {
		font-size: 16px;
	}

	.design_2026 .card_grid__link {
		min-height: 44px;
		margin-top: 0;
		margin-bottom: -10px;
		padding-top: 0;
	}

	.card_grid_icons .card_grid__panel {
		padding: 32px 14px 16px;
	}

	.card_grid_icons .card_grid__cards {
		gap: 14px;
	}

	.card_grid_icons .card_grid__card {
		padding: 22px 20px;
	}

	/* Navy panel: number and icon on one row, title and text below */
	.card_grid_navy .card_grid__panel {
		padding: 32px 20px;
	}

	.card_grid_navy .path_head {
		align-items: flex-start;
		padding: 0;
		text-align: left;
	}

	.card_grid_navy .card_grid__cards {
		gap: 12px;
	}

	.card_grid_navy .card_grid__card {
		grid-template-columns: minmax(0, 1fr) auto;
		row-gap: 8px;
		padding: 20px;
	}

	.card_grid_navy .card_grid__card > .card_grid__label {
		grid-column: 1;
		grid-row: 1;
		margin: 0;
	}

	.card_grid_navy .card_grid__card > .card_grid__icon {
		grid-column: 2;
		grid-row: 1;
		width: 40px;
		height: 40px;
	}

	.card_grid_navy .card_grid__icon svg,
	.card_grid_navy .card_grid__icon img {
		width: 22px !important;
		height: 22px !important;
	}

	.card_grid_navy.design_2026 .card_grid__card h3 {
		margin: 0;
	}

	.cost_estimator__paths {
		max-width: none;
		gap: 12px;
	}

	.cost_estimator__path {
		gap: 6px;
		padding: 20px 20px 10px;
	}

	.design_2026 .cost_estimator__path h3 {
		font-size: 20px;
		line-height: 1.25;
	}

	.cost_estimator__tag {
		padding: 3px 10px;
		font-size: 13px;
	}

	.cost_estimator__path p {
		font-size: 16px;
	}

	.design_2026 .cost_estimator__link {
		min-height: 44px;
		margin-top: 0;
	}
}
