/**
 * Styling pass (Phase 6). Colours and fonts are the confirmed site values
 * from docs/SITE-NOTES.md. Breakpoints (768px / 544px) and the card shadow
 * (0 4px 10px -2px rgba(0,0,0,.1)) are copied from the theme's own compiled
 * CSS (wp-content/themes/astra/assets/css/minified/style.min.css), not
 * guessed, so cards and the mobile layout match the rest of the site.
 * docs/screenshots/reference/ is still empty (the brief asks for it to be
 * filled in from the live site) — there was nothing to visually compare
 * against beyond what's confirmed here and in SITE-NOTES.md.
 *
 * Headings (h1–h4), paragraph text, links and buttons inside these
 * sections are deliberately NOT restyled — they're plain HTML elements
 * (<h3>, <a>, core/button), so they already inherit Astra's real
 * typography, colours and button styling automatically, the same as every
 * other page on the site. Only the parts that are genuinely new here
 * (cards, grids, the sub-nav, the FAQ accordion) have their own CSS below.
 */
.nmt-academy-subnav,
.nmt-academy-quick-facts,
.nmt-academy-why-cards,
.nmt-academy-course-categories,
.nmt-academy-courses,
.nmt-academy-facilities,
.nmt-academy-alumni,
.nmt-academy-faq,
.nmt-academy-timeline,
.nmt-academy-placeholder,
.nmt-academy-box {
	--nmt-color-primary: var(--ast-global-color-0, #5b864d);
	--nmt-color-secondary: var(--ast-global-color-1, #629552);
	--nmt-color-heading: var(--ast-global-color-2, #000000);
	--nmt-color-text: var(--ast-global-color-3, rgba(0, 0, 0, 0.65));
	--nmt-color-surface-light: var(--ast-global-color-4, #f6f6f6);
	--nmt-color-surface: var(--ast-global-color-5, #ffffff);
	--nmt-color-border: var(--ast-global-color-6, rgba(0, 0, 0, 0.1));
	--nmt-color-link: #306a36;
	--nmt-color-accent: #479746;
	--nmt-font-body: 'Poppins', sans-serif;
	--nmt-font-heading: 'Poppins', sans-serif;
	--nmt-card-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1);
	--nmt-card-shadow-hover: 0 8px 20px -4px rgba(0, 0, 0, 0.18);

	font-family: var(--nmt-font-body);
	color: var(--nmt-color-text);
	box-sizing: border-box;
}

.nmt-academy-subnav *,
.nmt-academy-quick-facts *,
.nmt-academy-why-cards *,
.nmt-academy-course-categories *,
.nmt-academy-courses *,
.nmt-academy-facilities *,
.nmt-academy-alumni *,
.nmt-academy-faq *,
.nmt-academy-timeline * {
	box-sizing: inherit;
}

/* Sub-nav */
.nmt-academy-subnav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	overflow-x: auto;
	padding: 16px 24px;
	background: var(--nmt-color-surface-light);
	border-bottom: 1px solid var(--nmt-color-border);
}
.nmt-academy-subnav__list {
	display: flex;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
	white-space: nowrap;
}
.nmt-academy-subnav__item a {
	color: var(--nmt-color-text);
	text-decoration: none;
	font-weight: 600;
	padding-bottom: 4px;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.nmt-academy-subnav__item a:hover {
	color: var(--nmt-color-primary);
}
.nmt-academy-subnav__item.is-current a {
	color: var(--nmt-color-primary);
	border-bottom-color: var(--nmt-color-primary);
}
.nmt-academy-subnav__apply {
	flex-shrink: 0;
	background: var(--nmt-color-primary);
	color: #fff;
	padding: 10px 22px;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 600;
	transition: background-color 0.15s ease;
}
.nmt-academy-subnav__apply:hover {
	background: var(--nmt-color-secondary);
	color: #fff;
}

/* Quick facts */
.nmt-academy-quick-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 32px;
	text-align: center;
	padding: 48px 24px;
}
.nmt-academy-quick-facts__value {
	display: block;
	font-family: var(--nmt-font-heading);
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--nmt-color-primary);
	line-height: 1.15;
}
.nmt-academy-quick-facts__label {
	display: block;
	margin-top: 6px;
	font-size: 0.9rem;
}

/* Why NMT cards */
.nmt-academy-why-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 24px;
	padding: 24px 0;
}
.nmt-academy-why-cards__card {
	background: var(--nmt-color-surface);
	border-radius: 8px;
	padding: 28px 24px;
	box-shadow: var(--nmt-card-shadow);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.nmt-academy-why-cards__card:hover {
	box-shadow: var(--nmt-card-shadow-hover);
	transform: translateY(-2px);
}
.nmt-academy-why-cards__number {
	display: block;
	font-family: var(--nmt-font-heading);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--nmt-color-accent);
}
.nmt-academy-why-cards__title {
	font-family: var(--nmt-font-heading);
	color: var(--nmt-color-heading);
	margin: 10px 0 8px;
}
.nmt-academy-why-cards__description {
	margin: 0;
}

/* Programme categories */
.nmt-academy-course-categories {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	padding: 24px 0;
}
.nmt-academy-course-categories__card {
	display: block;
	background: var(--nmt-color-surface-light);
	border-radius: 8px;
	padding: 24px;
	text-decoration: none;
	color: var(--nmt-color-text);
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.nmt-academy-course-categories__card:hover {
	background: var(--nmt-color-surface);
	box-shadow: var(--nmt-card-shadow);
}
.nmt-academy-course-categories__card h3 {
	font-family: var(--nmt-font-heading);
	color: var(--nmt-color-heading);
	margin: 0 0 8px;
}
.nmt-academy-course-categories__card p {
	color: var(--nmt-color-text);
	margin: 0;
}

/* Picture slots shared by Programme Category cards and Course cards — every
   card reserves the same space whether or not a photo has been added yet,
   so the grid looks consistent either way. */
.nmt-academy-course-categories__photo,
.nmt-academy-courses__thumb {
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 14px;
	background: var(--nmt-color-surface-light);
	display: flex;
	align-items: center;
	justify-content: center;
}
.nmt-academy-course-categories__photo img,
.nmt-academy-course-categories__image,
.nmt-academy-courses__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
}
.nmt-academy-photo-placeholder-icon {
	width: 36%;
	height: 36%;
	max-width: 44px;
	max-height: 44px;
	opacity: 0.3;
	background-color: var(--nmt-color-text);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z'/%3E%3Ccircle cx='8' cy='8' r='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z'/%3E%3Ccircle cx='8' cy='8' r='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Courses */
.nmt-academy-courses__filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 32px;
}
.nmt-academy-courses__filter-btn {
	background: var(--nmt-color-surface);
	border: 1px solid var(--nmt-color-border);
	border-radius: 999px;
	padding: 8px 18px;
	cursor: pointer;
	font-family: var(--nmt-font-body);
	color: var(--nmt-color-text);
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nmt-academy-courses__filter-btn:hover {
	border-color: var(--nmt-color-primary);
	color: var(--nmt-color-primary);
}
.nmt-academy-courses__filter-btn.is-active {
	background: var(--nmt-color-primary);
	color: #fff;
	border-color: var(--nmt-color-primary);
}
.nmt-academy-courses__group-title {
	font-family: var(--nmt-font-heading);
	color: var(--nmt-color-heading);
	margin: 32px 0 16px;
}
.nmt-academy-courses__group:first-of-type .nmt-academy-courses__group-title {
	margin-top: 0;
}
.nmt-academy-courses__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
}
.nmt-academy-courses__card {
	background: var(--nmt-color-surface);
	border-radius: 8px;
	padding: 22px;
	box-shadow: var(--nmt-card-shadow);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.nmt-academy-courses__card:hover {
	box-shadow: var(--nmt-card-shadow-hover);
	transform: translateY(-2px);
}
.nmt-academy-courses__card h4 {
	font-family: var(--nmt-font-heading);
	color: var(--nmt-color-heading);
	margin: 0 0 8px;
}
.nmt-academy-courses__card p {
	color: var(--nmt-color-text);
	margin: 0 0 8px;
}
.nmt-academy-courses__duration {
	font-size: 0.9rem;
	color: var(--nmt-color-text);
}
.nmt-academy-courses__duration strong {
	color: var(--nmt-color-heading);
}

/* Facilities */
.nmt-academy-facilities {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
	padding: 24px 0;
}
.nmt-academy-facilities__card {
	background: var(--nmt-color-surface);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--nmt-card-shadow);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	padding-bottom: 20px;
}
.nmt-academy-facilities__card:hover {
	box-shadow: var(--nmt-card-shadow-hover);
	transform: translateY(-2px);
}
.nmt-academy-facilities__photo {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: var(--nmt-color-surface-light);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.nmt-academy-facilities__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.nmt-academy-facilities__card h3,
.nmt-academy-facilities__card p {
	padding: 0 20px;
}
.nmt-academy-facilities__card h3 {
	font-family: var(--nmt-font-heading);
	color: var(--nmt-color-heading);
	margin-top: 18px;
}

/* Alumni */
.nmt-academy-alumni {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
	padding: 24px 0;
}
.nmt-academy-alumni__quote {
	background: var(--nmt-color-surface-light);
	border-radius: 8px;
	padding: 28px;
	margin: 0;
	border-left: 3px solid var(--nmt-color-primary);
}
.nmt-academy-alumni__text {
	font-style: italic;
}
.nmt-academy-alumni__text p:first-child {
	margin-top: 0;
}
.nmt-academy-alumni__photo img {
	border-radius: 50%;
	width: 64px;
	height: 64px;
	object-fit: cover;
	margin-bottom: 12px;
}
.nmt-academy-alumni__meta {
	display: flex;
	flex-direction: column;
	margin-top: 14px;
	font-size: 0.9rem;
	font-style: normal;
}

/* FAQ */
.nmt-academy-faq {
	max-width: 800px;
}
.nmt-academy-faq__item {
	border-bottom: 1px solid var(--nmt-color-border);
}
.nmt-academy-faq__question {
	margin: 0;
}
.nmt-academy-faq__question button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	padding: 18px 0;
	font-family: var(--nmt-font-heading);
	font-size: 1rem;
	font-weight: 600;
	color: var(--nmt-color-heading);
	cursor: pointer;
}
.nmt-academy-faq__question button::after {
	content: '+';
	flex-shrink: 0;
	font-size: 1.4rem;
	font-weight: 400;
	color: var(--nmt-color-primary);
	transition: transform 0.2s ease;
}
.nmt-academy-faq__question button[aria-expanded='true']::after {
	content: '\2212'; /* minus sign */
}
.nmt-academy-faq__answer {
	padding: 0 0 20px;
}
.nmt-academy-faq__answer p:first-child {
	margin-top: 0;
}

/* Placeholders and content boxes used directly in page content (not part
   of a specific block) — see block-patterns/. */
.nmt-academy-placeholder {
	border: 1px dashed var(--nmt-color-border);
	background: var(--nmt-color-surface-light);
	color: var(--nmt-color-text);
	padding: 32px 24px;
	text-align: center;
	font-style: italic;
}
.nmt-academy-box {
	background: var(--nmt-color-surface-light);
	border-radius: 8px;
	padding: 28px;
	height: 100%;
}

/* Timeline — vertical stepper (numbered/checkmark circles connected by a
   line), see nmt_academy_render_timeline() in shortcodes.php. */
.nmt-academy-timeline.stepper-box {
	display: flex;
	flex-direction: column;
	max-width: 640px;
	padding: 24px 0;
}
.stepper-step {
	position: relative;
	display: flex;
	gap: 20px;
	padding-bottom: 32px;
}
.stepper-step:last-child {
	padding-bottom: 0;
}
.stepper-circle {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--nmt-font-heading);
	font-weight: 700;
	font-size: 0.95rem;
	background: var(--nmt-color-surface-light);
	color: var(--nmt-color-text);
	border: 1px solid var(--nmt-color-border);
	position: relative;
	z-index: 1;
}
.stepper-completed .stepper-circle {
	background: var(--nmt-color-primary);
	border-color: var(--nmt-color-primary);
	color: #fff;
}
.stepper-active .stepper-circle {
	background: var(--nmt-color-accent);
	border-color: var(--nmt-color-accent);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(71, 151, 70, 0.2);
}
.stepper-line {
	position: absolute;
	left: 17px;
	top: 36px;
	bottom: 0;
	width: 2px;
	background: var(--nmt-color-border);
}
.stepper-completed .stepper-line {
	background: var(--nmt-color-primary);
}
.stepper-content {
	padding-top: 4px;
}
.stepper-title {
	font-family: var(--nmt-font-heading);
	font-weight: 700;
	color: var(--nmt-color-heading);
	font-size: 1.1rem;
}
.stepper-status {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
	margin-top: 2px;
	color: var(--nmt-color-primary);
}
.stepper-pending .stepper-status {
	color: var(--nmt-color-text);
}
.stepper-description {
	margin: 8px 0 0;
	color: var(--nmt-color-text);
}

/**
 * Accessibility: none of these sections remove the browser's default
 * focus ring, so keyboard focus is already visible everywhere — this adds
 * a clearer, on-brand one on top for the interactive elements that are
 * genuinely custom (not already covered by the theme's own link/button
 * focus styles).
 */
.nmt-academy-subnav__item a:focus-visible,
.nmt-academy-subnav__apply:focus-visible,
.nmt-academy-courses__filter-btn:focus-visible,
.nmt-academy-course-categories__card:focus-visible,
.nmt-academy-faq__question button:focus-visible {
	outline: 2px solid var(--nmt-color-primary);
	outline-offset: 2px;
}

/**
 * Confirmed from the theme's own compiled CSS: Astra's tablet breakpoint
 * is 768px and its mobile breakpoint is 544px — using the same two here
 * instead of inventing separate ones.
 */
@media (max-width: 768px) {
	.nmt-academy-subnav {
		justify-content: flex-start;
	}
	.nmt-academy-subnav__apply {
		margin-left: 12px;
	}
}

@media (max-width: 544px) {
	.nmt-academy-quick-facts__value {
		font-size: 1.75rem;
	}
	.nmt-academy-subnav {
		padding: 12px 16px;
	}
}
