/* program — single course / seminar / birth-support pages. Loaded after style.css.
   Layout: hero (title + price panel) -> ONE 960px column of stacked cards (intro, then one card per section).
   Markup classes come from the `the_content` filter in functions.php:
   .program-intro(--callout|--flow) .program-sections > .program-section(--subs|--flow|--biglist) */

/* ---------- Hero: one column — title, lead, chips, then the price as plain text (no card) ---------- */
.program-hero {
	display: block;
	padding-top: 40px;
}

.program-head { padding-top: 0; min-width: 0; }
.program-head__back a { display: inline-block; padding: 10px 0; margin-block: -10px; }

.program-aside { position: static; }

.program-aside { margin-top: 32px; }

/* price block: hairline above, big crimson price, note, then button + phone on one row */
.program-aside__card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: 24px;
	align-items: center;
	max-width: 960px;
	padding: 28px 0 0;
	background: none;
	border: 0;
	border-top: var(--rl-line);
	border-radius: 0;
	box-shadow: none;
}

.program-aside__card > * { margin: 0; max-width: none; }
.program-aside__card > .program-aside__label,
.program-aside__card > .program-aside__price,
.program-aside__card > .program-aside__note { grid-column: 1 / -1; }
.program-aside__label { margin-bottom: 4px; }
.program-aside__price { font-size: 2.75rem; line-height: 1.1; margin-bottom: 10px; }
.program-aside__note { font-size: 1.0625rem; line-height: 1.6; color: var(--rl-muted); margin-bottom: 20px; }
.program-aside__phone { margin: 0; text-align: left; }
.program-aside__phone a { display: inline-block; padding: 8px 0; margin-block: -8px; }

.program-aside__buttons { margin: 0; }
.program-aside__buttons .wp-block-button__link { display: block; width: auto; text-align: center; box-sizing: border-box; padding-inline: 40px; }

/* ---------- Body: one column, 32px between every card ---------- */
.program-body { padding-top: var(--rl-section); }

.program-body > .wp-block-post-content {
	display: grid;
	gap: 32px;
	max-width: 960px;
	margin-inline: 0;
}

.program-body > .wp-block-post-content > * { margin: 0; }

.program-intro,
.program-section,
.program-sub {
	padding: 32px 36px;
	background: #fff;
	border: var(--rl-line);
	border-radius: var(--rl-radius);
}

/* text rhythm inside every card: generous gaps, one scale */
.program-intro > * + *,
.program-section > * + *,
.program-flow > * + *,
.program-sub > * + *,
.program-section__lead > * + * { margin-top: 1.15em; margin-bottom: 0; }

.program-intro > *,
.program-section > *,
.program-flow > *,
.program-sub > *,
.program-section__lead > * { max-width: none; }

.program-intro p, .program-intro li,
.program-section p, .program-section li,
.program-sub p, .program-sub li {
	font-size: 1.125rem;
	line-height: 1.75;
	max-width: none;
	margin-bottom: 0;
}

.program-section > h2 {
	margin: 0 0 0.9em;
	font-size: 1.5rem;
	line-height: 1.25;
	color: var(--wp--preset--color--coral);
	padding-bottom: 0.6em;
	border-bottom: 2px solid rgba(172, 127, 88, 0.35);
}

/* ---------- Lists: an inset panel, clearly apart from the prose ---------- */
.program-body ul.wp-block-list.checklist {
	list-style: none;
	margin: 0.9em 0 0;
	padding: 20px 24px;
	background: var(--wp--preset--color--base);
	border-radius: 16px;
}

.program-body ul.wp-block-list.checklist li {
	position: relative;
	margin: 0;
	padding-left: 26px;
}

.program-body ul.wp-block-list.checklist li + li { margin-top: 0.7em; }

.program-body ul.wp-block-list.checklist li::before {
	left: 2px;
	top: 0.72em;
	width: 8px;
	height: 8px;
}

/* ---------- Sub-headings (h3 or bold-only lead line) ---------- */
.program-sub__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.3125rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
}

.program-sub__title strong { font-weight: 700; }
.program-sub > .program-sub__title + * { margin-top: 0.8em; }

/* ---------- Intro: one column; a callout (e.g. the Cochrane summary) is its own tinted block below the text ---------- */
.program-intro--callout > .callout {
	margin-top: 1.5em;
	padding: 28px 30px;
	background: var(--wp--preset--color--base);
}

.program-intro .callout > * + * { margin-top: 0.9em; }
.program-body .callout ul.wp-block-list.checklist { padding: 4px 0 0; background: none; }

/* ---------- Sections: one card per section, stacked in a single column ---------- */
.program-sections { display: grid; gap: 32px; }
.program-section { margin: 0; }

/* sections made of several sub-sections: the H2 is a heading, the subs are the cards */
.program-section--subs {
	padding: 0;
	background: none;
	border: 0;
}

/* the heading of a group stands on the page; the cards below it carry the content */
.program-section--subs > h2,
.program-section--modules > h2 { margin-bottom: 0.6em; padding-bottom: 0; border-bottom: 0; }
.program-section__lead { margin-bottom: 20px; }
.program-section__lead p { font-size: 1.125rem; }

.program-subs { display: grid; gap: 24px; }
.program-sub { margin: 0; }

/* modules: the two module cards are the content, so the wrapper card is dropped */
.program-section--modules {
	padding: 0;
	background: none;
	border: 0;
}

.program-section--modules > h2 { margin-bottom: 0.6em; }
.program-section .card-grid { margin: 0; gap: 24px; }
.program-section .card-grid .card { padding: 28px 32px; }
.program-section .card-grid .card h3 { font-size: 1.25rem; margin: 0 0 0.8em; }

/* callouts inside sections */
.program-section .callout,
.program-sub .callout { margin: 1.15em 0 0; padding: 22px 26px; }

@media (max-width: 900px) {
	.program-hero { padding-top: 28px; }

	.program-intro,
	.program-section,
	.program-sub { padding: 24px 22px; }

	.program-section--subs,
	.program-section--modules { padding: 0; }

	.program-aside__card { padding: 22px 0 0; }
}

@media (max-width: 560px) {
	.program-aside__card { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
	.program-aside__buttons .wp-block-button__link { width: 100%; }
}

/* pillars («Три основы…») and modules: one column of stacked cards, like everything else on the page */
.program-section .card-grid,
.program-section .card-grid--pillars { grid-template-columns: minmax(0, 1fr); margin: 0; }
.program-section .card-grid--pillars .card { padding: 24px 26px; }
.program-section .card-grid--pillars .card h3 { margin: 0 0 0.7em; }
.program-section .card-grid .card > * { max-width: none; margin-inline: 0; }
.program-section .card-grid .card > * + * { margin-top: 0.9em; }
.program-section .card-grid .card p { font-size: 1.0625rem; line-height: 1.7; margin-bottom: 0; }
