/* Small Group Journeys page only (body.ot-sgj-sticky-header): the site header
 * stays at the top of the window while scrolling, with a phone button and an
 * Enquire Now button in a slim row above the logo and menu (client edits,
 * 12 November 2026). Over the hero the header stays transparent, as on the rest
 * of the site; once the page scrolls (js/header.js adds .is-scrolled) it takes
 * the hero's navy so the white menu stays readable over any section.
 * js/header.js also publishes the header's height as --ot-sgj-header-h for the
 * filter sidebar and for anchor scrolling. */

body.ot-sgj-sticky-header .site-header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 999;
	transition: background-color 250ms ease-out, box-shadow 250ms ease-out;
}

body.ot-sgj-sticky-header .site-header.is-scrolled {
	background-color: #123458;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* The button row. */
.ot-sgj-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	max-width: 1440px;
	margin: 0 auto;
	padding-top: 10px;
	/* The theme turns pointer events off on the header container from 1200px. */
	pointer-events: auto;
}

.ot-sgj-header-actions a {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 16px;
	border-radius: 999px;
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color 200ms ease-out, border-color 200ms ease-out, color 200ms ease-out;
}

.ot-sgj-header-actions a:focus-visible {
	outline: 2px solid var(--ast-global-color-0);
	outline-offset: 2px;
}

.ot-sgj-header-actions__phone,
.ot-sgj-header-actions__phone:visited {
	border: 1px solid rgba(255, 255, 255, 0.55);
	/* A light navy wash so the number stays readable over the hero photo on phones. */
	background-color: rgba(18, 52, 88, 0.45);
	color: var(--ast-global-color-4);
}

.ot-sgj-header-actions__phone:hover {
	border-color: var(--ast-global-color-0);
	color: var(--ast-global-color-0);
}

.ot-sgj-header-actions__phone svg {
	flex-shrink: 0;
}

.ot-sgj-header-actions__enquire,
.ot-sgj-header-actions__enquire:visited {
	border: 1px solid var(--ast-global-color-0);
	background-color: var(--ast-global-color-0);
	color: var(--ast-global-color-4);
	font-weight: 500;
}

.ot-sgj-header-actions__enquire:hover {
	border-color: var(--ast-global-color-3);
	background-color: var(--ast-global-color-3);
	color: var(--ast-global-color-4);
}

/* The Destinations mega menu is about 815px tall. With the header fixed it can
 * no longer be scrolled into view with the page, so on a shorter window it
 * scrolls inside itself instead. */
@media (min-width: 1200px) {
	body.ot-sgj-sticky-header .site-header__menu .menu > .menu-item.menu-item-has-children.menu-item-object-destination > .sub-menu {
		max-height: calc(100vh - var(--ot-sgj-header-h, 128px) - var(--wp-admin--admin-bar--height, 0px));
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

/* Below 1200 (the burger menu): the buttons centred above the logo row, and
 * the menu panel opening under the whole header, scrolling on its own. */
@media (max-width: 1199px) {
	.ot-sgj-header-actions {
		justify-content: center;
		gap: 8px;
		padding-top: 0;
		padding-bottom: 8px;
	}

	.ot-sgj-header-actions a {
		height: 34px;
		padding: 0 12px;
		font-size: 13px;
	}

	body.ot-sgj-sticky-header .site-header__menu .menu-site-header-container {
		top: 100%;
		max-height: calc(100vh - var(--ot-sgj-header-h, 140px));
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

/* Logged in on a phone, WordPress's admin bar scrolls away with the page, so
 * once scrolled the header goes to the very top instead of leaving a gap. */
@media (max-width: 600px) {
	body.ot-sgj-sticky-header .site-header.is-scrolled {
		top: 0;
	}
}

@media (max-width: 359px) {
	.ot-sgj-header-actions a {
		padding: 0 10px;
		font-size: 12px;
	}

	.ot-sgj-header-actions__phone svg {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.ot-sgj-sticky-header .site-header,
	.ot-sgj-header-actions a {
		transition: none;
	}
}
