/* ==========================================================================
   Site header (patterns/header.php): info bar + sticky main bar.
   Mobile menu is a <details> – no JS.
   ========================================================================== */

:root {
	--crh-top-h: 38px; /* Info bar height – it scrolls away, the main bar sticks. */
	--crh-bar-h: 84px; /* Main bar height – used to offset in-page anchors. */
}

/* Sticky with a negative offset: the info bar scrolls off, the main bar stays pinned. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--crh-top-h));
	z-index: 100;
}

/* Anchored sections land below the pinned bar, not under it. */
[id] {
	scroll-margin-top: calc(var(--crh-bar-h) + var(--wp-admin--admin-bar--height, 0px));
}

.crh {
	color: var(--wp--preset--color--cream);
	font-family: var(--cr-font-sans);
}

.crh a:focus-visible,
.crh summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 3px;
}

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

/* --- Info bar ------------------------------------------------------------- */

.crh-top {
	height: var(--crh-top-h);
	background: #0e0e0e;
	border-bottom: 1px solid var(--cr-rule-on-dark);
	font-size: 13px;
	color: var(--wp--preset--color--sand);
}

.crh-top-inner {
	max-width: var(--cr-max);
	height: 100%;
	margin: 0 auto;
	padding: 0 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.crh-meta {
	display: flex;
	align-items: center;
	gap: 22px;
	margin: 0;
	min-width: 0;
}

.crh-meta > *,
.crh-phone {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
}

.crh-top a {
	color: inherit;
	text-decoration: none;
}

.crh-top a:hover {
	color: var(--wp--preset--color--cream);
}

.crh-top .cr-icon {
	width: 14px;
	height: 14px;
	color: var(--wp--preset--color--gold);
}

.crh-top-end {
	display: flex;
	align-items: center;
	gap: 18px;
}

.crh-phone {
	font-weight: 600;
	color: var(--wp--preset--color--cream);
}

.crh-social {
	display: flex;
	align-items: center;
	gap: 4px;
}

.crh-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: var(--wp--preset--color--sand);
	transition: color 0.15s, background-color 0.15s;
}

.crh-social-link:hover {
	color: var(--wp--preset--color--gold);
	background: var(--cr-tint-gold);
}

.crh-top .crh-social-link .cr-icon {
	color: currentColor;
}

/* --- Main bar ------------------------------------------------------------- */

.crh-bar {
	background: var(--wp--preset--color--ink);
	border-bottom: 1px solid var(--cr-rule-gold);
}

.crh-inner {
	max-width: var(--cr-max);
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 28px;
	padding: 14px 22px;
}

.crh .cr-brand {
	margin-right: auto;
}

.crh-nav ul {
	display: flex;
	gap: 30px;
}

.crh-link {
	position: relative;
	display: inline-block;
	padding: 8px 0;
	color: var(--wp--preset--color--cream);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	text-decoration: none;
}

.crh-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 1px;
	background: var(--wp--preset--color--gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}

.crh-link:hover,
.crh-link:focus-visible {
	color: var(--wp--preset--color--cream);
}

.crh-link:hover::after,
.crh-link:focus-visible::after {
	transform: scaleX(1);
}

.crh-cta {
	display: inline-block;
	padding: 12px 20px;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
	border-radius: var(--cr-radius);
	font-family: var(--cr-font-sans); /* Also used outside the header (booking band). */
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s;
}

.crh-cta:hover,
.crh-cta:focus-visible {
	background: var(--wp--preset--color--butter);
	color: var(--wp--preset--color--ink);
}

/* --- Mobile menu ---------------------------------------------------------- */

.crh-menu {
	display: none;
	position: relative;
}

.crh-menu summary {
	list-style: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--cr-radius);
	color: var(--wp--preset--color--cream);
}

.crh-menu summary::-webkit-details-marker {
	display: none;
}

.crh-menu[open] summary {
	background: var(--cr-tint-gold);
}

.crh-burger {
	position: relative;
	width: 22px;
	height: 14px;
	display: block;
	border-top: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
}

.crh-burger::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 4px;
	border-top: 2px solid currentColor;
}

.crh-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 15px);
	width: min(320px, calc(100vw - 32px));
	display: grid;
	gap: 16px;
	padding: 8px 18px 18px;
	background: var(--wp--preset--color--ink);
	border: 1px solid var(--cr-rule-gold);
	border-radius: var(--cr-radius);
	box-shadow: 0 18px 38px rgb(0 0 0 / 0.3);
}

.crh-panel li {
	border-bottom: 1px solid var(--cr-rule-on-dark);
}

.crh-panel .crh-link {
	display: block;
	padding: 14px 0;
}

.crh-panel .crh-link::after {
	display: none;
}

.crh-cta--block {
	display: block;
	text-align: center;
}

.crh-panel-contact {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
}

.crh-panel-contact .crh-phone {
	text-decoration: none;
}

.crh-panel-contact .cr-icon {
	color: var(--wp--preset--color--gold);
}

.crh-panel-contact .crh-social-link .cr-icon {
	color: currentColor;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1000px) {
	.crh-nav {
		display: none;
	}

	.crh-menu {
		display: block;
	}

	.crh-inner {
		gap: 14px;
	}
}

@media (max-width: 760px) {
	:root {
		--crh-top-h: 0px;
		--crh-bar-h: 76px;
	}

	.crh-top {
		display: none;
	}
}

@media (max-width: 600px) {
	/* The admin bar isn't fixed on small screens, so don't offset for it. */
	.wp-site-blocks > header.wp-block-template-part {
		top: 0;
	}

	.crh-inner {
		padding: 11px 16px;
	}

	.crh-bar .crh-inner > .crh-cta {
		display: none;
	}

	.crh .cr-brand {
		max-width: calc(100% - 58px);
	}
}
