/*!
Theme Name: MoM X Blog Pro Child
Theme URI: https://metaphorsofmovement.co.uk/
Description: Update-safe presentation and semantic overrides for the Metaphors of Movement site.
Author: The Fresh Brain Company Ltd
Template: xblog-pro
Version: 1.1.2
Text Domain: mom-xblog-child
*/

/* Preserve the site-title presentation after replacing the decorative H1. */
.classic-header div.site-title {
	font-family: "Crete Round", serif !important;
	font-size: 60px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: 1px !important;
	text-transform: uppercase !important;
	text-align: center !important;
	text-shadow: 2px 4px 3px rgba(0, 0, 0, 0.3);
	margin-top: 20px !important;
	margin-bottom: 15px !important;
}

.black-overlay div.site-title,
.black-overlay div.site-title a,
.black-overlay div.site-title a:hover {
	color: #fff !important;
}

@media only screen and (min-width: 768px) {
	body .classic-header div.site-title {
		font-size: 43px !important;
		line-height: 40px !important;
	}
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
	.cheader-search .classic-header div.site-title {
		margin-top: -16px !important;
		margin-left: -30px !important;
	}
}

@media only screen and (max-width: 767px) {
	.classic-header div.site-title {
		font-size: 35px !important;
		line-height: 1.1 !important;
		margin-top: 5px !important;
		margin-left: 0 !important;
	}
}

/* Editorial page system: applied to native page blocks without altering content. */
body.page .entry-content {
	--mom-ink: #17384f;
	--mom-blue: #1f5f7a;
	--mom-rust: #b54f32;
	--mom-gold: #e0a43d;
	--mom-cream: #fbf7ef;
	--mom-pale-blue: #f1f7fa;
	--mom-line: #d9e3e8;
	color: #263a47;
	font-size: 1.02rem;
	line-height: 1.78;
}

body.page .entry-content > p.wp-block-paragraph {
	margin-bottom: 1.25rem;
}

body.page .entry-content > p.wp-block-paragraph:first-of-type:not(:empty) {
	color: #425b69;
	font-size: 1.12rem;
	line-height: 1.72;
}

