/* =========================================================================
 * Site-wide fixes (loaded on every front-end page).
 * ========================================================================= */

/* 1. Search result pages (e.g. /experiences/): no banner, no search form.
 *    The theme header is position:absolute over that banner, so once the banner
 *    is gone the header must take its own space in the flow again. */
body.page-template-template-tour-search #st-content-wrapper.search-result-page > .banner,
body.page-template-template-activity-search #st-content-wrapper.search-result-page > .banner,
body:has(#st-content-wrapper.search-result-page) #st-content-wrapper.search-result-page > .banner {
	display: none !important;
}
body.page-template-template-tour-search #header,
body.page-template-template-activity-search #header,
body:has(#st-content-wrapper.search-result-page) #header {
	position: relative !important;
	height: auto !important;
	min-height: 0 !important;
}

/* 2. Mobile menu icon: the theme applies filter:brightness(0) to it, which turns
 *    the white icon black on the black header. */
#header .toggle-menu .input-icon {
	filter: none !important;
	background: transparent !important;
}
#header .toggle-menu svg,
#header .toggle-menu svg * {
	stroke: #fff !important;
}

/* 4. Header — every page, every device.
 * ------------------------------------------------------------------------- */

/* 4a. Black background, 50% transparent. */
#header .header {
	background-color: rgba(0, 0, 0, .5) !important;
}

/* 4b. Logo: always visible, never oversized (the desktop logo file is ~555px wide). */
#header .logo img,
#header .custom-logo {
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 42px !important;
}

/* 4c. Menu text always readable: white, gold on hover / current page.
 *     (The theme hover colour is --main-color = #100e0e, black on black.) */
#header #main-menu > li > a,
#header .header-right .st-list a {
	color: #fff !important;
}
#header #main-menu > li > a:hover,
#header #main-menu > li > a:focus,
#header #main-menu > li:hover > a,
#header #main-menu > li.active > a,
#header #main-menu > li.current-menu-item > a,
#header .header-right .st-list a:hover,
#header .header-right .st-list a:focus {
	color: #b08d57 !important;
}
#header .header-right .st-list a { white-space: nowrap; }

/* 4d. Desktop menu (>= 992px, below that it is the mobile slide-in panel):
 *     logo + menu + Login/Sign up on ONE line, spacing shrinks with the screen. */
@media (min-width: 992px) {
	#header .header { flex-wrap: nowrap !important; gap: 16px; }
	#header .header-left { flex: 1 1 auto; min-width: 0; }
	#header .logo { flex: 0 0 auto; }
	#header .logo img,
	#header .custom-logo { max-height: 54px !important; max-width: 220px !important; }
	#header #st-main-menu { flex: 1 1 auto; min-width: 0; }
	#header #main-menu {
		display: flex !important;
		flex-wrap: nowrap !important;
		justify-content: center;
		white-space: nowrap;
	}
	#header #main-menu > li { flex: 0 0 auto; }
	#header #main-menu > li > a {
		padding-left: clamp(8px, 1.1vw, 22px) !important;
		padding-right: clamp(8px, 1.1vw, 22px) !important;
		font-size: clamp(12px, .95vw, 14px) !important;
	}
	#header .header-right { flex: 0 0 auto; }
	#header .header-right .st-list { flex-wrap: nowrap !important; }
}

/* 4e. Mobile slide-in menu (< 992px): black, 50% transparent, slightly blurred so
 *     the white links stay readable over any photo. */
@media (max-width: 991.98px) {
	/* Mobile header: 50% black looked grey over the light page background. */
	#header .header {
		background-color: rgba(0, 0, 0, .9) !important;
	}
	#header #st-main-menu {
		background: rgba(0, 0, 0, .35) !important;
	}
	#header #st-main-menu #main-menu {
		background: rgba(0, 0, 0, .5) !important;
		-webkit-backdrop-filter: blur(8px);
		backdrop-filter: blur(8px);
	}
	#header #st-main-menu .back-menu {
		background: rgba(0, 0, 0, .5) !important;
		z-index: 20 !important;
	}
	/* The theme also applies filter:brightness(0) to the back arrow (black on black). */
	#header #st-main-menu .back-menu i {
		filter: none !important;
		color: #fff !important;
	}
	#header #st-main-menu #main-menu > li {
		border-color: rgba(255, 255, 255, .15) !important;
	}
}

/* 6. Search result pages (e.g. /experiences/): no list/grid switch. The page always
 *    opens in list mode (the theme does not remember a visitor's choice). */
#st-content-wrapper.search-result-page li.layout,
#st-content-wrapper.search-result-page .layout-item {
	display: none !important;
}

/* 5. Theme "Go to top" button: hidden on every device. */
#gotop {
	display: none !important;
}

/* 3. Google reCAPTCHA v3 badge (behind the chatbot button).
 *    visibility:hidden (not display:none) keeps reCAPTCHA working; Google allows
 *    hiding it as long as its notice is shown in the user flow. */
.grecaptcha-badge {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
