/*
Theme Name: CCHD 2027
Theme URI: https://clintoncohealth.org/
Description: Accessible block theme for the Clinton County Health Department (child of Twenty Twenty-Five).
Author: Clinton County Health Department
Template: twentytwentyfive
Version: 0.1.0
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cchd-2027
*/

/* ---------- Focus & motion ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
	outline: 3px solid var(--wp--preset--color--gold) !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px var(--wp--preset--color--navy) !important;
	border-radius: 2px;
}
main:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Header ---------- */
.cchd-utility {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	font-size: 0.9375rem;
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
}
.cchd-utility p { margin: 0; }
.cchd-utility a { color: var(--wp--preset--color--white); }
.cchd-utility__inner { gap: 0.25rem 2rem; }

.cchd-masthead {
	background: var(--wp--preset--color--white);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-top: 1rem;
	padding-bottom: 0.25rem;
}
.cchd-masthead__row { gap: 1rem 2rem; }
.cchd-masthead .wp-block-site-logo img { height: auto; }
.cchd-masthead .wp-block-search { min-width: min(22rem, 100%); }
.cchd-navrow { padding-top: 0.5rem; padding-bottom: 0.5rem; }

.cchd-navrow .wp-block-navigation {
	font-weight: 600;
	font-size: 1rem;
	gap: 0.25rem 1.5rem;
}
.cchd-navrow .wp-block-navigation a,
.cchd-navrow .wp-block-navigation .wp-block-navigation-submenu__toggle {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	padding: 0.5rem 0.15rem;
}
.cchd-navrow .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cchd-navrow .wp-block-navigation .current-menu-item > a { box-shadow: inset 0 -3px 0 var(--wp--preset--color--gold); }
.cchd-navrow .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(11, 47, 99, 0.12);
	padding: 0.4rem 0 !important;
	min-width: 16rem !important;
}
.cchd-navrow .wp-block-navigation__submenu-container a { padding: 0.5rem 1rem !important; font-weight: 500; }
.wp-block-navigation__responsive-container-open:not(.always-shown) {
	border: 2px solid var(--wp--preset--color--navy);
	border-radius: 6px;
	padding: 0.4rem 0.9rem;
	font-weight: 700;
	color: var(--wp--preset--color--navy);
	background: var(--wp--preset--color--white);
}
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { font-size: 1.125rem; }

