/**
 * NCT Article CTA
 *
 * Self-contained on purpose. Divi's "Dynamic Assets" only ships CSS for module
 * slugs literally present in a page's shortcode text, so borrowing .et_pb_button
 * would render unstyled on articles with no real Button module. Nothing here
 * depends on Divi or on the child theme.
 *
 * Colours are redeclared locally rather than inherited from the child theme's
 * :root so a theme change cannot break them.
 *
 * Contrast: #108b44 on white is 4.37:1 and FAILS WCAG AA for normal text.
 * #1d5a2c is 8.2:1. Text and button backgrounds therefore use --nct-darkgreen;
 * --nct-green is reserved for hover states only.
 */

.nct-svclink,
.nct-cta {
	--nct-green: #108b44;
	--nct-darkgreen: #1d5a2c;
	--nct-bright: #149848;
	--nct-ink: #082417;

	box-sizing: border-box;
	max-width: 100%;
}

.nct-svclink *,
.nct-cta * {
	box-sizing: inherit;
}

/* ---------------------------------------------------------------- top link */

.nct-svclink {
	margin: 0 0 18px;
}

.nct-svclink__link {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.5em;
	padding: 8px 16px;
	border-left: 3px solid var(--nct-darkgreen);
	background: #f4f8f5;
	color: var(--nct-darkgreen);
	font-size: 16px;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.nct-svclink__link:hover,
.nct-svclink__link:focus {
	background: #e8f1ea;
	color: var(--nct-green);
	text-decoration: none;
}

.nct-svclink__link:focus-visible {
	outline: 2px solid var(--nct-darkgreen);
	outline-offset: 2px;
}

.nct-svclink__eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nct-ink);
	opacity: 0.7;
}

.nct-svclink__label {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nct-svclink__arrow {
	font-weight: 700;
}

/* ------------------------------------------------------------- bottom CTA */

.nct-cta {
	margin: 32px 0 0;
	padding: 28px;
	border: 1px solid #dbe5dd;
	border-top: 4px solid var(--nct-darkgreen);
	border-radius: 4px;
	background: #f4f8f5;
}

.nct-cta__headline {
	margin: 0 0 10px;
	color: var(--nct-ink);
	font-size: 26px;
	line-height: 1.25;
	font-weight: 700;
}

.nct-cta__blurb {
	margin: 0 0 18px;
	color: #333;
	font-size: 17px;
	line-height: 1.6;
}

.nct-cta__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin: 0;
}

.nct-cta__btn {
	display: inline-block;
	padding: 13px 26px;
	border: 2px solid var(--nct-darkgreen);
	border-radius: 3px;
	background: var(--nct-darkgreen);
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nct-cta__btn:hover,
.nct-cta__btn:focus {
	background: var(--nct-green);
	border-color: var(--nct-green);
	color: #fff;
	text-decoration: none;
}

.nct-cta__btn:focus-visible,
.nct-cta__tel:focus-visible {
	outline: 2px solid var(--nct-ink);
	outline-offset: 2px;
}

.nct-cta__tel {
	color: var(--nct-darkgreen);
	font-size: 17px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nct-cta__tel:hover,
.nct-cta__tel:focus {
	color: var(--nct-green);
}

/* --------------------------------------------------------------- mobile */

@media (max-width: 480px) {
	.nct-cta {
		padding: 22px 18px;
	}

	.nct-cta__headline {
		font-size: 22px;
	}

	.nct-cta__actions {
		align-items: stretch;
		flex-direction: column;
		gap: 14px;
	}

	.nct-cta__tel {
		text-align: center;
	}
}

/* ----------------------------------------------------------------- Divi
 * Divi's module CSS wins the cascade on anchors inside builder content.
 * Mirror the specificity prefix the child theme already uses, duplicating
 * only the rules Divi actually fights over. No !important.
 */

.et-db #et-boc .et-l .nct-svclink__link {
	color: var(--nct-darkgreen);
	text-decoration: none;
}

.et-db #et-boc .et-l .nct-svclink__link:hover {
	color: var(--nct-green);
}

.et-db #et-boc .et-l .nct-cta__headline {
	margin: 0 0 10px;
	padding: 0;
	color: var(--nct-ink);
	font-size: 26px;
	line-height: 1.25;
}

.et-db #et-boc .et-l .nct-cta__blurb {
	margin: 0 0 18px;
	padding: 0;
	line-height: 1.6;
}

.et-db #et-boc .et-l .nct-cta__btn {
	background: var(--nct-darkgreen);
	color: #fff;
	text-decoration: none;
}

.et-db #et-boc .et-l .nct-cta__btn:hover {
	background: var(--nct-green);
	color: #fff;
}

.et-db #et-boc .et-l .nct-cta__tel {
	color: var(--nct-darkgreen);
}
