/**
 * The hero photograph is pulled up under the bar, and it is positioned,
 * so it paints over the logo and the name. The menu stays visible
 * because its list has its own z-index.
 * Lift the bar on every page. It stays in normal flow, so it still
 * scrolls away with the page.
 */
header.elementor-location-header {
	position: relative;
	z-index: 10;
}

/**
 * The hero is pulled up under the bar. The distance is the bar's
 * own height, so a taller logo does not leave a strip of page colour
 * above the photograph. 132px is the wide-screen bar, used until the
 * measured height is written.
 *
 * A light header sits on a photograph. The Windhoek day-trips screen
 * is an ordinary page, so it never receives a safari or day-trip
 * class. Its own top margin is a fixed 119px, which stops short of
 * the bar and leaves a grey strip. Pull that page up with the others.
 */
body.pride-header-light #hero,
body.elementor-page-414 #hero,
body.elementor-page-570 #hero,
body.pride-destinations-page #hero,
body.pride-safari #hero,
body.pride-day-trip #hero,
body.pride-destination #hero,
body.pride-contact #hero,
body.pride-shuttle #hero,
body.pride-private #hero,
body.pride-terms #hero,
body.pride-faq #hero {
	margin-top: calc(-1 * var(--pride-header-h, 132px));
}

/**
 * Header wordmark.
 *
 * From 768px up the name column is a percentage of the bar. Keep
 * "Safaris Namibia" on one line, and stop that column shrinking
 * below the words.
 *
 * Below 768px Elementor sets every column to width 100%. Locking the
 * name column at that width collapses the logo and pushes the menu
 * button past the screen. On a phone, size the logo and the button
 * to their content, and line the logo, the name, and the button up at the top.
 */

@media (min-width: 768px) {
	header.elementor-location-header.elementor-27 #header-wordmark {
		flex-shrink: 0;
		min-width: max-content;
	}

	header.elementor-location-header.elementor-27 #header-wordmark h2 {
		white-space: nowrap;
	}
}

@media (max-width: 767px) {
	header.elementor-location-header.elementor-27 .header-row {
		align-items: flex-start;
		column-gap: 8px;
		min-width: 0;
	}

	header.elementor-location-header.elementor-27 #header-logo,
	header.elementor-location-header.elementor-27 #header-menu,
	header.elementor-location-header.elementor-27 #header-menu .elementor-widget-nav-menu {
		--width: auto;
		width: auto;
		flex: 0 0 auto;
		min-width: 0;
	}

	header.elementor-location-header.elementor-27 #header-logo {
		flex: 0 1 auto;
		align-self: flex-start;
		max-width: 106px;
	}

	header.elementor-location-header.elementor-27 #header-logo .elementor-widget-image,
	header.elementor-location-header.elementor-27 #header-logo .elementor-widget-image img {
		min-width: 0;
		max-width: 100%;
		height: auto;
	}

	header.elementor-location-header.elementor-27 #header-wordmark {
		--width: auto;
		width: auto;
		flex: 1 1 auto;
		align-self: flex-start;
		min-width: 0;
		align-items: flex-start;
	}

	header.elementor-location-header.elementor-27 #header-wordmark > .elementor-element,
	header.elementor-location-header.elementor-27 #header-wordmark > h1,
	header.elementor-location-header.elementor-27 #header-wordmark > h2 {
		align-self: flex-start;
		max-width: 100%;
	}

	header.elementor-location-header.elementor-27 #header-wordmark h1,
	header.elementor-location-header.elementor-27 #header-wordmark h2 {
		white-space: nowrap;
	}

	header.elementor-location-header.elementor-27 #header-menu,
	header.elementor-location-header.elementor-27 #header-menu .elementor-widget-nav-menu {
		position: static;
		align-self: flex-start;
	}
}

/*
 * Tablet. The open list is in normal flow there, so choosing the
 * button lengthens the bar and pushes the photograph down. Lay it
 * over the photograph, as on a phone.
 */
