/* Default course template: the layout skeleton only. The left menu floats over
   the hero strip (railing overlay sharing one grid cell with the content) and
   the centred content box pads left for it. All component visuals (menu
   internals, cards, buttons, hero pieces, meta, navigation) live in the shared
   ../components.css. */
.mw_course {
	/* Menu (railing) and content share one grid cell; the row sizes to the taller
	   of the two, so the container is always tall enough for the menu. */
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	width: 100%;
	margin: 0;
}

/* the shared centred inner: no right padding, left padding clears the menu */
.mw_course_inner {
	padding-right: 0;
	padding-left: 342px; /* menu width 300 + gap 42 */
}

/* Centred overlay matching the content box; the menu lines up with the content
   (and the header), whatever the viewport. Stretches to the grid row height, so
   the menu inside can fill the full height. */
.mw_course_railing {
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 90%;
	max-width: var(--course-width);
	margin: 0 auto;
	padding: 40px 0;
	pointer-events: none;
	z-index: 2;
}

/* ---------- main column: full width, no box, no shadow ---------- */
.mw_course_main {
	grid-area: 1 / 1; /* same cell as the railing; the menu floats over it */
	z-index: 1;
	background: var(--course-bg);
}

@media (max-width: 980px) {
	/* Stack: menu (row 1) above the content (row 2), no overlap. The railing takes
	   the hero colour, so the collapsed menu bar sits inside the coloured strip. */
	.mw_course_railing {
		grid-row: 1;
		align-items: stretch;
		width: auto;
		max-width: none;
		margin: 0;
		padding: 16px 16px 0;
		background: var(--course-light);
		pointer-events: auto;
	}

	.mw_course_strip_main .mw_course_railing {
		background: var(--course-main);
	}

	.mw_course_main {
		grid-row: 2;
	}

	/* full width with small gutters (the desktop 90% width would add extra margins) */
	.mw_course_inner {
		width: auto;
		padding-left: 16px;
		padding-right: 16px;
	}
}

@media (max-width: 560px) {
	.mw_course_railing {
		padding: 12px 12px 0;
	}

	.mw_course_inner {
		padding-left: 12px;
		padding-right: 12px;
	}
}

/* split hero (text left, media right, side by side above 900px): the heading sits in a
   narrower column, so make it a touch smaller than the stacked hero */
@media (min-width: 901px) {
	.mw_course_hero_split .mw_course_hero_title {
		font-size: 34px;
	}
}
