/*
/* Note: WordPress emits ":root :where(.is-layout-flow) > * { margin-block: 0 }" late in the page;
   :root gives it class specificity, so block-level classes that set their own
   vertical margins are doubled (.x.x) to win. */
 * McRae-Helena theme styles: page base, the native-block section classes used
 * in page content, the footer template part, and the small-screen reflow.
 *
 * Desktop values are taken verbatim from the design handoff's inline styles.
 * Everything under the max-width media queries is added for WCAG 1.4.10
 * (reflow) — the handoff was drawn at 1440px only.
 */

/* ----------------------------------------------------------------- base */
body {
	margin: 0;
	background: #faf7f1;
	color: #1c2119;
	font-family: 'Public Sans', sans-serif;
	line-height: normal;
}

a { color: #00693c; text-decoration: none; }
a:hover { color: #004526; }
h1, h2, h3, h4, h5, h6 { margin: 0; }

:focus-visible {
	outline: 3px solid #00693c;
	outline-offset: 2px;
}

.mc-on-dark :focus-visible,
.mc-footer :focus-visible {
	outline-color: #8fe0b4;
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* ------------------------------------------------------------ wrappers */

/* Home sections: content-box, so the 1440px measure is the content width
   (core gives .wp-block-group border-box, hence the doubled class). */
.mc-wrap.mc-wrap {
	box-sizing: content-box;
	max-width: 1440px;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 48px;
	padding-right: 48px;
}

/* Inner pages: border-box, so 1440px includes the 48px gutters. */
.mc-wrap-bb {
	max-width: 1440px;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 48px;
	padding-right: 48px;
	box-sizing: border-box;
}

/* Two-column page body: main column + fixed-width sidebar. */
.mc-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 48px;
	align-items: start;
}
.mc-layout--380 { grid-template-columns: minmax(0, 1fr) 380px; }

.mc-aside { display: grid; gap: 22px; }

/* ------------------------------------------------------ section titles */
.mc-title {
	font-family: 'Zilla Slab', serif;
	font-size: 46px;
	font-weight: 600;
	color: #1c2119;
	line-height: normal;
}
.mc-title.is-small { font-size: 40px; }

.mc-intro.mc-intro {
	font-size: 19px;
	line-height: 1.6em;
	color: #4b5449;
	margin: 0 0 44px;
	max-width: 620px;
}

.mc-sub.mc-sub {
	font-size: 19px;
	color: #4b5449;
	margin: 0 0 36px;
}

.mc-more-link.mc-more-link {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	padding-left: 4px;
}

/* -------------------------------------------- home: events + newsletter */
.mc-split-events {
	display: grid;
	grid-template-columns: 1.9fr 1fr;
	gap: 36px;
	align-items: start;
}

/* ------------------------------------------------- home: press releases */
.mc-empty-feed {
	margin: 0;
	border: 1px dashed #cfc6b4;
	border-radius: 5px;
	padding: 44px;
	text-align: center;
	font-family: ui-monospace, monospace;
	font-size: 16px;
	color: #6d6455;
}

.mc-press .wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.mc-press .wp-block-post {
	background: #fff;
	border: 1px solid #e4ddd0;
	border-radius: 5px;
	padding: 28px;
}
.mc-press .wp-block-post-date { font-size: 16px; font-weight: 700; color: #00693c; margin-bottom: 8px; }
.mc-press .wp-block-post-title { font-size: 25px; line-height: 1.25em; margin-bottom: 10px; }
.mc-press .wp-block-post-title a { color: #1c2119; }
.mc-press .wp-block-post-title a:hover { color: #00693c; }
.mc-press .wp-block-post-excerpt { font-size: 18px; line-height: 1.6em; color: #4b5449; }
.mc-press .wp-block-post-excerpt p { margin: 0; }

/* ---------------------------------------------- home: suggestion panel */
.mc-panel-mint {
	background: #eef6f0;
	border: 1px solid #cfe3d6;
	border-radius: 6px;
	padding: 54px 60px;
}

/* ------------------------------------------------------- home: facts */
.mc-facts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
}
.mc-fact { border-top: 4px solid #00aa55; padding-top: 26px; }
.mc-fact__num {
	margin: 0;
	font-family: 'Zilla Slab', serif;
	font-size: 66px;
	font-weight: 700;
	color: #00693c;
	line-height: 1;
}
.mc-fact__title {
	font-family: 'Zilla Slab', serif;
	font-size: 27px;
	font-weight: 600;
	color: #1c2119;
	padding: 12px 0 8px;
}
.mc-fact__text { margin: 0; font-size: 18px; color: #4b5449; }

/* ------------------------------------------------ department bio card */
.mc-bio-card {
	background: #fff;
	border: 1px solid #e4ddd0;
	border-top: 4px solid #00aa55;
	border-radius: 5px;
	padding: 44px 46px;
}
.mc-bio-card .mc-eyebrow {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #00693c;
}
.mc-bio-card h2 {
	font-family: 'Zilla Slab', serif;
	font-size: 44px;
	font-weight: 600;
	color: #1c2119;
	margin-bottom: 24px;
	line-height: normal;
}
.mc-bio-card p:not(.mc-eyebrow) {
	font-size: 20px;
	line-height: 1.75em;
	color: #3d4640;
	margin: 0 0 18px;
}

/* Pull quote under the bio card (core/quote). */
.wp-block-quote.mc-pullquote {
	margin: 44px 0 0;
	border-left: 4px solid #00aa55;
	padding: 4px 0 4px 30px;
	font-family: 'Zilla Slab', serif;
	font-size: 30px;
	line-height: 1.45em;
	font-weight: 500;
	color: #1c2119;
	text-wrap: pretty;
	box-sizing: content-box;
}
.wp-block-quote.mc-pullquote p { margin: 0; }
.wp-block-quote.mc-pullquote cite { display: block; margin-top: 12px; font-size: 18px; font-style: normal; }

/* -------------------------------------------------------------- footer */
.mc-footer {
	background: #1c2119;
	color: #cfd3c8;
	font-family: 'Public Sans', sans-serif;
}
.mc-footer__cols {
	max-width: 1440px;
	margin: 0 auto;
	padding: 70px 48px;
	box-sizing: border-box;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 44px;
	font-size: 18px;
	line-height: 1.75em;
}
.mc-footer p { margin: 0; }
.mc-footer__title {
	font-family: 'Zilla Slab', serif;
	color: #faf7f1;
	font-size: 23px;
	font-weight: 600;
	margin: 0 0 10px;
}
.mc-footer__subtitle {
	font-family: 'Zilla Slab', serif;
	color: #faf7f1;
	font-size: 20px;
	font-weight: 600;
	margin: 24px 0 6px;
}
/* Footer links sit inside running text in a colour close to the text's
   luminance, so they are underlined to stay distinguishable (WCAG 1.4.1). */
.mc-footer a {
	color: #8fe0b4;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.mc-footer a:hover { color: #fff; }
.mc-footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.mc-footer__bar p {
	max-width: 1440px;
	margin: 0 auto;
	padding: 24px 48px;
	box-sizing: border-box;
	font-size: 17px;
}

/* ------------------------------------------- generic (posts, 404, search) */
.mc-generic { padding-top: 64px; padding-bottom: 96px; font-size: 19px; line-height: 1.7em; }
.mc-generic h1 { font-size: 56px; line-height: 1.1em; margin-bottom: 24px; }
.mc-generic h2 { font-size: 32px; margin: 32px 0 8px; }
.mc-generic a { text-decoration: underline; }

/* ======================================================================
 * Reflow. Desktop (>1200px) is the handoff verbatim.
 * ====================================================================== */
@media (max-width: 1200px) {
	.mc-wrap.mc-wrap, .mc-wrap-bb { padding-left: 32px; padding-right: 32px; }
	.mc-layout, .mc-layout--380 { grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; }
	.mc-footer__cols { grid-template-columns: repeat(2, 1fr); padding-left: 32px; padding-right: 32px; }
	.mc-footer__bar p { padding-left: 32px; padding-right: 32px; }
	.mc-press .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.mc-layout, .mc-layout--380 { grid-template-columns: minmax(0, 1fr); }
	.mc-split-events { grid-template-columns: minmax(0, 1fr); }
	.mc-facts { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.mc-title { font-size: 36px; }
	.mc-title.is-small { font-size: 32px; }
	.mc-panel-mint { padding: 36px 28px; }
	.mc-bio-card { padding: 32px 28px; }
	.mc-bio-card h2 { font-size: 36px; }
	.wp-block-quote.mc-pullquote { font-size: 24px; }
}

@media (max-width: 600px) {
	.mc-wrap.mc-wrap, .mc-wrap-bb { padding-left: 16px; padding-right: 16px; }
	.mc-footer__cols { grid-template-columns: minmax(0, 1fr); padding: 48px 16px; gap: 28px; }
	.mc-footer__bar p { padding: 20px 16px; }
	.mc-press .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
	.mc-title { font-size: 30px; }
	.mc-title.is-small { font-size: 28px; }
	.mc-intro { margin-bottom: 28px; }
	.mc-fact__num { font-size: 52px; }
	.mc-empty-feed { padding: 28px 16px; }
	.mc-bio-card { padding: 26px 20px; }
	.mc-bio-card h2 { font-size: 30px; }
	.mc-bio-card p:not(.mc-eyebrow) { font-size: 18px; }
	.mc-panel-mint { padding: 28px 18px; }
}

/* Header: right-justify the main menu next to the social icon on desktop. */
.mc-header__main .mc-header__nav { margin-left: auto; }

/* Hero tiles: size the desktop grid to however many tiles there are
   (the plugin hard-codes 7 columns). Tablet/phone breakpoints are untouched. */
@media (min-width: 1201px) {
	.mc-tiles-wrap .mc-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
}

/* City Services cards: no description line, so drop the empty span and the
   label's bottom gap to keep the card padding even. */
.mc-service .mc-service__title:empty { display: none; }
.mc-service .mc-service__sub:has(+ .mc-service__title:empty) { margin-bottom: 0; }

/* Contact cards: size the desktop grid to the number of cards (the plugin
   hard-codes 4 columns). Tablet/phone breakpoints are untouched. */
@media (min-width: 1201px) {
	.mc-contact-cards.mc-contact-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
}

/* Latest Press Releases: fill the row whatever the post count (1–3).
   Desktop splits the width evenly; on the 2-column tablet layout an odd
   last card spans the full row. Phone is already one column. */
@media (min-width: 1201px) {
	.mc-press .wp-block-post-template { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}
@media (min-width: 601px) and (max-width: 1200px) {
	.mc-press .wp-block-post:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Footer logo: the logo file has an opaque white background, so it sits on a
   cream card (the header colour) rather than directly on the dark footer. */
.mc-footer .mc-footer__logo { margin: 0; }
.mc-footer .mc-footer__logo a { display: block; background: #faf7f1; border-radius: 6px; padding: 12px 14px; max-width: 280px; text-decoration: none; }
.mc-footer .mc-footer__logo img { display: block; width: 100%; height: auto; }
