/**
 * SANA header navigation: Activities mega panel (desktop), header pill
 * button, and the "Menu / Close" drawer below the header (phones/tablets).
 * Palette B "Wild Water". Fonts: Barlow Condensed (titles), Manrope (UI).
 */

:root {
	--sana-nav-dark: #123F46;
	--sana-nav-mist: #F2EDE2;
	--sana-nav-shade: #E9E2D3;
	--sana-nav-line: #D8CFBD;
	--sana-nav-ink: #0B262B;
	--sana-nav-teal-text: #216D77;
	--sana-nav-glacier: #82C6C9;
	--sana-nav-amber: #E3A64C;
}

/* ---------- Desktop header layout: logo left, links centred, button right ----------
 * Kadence: main_left = logo, main_center = navigation + navigation-2,
 * main_right = button. Kadence's center column keeps the links centred on
 * the page. The two menus sit together as one row of links: the space
 * between any two link texts is --sana-nav-gap (each link has half of it as
 * left/right padding, so the hover and click area is not smaller).
 */
@media (min-width: 1025px) {
	#masthead #main-header {
		--sana-nav-gap: clamp(28px, 3vw, 44px);
	}

	#main-header .site-header-main-section-center .site-header-item {
		margin-left: 0;
		margin-right: 0;
	}

	#main-header #site-navigation ul.menu > li > a,
	#main-header #secondary-navigation ul.menu > li > a {
		padding-left: calc(var(--sana-nav-gap) / 2) !important;
		padding-right: calc(var(--sana-nav-gap) / 2) !important;
	}
}

/* ---------- Desktop header pill button ---------- */

@media (min-width: 1025px) {
	#masthead .header-button-wrap .header-button {
		background: transparent !important;
		color: var(--sana-nav-mist) !important;
		border: 1.5px solid var(--sana-nav-amber) !important;
		border-radius: 999px !important;
		box-shadow: none !important;
		padding: 0.7em 1.4em !important;
		transition: background-color 0.2s ease, color 0.2s ease;
	}

	#masthead .header-button-wrap .header-button:hover,
	#masthead .header-button-wrap .header-button:focus-visible {
		background: var(--sana-nav-amber) !important;
		color: var(--sana-nav-ink) !important;
	}
}

/* ---------- Desktop mega panel ---------- */

.sana-mega[hidden] {
	display: none !important;
}

.sana-mega {
	display: none;
}

