/*
 * Muha Meds Hub Setup – blog post content (single posts only).
 * Everything is scoped to .mmh-post. The page background is left to the theme: text inherits
 * the theme's colour and the gold accents are tints/mixes, so components read on dark and light themes.
 */
.mmh-post {
	--mmh-gold: #c9a24a;
	--mmh-line: rgba(128, 128, 128, .35);
	line-height: 1.7;
	overflow-wrap: break-word;
	word-wrap: break-word;
}
.mmh-post > :first-child { margin-top: 0; }
.mmh-post > :last-child { margin-bottom: 0; }

/* Headings */
.mmh-post h2 {
	margin: 2em 0 .6em;
	line-height: 1.25;
}
.mmh-post h3 {
	margin: 1.6em 0 .5em;
	line-height: 1.3;
}
.mmh-post h2 + h3 { margin-top: .8em; }
.mmh-post h2 + p,
.mmh-post h3 + p { margin-top: 0; }

/* Direct-answer callout */
.mmh-post .mmh-answer {
	color: inherit;
	background: rgba(201, 162, 74, .10);
	border-left: 4px solid var(--mmh-gold);
	border-radius: 0 8px 8px 0;
	padding: 16px 20px;
	margin: 1.5em 0;
}
.mmh-post .mmh-answer > :first-child { margin-top: 0; }
.mmh-post .mmh-answer > :last-child { margin-bottom: 0; }
.mmh-post .mmh-answer strong:first-child { color: inherit; }

/* Muted note */
.mmh-post .mmh-note {
	color: inherit;
	color: color-mix(in srgb, currentColor 75%, transparent);
	background: rgba(128, 128, 128, .08);
	border: 1px solid rgba(128, 128, 128, .25);
	border-radius: 8px;
	font-size: .9em;
	line-height: 1.6;
	padding: 12px 16px;
	margin: 1.5em 0;
}
.mmh-post .mmh-note > :first-child { margin-top: 0; }
.mmh-post .mmh-note > :last-child { margin-bottom: 0; }

/* Tables: the wrapper scrolls sideways on small screens */
.mmh-post .mmh-table {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1.5em 0;
	border: 1px solid var(--mmh-line);
	border-radius: 8px;
}
.mmh-post .mmh-table table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: .95em;
	line-height: 1.5;
}
.mmh-post .mmh-table th,
.mmh-post .mmh-table td {
	border: 0;
	border-bottom: 1px solid var(--mmh-line);
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
}
.mmh-post .mmh-table tr > :not(:last-child) { border-right: 1px solid var(--mmh-line); }
.mmh-post .mmh-table tbody tr:last-child > * { border-bottom: 0; }
.mmh-post .mmh-table th {
	/* Gold pulled toward the theme's text colour: lighter on dark themes, darker on light ones
	   (contrast stays above 4.5:1 on both). Plain gold where color-mix() is unsupported. */
	color: #c9a24a;
	color: color-mix(in srgb, #c9a24a 55%, currentColor);
	background: rgba(201, 162, 74, .08);
	font-weight: 700;
}
.mmh-post .mmh-table caption {
	caption-side: bottom;
	color: inherit;
	color: color-mix(in srgb, currentColor 75%, transparent);
	font-size: .875em;
	padding: 8px 14px;
	text-align: left;
}

/* Images and figures */
.mmh-post img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}
.mmh-post figure {
	max-width: 100%;
	margin: 1.75em 0;
}
.mmh-post figure img {
	display: block;
	margin: 0 auto;
}
.mmh-post figcaption {
	color: inherit;
	color: color-mix(in srgb, currentColor 75%, transparent);
	font-size: .875em;
	line-height: 1.5;
	margin-top: .6em;
	text-align: center;
}

/* Gold button (same look as on shop pages) */
.mmh-post a.mmh-btn {
	display: inline-block;
	background: var(--mmh-gold);
	color: #0b0b0b !important;
	border-radius: 8px;
	padding: 12px 20px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
}
.mmh-post a.mmh-btn:hover,
.mmh-post a.mmh-btn:focus { background: #e0bd6a; color: #0b0b0b !important; }

@media (max-width: 600px) {
	.mmh-post .mmh-answer { padding: 14px 16px; }
	.mmh-post .mmh-table th,
	.mmh-post .mmh-table td { padding: 8px 10px; }
}

/* Spacing for content inside the Custom HTML block (themes only space top-level blocks). */
.mmh-post p,
.mmh-post ul,
.mmh-post ol { margin: 0 0 1em; }
.mmh-post li { margin: 0 0 .4em; }
.mmh-post h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 .6em; }
.mmh-post h2 { margin: 1.8em 0 .6em; line-height: 1.2; }
.mmh-post h3 { margin: 1.4em 0 .5em; line-height: 1.25; }
.mmh-post h2 + p, .mmh-post h3 + p { margin-top: 0; }
.mmh-post .mmh-answer p, .mmh-post .mmh-note p { margin: 0; }
.mmh-post figure { margin: 1.6em 0; }