/* ---------- Alert ---------- */
.cchd-alert {
	background: #fff4d6;
	color: var(--wp--preset--color--ink);
	border-bottom: 1px solid #f0d58a;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}
.cchd-alert p { margin: 0; }
.cchd-alert a { color: var(--wp--preset--color--ink); font-weight: 600; }

/* ---------- Hero ---------- */
.cchd-hero {
	background: linear-gradient(135deg, var(--wp--preset--color--navy) 0%, var(--wp--preset--color--navy-2) 100%);
	color: var(--wp--preset--color--white);
	padding-top: clamp(2.5rem, 6vw, 4.5rem);
	padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.cchd-hero h1 { color: var(--wp--preset--color--white); font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.1; margin-top: 0; }
.cchd-hero__lead { font-size: 1.25rem; max-width: 34rem; }
.cchd-hero .wp-block-columns { gap: 2.5rem; align-items: center; }
.cchd-hero .wp-block-search__label { color: var(--wp--preset--color--white); }
.cchd-hero .wp-block-search__input { border: 0; border-radius: 6px 0 0 6px; padding: 0.8rem 1rem; font-size: 1.0625rem; }
.cchd-hero .wp-block-search__button {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
	border: 0;
	border-radius: 0 6px 6px 0;
	font-weight: 700;
	margin-left: 0;
	padding: 0.8rem 1.25rem;
}
.cchd-hero__photo { margin: 0; }
.cchd-hero__photo img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 14px;
	border: 4px solid rgba(255, 255, 255, 0.85);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

/* ---------- Task cards ---------- */
.cchd-section { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.cchd-section--soft { background: var(--wp--preset--color--soft); }
.cchd-section__intro { color: var(--wp--preset--color--muted); margin-top: 0; }
.cchd-cards { gap: 1.25rem; }
.cchd-card {
	position: relative;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 1.5rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cchd-card:hover { border-color: var(--wp--preset--color--navy-2); box-shadow: 0 10px 24px rgba(11, 47, 99, 0.1); transform: translateY(-2px); }
.cchd-card:focus-within { border-color: var(--wp--preset--color--navy); }
.cchd-card h3 { font-size: 1.3rem; margin: 0.75rem 0 0.35rem; }
.cchd-card h3 a { color: var(--wp--preset--color--navy); text-decoration: none; }
.cchd-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.cchd-card:hover h3 a { text-decoration: underline; }
.cchd-card p { margin: 0; color: var(--wp--preset--color--muted); }
.cchd-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: #e7edf6;
	color: var(--wp--preset--color--navy);
}
.cchd-icon svg { width: 1.6rem; height: 1.6rem; }

/* ---------- News + contact ---------- */
.cchd-news .wp-block-post-template { list-style: none; padding: 0; margin: 0; }
.cchd-news .wp-block-post { padding: 1rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.cchd-news .wp-block-post-title { font-size: 1.25rem; margin: 0 0 0.25rem; }
.cchd-news .wp-block-post-date { color: var(--wp--preset--color--muted); font-size: 0.9375rem; }
.cchd-visit {
	background: var(--wp--preset--color--soft);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 6px solid var(--wp--preset--color--navy);
	border-radius: 12px;
	padding: 1.5rem 1.75rem;
}
.cchd-visit h2 { margin-top: 0; }
.cchd-visit p { margin: 0.4rem 0; }
.cchd-emergency {
	background: var(--wp--preset--color--white);
	border-left: 5px solid var(--wp--preset--color--gold);
	padding: 0.9rem 1rem;
	margin-top: 1.25rem;
	border-radius: 0 8px 8px 0;
}
.cchd-emergency h3 { font-size: 1.125rem; margin: 0 0 0.3rem; }

/* ---------- Photo strip ---------- */
.cchd-strip { margin: 0; }
.cchd-strip img { width: 100%; height: clamp(180px, 24vw, 320px); object-fit: cover; display: block; }

/* ---------- Footer ---------- */
.cchd-footer {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	padding-top: 3rem;
	padding-bottom: 2rem;
	font-size: 1rem;
}
.cchd-footer h2 { color: var(--wp--preset--color--white); font-size: 1.25rem; margin-top: 0; }
.cchd-footer a { color: var(--wp--preset--color--white); }
.cchd-footer ul { padding-left: 0; list-style: none; }
.cchd-footer li { margin: 0.35rem 0; }
.cchd-members { gap: 0.75rem; }
.cchd-members .wp-block-image { margin: 0; }
.cchd-members img { background: var(--wp--preset--color--white); padding: 0.5rem 0.75rem; border-radius: 8px; max-height: 64px; width: auto; }
.cchd-footer .wp-block-social-links .wp-social-link { background: transparent !important; color: var(--wp--preset--color--white) !important; border: 2px solid rgba(255, 255, 255, 0.7); }
.cchd-footer__legal { border-top: 1px solid rgba(255, 255, 255, 0.25); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.9375rem; }

/* ---------- Content pages ---------- */
.cchd-page-header { padding-top: 2.5rem; }
.cchd-page-header h1 { margin-bottom: 0.5rem; }
.wp-block-post-content img { height: auto; }
.wp-block-post-content iframe { max-width: 100%; }

/* Mobile overlay: flatten sub-menus into a simple indented list */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important;
	box-shadow: none !important;
	border-left: 3px solid var(--wp--preset--color--line) !important;
	border-radius: 0;
	padding: 0 0 0 1rem !important;
	min-width: 0 !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a { padding: 0.35rem 0 !important; }