@media (min-width: 1025px) {
	/* Kadence's own dropdown is replaced by the panel once JS runs. */
	.sana-mega-js #site-navigation .sana-has-mega > .sub-menu {
		display: none !important;
	}

	.sana-mega-js #site-navigation .sana-has-mega .dropdown-nav-toggle {
		transition: transform 0.2s ease;
	}

	.sana-mega-js #site-navigation .sana-mega-open .dropdown-nav-toggle {
		transform: rotate(180deg);
	}

	.sana-mega-js #site-navigation .sana-mega-open > a {
		color: var(--sana-nav-glacier);
	}

	.sana-mega {
		display: block;
		position: fixed;
		top: var(--sana-mega-top, 100px);
		left: 0;
		right: 0;
		z-index: 999;
		background: var(--sana-nav-mist);
		color: var(--sana-nav-ink);
		font-family: Manrope, sans-serif;
		box-shadow: 0 24px 40px -24px rgba(11, 38, 43, 0.45);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity 0.2s ease, transform 0.25s ease-out, visibility 0s linear 0.25s;
		pointer-events: none;
	}

	.sana-mega.is-open {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition: opacity 0.2s ease, transform 0.25s ease-out, visibility 0s;
		pointer-events: auto;
	}

	.sana-mega__inner {
		max-width: 1320px;
		margin: 0 auto;
		padding: 1.75rem 2.5rem 1.75rem;
		max-height: calc(100vh - var(--sana-mega-top, 100px) - 16px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.sana-mega a {
		color: inherit;
		text-decoration: none;
	}

	.sana-mega__all {
		display: inline-block;
		font-size: 12px;
		font-weight: 700;
		letter-spacing: 0.12em;
		text-transform: uppercase;
		color: var(--sana-nav-teal-text) !important;
		padding: 0.25rem 0;
		text-decoration: underline transparent !important;
		text-decoration-thickness: 1.5px !important;
		text-underline-offset: 5px;
		transition: text-decoration-color 0.15s ease-out, color 0.15s ease-out;
	}

	.sana-mega__all:hover,
	.sana-mega__all:focus-visible {
		color: var(--sana-nav-dark) !important;
		text-decoration-color: currentColor !important;
	}

	.sana-mega__body {
		display: grid;
		grid-template-columns: minmax(max-content, 4fr) 8fr;
		gap: 2.5rem;
		margin-top: 1.1rem;
		padding-top: 1.25rem;
		border-top: 1px solid var(--sana-nav-line);
	}

	.sana-mega__list {
		position: relative;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.sana-mega__list li {
		position: relative;
		z-index: 1;
		margin: 0;
	}

	/* One highlight that glides from item to item (positioned by JS). It
	   animates from wherever it is on screen, so quick mouse moves just
	   re-target it instead of restarting. */
	.sana-mega__list .sana-mega__pill {
		position: absolute;
		top: 0;
		left: -0.75rem;
		right: 0;
		z-index: 0;
		margin: 0;
		height: var(--sana-pill-h, 0);
		border-radius: 10px;
		background: rgba(130, 198, 201, 0.3);
		transform: translateY(var(--sana-pill-y, 0));
		pointer-events: none;
		transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), height 0.28s cubic-bezier(0.25, 1, 0.5, 1);
	}

	.sana-mega__list.is-instant .sana-mega__pill {
		transition: none;
	}

	.sana-mega__link {
		display: flex;
		align-items: center;
		padding: 0.65rem 0.75rem;
		margin-left: -0.75rem;
		border-radius: 10px;
		font-size: 17px;
		font-weight: 600;
		line-height: 1.3;
		color: var(--sana-nav-ink) !important;
		transition: color 0.12s ease-out, transform 0.1s ease-out;
	}

	/* Without the JS pill: plain background on hover. */
	html:not(.sana-mega-js) .sana-mega__link:hover {
		background: rgba(130, 198, 201, 0.3);
	}

	.sana-mega__link.is-active {
		color: var(--sana-nav-dark) !important;
	}

	/* Press feedback on pointer-down. */
	.sana-mega__link:active {
		transform: scale(0.98);
	}

	.sana-mega__label {
		white-space: nowrap;
	}

	.sana-mega__link:focus-visible {
		outline: 2px solid var(--sana-nav-teal-text);
		outline-offset: 2px;
	}

	.sana-mega__previews {
		position: relative;
	}

	.sana-mega__preview {
		display: none;
		grid-template-columns: 1fr minmax(220px, 300px);
		gap: 2.5rem;
		align-items: start;
	}

	.sana-mega__preview.is-active {
		display: grid;
		animation: sana-mega-fade 0.25s ease-out;
	}

	@keyframes sana-mega-fade {
		from {
			opacity: 0;
		}
		to {
			opacity: 1;
		}
	}

	.sana-mega__text {
		display: flex;
		flex-direction: column;
		padding-top: 0.35rem;
	}

	.sana-mega__title {
		font-family: "Barlow Condensed", sans-serif;
		font-weight: 600;
		font-size: 34px;
		line-height: 1.1;
		color: var(--sana-nav-dark);
	}

	.sana-mega__meta {
		display: block;
		margin-top: 0.4rem;
		padding-bottom: 0.9rem;
		border-bottom: 1px solid var(--sana-nav-line);
		font-size: 14px;
		font-weight: 700;
		color: var(--sana-nav-teal-text);
	}

	.sana-mega__desc {
		display: block;
		margin-top: 0.9rem;
		font-size: 16px;
		line-height: 1.65;
		color: var(--sana-nav-ink);
		max-width: 46ch;
	}

	.sana-mega__img {
		display: block;
		aspect-ratio: 1 / 1;
		overflow: hidden;
		border-radius: 10px;
		background: var(--sana-nav-shade);
	}

	.sana-mega__img img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.sana-mega__foot {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.5rem 2rem;
		margin: 1.5rem 0 0;
		padding-top: 1.1rem;
		border-top: 1px solid var(--sana-nav-line);
		font-size: 15px;
		font-weight: 600;
		color: var(--sana-nav-ink);
	}

	.sana-mega__foot a {
		color: var(--sana-nav-teal-text) !important;
		text-decoration: underline !important;
		text-decoration-thickness: 1px !important;
		text-underline-offset: 3px;
	}

	.sana-mega__foot a:hover {
		color: var(--sana-nav-dark) !important;
	}
}

@media (min-width: 1025px) and (max-width: 1240px) {
	.sana-mega__preview {
		grid-template-columns: 1fr minmax(180px, 220px);
		gap: 1.75rem;
	}

	.sana-mega__title {
		font-size: 30px;
	}
}

/* ---------- Phones and tablets: drawer below the header ---------- */

@media (max-width: 1024px) {
	/* Trigger: pill with "Menu" / "Close". */
	.sana-drawer-js #masthead .menu-toggle-open {
		display: inline-flex;
		align-items: center;
		gap: 0.55rem;
		min-height: 44px;
		padding: 0.45rem 1rem 0.45rem 1.1rem;
		border: 1.5px solid rgba(242, 237, 226, 0.5);
		border-radius: 999px;
		color: var(--sana-nav-mist);
		background: transparent;
		font-family: Manrope, sans-serif;
		position: relative;
		cursor: pointer;
		touch-action: manipulation;
		-webkit-tap-highlight-color: transparent;
		-webkit-user-select: none;
		user-select: none;
		transition: transform 0.1s ease-out, background-color 0.1s ease-out;
	}

	/* The whole pill is one tap target: the text and icon never receive the
	   tap themselves, and the hit area reaches 6px past the border. */
	.sana-drawer-js #masthead .menu-toggle-open > * {
		pointer-events: none;
	}

	.sana-drawer-js #masthead .menu-toggle-open::after {
		content: "";
		position: absolute;
		inset: -6px;
		border-radius: 999px;
	}

	/* Instant press feedback. */
	.sana-drawer-js #masthead .menu-toggle-open:active {
		transform: scale(0.96);
		background: rgba(242, 237, 226, 0.12);
	}

	.sana-drawer-js #masthead .menu-toggle-open .menu-toggle-label {
		font-size: 15px;
		font-weight: 700;
		line-height: 1;
		padding: 0;
	}

	.sana-drawer-js #masthead .menu-toggle-open .menu-toggle-icon {
		display: inline-flex;
		width: 22px;
		height: 22px;
		align-items: center;
		justify-content: center;
	}

	.sana-drawer-js #masthead .menu-toggle-open.sana-is-open .menu-toggle-icon svg {
		display: none;
	}

	.sana-drawer-js #masthead .menu-toggle-open.sana-is-open .menu-toggle-icon::before {
		content: "";
		width: 18px;
		height: 18px;
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 3l12 12M15 3L3 15' stroke='%23F2EDE2' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	}

	/* Header stays on top and solid while the drawer is open. */
	.sana-drawer-js body[class*="showing-popup-drawer-from"] #masthead {
		z-index: 100002;
	}

	.sana-drawer-js body[class*="showing-popup-drawer-from"] #mobile-header .site-header-row-container-inner {
		background: var(--sana-nav-dark);
	}

	/* Drawer drops down below the header and is only as tall as the menu;
	   the page stays visible (dimmed) underneath. Opening Activities makes it
	   taller; past the screen height it scrolls inside. Tapping the dimmed
	   page closes it (Kadence overlay). */
	.sana-drawer-js #mobile-drawer .drawer-overlay {
		top: var(--sana-drawer-top, 76px);
		background: rgba(11, 38, 43, 0.4) !important;
	}

	.sana-drawer-js #mobile-drawer .drawer-inner {
		top: var(--sana-drawer-top, 76px);
		bottom: auto !important;
		width: 100%;
		max-width: 100%;
		left: 0;
		right: 0;
		height: auto !important;
		max-height: calc(100vh - var(--sana-drawer-top, 76px));
		max-height: calc(100dvh - var(--sana-drawer-top, 76px));
		overflow-y: auto;
		background: var(--sana-nav-dark);
		border-top: 1px solid rgba(242, 237, 226, 0.18);
		border-radius: 0 0 16px 16px;
		box-shadow: 0 18px 32px -12px rgba(11, 38, 43, 0.55);
		overscroll-behavior: contain;
	}

	/* The header trigger ("Close") closes the drawer; Esc also works (Kadence). */
	.sana-drawer-js #mobile-drawer .drawer-header {
		display: none;
	}

	.sana-drawer-js #mobile-drawer .drawer-content {
		padding: 0.25rem 20px 1.5rem;
	}

	/* Menu items: divider lines, sentence case. */
	.sana-drawer-js #mobile-drawer .mobile-navigation ul {
		margin: 0;
	}

	.sana-drawer-js #mobile-drawer .mobile-navigation ul li > a,
	.sana-drawer-js #mobile-drawer .mobile-navigation ul li .drawer-nav-drop-wrap > a {
		font-family: Manrope, sans-serif;
		font-size: 17px;
		font-weight: 600;
		line-height: 1.3;
		padding: 1rem 0;
		color: var(--sana-nav-mist);
		text-transform: none;
	}

	.sana-drawer-js #mobile-drawer .mobile-navigation ul li:not(.menu-item-has-children) > a,
	.sana-drawer-js #mobile-drawer .mobile-navigation ul li .drawer-nav-drop-wrap {
		border-bottom: 1px solid rgba(242, 237, 226, 0.18);
	}

	.sana-drawer-js #mobile-drawer .mobile-navigation ul li.current-menu-item > a,
	.sana-drawer-js #mobile-drawer .mobile-navigation ul li.current-menu-item > .drawer-nav-drop-wrap > a {
		color: var(--sana-nav-glacier);
	}

	.sana-drawer-js #mobile-drawer .mobile-navigation .drawer-sub-toggle {
		color: var(--sana-nav-glacier);
		border: 0 !important;
		min-width: 48px;
	}

	.sana-drawer-js #mobile-drawer .mobile-navigation ul ul {
		padding-left: 0.9rem;
	}

	.sana-drawer-js #mobile-drawer .mobile-navigation ul ul li > a {
		font-size: 16px;
		font-weight: 500;
		padding: 0.8rem 0;
		color: rgba(242, 237, 226, 0.85);
	}

	/* Button: full-width outlined pill. */
	.sana-drawer-js #mobile-drawer .drawer-content > .site-header-item {
		width: 100%;
	}

	.sana-drawer-js #mobile-drawer .mobile-header-button-wrap {
		width: 100%;
		margin-top: 1.5rem;
	}

	.sana-drawer-js #mobile-drawer .mobile-header-button-wrap .mobile-header-button-inner-wrap,
	.sana-drawer-js #mobile-drawer .mobile-header-button-wrap .mobile-header-button {
		display: flex;
		width: 100%;
	}

	.sana-drawer-js #mobile-drawer .mobile-header-button-wrap .mobile-header-button {
		justify-content: center;
		align-items: center;
		min-height: 52px;
		padding: 0.8rem 1.25rem !important;
		border: 1.5px solid var(--sana-nav-amber) !important;
		border-radius: 999px !important;
		background: transparent !important;
		color: var(--sana-nav-mist) !important;
		font-family: Manrope, sans-serif;
		font-size: 16px;
		font-weight: 700;
		box-shadow: none !important;
	}

	.sana-drawer-js #mobile-drawer .mobile-header-button-wrap .mobile-header-button:hover,
	.sana-drawer-js #mobile-drawer .mobile-header-button-wrap .mobile-header-button:focus-visible {
		background: var(--sana-nav-amber) !important;
		color: var(--sana-nav-ink) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sana-mega,
	.sana-mega.is-open,
	.sana-mega__link,
	.sana-mega__pill,
	#masthead .menu-toggle-open,
	#masthead .header-button-wrap .header-button {
		transition: none !important;
	}

	.sana-mega__preview.is-active {
		animation: none;
	}
}

/* Solid colour on the fixed sticky wrapper itself (Kadence only colours the
   inner row). iOS 26 Safari tints the status-bar area from the background of
   the fixed element at the top; with a transparent wrapper it showed the
   page scrolling behind the status bar. */
#masthead .kadence-sticky-header.item-is-fixed {
	background-color: #123F46;
}
