/* Templeisure navigation on inner pages.
   The phone/tablet slide-in menu matches the home page: white panel, colour logo with a round close
   button, plain rows with dividers and the Food dropdown. Desktop keeps the existing header.
   Loaded by includes/header.php; markup from includes/navbar.php and tl_render_main_navigation(). */

header.header .tl-hr-nav {
	--hr-accent: #4A3AE0;
	--hr-ink: #14103A;
	--hr-soft: #F1EFFC;
	--hr-line: #ECE9F5;
	--hr-font: 'Jost', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

header.header .tl-hr-nav .tl-hr-ic {
	fill: none;
	flex: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
	transition: transform 200ms ease;
}

/* Desktop: the Food dropdown sits in the existing header. */
@media (min-width: 992px) {
	header.header .tl-hr-nav.main-menu > ul > li.tl-hr-has-sub > a {
		align-items: center;
		display: inline-flex;
		gap: 3px;
	}

	header.header .tl-hr-nav.main-menu > ul > li.tl-hr-has-sub > a::before,
	header.header .tl-hr-nav.main-menu > ul > li.tl-hr-has-sub > a::after {
		content: none !important;
		display: none !important;
	}

	header.header .tl-hr-nav .tl-hr-has-sub:hover > a .tl-hr-ic,
	header.header .tl-hr-nav .tl-hr-has-sub:focus-within > a .tl-hr-ic {
		transform: rotate(180deg);
	}

	/* Dropdown card styled like the home page (instead of the template's red-edged menu). */
	header.header .tl-hr-nav .tl-hr-sub {
		background: #FFFFFF;
		border: 1px solid var(--hr-line);
		border-radius: 12px;
		box-shadow: 0 18px 40px rgba(20, 16, 58, 0.12);
		left: 50%;
		min-width: 190px;
		padding: 8px;
		top: calc(100% + 4px);
		transform: translate(-50%, 6px);
		transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
	}

	/* Invisible bridge so the pointer can move from Food down to the card. */
	header.header .tl-hr-nav .tl-hr-sub::before {
		background: transparent;
		border: 0;
		content: '';
		height: 10px;
		left: 0;
		margin: 0;
		position: absolute;
		right: 0;
		top: -10px;
		width: auto;
	}

	header.header .tl-hr-nav .tl-hr-has-sub:hover > .tl-hr-sub,
	header.header .tl-hr-nav .tl-hr-has-sub:focus-within > .tl-hr-sub {
		opacity: 1;
		padding: 8px;
		transform: translate(-50%, 0);
		transition-delay: 0s;
		visibility: visible;
	}

	header.header .tl-hr-nav .tl-hr-sub li a,
	header.header .tl-hr-nav .tl-hr-sub li:hover > a {
		border: 0;
		border-radius: 8px;
		color: var(--hr-ink);
		font-size: 14px;
		font-weight: 500;
		padding: 10px 12px;
	}

	header.header .tl-hr-nav .tl-hr-sub li a:hover,
	header.header .tl-hr-nav .tl-hr-sub li a.active {
		background: var(--hr-soft);
		color: var(--hr-accent);
	}
}

/* Phones and tablets: the same slide-in menu as the home page. */
@media (max-width: 991px) {
	/* Above the header logo and menu button (z-index 100000002 in custom.css), as on the home page. */
	header.header .tl-hr-nav.main-menu {
		background: #FFFFFF;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		width: min(340px, 86vw);
		z-index: 100000003;
	}

	/* While the menu is open the header bar sits under the dimmed layer, like the home page. */
	body.tl-mobile-nav-open header.header #logo,
	body.tl-mobile-nav-open header.header .btn_mobile {
		z-index: 1;
	}

	/* Menu header: colour logo on the left, round close button on the right. */
	header.header .tl-hr-nav #header_menu {
		align-items: center;
		background: #FFFFFF !important;
		border-bottom: 1px solid var(--hr-line);
		display: flex !important;
		justify-content: space-between;
		min-height: 68px;
		padding: 12px 16px 12px 22px;
		position: sticky;
		text-align: left;
		top: 0;
		z-index: 2;
	}

	header.header .tl-hr-nav #header_menu .tl-hr-menu-logo {
		display: flex;
		flex: none;
		order: 1;
	}

	header.header .tl-hr-nav #header_menu .tl-brand-logo {
		display: block;
		inset: auto;
		opacity: 1;
		position: static;
		transform: none;
		visibility: visible;
	}

	header.header .tl-hr-nav #header_menu .tl-brand-logo__image {
		display: block;
		height: 40px;
		max-width: none;
		width: auto;
	}

	header.header .tl-hr-nav #header_menu a.open_close {
		align-items: center;
		background: #FFFFFF;
		border: 1px solid #E2DEEF;
		border-radius: 999px;
		box-shadow: none;
		color: var(--hr-ink) !important;
		display: flex;
		flex: none;
		font-size: 20px;
		height: 42px;
		justify-content: center;
		left: auto;
		order: 2;
		position: static;
		right: auto;
		top: auto;
		width: 42px;
	}

	header.header .tl-hr-nav #header_menu a.open_close:hover {
		background: var(--hr-soft);
		color: var(--hr-accent) !important;
	}

	header.header .tl-hr-nav.main-menu > ul {
		align-items: stretch;
		display: block;
		flex: 0 0 auto;
		gap: 0;
		list-style: none;
		margin: 0;
		padding: 8px 0 24px;
	}

	header.header .tl-hr-nav.main-menu > ul > li {
		border: 0;
		border-bottom: 1px solid var(--hr-line);
		display: block;
		float: none;
		margin: 0;
		padding: 0;
		position: relative;
	}

	header.header .tl-hr-nav.main-menu > ul > li > a {
		align-items: center;
		background: none;
		border: 0;
		border-radius: 0;
		color: var(--hr-ink) !important;
		display: flex;
		font-family: var(--hr-font);
		font-size: 16px;
		font-weight: 500;
		gap: 4px;
		justify-content: space-between;
		letter-spacing: 0;
		line-height: 1.2;
		min-height: 52px;
		opacity: 1;
		padding: 0 22px !important;
		text-decoration: none;
		text-shadow: none;
		white-space: nowrap;
	}

	header.header .tl-hr-nav.main-menu > ul > li > a::before,
	header.header .tl-hr-nav.main-menu > ul > li > a::after {
		content: none !important;
		display: none !important;
	}

	header.header .tl-hr-nav.main-menu > ul > li > a:hover,
	header.header .tl-hr-nav.main-menu > ul > li > a.active {
		background: none;
		border: 0;
		color: var(--hr-accent) !important;
	}

	header.header .tl-hr-nav .tl-nav-label {
		color: inherit;
		font: inherit;
		min-width: 0;
	}

	header.header .tl-hr-nav .tl-hr-has-sub:hover > a .tl-hr-ic {
		transform: rotate(180deg);
	}

	header.header .tl-hr-nav .tl-hr-sub {
		background: #FFFFFF;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		display: none;
		left: auto !important;
		list-style: none;
		margin: 0;
		min-width: 0;
		opacity: 1 !important;
		padding: 0 0 10px 12px;
		position: static;
		transform: none !important;
		visibility: visible !important;
	}

	header.header .tl-hr-nav .tl-hr-sub.show_normal {
		display: block;
	}

	header.header .tl-hr-nav .tl-hr-sub::before {
		content: none;
	}

	header.header .tl-hr-nav .tl-hr-sub li,
	header.header .tl-hr-nav .tl-hr-sub li a {
		border: 0;
		display: block;
		float: none;
		margin: 0;
	}

	header.header .tl-hr-nav .tl-hr-sub a {
		background: none;
		border-radius: 8px;
		color: var(--hr-ink) !important;
		font-family: var(--hr-font);
		font-size: 15px;
		font-weight: 500;
		padding: 12px 22px !important;
		text-decoration: none;
	}

	header.header .tl-hr-nav .tl-hr-sub a:hover,
	header.header .tl-hr-nav .tl-hr-sub a.active {
		background: var(--hr-soft);
		color: var(--hr-accent) !important;
	}
}
