/*
 * Header — Astra's header builder, restyled as the app's glass navbar.
 * app: final-cards §25 NV1 (`.dnv--glass`, real component `navbar.component`): translucent blurred bar, hairline bottom border, 13px links with a
 * pill-shaped active item, small language box. The menus stay in Appearance → Menus (one per language).
 * Add the CSS class `sc-menu-cta` to a menu item (Menus → Screen Options → CSS classes) to make it the primary button.
 */
#masthead {
	position: sticky;
	top: 0;
	z-index: 100;
}

body.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { body.admin-bar #masthead { top: 46px; } }

#masthead .main-header-bar,
#masthead .ast-primary-header-bar {
	background: rgba(30, 30, 30, 0.72);
	-webkit-backdrop-filter: var(--sc-glass-blur);
	backdrop-filter: blur(18px);
	border-bottom: 1px solid var(--sc-hairline);
}

#masthead .site-primary-header-wrap {
	min-height: 56px;
}

#masthead .site-branding {
	padding: 0;
}

/* The uploaded logo carries its own padding, so 48px high reads like the app's 34px logo; Astra's Customizer
   sets a fixed width, so size it by height instead */
#masthead .custom-logo-link img,
#masthead .site-logo-img img {
	width: auto;
	max-width: none;
	height: 48px;
	/* reserve the box before the image arrives, so nothing shifts or flashes (343x240 source) */
	aspect-ratio: 343 / 240;
	object-fit: contain;
}

/* ---- menu links (desktop) */
#masthead .main-header-menu > .menu-item > .menu-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 30px;
	padding: 0 12px;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	color: var(--sc-text-muted);
	transition: color 0.15s, background 0.15s;
}

#masthead .main-header-menu > .menu-item:hover > .menu-link,
#masthead .main-header-menu > .menu-item:focus-within > .menu-link {
	background: rgba(255, 255, 255, 0.06);
	color: var(--sc-text);
}

#masthead .main-header-menu > .current-menu-item > .menu-link,
#masthead .main-header-menu > .current-menu-ancestor > .menu-link,
#masthead .main-header-menu > .current-menu-parent > .menu-link {
	background: rgba(0, 124, 194, 0.18);
	color: var(--sc-accent);
	font-weight: 600;
}

#masthead .main-header-menu > .menu-item {
	margin: 0 1px;
}

#masthead .ast-icon.icon-arrow svg {
	width: 10px;
	height: 10px;
	margin-left: 2px;
}

/* ---- dropdowns: surface cards */
#masthead .main-header-menu .sub-menu {
	margin-top: 6px;
	padding: 6px;
	min-width: 220px;
	background: var(--sc-surface);
	border: 1px solid var(--sc-hairline);
	border-radius: 12px;
	box-shadow: var(--sc-shadow-card);
}

#masthead .main-header-menu .sub-menu .menu-item > .menu-link {
	padding: 9px 12px;
	border: 0;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-transform: none;
	color: var(--sc-text-muted);
	transition: color 0.15s, background 0.15s;
}

#masthead .main-header-menu .sub-menu .menu-item:hover > .menu-link,
#masthead .main-header-menu .sub-menu .current-menu-item > .menu-link {
	background: rgba(255, 255, 255, 0.06);
	color: var(--sc-text);
}

#masthead .main-header-menu .sub-menu .current-menu-item > .menu-link {
	color: var(--sc-accent);
}

/* ---- primary "Book a table" button (menu item with class sc-menu-cta): look comes from buttons.css; only placement here */
#masthead .main-header-menu > .sc-menu-cta > .menu-link {
	height: 30px;
	min-height: 30px;   /* same height and type size as the other menu links */
	padding: 0 14px;
	margin-left: 6px;
	font-size: 13px;
	text-transform: none;
}

/* ---- language switcher: small pill */
#masthead .main-header-menu > .pll-parent-menu-item > .menu-link {
	height: 30px;
	margin-left: 6px;
	padding: 0 10px;
	border: 1px solid var(--sc-hairline);
	border-radius: 6px;                        /* app: .navbar__lang */
	background: transparent;
	color: var(--sc-text-muted);
	font-size: 12px;
	font-weight: 700;
}

#masthead .main-header-menu > .pll-parent-menu-item:hover > .menu-link {
	border-color: rgba(238, 238, 238, 0.28);
}

#masthead .pll-parent-menu-item .sub-menu {
	min-width: 150px;
	right: 0;
	left: auto;
}

#masthead .lang-item img {
	margin-right: 6px;
	vertical-align: -2px;
}

/* ---- mobile: logo + hamburger, panel uses the same surfaces */
#masthead .menu-toggle,
#masthead .ast-button-wrap .menu-toggle {
	border-radius: 10px;
	color: var(--sc-text);
}

@media (max-width: 921px) {
	#masthead .main-header-bar-navigation,
	#masthead .ast-mobile-header-content {
		background: var(--sc-surface);
		border-top: 1px solid var(--sc-hairline);
	}

	#masthead .main-header-menu {
		padding: 8px 12px 16px;
		background: transparent;
	}

	#masthead .main-header-menu > .menu-item > .menu-link,
	#masthead .main-header-menu .sub-menu .menu-item > .menu-link {
		height: auto;
		min-height: 44px;
		margin: 2px 0;
		padding: 10px 12px;
		border: 0;
		font-size: 15px;
	}

	#masthead .main-header-menu .sub-menu {
		margin: 0 0 6px 12px;
		padding: 0;
		background: transparent;
		border: 0;
		border-left: 1px solid var(--sc-hairline);
		border-radius: 0;
		box-shadow: none;
	}

	#masthead .main-header-menu > .sc-menu-cta > .menu-link {
		justify-content: center;
		height: 44px;
		min-height: 44px;
		padding: 0 22px;
		font-size: 0.9375rem;
		margin: 10px 0 4px;
	}

	#masthead .main-header-menu > .pll-parent-menu-item > .menu-link {
		height: auto;
		margin-left: 0;
		border: 0;
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#masthead .main-header-menu .menu-link { transition: none; }
}
