/*
 * EG Course: the course card at the end of the exercises (class-egc-card.php).
 * Buttons and colors come from base.css.
 */

.egc-card {
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	margin: 32px 0 8px;
	padding: 26px 28px 24px;
	border: 1px solid #d8d8d3;
	border-top: 3px solid var(--egc-button-bg);
	border-radius: 4px;
	background: radial-gradient(ellipse at 0 0, rgba(246, 226, 159, 0.22), transparent 52%), radial-gradient(ellipse at 100% 0, rgba(121, 194, 185, 0.12), transparent 54%), #f8f8f6;
	text-align: center;
}

/* The theme takes the bottom margin off the last element of a post; the card keeps its own. */
.entry-content > .egc-card:last-child {
	margin-bottom: 8px;
}

.egc-card__inner {
	max-width: 760px;
	margin: 0 auto;
}

.egc-card .egc-card__title {
	margin: 0 0 8px;
	color: #2f2f2f;
	font-size: clamp(23px, 3vw, 27px);
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-align: center;
	text-wrap: balance;
}

.egc-card .egc-card__message {
	max-width: 58ch;
	margin: 0 auto 14px;
	color: #333333;
	font-size: 16px;
	line-height: 1.5;
}

/* The lines: a centered column of ticks. */

.egc-card ul.egc-card__benefits {
	display: grid;
	gap: 6px;
	width: fit-content;
	max-width: min(100%, 520px);
	margin: 0 auto 16px;
	padding: 0;
	list-style: none;
	text-align: left;
}

.egc-card ul.egc-card__benefits > li {
	position: relative;
	display: block;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0 0 0 24px;
	color: #303b2b;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	list-style: none;
	overflow-wrap: break-word;
}

.egc-card ul.egc-card__benefits > li::before {
	position: absolute;
	top: 1px;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #416d27;
	color: #ffffff;
	content: "✓" / "";
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
}

/* The lesson that teaches the exercise's topic. */

.egc-card .egc-card__lesson {
	display: grid;
	gap: 2px;
	box-sizing: border-box;
	width: fit-content;
	max-width: min(100%, 520px);
	margin: 0 auto 16px;
	padding: 11px 16px 12px 14px;
	border: 1px solid #d8e4d0;
	border-left: 4px solid var(--egc-button-bg);
	border-radius: 8px;
	background: #ffffff;
	color: #263020;
	font-size: 15px;
	line-height: 1.45;
	text-align: left;
	overflow-wrap: break-word;
}

.egc-card__lesson > span,
.egc-card__lesson > strong {
	display: block;
	margin: 0;
}

.egc-card .egc-card__lesson-label {
	color: #44642f;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.egc-card .egc-card__lesson-title {
	color: #1d2a17;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.egc-card .egc-card__lesson-title a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.egc-card .egc-card__lesson-title a:hover {
	text-decoration-thickness: 2px;
}

.egc-card .egc-card__lesson-where {
	color: #5c655b;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
}

/* The button and the two links under it. */

.egc-card__actions {
	max-width: 520px;
	margin: 0 auto;
}

.egc-card .egc-card__button {
	width: 100%;
	min-height: 46px;
	padding: 11px 18px;
	font-size: 16.5px;
}

.egc-card .egc-card__signin {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.5;
}

.egc-card .egc-card__signin-link {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 4px;
	color: #4b8f29;
	font-weight: 600;
}

.egc-card .egc-card__signin-link:hover,
.egc-card .egc-card__signin-link:focus {
	text-decoration: underline;
}

.egc-card .egc-card__more {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.5;
}

.egc-card .egc-card__more a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 2px 4px;
	color: #3d6427;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.egc-card .egc-card__more a:focus-visible {
	outline: 2px solid #416d27;
	outline-offset: 3px;
}

@media (max-width: 600px) {
	.egc-card {
		margin-top: 24px;
		padding: 20px 16px 18px;
	}

	.egc-card .egc-card__message {
		margin-bottom: 12px;
		font-size: 15px;
	}

	.egc-card ul.egc-card__benefits > li {
		font-size: 14.5px;
	}
}

@media (max-width: 520px) {
	.egc-card .egc-card__lesson {
		width: 100%;
	}

	.egc-card .egc-card__lesson-title {
		font-size: 15.5px;
	}
}

@media (forced-colors: active) {
	.egc-card .egc-card__lesson {
		border: 1px solid CanvasText;
		border-left-width: 4px;
	}
}
