/*
Theme Name: Muskingum County CERT
Description: A block theme for the Muskingum County, Ohio Community Emergency Response Team. Home page sections for training, getting involved, events, news and contact, all editable in the Site Editor.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: muskingum-cert
Tags: block-patterns, full-site-editing, one-column, custom-colors, custom-logo
*/

:root {
	--mc-green: var(--wp--preset--color--vest-green, #01cd0d);
	--mc-deep: var(--wp--preset--color--deep-green, #0a6614);
	--mc-black: #000;
	--mc-fog: var(--wp--preset--color--fog, #edf0ea);
	--mc-line: #c5cbc2;
	--mc-display: var(--wp--preset--font-family--display, Jost, Futura, sans-serif);
	--mc-section: clamp(3.5rem, 8vw, 6.5rem);
	--mc-skyline: clamp(48px, 7vw, 84px);
	--mc-header-height: 5.5rem;
}

html {
	scroll-behavior: smooth;
	/* Keep section headings clear of the sticky header when a menu link jumps to them. */
	scroll-padding-top: calc(var(--mc-header-height) + var(--wp-admin--admin-bar--height, 0px) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

:where(a, button, .wp-block-button__link):focus-visible {
	outline: 3px solid var(--mc-black);
	outline-offset: 3px;
}

.mc-contact :where(a, .wp-block-button__link):focus-visible,
.mc-next :where(a):focus-visible,
.mc-footer :where(a):focus-visible {
	outline-color: #fff;
}

/* Sections sit flush against each other; each one sets its own padding. */
.wp-site-blocks > *,
.mc-main > * {
	margin-block-start: 0;
}

.mc-section {
	padding-top: var(--mc-section);
	padding-bottom: var(--mc-section);
}

.mc-section--fog {
	background: var(--mc-fog);
}

.mc-section__intro {
	max-width: 44rem;
	margin-bottom: 2.5rem;
}

.mc-lede {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	max-width: 36rem;
}

/* Grids built from Group blocks. */
.mc-grid {
	display: grid;
	gap: clamp(1.75rem, 4vw, 3.5rem);
}

.mc-grid > * {
	margin-block-start: 0;
	min-width: 0;
}

@media (min-width: 800px) {
	.mc-grid--hero {
		grid-template-columns: 1.2fr 0.8fr;
		align-items: center;
	}

	.mc-grid--about {
		grid-template-columns: 1.1fr 0.9fr;
		align-items: start;
	}

	.mc-grid--three {
		grid-template-columns: repeat(3, 1fr);
	}

	.mc-grid--two {
		grid-template-columns: 1fr 1fr;
	}
}

/* ---------- Header ---------- */
/* The header stays at the top of the window while the page scrolls. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}

/* On phones the WordPress admin bar scrolls away, so the header sits at the very top. */
@media (max-width: 600px) {
	.wp-site-blocks > header.wp-block-template-part {
		top: 0;
	}
}

.mc-header {
	padding-top: 0.85rem;
	padding-bottom: 0.85rem;
	border-bottom: 3px solid var(--mc-black);
	background: #fff;
}

.mc-header__bar,
.mc-header__brand {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.mc-header__bar {
	justify-content: space-between;
	gap: 1.5rem;
}

.mc-header__bar > *,
.mc-header__brand > * {
	margin-block-start: 0;
}

.mc-header__logo {
	margin: 0;
	flex: none;
}

.mc-header__logo img {
	display: block;
	width: auto;
	height: 58px;
}

.mc-header .wp-block-navigation a:hover {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-decoration-color: var(--mc-green);
	text-underline-offset: 6px;
}

@media (max-width: 480px) {
	.mc-header .wp-block-site-title {
		font-size: 1.05rem;
	}

	.mc-header__logo img {
		height: 46px;
	}
}

/* ---------- Skyline edge (echoes the logo) ---------- */
.mc-skyline {
	position: relative;
}

.mc-skyline::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc(100% - 1px);
	height: var(--mc-skyline);
	background: url(assets/images/skyline.svg) repeat-x center bottom / auto 100%;
	pointer-events: none;
}

/* ---------- Hero ---------- */
.mc-hero {
	padding-top: clamp(2.5rem, 6vw, 5rem);
	padding-bottom: calc(var(--mc-skyline) + clamp(2rem, 5vw, 3.5rem));
}

.mc-hero h1 {
	max-width: 13em;
	margin-bottom: 1.25rem;
}

.mc-hero .wp-block-buttons {
	margin-top: 1.75rem;
}

.mc-hero__logo {
	margin: 0;
}

.mc-hero__logo img {
	display: block;
	width: 100%;
	height: auto;
}

@media (max-width: 799px) {
	.mc-hero__logo {
		max-width: 22rem;
	}
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--mc-black);
	border: 2px solid var(--mc-black);
	padding: 0.8rem 1.4rem;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--mc-black);
	color: #fff;
}

/* ---------- Next class band ---------- */
.mc-next {
	background: var(--mc-black);
	color: #fff;
	padding-top: 1.75rem;
	padding-bottom: 2rem;
}

.mc-next__row {
	display: grid;
	gap: 1rem 2.5rem;
	align-items: center;
}

.mc-next__row > * {
	margin-block-start: 0;
}

@media (min-width: 800px) {
	.mc-next__row {
		grid-template-columns: auto 1fr auto;
	}
}

.mc-next h2 {
	color: var(--mc-green);
	font-size: 1.5rem;
	margin: 0;
}

.mc-next p {
	margin: 0;
}

.mc-next a {
	color: #fff;
}

/* ---------- About ---------- */
.mc-skills {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: 0.6rem 1.5rem;
	font-family: var(--mc-display);
	font-weight: 600;
	font-size: 1.15rem;
}

.mc-skills li {
	padding-left: 1.6rem;
	position: relative;
}

.mc-skills li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.42em;
	width: 0.9rem;
	height: 0.9rem;
	background: var(--mc-green);
	border: 2px solid var(--mc-black);
}

.mc-history {
	background: var(--mc-black);
	color: #fff;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	border-top: 10px solid var(--mc-green);
}

.mc-history h3 {
	color: #fff;
}

.mc-history a {
	color: var(--mc-green);
}

.mc-figure {
	font-family: var(--mc-display);
	font-weight: 700;
	font-size: clamp(2.2rem, 4vw, 3rem);
	line-height: 1;
	color: var(--mc-green);
	margin: 1.5rem 0 0.25rem;
}

.mc-figure + p {
	margin-top: 0;
}

/* ---------- Training units (a real sequence: FEMA numbers them) ---------- */
.mc-units {
	list-style: none;
	counter-reset: unit;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	gap: 2rem clamp(1.5rem, 3vw, 3rem);
}

.mc-units li {
	counter-increment: unit;
	border-top: 6px solid var(--mc-black);
	padding-top: 0.75rem;
	display: grid;
	grid-template-columns: 3.25rem 1fr;
	grid-template-rows: auto 1fr;
	column-gap: 0.5rem;
}

.mc-units li::before {
	content: counter(unit);
	grid-row: span 2;
	font-family: var(--mc-display);
	font-weight: 700;
	font-size: 3rem;
	line-height: 0.95;
	color: var(--mc-deep);
}

.mc-units li strong {
	font-family: var(--mc-display);
	font-size: 1.25rem;
	line-height: 1.2;
	color: var(--mc-black);
	display: block;
	margin-bottom: 0.3rem;
}

.mc-units li br {
	display: none;
}

/* ---------- Get involved ---------- */
.mc-way {
	border-top: 6px solid var(--mc-green);
	padding-top: 1.1rem;
}

.mc-way h3 {
	margin-top: 0;
}

.mc-way .wp-block-buttons {
	margin-top: 1.25rem;
}

/* ---------- Be ready at home ---------- */
.mc-ready h3 {
	margin-bottom: 0.4rem;
}

.mc-ready h3 + p {
	margin-top: 0;
}

/* ---------- Events and news ---------- */
.mc-event {
	display: grid;
	grid-template-columns: 5.25rem 1fr;
	gap: 0 1.1rem;
	align-items: start;
	padding: 1.1rem 0;
	border-top: 1px solid var(--mc-line);
}

.mc-event > * {
	margin-block-start: 0;
}

.mc-event__when {
	grid-row: span 2;
	margin: 0;
	background: var(--mc-green);
	border: 2px solid var(--mc-black);
	color: var(--mc-black);
	font-family: var(--mc-display);
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.1;
	text-align: center;
	padding: 0.7rem 0.3rem;
}

.mc-event h3 {
	font-size: 1.25rem;
	margin: 0 0 0.2rem;
}

.mc-event p:last-child {
	margin: 0;
}

.mc-news .wp-block-post-template {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mc-news .wp-block-post {
	padding: 1.1rem 0;
	border-top: 1px solid var(--mc-line);
	margin: 0;
}

.mc-news .wp-block-post > * {
	margin-block: 0 0.3rem;
}

.mc-news .wp-block-post-title {
	font-size: 1.25rem;
}

.mc-news .wp-block-post-title a:hover {
	text-decoration: underline;
}

/* ---------- Contact band and footer ---------- */
.mc-contact {
	background: var(--mc-green);
	color: var(--mc-black);
	padding-top: var(--mc-section);
	padding-bottom: calc(var(--mc-skyline) + var(--mc-section));
}

.mc-contact a:not(.wp-block-button__link) {
	color: var(--mc-black);
	font-weight: 600;
}

.mc-contact .wp-block-button__link {
	background: var(--mc-black);
	color: #fff;
}

.mc-contact .wp-block-button__link:hover {
	background: #fff;
	color: var(--mc-black);
}

.mc-contact__details p {
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--large);
}

.mc-footer {
	background: var(--mc-black);
	color: #fff;
	padding-top: 2.5rem;
	padding-bottom: 2.5rem;
}

.mc-footer a {
	color: #fff;
}

.mc-footer h2 {
	color: #fff;
	font-size: 1.5rem;
	margin: 0 0 0.4rem;
}

.mc-footer__top {
	display: grid;
	gap: 2rem;
	align-items: start;
}

.mc-footer__top > * {
	margin-block-start: 0;
}

@media (min-width: 800px) {
	.mc-footer__top {
		grid-template-columns: auto 1.4fr 1fr 1fr;
	}
}

.mc-footer__badge {
	margin: 0;
}

.mc-footer__badge img {
	display: block;
	width: 112px;
	height: 112px;
	border-radius: 50%;
}

.mc-footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mc-footer li {
	margin-bottom: 0.4rem;
}

.mc-footer__911 {
	font-family: var(--mc-display);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--mc-green);
}

.mc-footer__legal {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid #3a3a3a;
	font-size: var(--wp--preset--font-size--small);
	color: #c9c9c9;
}

/* ---------- Inner pages and posts ---------- */
.mc-page {
	padding-top: clamp(2.5rem, 6vw, 4.5rem);
	padding-bottom: calc(var(--mc-skyline) + var(--mc-section));
}

.mc-page__title {
	border-bottom: 6px solid var(--mc-green);
	padding-bottom: 1rem;
	margin-bottom: 2rem;
}

.mc-list .wp-block-post-template {
	list-style: none;
	padding: 0;
}

.mc-list .wp-block-post {
	border-top: 1px solid var(--mc-line);
	padding: 1.5rem 0;
	margin: 0;
}

.mc-list .wp-block-post-title {
	font-size: 1.6rem;
}