@media (max-width: 1366px) {
	header.elementor-location-header.elementor-27 #header-menu,
	header.elementor-location-header.elementor-27 #header-menu .elementor-widget-nav-menu {
		position: static;
	}

	header.elementor-location-header.elementor-27 #header-menu .elementor-nav-menu--dropdown.elementor-nav-menu__container {
		position: absolute;
		top: 100%;
		right: 10px;
		left: auto;
		z-index: 100;
		width: max-content;
		min-width: 11rem;
		max-width: calc(100vw - 20px);
	}
}

/**
 * Light header on the slugs saved under Headers.
 *
 * The bar sits on a photograph, so the Pride title, "Safaris Namibia",
 * the menu, and the divider switch to #FAF9F6. The photograph is pulled up under the bar
 * and painted later, so the bar has to sit above it.
 */
body.pride-header-light header.elementor-location-header {
	--e-global-color-text: #FAF9F6;
	overflow: visible;
}

/**
 * The fade belongs to the light header, not the photograph.
 * It hangs below the bar and scrolls away with it.
 */
body.pride-header-light header.elementor-location-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 11rem;
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(46, 45, 43, 0.5), rgba(46, 45, 43, 0));
}

body.pride-header-light header.elementor-location-header .elementor-widget-divider {
	--divider-color: #FAF9F6;
}

body.pride-header-light header.elementor-location-header #header-bar,
body.pride-header-light header.elementor-location-header #header-bar::before,
body.pride-header-light header.elementor-location-header #header-bar::after,
body.pride-header-light header.elementor-location-header #header-bar > .elementor-background-overlay {
	background-color: transparent;
	background-image: none;
	border-color: #FAF9F6;
}

body.pride-header-light header.elementor-location-header #header-wordmark h1,
body.pride-header-light header.elementor-location-header #header-wordmark h1 .elementor-heading-title,
body.pride-header-light header.elementor-location-header #header-wordmark h2,
body.pride-header-light header.elementor-location-header #header-wordmark h2 .elementor-heading-title,
body.pride-header-light header.elementor-location-header #header-bar .elementor-widget-text-editor,
body.pride-header-light header.elementor-location-header #header-bar .elementor-widget-text-editor a,
body.pride-header-light header.elementor-location-header #header-bar .elementor-icon-list-text,
body.pride-header-light header.elementor-location-header #header-menu .elementor-nav-menu--main .elementor-item,
body.pride-header-light header.elementor-location-header #header-menu .elementor-nav-menu--main .elementor-item:hover,
body.pride-header-light header.elementor-location-header #header-menu .elementor-nav-menu--main .elementor-item:focus,
body.pride-header-light header.elementor-location-header #header-menu .elementor-nav-menu--main .elementor-item.elementor-item-active {
	color: #FAF9F6;
}

/*
 * The button keeps its resting colour when it is hovered, focused,
 * open, or left focused after a choice. Dark headers are black.
 * Light headers are white. Elementor switches the focused button to orange.
 */
header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle,
header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle:hover,
header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle:focus,
header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle:focus-visible,
header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle:active,
header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle.elementor-active {
	color: #33373d;
}

header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle svg,
header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle svg path {
	fill: #33373d;
}

body.pride-header-light header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle,
body.pride-header-light header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle:hover,
body.pride-header-light header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle:focus,
body.pride-header-light header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle:focus-visible,
body.pride-header-light header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle:active,
body.pride-header-light header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle.elementor-active {
	color: #FAF9F6;
}

body.pride-header-light header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle svg,
body.pride-header-light header.elementor-location-header.elementor-27 #header-menu .elementor-menu-toggle svg path {
	fill: #FAF9F6;
}

body.pride-header-light header.elementor-location-header .elementor-divider-separator {
	border-color: #FAF9F6;
}

/*
 * The open panel is white on every page. Elementor paints its links
 * with the cream secondary colour, so a dark header was cream on white.
 */
header.elementor-location-header #header-menu .elementor-nav-menu--dropdown .elementor-item,
header.elementor-location-header #header-menu .elementor-nav-menu--dropdown .elementor-item:hover,
header.elementor-location-header #header-menu .elementor-nav-menu--dropdown .elementor-item:focus {
	color: #2E2D2B;
}