body.page .entry-content > h2.wp-block-heading {
	margin: 2.8rem 0 1.15rem;
	padding: 0.9rem 1.1rem 0.9rem 1.35rem;
	border-left: 5px solid var(--mom-rust);
	border-radius: 0 12px 12px 0;
	background: linear-gradient(90deg, #f8eee4 0%, #fffaf4 62%, rgba(255,255,255,0) 100%);
	color: var(--mom-ink);
	font-size: clamp(1.42rem, 2.4vw, 1.8rem);
	line-height: 1.3;
	letter-spacing: 0.005em;
	text-wrap: balance;
}

body.page .entry-content > h2.wp-block-heading:first-child {
	margin-top: 0;
}

body.page .entry-content > h3.wp-block-heading {
	margin: 2rem 0 0.9rem;
	padding-bottom: 0.55rem;
	border-bottom: 2px solid #e7edf0;
	color: var(--mom-blue);
	font-size: clamp(1.16rem, 2vw, 1.36rem);
	line-height: 1.35;
	text-wrap: balance;
}

body.page .entry-content > h4.wp-block-heading,
body.page .entry-content > h5.wp-block-heading {
	margin: 1.55rem 0 0.65rem;
	color: #385668;
	line-height: 1.4;
	text-wrap: balance;
}

body.page .entry-content > ul.wp-block-list,
body.page .entry-content > ol.wp-block-list {
	margin: 1.35rem 0 1.75rem;
	padding: 1.25rem 1.35rem 1.25rem 2.75rem;
	border: 1px solid #e8dccb;
	border-radius: 14px;
	background: var(--mom-cream);
	box-shadow: 0 8px 24px rgba(23, 56, 79, 0.055);
}

body.page .entry-content li {
	margin: 0.38rem 0;
	padding-left: 0.18rem;
}

body.page .entry-content a:not(.wp-block-button__link):not(.post-edit-link) {
	color: #a9432b;
	font-weight: 650;
	text-decoration: underline;
	text-decoration-color: rgba(224, 164, 61, 0.72);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
	transition: color 160ms ease, text-decoration-color 160ms ease;
}

body.page .entry-content a:not(.wp-block-button__link):not(.post-edit-link):hover,
body.page .entry-content a:not(.wp-block-button__link):not(.post-edit-link):focus {
	color: #6f2c1f;
	text-decoration-color: #b54f32;
}

body.page .entry-content .wp-block-button__link,
body.page .entry-content a.mom-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.78rem 1.2rem;
	border: 0;
	border-radius: 9px;
	background: linear-gradient(135deg, #1f5f7a, #17384f);
	box-shadow: 0 7px 18px rgba(23, 56, 79, 0.18);
	color: #fff !important;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none !important;
	transition: transform 160ms ease, box-shadow 160ms ease;
}

body.page .entry-content .wp-block-button__link:hover,
body.page .entry-content .wp-block-button__link:focus,
body.page .entry-content a.mom-button:hover,
body.page .entry-content a.mom-button:focus {
	transform: translateY(-1px);
	box-shadow: 0 10px 23px rgba(23, 56, 79, 0.24);
}

body.page .entry-content blockquote,
body.page .entry-content > .wp-block-quote {
	margin: 1.8rem 0;
	padding: 1.25rem 1.4rem;
	border-left: 5px solid var(--mom-gold);
	border-radius: 0 12px 12px 0;
	background: #fff9ed;
	color: #394d58;
	font-size: 1.06rem;
	font-style: italic;
}

body.page .entry-content > figure:not(.wp-block-table),
body.page .entry-content > .wp-block-image,
body.page .entry-content > .wp-block-embed {
	margin-top: 1.7rem;
	margin-bottom: 2rem;
}

body.page .entry-content figure img {
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(23, 56, 79, 0.13);
}

body.page .entry-content figcaption {
	margin-top: 0.65rem;
	color: #617785;
	font-size: 0.9rem;
	line-height: 1.5;
	text-align: center;
}

body.page .entry-content .wp-block-embed__wrapper {
	overflow: hidden;
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(23, 56, 79, 0.14);
}

body.page .entry-content > hr.wp-block-separator {
	width: 76px;
	margin: 2.7rem auto;
	border: 0;
	border-top: 4px solid var(--mom-gold);
	opacity: 0.75;
}

body.page .entry-content .wp-block-table {
	margin: 1.6rem 0 2rem;
	overflow-x: auto;
	border: 1px solid var(--mom-line);
	border-radius: 12px;
	box-shadow: 0 9px 26px rgba(23, 56, 79, 0.08);
}

body.page .entry-content .wp-block-table table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.94rem;
	line-height: 1.55;
}

body.page .entry-content .wp-block-table th {
	padding: 0.85rem 0.9rem;
	border-color: #315c72;
	background: var(--mom-ink);
	color: #fff;
	font-weight: 700;
	vertical-align: top;
}

body.page .entry-content .wp-block-table td {
	padding: 0.78rem 0.9rem;
	border-color: #dfe7eb;
	vertical-align: top;
}

body.page .entry-content .wp-block-table tbody tr:nth-child(even) {
	background: #f5f9fb;
}

body.page .entry-content > p:has(> strong:only-child),
body.page .entry-content > p:has(> em:only-child) {
	padding: 0.95rem 1.1rem;
	border-radius: 10px;
	background: var(--mom-pale-blue);
	color: var(--mom-ink);
}

/* Linked article headings read as clear, self-contained choices. */
body.page .entry-content > h3.wp-block-heading:has(a) {
	padding: 0.9rem 1rem;
	border: 1px solid #dce7ec;
	border-left: 4px solid var(--mom-blue);
	border-radius: 10px;
	background: #f6fafc;
}

body.page .entry-content > h3.wp-block-heading:has(a) a {
	display: block;
	color: var(--mom-ink);
	text-decoration: none;
}

