/* ==========================================================================
   DESKTOP HEADER + NAVIGATION REFINEMENT
   Logo stack · utility grouping · Bernard-inspired nav · specialty panel
   Scope: min-width 1100 only. Mobile unchanged.
   ========================================================================== */

:root {
	--gold: #B79A5B;
	--primary: #0B6F73;
	--primary-dark: #075B5F;
	--ink: #123C40;
	--ykhg-ease: 170ms ease;
}

/* Compact: keep current custom logo, hide desktop stack */
@media (max-width: 1099px) {
	.header-brand-stack {
		display: none !important;
	}

	.header-brand-legacy,
	.header-brand-legacy img {
		display: block;
	}

	.header-brand:not(:has(.header-brand-legacy)) .header-brand-stack {
		display: flex !important;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
}

@media (min-width: 1100px) {
	.header-brand-legacy {
		display: none !important;
	}

	/* Kill v3/v5 absolute centered logo + logo-slot indent */
	.site-header .identity-row.container,
	.site-header .identity-row {
		position: relative !important;
		display: flex !important;
		align-items: center !important;
		justify-content: flex-start;
		gap: 20px;
		min-height: 88px;
		padding-top: 10px !important;
		padding-bottom: 10px !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.header-navigation {
		margin-top: 0 !important;
	}

	.header-brand {
		position: static !important;
		left: auto !important;
		top: auto !important;
		transform: none !important;
		order: 1 !important;
		z-index: 6;
		display: flex !important;
		align-items: center;
		justify-content: flex-start !important;
		width: auto !important;
		max-width: none !important;
		height: auto !important;
		min-height: 0 !important;
		flex: 0 0 auto;
		align-self: center !important;
	}

	.header-brand-stack {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;
		min-width: 0;
	}

	.header-logo-mark-frame {
		display: block;
		width: 64px;
		height: 46px;
		overflow: hidden;
		flex: 0 0 auto;
		background: transparent;
		line-height: 0;
	}

	.header-brand img.header-logo-mark,
	.header-logo-mark {
		display: block !important;
		width: 92px !important;
		max-width: none !important;
		height: 83px !important;
		margin: -4px 0 0 -14px !important;
		object-fit: cover !important;
		object-position: 50% 0 !important;
		transform: none !important;
		mix-blend-mode: darken;
	}

	.header-brand-name {
		display: block;
		margin: 0;
		color: var(--primary);
		font-size: 12px;
		font-weight: 700;
		line-height: 1.2;
		letter-spacing: 0.02em;
		text-transform: uppercase;
		white-space: nowrap;
	}

	/* Hours sit with hotline/CTAs — not stranded on the far left */
	.header-hours {
		display: flex !important;
		align-items: center;
		order: 2 !important;
		margin-left: auto !important;
		flex: 0 0 auto;
		min-width: 0;
	}

	.header-hours-text {
		margin: 0;
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none;
		color: var(--ink);
		font-size: 0.8125rem;
		font-weight: 600;
		line-height: 1.35;
		white-space: nowrap;
	}

	.header-actions {
		order: 3 !important;
		margin-left: 0 !important;
		display: flex;
		align-items: center;
		gap: 12px;
		flex: 0 0 auto;
	}

	.header-action-buttons {
		align-items: center;
	}

	.header-action-buttons .header-hotline-btn,
	.header-action-buttons .header-emr,
	.header-action-buttons .header-booking {
		align-items: center;
	}

	.identity-row .menu-toggle {
		display: none !important;
	}

	/* --- Nav row: no leftover logo-slot indent --- */
	.navigation-inner {
		padding-left: 0 !important;
		display: flex !important;
		align-items: center;
		justify-content: flex-end;
		gap: 8px;
		min-height: 52px;
	}

	.nav-desktop-menu {
		flex: 1 1 auto;
	}

	.nav-desktop-menu .menu {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
		align-items: center;
		gap: 2px;
	}

	/* Top-level: Bernard accent diamond + underline */
	.nav-desktop-menu .menu > li > a {
		position: relative;
		display: inline-flex;
		align-items: center;
		gap: 0;
		padding: 14px 12px;
		color: var(--ink);
		font-size: 0.9375rem;
		font-weight: 600;
		letter-spacing: 0.01em;
		background: transparent;
	}

	.nav-desktop-menu .menu > li > a::after {
		content: "";
		position: absolute;
		right: 12px;
		bottom: 7px;
		left: 12px;
		height: 2px;
		border-radius: 2px;
		background: var(--gold);
		transform: scaleX(0);
		transform-origin: center;
		transition: transform var(--ykhg-ease);
	}

	.nav-desktop-menu .menu > li > a .menu-link-label {
		display: inline-flex;
		align-items: center;
	}

	.nav-desktop-menu .menu > li > a .menu-link-label::before {
		content: "◆";
		margin-right: 7px;
		color: var(--gold);
		font-size: 0.48em;
		line-height: 1;
		opacity: 0.55;
		transform: translateY(-1px);
		transition: opacity var(--ykhg-ease), color var(--ykhg-ease);
	}

	.nav-desktop-menu .menu > li:hover > a,
	.nav-desktop-menu .menu > li:focus-within > a,
	.nav-desktop-menu .menu > li.current-menu-item > a,
	.nav-desktop-menu .menu > li.current-menu-ancestor > a {
		color: var(--primary-dark);
		background: transparent;
	}

	.nav-desktop-menu .menu > li:hover > a::after,
	.nav-desktop-menu .menu > li:focus-within > a::after,
	.nav-desktop-menu .menu > li.current-menu-item > a::after,
	.nav-desktop-menu .menu > li.current-menu-ancestor > a::after {
		transform: scaleX(1);
		background: var(--gold);
	}

	.nav-desktop-menu .menu > li.current-menu-item > a::after,
	.nav-desktop-menu .menu > li.current-menu-ancestor > a::after {
		background: var(--primary);
	}

	.nav-desktop-menu .menu > li:hover > a .menu-link-label::before,
	.nav-desktop-menu .menu > li:focus-within > a .menu-link-label::before,
	.nav-desktop-menu .menu > li.current-menu-item > a .menu-link-label::before,
	.nav-desktop-menu .menu > li.current-menu-ancestor > a .menu-link-label::before {
		opacity: 1;
		color: var(--gold);
	}

	.nav-desktop-menu .menu > li.current-menu-item > a .menu-link-label::before,
	.nav-desktop-menu .menu > li.current-menu-ancestor > a .menu-link-label::before {
		color: var(--primary);
	}

	.nav-desktop-menu .menu > li > a .menu-chevron {
		opacity: 0.65;
		margin-left: 6px;
	}

	.nav-desktop-menu .menu > li:hover > a .menu-chevron,
	.nav-desktop-menu .menu > li:focus-within > a .menu-chevron {
		opacity: 1;
		border-color: var(--primary);
	}

	/* Simple submenu: text rows, divider, hover arrow */
	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) {
		min-width: 268px;
		padding: 6px 0 !important;
		border: 1px solid rgba(18, 60, 64, 0.1);
		border-radius: 10px;
		background: #fff;
		box-shadow: 0 12px 28px rgba(18, 60, 64, 0.1);
	}

	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item {
		list-style: none;
	}

	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item > a {
		position: relative;
		display: block;
		padding: 12px 20px 12px 34px !important;
		border: 0 !important;
		border-bottom: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
		color: var(--ink);
		font-size: 0.9rem;
		font-weight: 500;
		transform: none !important;
	}

	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item:last-child > a {
		border-bottom: 0 !important;
	}

	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item > a::before {
		content: "→" !important;
		position: absolute !important;
		left: 14px !important;
		top: 50% !important;
		width: auto !important;
		height: auto !important;
		margin: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: none !important;
		color: var(--primary);
		font-size: 12px;
		line-height: 1;
		opacity: 0 !important;
		transform: translate(-4px, -50%) !important;
		transition: opacity 150ms ease, transform 150ms ease;
	}

	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item > a:hover,
	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item > a:focus-visible {
		color: var(--primary) !important;
		background: rgba(11, 111, 115, 0.04) !important;
		text-decoration: none;
	}

	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item > a:hover::before,
	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item > a:focus-visible::before {
		opacity: 1 !important;
		transform: translate(0, -50%) !important;
		background: none !important;
	}

	/* Specialty featured panel */
	.nav-desktop-menu .specialty-featured-panel.sub-menu {
		left: 50%;
		width: min(860px, calc(100vw - 48px));
		padding: 20px 22px 18px !important;
		border-radius: 12px;
		background: #fff;
		box-shadow: 0 16px 36px rgba(18, 60, 64, 0.12);
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px 14px;
	}

	.nav-desktop-menu .specialty-featured-heading {
		grid-column: 1 / -1;
		display: flex !important;
		align-items: center;
		justify-content: center;
		gap: 10px;
		padding: 2px 0 12px;
		margin: 0 0 4px;
		border-bottom: 1px solid rgba(18, 60, 64, 0.1);
	}

	.nav-desktop-menu .specialty-accent-dot {
		width: 8px;
		height: 8px;
		background: var(--gold);
		box-shadow: 0 0 0 3px rgba(183, 154, 91, 0.18);
	}

	.nav-desktop-menu .specialty-featured-heading-text {
		font-size: 0.95rem;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--ink);
	}

	.nav-desktop-menu .specialty-featured-item a {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		padding: 8px;
		border: 0 !important;
		border-radius: 10px;
		box-shadow: none;
		background: transparent;
		min-height: 0;
	}

	.nav-desktop-menu .specialty-featured-item a:hover,
	.nav-desktop-menu .specialty-featured-item a:focus-visible {
		background: var(--surface, #F7FAF9);
		box-shadow: none;
		transform: none;
		border-color: transparent;
	}

	.nav-desktop-menu .specialty-featured-thumb {
		width: 100%;
		height: 108px;
		border-radius: 8px;
	}

	.nav-desktop-menu .specialty-featured-body {
		padding-inline: 2px;
		gap: 8px;
	}

	.nav-desktop-menu .specialty-featured-title {
		font-size: 0.95rem;
		font-weight: 600;
		line-height: 1.35;
		color: var(--ink);
	}

	.nav-desktop-menu .specialty-featured-item a:hover .specialty-featured-title {
		color: var(--primary);
	}

	.nav-desktop-menu .specialty-featured-arrow {
		display: none !important;
	}

	.nav-desktop-menu .specialty-featured-all {
		grid-column: 1 / -1;
		display: flex !important;
		justify-content: center !important;
		justify-self: stretch;
		width: 100%;
		margin-top: 6px;
		border-bottom: 0 !important;
	}

	.nav-desktop-menu .specialty-featured-all a {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: auto !important;
		min-height: 42px;
		padding: 8px 22px !important;
		margin: 0 !important;
		border: 0 !important;
		border-top: 0 !important;
		border-radius: 9px;
		background: var(--primary) !important;
		color: #fff !important;
		font-size: 0.8125rem;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		text-decoration: none;
	}

	.nav-desktop-menu .specialty-featured-all a::before {
		content: none !important;
		display: none !important;
	}

	.nav-desktop-menu .specialty-featured-all a:hover,
	.nav-desktop-menu .specialty-featured-all a:focus-visible {
		background: var(--primary-dark) !important;
		color: #fff !important;
	}

	.nav-desktop-menu .menu > li > a:focus-visible,
	.nav-desktop-menu .sub-menu a:focus-visible {
		outline: 3px solid rgba(11, 111, 115, 0.35);
		outline-offset: 2px;
	}
}

@media (min-width: 1100px) and (max-width: 1279px) {
	.header-brand-name {
		font-size: 10.75px;
		letter-spacing: 0.01em;
	}

	.header-logo-mark-frame {
		width: 56px;
		height: 40px;
	}

	.header-brand img.header-logo-mark,
	.header-logo-mark {
		width: 80px !important;
		height: 72px !important;
		margin: -4px 0 0 -12px !important;
	}

	.header-hours-text {
		font-size: 0.75rem;
	}

	.nav-desktop-menu .menu > li > a {
		padding-inline: 8px;
		font-size: 0.875rem;
	}

	.nav-desktop-menu .menu > li > a::after {
		right: 8px;
		left: 8px;
	}

	.nav-desktop-menu .specialty-featured-panel.sub-menu {
		width: min(760px, calc(100vw - 32px));
		padding: 16px !important;
	}

	.nav-desktop-menu .specialty-featured-thumb {
		height: 92px;
	}
}

@media (min-width: 1600px) {
	.header-brand-name {
		font-size: 13px;
	}

	.header-logo-mark-frame {
		width: 72px;
		height: 52px;
	}

	.header-brand img.header-logo-mark,
	.header-logo-mark {
		width: 104px !important;
		height: 94px !important;
		margin: -4px 0 0 -16px !important;
	}

	.nav-desktop-menu .specialty-featured-panel.sub-menu {
		width: min(920px, calc(100vw - 64px));
	}
}

@media (min-width: 1100px) and (prefers-reduced-motion: reduce) {
	.nav-desktop-menu .menu > li > a::after,
	.nav-desktop-menu .menu > li > a .menu-link-label::before,
	.nav-desktop-menu .sub-menu:not(.specialty-featured-panel) > .menu-item > a::before {
		transition: none;
	}
}
