/* NOWCAP Academy site styles: landing page, then the course catalog.
   Landing page
   Colors come from the theme (with fallbacks) so a palette change in the theme carries over. */

.ncah {
	--ncah-teal: var(--wp--preset--color--deep-teal, #193b43);
	--ncah-sage: var(--wp--preset--color--sage, #467e72);
	--ncah-soft: var(--wp--preset--color--soft-sage, #c7e0cf);
	--ncah-off: var(--wp--preset--color--off-white, #f6f7f5);
	--ncah-gold: var(--wp--preset--color--warm-gold, #d6a45c);
	--ncah-muted: var(--wp--preset--color--muted, #61746e);
	--ncah-head: "Atkinson Hyperlegible", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--ncah-radius: 18px;

	margin-block-start: 0 !important;
	color: var(--ncah-teal);
	background: var(--ncah-off);
	overflow-x: clip;
}

.ncah *,
.ncah *::before,
.ncah *::after { box-sizing: border-box; }

.ncah h1, .ncah h2, .ncah h3 { font-family: var(--ncah-head); margin: 0; }
.ncah p { margin: 0; }

.ncah-wrap {
	width: min(1160px, 100% - 2.5rem);
	margin-inline: auto;
}

/* ---------- Buttons ---------- */
.ncah-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.ncah-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: .8rem 1.6rem;
	border-radius: 999px;
	font-family: var(--ncah-head);
	font-weight: 700;
	font-size: 1.05rem;
	text-decoration: none !important;
	border: 2px solid transparent;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ncah-btn:hover { transform: translateY(-2px); }
.ncah-btn:focus-visible { outline: 3px solid var(--ncah-gold); outline-offset: 3px; }

.ncah-btn--gold { background: var(--ncah-gold); color: var(--ncah-teal) !important; box-shadow: 0 8px 24px rgba(214,164,92,.35); }
.ncah-btn--gold:hover { background: #e2b46e; }
.ncah-btn--ghost { color: #fff !important; border-color: rgba(255,255,255,.55); }
.ncah-btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.ncah-btn--teal { background: var(--ncah-teal); color: #fff !important; }
.ncah-btn--teal:hover { background: #0f2a30; }

/* ---------- Hero ---------- */
.ncah-hero {
	position: relative;
	color: #fff;
	background:
		radial-gradient(circle at 82% 18%, rgba(214,164,92,.28) 0, rgba(214,164,92,0) 32%),
		radial-gradient(circle at 10% 90%, rgba(70,126,114,.55) 0, rgba(70,126,114,0) 45%),
		linear-gradient(160deg, #1f4952 0%, var(--ncah-teal) 55%, #12303a 100%);
	padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(6rem, 11vw, 9rem);
}

.ncah-hero__inner {
	width: min(1160px, 100% - 2.5rem);
	margin-inline: auto;
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
	position: relative;
	z-index: 1;
}

.ncah-eyebrow {
	display: inline-block;
	font-family: var(--ncah-head);
	font-weight: 700;
	font-size: .85rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ncah-gold);
	margin-bottom: 1.1rem !important;
	padding-left: 2.6rem;
	position: relative;
}
.ncah-eyebrow::before {
	content: "";
	position: absolute; left: 0; top: 50%;
	width: 2rem; height: 2px;
	background: var(--ncah-gold);
}

.ncah-hero__title {
	font-size: clamp(2.6rem, 6.2vw, 4.6rem);
	line-height: 1.04;
	letter-spacing: -.02em;
	color: #fff;
	margin-bottom: 1.4rem !important;
}
.ncah-hero__title span { display: block; color: var(--ncah-soft); }

.ncah-hero__lead {
	font-size: clamp(1.1rem, 1.8vw, 1.3rem);
	line-height: 1.6;
	max-width: 36ch;
	color: rgba(255,255,255,.88);
	margin-bottom: 2rem !important;
}

.ncah-hero__note { margin-top: 1.25rem !important; font-size: .98rem; color: rgba(255,255,255,.75); }
.ncah-hero__note a { color: #fff; font-weight: 700; text-underline-offset: 3px; }

/* Decorative progress card */
.ncah-hero__card { display: flex; justify-content: center; position: relative; }
.ncah-hero__card::before {
	content: "";
	position: absolute; top: -34px; right: calc(50% - 205px);
	width: 110px; height: 110px; border-radius: 50%;
	background: var(--ncah-gold);
	opacity: .9;
}
.ncah-mini {
	width: min(340px, 100%);
	background: #fff;
	color: var(--ncah-teal);
	border-radius: 22px;
	padding: 1.6rem;
	box-shadow: 0 30px 60px rgba(0,0,0,.28);
	transform: rotate(2.5deg);
	position: relative;
	z-index: 1;
}
.ncah-mini__top { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem; }
.ncah-mini__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ncah-sage); }
.ncah-mini__label { font-family: var(--ncah-head); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ncah-muted); }
.ncah-mini__row { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid #e6ece8; font-weight: 600; }
.ncah-mini__check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ncah-soft); color: var(--ncah-teal); font-size: .85rem; font-weight: 700; }
.ncah-mini__bar { height: 10px; border-radius: 99px; background: #e6ece8; margin: 1.2rem 0; overflow: hidden; }
.ncah-mini__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--ncah-sage), var(--ncah-gold)); border-radius: 99px; }
.ncah-mini__cert { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: 12px; background: #fbf4e8; color: #8a5f1f; font-family: var(--ncah-head); font-weight: 700; }

/* Mountain ridge at the bottom of the hero */
.ncah-hero__ridge {
	position: absolute; left: 0; right: 0; bottom: -1px;
	width: 100%; height: clamp(60px, 9vw, 140px);
	display: block;
}
.ncah-hero__ridge .r1 { fill: var(--ncah-sage); opacity: .55; }
.ncah-hero__ridge .r2 { fill: var(--ncah-off); }

/* ---------- Sections ---------- */
.ncah-section { padding: clamp(3.5rem, 7vw, 6rem) 0; }

.ncah-kicker {
	font-family: var(--ncah-head);
	font-weight: 700;
	font-size: .85rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ncah-sage);
	margin-bottom: .75rem !important;
}
.ncah-kicker--light { color: var(--ncah-gold); }

.ncah-h2 {
	font-size: clamp(1.9rem, 3.6vw, 2.7rem);
	line-height: 1.15;
	letter-spacing: -.01em;
	color: var(--ncah-teal);
	max-width: 22ch;
}
.ncah-h2--light { color: #fff; }

/* Steps */
.ncah-steps { padding-top: clamp(2rem, 4vw, 3rem); }
.ncah-steps__list {
	list-style: none;
	margin: 2.5rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}
.ncah-step {
	background: #fff;
	border-radius: var(--ncah-radius);
	padding: 2rem 1.75rem;
	border: 1px solid #e3e9e5;
	box-shadow: 0 2px 0 rgba(25,59,67,.04);
	position: relative;
	transition: transform .2s ease, box-shadow .2s ease;
}
.ncah-step:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(25,59,67,.10); }
.ncah-step__num {
	display: grid; place-items: center;
	width: 48px; height: 48px;
	border-radius: 14px;
	background: var(--ncah-teal);
	color: var(--ncah-gold);
	font-family: var(--ncah-head);
	font-weight: 700;
	font-size: 1.35rem;
	margin-bottom: 1.25rem;
}
.ncah-step h3 { font-size: 1.3rem; margin-bottom: .6rem; color: var(--ncah-teal); }
.ncah-step p { color: var(--ncah-muted); line-height: 1.6; font-size: 1.02rem; }

/* Features (sage band) */
.ncah-features {
	background: var(--ncah-sage);
	color: #fff;
	position: relative;
}
.ncah-features__grid {
	display: grid;
	grid-template-columns: 1fr 1.25fr;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start;
}
.ncah-features__text { margin-top: 1.25rem !important; font-size: 1.12rem; line-height: 1.65; color: rgba(255,255,255,.9); max-width: 40ch; }
.ncah-features__list {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
.ncah-feature {
	display: flex; flex-direction: column; gap: 1rem;
	background: rgba(25,59,67,.35);
	border: 1px solid rgba(255,255,255,.16);
	border-radius: var(--ncah-radius);
	padding: 1.6rem;
}
.ncah-feature__icon {
	display: grid; place-items: center;
	width: 46px; height: 46px; border-radius: 12px;
	background: var(--ncah-gold); color: var(--ncah-teal);
}
.ncah-feature__icon svg { width: 24px; height: 24px; }
.ncah-feature h3 { font-size: 1.15rem; color: #fff; margin-bottom: .4rem; }
.ncah-feature p { color: rgba(255,255,255,.85); line-height: 1.55; font-size: .98rem; }

/* Closing CTA */
.ncah-cta__box {
	display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
	background: var(--ncah-gold);
	border-radius: 26px;
	padding: clamp(2rem, 4vw, 3rem) clamp(1.75rem, 4vw, 3.5rem);
	position: relative;
	overflow: hidden;
}
.ncah-cta__box::before {
	content: "";
	position: absolute; right: -60px; top: -60px;
	width: 220px; height: 220px; border-radius: 50%;
	border: 28px solid rgba(255,255,255,.18);
}
.ncah-cta__box > * { position: relative; }
.ncah-cta__box p { margin-top: .5rem !important; font-size: 1.1rem; color: var(--ncah-teal); }
.ncah-verify { text-align: center; margin-top: 1.75rem !important; color: var(--ncah-muted); }
.ncah-verify a { color: var(--ncah-teal); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.ncah-hero__inner { grid-template-columns: 1fr; }
	.ncah-hero__card { justify-content: flex-start; }
	.ncah-mini { transform: none; }
	.ncah-hero__card::before { display: none; }
	.ncah-steps__list { grid-template-columns: 1fr; }
	.ncah-features__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.ncah-hero__card { display: none; }
	.ncah-features__list { grid-template-columns: 1fr; }
	.ncah-actions .ncah-btn { flex: 1 1 100%; }
	.ncah-cta__box { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	.ncah-btn, .ncah-step { transition: none; }
	.ncah-btn:hover, .ncah-step:hover { transform: none; }
}

/* =====================================================================
   Course catalog ([ncl_course_catalog])
   ===================================================================== */
.ncl-catalog-page .wp-block-post-title {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.ncl-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Use the theme's wide width (the catalog is a grid), not the narrow reading width. */
.ncl-catalog-page .wp-block-post-content { max-width: var(--wp--style--global--wide-size, 1160px) !important; }
.ncl-app.ncl-wide.ncl-catalog { max-width: min(1180px, 100%); margin-left: auto !important; margin-right: auto !important; }
.ncl-catalog {
	--c-teal: #193b43; --c-sage: #467e72; --c-soft: #c7e0cf; --c-gold: #d6a45c; --c-off: #f6f7f5; --c-muted: #61746e; --c-line: #dce5e0;
}

/* Banner */
.ncl-cat-hero {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
	color: #fff;
	background:
		radial-gradient(circle at 88% 10%, rgba(214,164,92,.30) 0, rgba(214,164,92,0) 34%),
		radial-gradient(circle at 0% 100%, rgba(70,126,114,.6) 0, rgba(70,126,114,0) 50%),
		linear-gradient(150deg, #1f4952 0%, var(--c-teal) 60%, #12303a 100%);
	padding: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem) clamp(3.25rem, 6vw, 4.5rem);
	margin-bottom: 1.5rem;
}
.ncl-cat-hero__inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 2.5rem; }
.ncl-cat-hero__text { flex: 1 1 380px; }
.ncl-catalog .ncl-cat-kicker {
	font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
	color: var(--c-gold); margin: 0 0 .6rem; padding-left: 2.3rem; position: relative;
}
.ncl-catalog .ncl-cat-kicker::before { content: ""; position: absolute; left: 0; top: 50%; width: 1.7rem; height: 2px; background: var(--c-gold); }
.ncl-app .ncl-cat-title {
	font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -.02em; color: #fff; margin: 0 0 .75rem;
}
.ncl-app .ncl-cat-title span { display: block; color: var(--c-soft); }
.ncl-catalog .ncl-cat-sub { margin: 0; color: rgba(255,255,255,.82); font-size: 16px; }
.ncl-cat-hero__ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 56px; display: block; }
.ncl-cat-hero__ridge path { fill: var(--c-sage); opacity: .55; }

.ncl-cat-search { position: relative; flex: 0 1 340px; width: 100%; }
.ncl-cat-search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.ncl-app .ncl-cat-search input {
	width: 100%; min-height: 52px; padding: 12px 16px 12px 46px; border-radius: 999px; border: 2px solid transparent;
	background: #fff; color: var(--c-teal); font: inherit; font-size: 17px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.ncl-app .ncl-cat-search input:focus { outline: none; border-color: var(--c-gold); }

/* Logged-out prompt */
.ncl-cat-login {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
	background: #fff; border: 1px solid var(--c-line); border-left: 5px solid var(--c-gold);
	border-radius: 14px; padding: 14px 18px; margin: 0 0 1.5rem;
}
.ncl-cat-login p { flex: 1 1 260px; margin: 0; }
.ncl-cat-login .ncl-ico { color: var(--c-muted); }

/* Filters */
.ncl-cat-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 .75rem; }
.ncl-cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ncl-app .ncl-cat-tab {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
	border: 2px solid var(--c-line); background: #fff; color: var(--c-teal); font-weight: 700; font-size: 15px; cursor: pointer;
}
.ncl-app .ncl-cat-tab span { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--c-off); font-size: 13px; color: var(--c-muted); }
.ncl-app .ncl-cat-tab:hover { border-color: var(--c-sage); }
.ncl-app .ncl-cat-tab[aria-pressed="true"] { background: var(--c-teal); border-color: var(--c-teal); color: #fff; }
.ncl-app .ncl-cat-tab[aria-pressed="true"] span { background: var(--c-gold); color: var(--c-teal); }
.ncl-cat-cats { display: flex; align-items: center; gap: 10px; }
.ncl-cat-cats label { font-weight: 700; font-size: 15px; color: var(--c-muted); }
.ncl-app .ncl-cat-cats select {
	min-height: 44px; padding: 8px 40px 8px 14px; border-radius: 12px; border: 2px solid var(--c-line); background-color: #fff;
	color: var(--c-teal); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
	appearance: none; -webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23193b43' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.ncl-catalog .ncl-cat-count { min-height: 1.4em; margin: 0 0 .75rem; font-size: 15px; color: var(--c-muted); }

/* Card grid */
.ncl-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.ncl-ccard {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--c-line); border-radius: 18px; overflow: hidden;
	box-shadow: 0 9px 30px rgba(25,59,67,.05);
	transition: transform .18s ease, box-shadow .18s ease;
}
.ncl-ccard[hidden] { display: none; }
.ncl-ccard:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(25,59,67,.12); }

.ncl-ccard__band {
	position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
	min-height: 92px; padding: 16px 18px 26px; color: #fff;
	background: linear-gradient(135deg, var(--band1), var(--band2));
}
.ncl-ccard--a1 { --band1: #1f4952; --band2: #193b43; --ridge: #467e72; }
.ncl-ccard--a2 { --band1: #55907f; --band2: #3c6f63; --ridge: #c7e0cf; }
.ncl-ccard--a3 { --band1: #e0b26c; --band2: #c9923f; --ridge: #f3dcb4; }
.ncl-ccard--a4 { --band1: #2e6b5b; --band2: #224f45; --ridge: #d6a45c; }
.ncl-ccard--a3 .ncl-ccard__band { color: #193b43; }
.ncl-ccard__ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 26px; }
.ncl-ccard__ridge path { fill: var(--ridge); opacity: .5; }
.ncl-ccard__cat { position: relative; z-index: 1; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .95; padding-top: 4px; }

.ncl-cbadge {
	position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; flex: none;
	padding: 4px 11px; border-radius: 999px; background: #fff; color: var(--c-teal);
	font-size: 13px; font-weight: 700; line-height: 1.3; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.ncl-cbadge .ncl-ico { width: 16px; height: 16px; }
.ncl-cbadge--done { color: #2e6b5b; }
.ncl-cbadge--lock { color: var(--c-muted); }
.ncl-cbadge--over { background: #c4502f; color: #fff; }
.ncl-cbadge--soon { background: #fbf3dc; color: #7a5300; }
.ncl-cbadge--open { background: #193b43; color: #fff; }
.ncl-ccard--a1 .ncl-cbadge--open, .ncl-ccard--a4 .ncl-cbadge--open { background: #d6a45c; color: #193b43; }

.ncl-ccard__body { flex: 1; padding: 18px 20px 6px; }
.ncl-app .ncl-ccard__title { margin: 0 0 8px; font-size: 21px; line-height: 1.25; color: var(--c-teal); }
.ncl-app .ncl-ccard__title a { color: inherit; text-decoration: none; }
.ncl-app .ncl-ccard__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ncl-ccard__flags { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ncl-catalog .ncl-ccard__desc {
	margin: 0 0 14px; color: #3f514c; font-size: 16px; line-height: 1.55;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ncl-ccard__facts { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ncl-ccard__facts li { padding: 3px 10px; border-radius: 8px; background: var(--c-off); color: var(--c-muted); font-size: 13px; font-weight: 700; }
.ncl-ccard__facts .ncl-ccard__cert { background: #fbf4e8; color: #8a5f1f; }
.ncl-catalog .ncl-ccard__req { margin: 0 0 8px; font-size: 14px; color: var(--c-muted); }
.ncl-ccard__foot { padding: 4px 20px 20px; }
.ncl-ccard__foot .ncl-progress { margin: 4px 0 12px; }
.ncl-ccard__foot .ncl-card__action .ncl-btn { width: 100%; }

.ncl-cat-empty { text-align: center; padding: 2.5rem 1rem; background: #fff; border: 2px dashed var(--c-line); border-radius: 18px; }
.ncl-cat-empty p { margin: 0 0 1rem; }

@media (max-width: 600px) {
	.ncl-cat-hero { border-radius: 18px; }
	.ncl-cat-tools { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
	.ncl-app .ncl-cat-tab { padding: 6px 12px; font-size: 14px; min-height: 40px; }
	.ncl-cat-cats select { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.ncl-ccard { transition: none; }
	.ncl-ccard:hover { transform: none; }
}