/* The Writings hub becomes a readable visual catalogue without changing its blocks. */
body.page-id-20694 .entry-content > h3.wp-block-heading:has(a) {
	margin-bottom: 0;
	border-radius: 12px 12px 0 0;
	background: linear-gradient(135deg, #eef6f9, #fbfdfe);
}

body.page-id-20694 .entry-content > h3.wp-block-heading:has(a) + p {
	margin-top: 0;
	padding: 0.25rem 1.1rem 1.15rem;
	border: 1px solid #dce7ec;
	border-top: 0;
	border-radius: 0 0 12px 12px;
	background: #fbfdfe;
}

body.page-id-20694 .entry-content .wp-block-image .alignright {
	margin: 0.4rem 0 1.2rem 1.6rem;
}

/* Resource links appear as distinct cards. */
body.page-id-10152 .entry-content > p {
	margin: 0 0 1rem;
	padding: 1.15rem 1.25rem;
	border: 1px solid #dce7ec;
	border-left: 4px solid var(--mom-gold);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 22px rgba(23, 56, 79, 0.06);
}

/* Short confirmation page. */
body.page-id-16532 .entry-content {
	padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3.5rem);
	border: 1px solid #dce7ec;
	border-radius: 18px;
	background: linear-gradient(145deg, #f2f8fa, #fff9ee);
	box-shadow: 0 14px 36px rgba(23, 56, 79, 0.1);
	text-align: center;
}

body.page-id-16532 .entry-content > h2.wp-block-heading {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

/* Embedded MembershipWorks pages sit in a deliberate frame. */
body:is(.page-id-18545,.page-id-19021,.page-id-19287,.page-id-20145) .entry-content #SFctr,
body:is(.page-id-18545,.page-id-19021,.page-id-19287,.page-id-20145) .entry-content > [class*="SF"] {
	margin: 1.2rem 0;
	padding: clamp(0.75rem, 2vw, 1.25rem);
	border: 1px solid #dce7ec;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(23, 56, 79, 0.08);
}

/* Gallery and image-led pages. */
body:is(.page-id-16685,.page-id-16697,.page-id-20162) .entry-content img {
	transition: transform 180ms ease, box-shadow 180ms ease;
}

body:is(.page-id-16685,.page-id-16697,.page-id-20162) .entry-content a:hover img,
body:is(.page-id-16685,.page-id-16697,.page-id-20162) .entry-content a:focus img {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px rgba(23, 56, 79, 0.18);
}

/* Contact details are visually separated even before their links are used. */
body.page-id-8761 .entry-content > p:not(:empty) {
	padding: 0.95rem 1.1rem;
	border: 1px solid #dce7ec;
	border-radius: 11px;
	background: #f8fbfc;
}

@media (max-width: 767px) {
	body.page .entry-content {
		font-size: 1rem;
		line-height: 1.7;
	}

	body.page .entry-content > h2.wp-block-heading {
		margin-top: 2.2rem;
		padding: 0.75rem 0.85rem 0.75rem 1rem;
	}

	body.page .entry-content > ul.wp-block-list,
	body.page .entry-content > ol.wp-block-list {
		padding: 1rem 1rem 1rem 2.25rem;
	}

	body.page .entry-content .wp-block-table {
		margin-right: -0.5rem;
		margin-left: -0.5rem;
		border-radius: 8px;
	}

	body.page-id-20694 .entry-content .wp-block-image .alignright {
		float: none;
		display: block;
		margin: 1rem auto 1.4rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.page .entry-content a,
	body.page .entry-content img {
		transition: none !important;
	}
}

/* Online-program cards: two balanced columns, with the final item centred. */
body.page-id-20162 .entry-content {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

body.page-id-20162 .entry-content > figure.wp-block-image {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 14px 14px 18px;
	border: 1px solid #dce7ec;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 26px rgba(23, 56, 79, 0.08);
}

body.page-id-20162 .entry-content > figure.wp-block-image:last-of-type {
	grid-column: 1 / -1;
	justify-self: center;
	width: calc(50% - 12px);
}

body.page-id-20162 .entry-content > figure.wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
}

body.page-id-20162 .entry-content > figure.wp-block-image figcaption {
	margin-top: auto;
	padding-top: 0.8rem;
	color: #425b69;
	font-weight: 650;
}

@media (max-width: 767px) {
	body.page-id-20162 .entry-content {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	body.page-id-20162 .entry-content > figure.wp-block-image:last-of-type {
		grid-column: auto;
		width: 100%;
	}
}

body.page-id-20162 .entry-content::before,
body.page-id-20162 .entry-content::after {
	display: none;
}
