/* Cavaliers of Healdsburg — site header (block theme template part) */

:root {
	--coh-h-bg: #faf5f0;
	--coh-h-ink: #2a2421;
	--coh-h-muted: #6f655e;
	--coh-h-brand: #86734e;
	--coh-h-brand-dark: #6c5c3c;
	--coh-h-line: #ece3d8;
}

/* Stay at the top while scrolling (the template-part wrapper is what can stick). */
.wp-site-blocks > .wp-block-template-part:has(> .coh-header) {
	position: sticky;
	top: 0;
	z-index: 100;
	margin-block-start: 0;
}
body.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .coh-header) { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .coh-header) { top: 46px; }
}
@media (max-width: 600px) {
	body.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .coh-header) { top: 0; }
}

/* ---------- Bar ---------- */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header {
	margin: 0 !important;
	padding: 0 clamp(16px, 4vw, 32px) !important;
	background: var(--coh-h-bg);
	border-bottom: 1px solid var(--coh-h-line);
	box-shadow: 0 2px 14px rgba(68, 49, 32, .06);
	color: var(--coh-h-ink);
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__inner {
	max-width: 1240px;
	min-height: 80px;
	margin: 0 auto;
	padding: 10px 0;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
	flex-wrap: nowrap;
}

/* ---------- Logo + name ---------- */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__brand {
	flex: 0 1 auto;
	min-width: 0;
	gap: 12px;
	align-items: center;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-site-logo { flex: none; margin: 0; line-height: 0; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-site-logo img { width: 56px !important; height: auto; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-site-title {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: .05em;
	text-transform: uppercase;
	white-space: nowrap;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-site-title a { color: var(--coh-h-brand); text-decoration: none; }

/* ---------- Right side ---------- */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__right {
	flex: 0 0 auto;
	gap: 18px;
	align-items: center;
}

/* Menu */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation {
	gap: 0;
	font-size: 15.5px;
	font-weight: 500;
	color: var(--coh-h-ink);
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation__container { gap: 6px; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 10px 12px;
	border-radius: 999px;
	color: var(--coh-h-ink);
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation-item__content:hover,
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation-item__content:focus-visible,
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .has-child:hover > .wp-block-navigation-item__content {
	background: rgba(134, 115, 78, .12);
	color: var(--coh-h-brand-dark);
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--coh-h-brand-dark);
	font-weight: 600;
}
/* Drop-down arrow sits snugly after its label */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .has-child > .wp-block-navigation-item__content { padding-right: 24px; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation__submenu-icon {
	margin-left: -22px;
	width: 14px;
	height: 14px;
	color: var(--coh-h-muted);
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation__submenu-icon svg { stroke: currentColor; }

/* Drop-down panels */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation__submenu-container {
	padding: 8px;
	border: 1px solid var(--coh-h-line) !important;
	border-radius: 14px;
	background: #fff !important;
	color: var(--coh-h-ink) !important;
	box-shadow: 0 16px 36px rgba(68, 49, 32, .14);
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container,
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-container,
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .has-child [aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	min-width: 230px;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 15px;
	white-space: nowrap;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--coh-h-bg);
}

/* "Apply for a Puppy" lives in the phone/tablet menu only; wide screens use the button. */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-nav-apply { display: none; }

/* Apply Now button */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__cta { flex: none; gap: 0; margin: 0; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__cta .wp-block-button__link {
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--coh-h-brand);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .01em;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	box-shadow: none;
	transition: background-color .15s ease;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__cta .wp-block-button__link:hover,
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__cta .wp-block-button__link:focus-visible {
	background: var(--coh-h-brand-dark);
	color: #fff;
}

/* ---------- Menu button (tablets and phones) ---------- */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation__responsive-container-open {
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--coh-h-line);
	border-radius: 12px;
	background: #fff;
	color: var(--coh-h-ink);
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation__responsive-container-open svg { width: 24px; height: 24px; }

/* Use the menu button below 1100px (WordPress normally switches at 600px, which is too late for this many links). */
@media (max-width: 1099px) {
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }

	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__inner { min-height: 68px; gap: 12px; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-site-logo img { width: 46px !important; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-site-title { font-size: 16px; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__right { gap: 10px; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__cta { order: -1; } /* Apply Now, then the menu button */
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__cta .wp-block-button__link { padding: 11px 16px; font-size: 14px; }
}
@media (max-width: 600px) {
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__brand { gap: 10px; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-site-logo img { width: 42px !important; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-site-title { max-width: 12ch; font-size: 14px; white-space: normal; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__right { gap: 8px; }
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__cta .wp-block-button__link { padding: 9px 13px; font-size: 13px; }
}
@media (max-width: 359px) {
	:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .coh-header__cta { display: none; }
}

/* ---------- Open menu (full screen) ---------- */
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 24px clamp(20px, 6vw, 48px) 40px;
	background: var(--coh-h-bg) !important;
	color: var(--coh-h-ink) !important;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--coh-h-line);
	border-radius: 12px;
	background: #fff;
	color: var(--coh-h-ink);
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation__responsive-container-content,
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation__container,
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation-item {
	align-items: flex-start !important;
	text-align: left;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 56px; gap: 6px; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation__container { gap: 6px; width: 100%; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation-item__content {
	padding: 8px 0 !important;
	border-radius: 0;
	background: none !important;
	font-size: 21px;
	font-weight: 600;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation__submenu-container {
	min-width: 0;
	margin: 0 0 6px;
	padding: 0 0 0 14px !important;
	border: 0 !important;
	border-left: 2px solid var(--coh-h-line) !important;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 6px 0 !important;
	color: var(--coh-h-muted);
	font-size: 17px;
	font-weight: 500;
}
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .has-child > .wp-block-navigation-item__content { padding-right: 0 !important; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .coh-nav-apply { display: flex; margin-top: 18px; }
:is(.wp-site-blocks, .editor-styles-wrapper) .coh-header .is-menu-open .coh-nav-apply > .wp-block-navigation-item__content {
	padding: 13px 26px !important;
	border-radius: 999px;
	background: var(--coh-h-brand) !important;
	color: #fff !important;
	font-size: 17px;
}
