/**
 * SKM Navigation
 * Mobile-first: accordion below 992px, mega menu panel from 992px up.
 * Every rule is scoped to #skm-nav so the theme's global rules cannot leak in.
 * Values follow the navigation refresh mockups; fonts use the site's Adobe
 * fonts first, with the mockup's Google fonts as fallbacks.
 */

#skm-nav {
	/* Same navy as the site header, so the bar does not change colour when the menu opens. */
	--skm-navy: #213454;
	--skm-ink: #1a2333;
	--skm-blue: #2c64a8;
	--skm-red: #c2352b;
	--skm-red-dark: #a62b22;
	--skm-line: #d9dee7;
	--skm-line-soft: #e4e8ee;
	--skm-mist: #f4f6f9;
	--skm-open: #f8fafc;
	--skm-muted: #4a5568;
	--skm-rail-link: #d5dce8;
	--skm-font: azo-sans-web, Figtree, "Helvetica Neue", Helvetica, Arial, sans-serif;
	--skm-serif: quincy-cf, "Source Serif 4", Georgia, serif;
	/* The mockup's 600 weight; the site's Azo Sans kit has 500 and 700, and 500 is the closer match. */
	--skm-semibold: 500;
	--skm-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--skm-duration: 280ms;

	/*
	 * Closed: still rendered but invisible (hidden with CSS, links stay in the HTML), so it can fade.
	 * Visibility flips only after the fade-out finishes.
	 */
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear var(--skm-duration);
	position: fixed;
	/* Pinned to the very top like the theme's fixed header (which ignores the admin bar), so they line up. */
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 100000;
	font-family: var(--skm-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--skm-ink);
	text-align: left;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

#skm-nav.is-open {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

html.skm-nav-is-open,
html.skm-nav-is-open body {
	overflow: hidden;
}

/* ---------- Reset (theme styles ul, li, a, button and input globally) ---------- */

#skm-nav *,
#skm-nav *::before,
#skm-nav *::after {
	box-sizing: border-box;
}

/* The theme's reset sets font-family and font-weight: 400 on every element, which blocks inheritance. */
#skm-nav div,
#skm-nav span,
#skm-nav nav,
#skm-nav form,
#skm-nav label,
#skm-nav ul,
#skm-nav li,
#skm-nav a {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

#skm-nav span {
	color: inherit;
}

#skm-nav ul,
#skm-nav li {
	list-style: none;
	margin: 0;
	padding: 0;
}

#skm-nav a {
	text-decoration: none;
	background: none;
	box-shadow: none;
}

#skm-nav button {
	-webkit-appearance: none;
	appearance: none;
	width: auto;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-align: inherit;
	text-transform: none;
	cursor: pointer;
}

#skm-nav svg {
	display: block;
	flex-shrink: 0;
}

#skm-nav img {
	max-width: none;
}

#skm-nav :focus {
	outline: none;
}

#skm-nav :focus-visible {
	outline: 2px solid var(--skm-blue);
	outline-offset: 2px;
}

#skm-nav .skm-nav__sr,
.skm-nav-trigger .skm-nav__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------- Panel ---------- */

#skm-nav .skm-nav__backdrop {
	display: none;
}

#skm-nav .skm-nav__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--skm-mist);
	opacity: 0;
	transition: opacity 200ms ease;
}

#skm-nav.is-open .skm-nav__panel {
	opacity: 1;
}

/* Mobile: content rises into place while the panel fades in. */
#skm-nav .skm-nav__body,
#skm-nav .skm-nav__dock {
	transform: translateY(12px);
	transition: transform var(--skm-duration) var(--skm-ease);
}

#skm-nav.is-open .skm-nav__body,
#skm-nav.is-open .skm-nav__dock {
	transform: none;
}

/* ---------- Bar: close, logo, search (and the CTA on desktop) ---------- */

#skm-nav .skm-nav__bar {
	flex-shrink: 0;
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 44px;
	align-items: center;
	height: 64px;
	padding: 0 12px;
	background: var(--skm-navy);
	color: #fff;
}

#skm-nav .skm-nav__bar-start,
#skm-nav .skm-nav__bar-end {
	display: contents;
}

#skm-nav .skm-nav__icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	color: #fff;
}

#skm-nav .skm-nav__bar :focus-visible {
	outline-color: #fff;
}

#skm-nav .skm-nav__close svg {
	width: 24px;
	height: 24px;
}

#skm-nav .skm-nav__search-toggle svg {
	width: 22px;
	height: 22px;
}

#skm-nav .skm-nav__brand {
	justify-self: center;
	display: flex;
	align-items: center;
	min-width: 0;
	color: #fff;
}

#skm-nav .skm-nav__logo {
	display: block;
	width: auto;
	height: 36px;
}

#skm-nav .skm-nav__wordmark {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

#skm-nav .skm-nav__cta--bar {
	display: none;
}

/* ---------- Search ---------- */

#skm-nav .skm-nav__search {
	flex-shrink: 0;
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	background: #fff;
	border-bottom: 1px solid var(--skm-line);
}

#skm-nav .skm-nav__search[hidden] {
	display: none;
}

#skm-nav .skm-nav__search-input {
	-webkit-appearance: none;
	appearance: none;
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--skm-line);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	color: var(--skm-ink);
	font-family: var(--skm-font);
	font-size: 16px !important; /* 16px stops iOS zooming; !important beats the theme's 1.1em rule */
	line-height: normal;
}

#skm-nav .skm-nav__search-input:focus-visible {
	outline-offset: 0;
	border-color: var(--skm-blue);
}

#skm-nav .skm-nav__search-submit {
	flex-shrink: 0;
	height: 46px;
	padding: 0 18px;
	border-radius: 8px;
	background: var(--skm-navy);
	color: #fff;
	font-size: 15px !important;
	font-weight: var(--skm-semibold);
}

/* ---------- Body (scrolls on mobile) ---------- */

#skm-nav .skm-nav__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	/* Keep the accordion a comfortable width on tablets. */
	padding: 0 max(0px, calc((100% - 640px) / 2));
}

/* Quick tiles (mobile) */

#skm-nav .skm-nav__tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	padding: 16px;
}

#skm-nav .skm-nav__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 76px;
	padding: 0 4px;
	background: #fff;
	border: 1px solid var(--skm-line);
	border-radius: 10px;
	color: var(--skm-ink);
	font-size: 13px;
	font-weight: var(--skm-semibold);
	line-height: 1.15;
	text-align: center;
	overflow-wrap: anywhere;
}

#skm-nav .skm-nav__tile svg {
	color: var(--skm-navy);
}

#skm-nav .skm-nav__tile:hover {
	border-color: var(--skm-blue);
	color: var(--skm-blue);
}

/* Accordion (mobile) */

#skm-nav .skm-nav__sections {
	margin: 0 16px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--skm-line);
	border-radius: 12px;
}

#skm-nav .skm-nav__section {
	background: #fff;
}

#skm-nav .skm-nav__section + .skm-nav__section {
	border-top: 1px solid var(--skm-line-soft);
}

#skm-nav .skm-nav__section.is-open {
	background: var(--skm-open);
}

#skm-nav .skm-nav__heading {
	margin: 0;
	padding: 0;
}

#skm-nav .skm-nav__heading-text {
	display: none;
}

#skm-nav .skm-nav__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	height: 58px;
	padding: 0 18px;
	color: var(--skm-ink);
	font-size: 17px !important;
	font-weight: var(--skm-semibold);
	line-height: 1.2;
	text-align: left;
}

#skm-nav .skm-nav__toggle:focus-visible,
#skm-nav .skm-nav__link:focus-visible {
	outline-offset: -2px;
}

#skm-nav .skm-nav__toggle svg {
	color: var(--skm-blue);
	transition: transform 0.2s ease;
}

#skm-nav .skm-nav__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

/*
 * Links stay in the HTML; closed sections hide them with CSS only.
 * The drawer animates its height (0fr to 1fr). "inherit" rather than "visible" so an
 * open section never shows through while the whole menu is closed.
 */
#skm-nav .skm-nav__drawer {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows 240ms var(--skm-ease), visibility 0s linear 240ms;
}

#skm-nav .skm-nav__section.is-open .skm-nav__drawer {
	grid-template-rows: 1fr;
	visibility: inherit;
	transition-delay: 0s;
}

#skm-nav .skm-nav__links {
	min-height: 0;
	overflow: hidden;
	padding: 0 10px;
}

/* Bottom spacing as a margin (not padding) so the drawer can collapse to zero. */
#skm-nav .skm-nav__links > li:last-child {
	margin-bottom: 12px;
}

#skm-nav .skm-nav__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 46px;
	padding: 0 10px;
	border-radius: 8px;
	color: var(--skm-ink);
	font-size: 16px;
	line-height: 1.25;
}

#skm-nav .skm-nav__link:hover {
	color: var(--skm-blue);
}

#skm-nav .skm-nav__link[aria-current="page"] {
	color: var(--skm-blue);
	font-weight: var(--skm-semibold);
}

/* Season pills: visual only, drawn from the item's tag-* class so the link text stays the label. */
#skm-nav .tag-winter > .skm-nav__link::after,
#skm-nav .tag-summer > .skm-nav__link::after,
#skm-nav .tag-store > .skm-nav__link::after {
	flex-shrink: 0;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: var(--skm-semibold);
	line-height: 1.25;
	white-space: nowrap;
}

#skm-nav .tag-winter > .skm-nav__link::after {
	content: "Winter";
	content: "Winter" / "";
	background: #e3edf8;
	color: #1f4f86;
}

#skm-nav .tag-summer > .skm-nav__link::after {
	content: "Summer";
	content: "Summer" / "";
	background: #fcebd9;
	color: #8a4b12;
}

#skm-nav .tag-store > .skm-nav__link::after {
	content: "Store";
	content: "Store" / "";
	background: #eef0f3;
	color: #3d4757;
}

/* Rail (desktop only) */

#skm-nav .skm-nav__rail {
	display: none;
}

/* Footer links */

#skm-nav .skm-nav__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	padding: 18px 20px 24px;
	font-size: 14px;
}

#skm-nav .skm-nav__footer-link {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	color: var(--skm-muted);
}

#skm-nav .skm-nav__footer-link:hover {
	color: var(--skm-blue);
}

/* Sticky Buy Tickets & Passes (mobile) */

#skm-nav .skm-nav__dock {
	flex-shrink: 0;
	padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid var(--skm-line);
}

#skm-nav .skm-nav__cta--dock {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	max-width: 608px;
	height: 52px;
	margin: 0 auto;
	border-radius: 10px;
	background: var(--skm-red);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

#skm-nav .skm-nav__cta:hover {
	background: var(--skm-red-dark);
	color: #fff;
}

#skm-nav .skm-nav__cta--dock:focus-visible {
	outline-offset: 3px;
}

/* Smallest phones (320px): keep the four tile labels on one line. */
@media (max-width: 359.98px) {
	#skm-nav .skm-nav__tiles {
		gap: 6px;
		padding: 12px;
	}

	#skm-nav .skm-nav__tile {
		padding: 0 2px;
		font-size: 11.5px;
		letter-spacing: -0.01em;
	}

	#skm-nav .skm-nav__sections {
		margin: 0 12px;
	}
}

/* ---------- Desktop mega menu ---------- */

@media (min-width: 992px) {
	#skm-nav .skm-nav__backdrop {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		background: rgba(15, 23, 38, 0.55);
		opacity: 0;
		transition: opacity var(--skm-duration) ease;
	}

	#skm-nav.is-open .skm-nav__backdrop {
		opacity: 1;
	}

	/*
	 * The bar fades in place over the identical site header (the hamburger crossfades into the X,
	 * the logo does not move); the content below settles down from under the bar.
	 */
	#skm-nav .skm-nav__panel {
		bottom: auto;
		max-height: 100%;
		overflow: visible;
		background: transparent;
	}

	#skm-nav .skm-nav__bar,
	#skm-nav .skm-nav__search {
		position: relative;
		z-index: 1;
	}

	#skm-nav .skm-nav__body {
		background: #fff;
		box-shadow: 0 24px 48px rgba(15, 23, 38, 0.25);
		transform: translateY(-12px);
	}

	#skm-nav .skm-nav__bar {
		display: flex;
		justify-content: space-between;
		/*
		 * The open bar sits exactly on top of the site header (#ninec_custom_menu_wrapper) so nothing
		 * jumps: 92px tall, the X in the hamburger's 60x90 box at x=20, and the logo 186px wide at x=125.
		 */
		height: 92px;
		padding: 0 32px 0 20px;
	}

	#skm-nav .skm-nav__bar-start,
	#skm-nav .skm-nav__bar-end {
		display: flex;
		align-items: center;
	}

	#skm-nav .skm-nav__bar-start {
		align-self: stretch;
		align-items: flex-start;
		gap: 45px;
		min-width: 0;
	}

	#skm-nav .skm-nav__bar-end {
		gap: 20px;
	}

	#skm-nav .skm-nav__close {
		width: 60px;
		height: 90px;
		border-radius: 0;
	}

	/* X drawn with the hamburger's 3px square-ended strokes. */
	#skm-nav .skm-nav__close svg {
		width: 44px;
		height: 44px;
		stroke-width: 1.64;
		stroke-linecap: square;
	}

	#skm-nav .skm-nav__close:focus-visible {
		outline-offset: -4px;
	}

	#skm-nav .skm-nav__search-toggle svg {
		width: 24px;
		height: 24px;
	}

	#skm-nav .skm-nav__brand {
		align-self: center;
	}

	#skm-nav .skm-nav__logo {
		width: 186px;
		height: auto;
	}

	#skm-nav .skm-nav__wordmark {
		font-size: 20px;
	}

	#skm-nav .skm-nav__cta--bar {
		display: flex;
		align-items: center;
		height: 48px;
		padding: 0 22px;
		border-radius: 8px;
		background: var(--skm-red);
		color: #fff;
		font-size: 15px;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		white-space: nowrap;
	}

	#skm-nav .skm-nav__search {
		padding: 16px 48px;
	}

	#skm-nav .skm-nav__search-input {
		flex: 0 1 560px;
	}

	#skm-nav .skm-nav__body {
		display: grid;
		/* Rail as in the mockup: 300px cards + 28px padding each side. */
		grid-template-columns: minmax(0, 1fr) 356px;
		grid-template-rows: auto 1fr auto;
		padding: 0;
	}

	/* Navy rail background spanning the full height of the right column. */
	#skm-nav .skm-nav__body::before {
		content: "";
		grid-column: 2;
		grid-row: 1 / span 3;
		background: var(--skm-navy);
	}

	#skm-nav .skm-nav__tiles {
		display: none;
	}

	#skm-nav .skm-nav__sections {
		grid-column: 1;
		grid-row: 1 / span 3;
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		align-content: start;
		gap: 36px 40px;
		margin: 0;
		padding: 40px 48px;
		overflow: visible;
		background: none;
		border: 0;
		border-radius: 0;
	}

	#skm-nav .skm-nav__section,
	#skm-nav .skm-nav__section.is-open {
		background: none;
	}

	#skm-nav .skm-nav__section + .skm-nav__section {
		border-top: 0;
	}

	#skm-nav .skm-nav__heading-text {
		display: block;
		margin-bottom: 8px;
		color: var(--skm-navy);
		font-family: var(--skm-serif);
		font-size: 24px;
		font-weight: 600;
		line-height: 1.2;
	}

	#skm-nav .skm-nav__toggle {
		display: none;
	}

	#skm-nav .skm-nav__drawer,
	#skm-nav .skm-nav__section.is-open .skm-nav__drawer {
		display: block;
		visibility: inherit;
		transition: none;
	}

	#skm-nav .skm-nav__links {
		display: flex;
		flex-direction: column;
		gap: 4px;
		padding: 0;
		overflow: visible;
	}

	#skm-nav .skm-nav__links > li:last-child {
		margin-bottom: 0;
	}

	#skm-nav .skm-nav__link {
		justify-content: flex-start;
		min-height: 30px;
		padding: 0;
		border-radius: 4px;
	}

	#skm-nav .skm-nav__link:focus-visible {
		outline-offset: 2px;
	}

	/* Conditions, Webcams and Trail Map live in the rail on desktop. */
	#skm-nav .skm-nav__item.skm-rail-only {
		display: none;
	}

	#skm-nav .tag-winter > .skm-nav__link::after,
	#skm-nav .tag-summer > .skm-nav__link::after,
	#skm-nav .tag-store > .skm-nav__link::after {
		padding: 2px 7px;
		font-size: 11px;
	}

	#skm-nav .skm-nav__rail {
		grid-column: 2;
		grid-row: 1;
		position: relative;
		display: flex;
		flex-direction: column;
		gap: 12px;
		padding: 40px 28px 0;
	}

	#skm-nav .skm-nav__card {
		display: flex;
		align-items: center;
		gap: 14px;
		height: 64px;
		padding: 0 18px;
		border-radius: 10px;
		background: #fff;
		color: var(--skm-ink);
		font-size: 16px;
		font-weight: var(--skm-semibold);
	}

	#skm-nav .skm-nav__card svg {
		color: var(--skm-navy);
	}

	#skm-nav .skm-nav__card:hover,
	#skm-nav .skm-nav__card[aria-current="page"] {
		color: var(--skm-blue);
	}

	#skm-nav .skm-nav__rail :focus-visible,
	#skm-nav .skm-nav__footer :focus-visible {
		outline-color: #fff;
	}

	#skm-nav .skm-nav__footer {
		grid-column: 2;
		grid-row: 3;
		position: relative;
		gap: 6px 18px;
		padding: 24px 28px 40px;
	}

	#skm-nav .skm-nav__footer-link {
		color: var(--skm-rail-link);
	}

	#skm-nav .skm-nav__footer-link:hover {
		color: #fff;
	}

	#skm-nav .skm-nav__dock {
		display: none;
	}
}

/* 1366-1439px: slightly tighter spacing so three columns still fit the longest label + pill (284px). */
@media (min-width: 1366px) and (max-width: 1439.98px) {
	#skm-nav .skm-nav__sections {
		gap: 36px 32px;
		padding: 40px;
	}
}

/* Below 1366px three columns are too narrow for the longest label plus its pill, so use two. */
@media (min-width: 992px) and (max-width: 1365.98px) {
	#skm-nav .skm-nav__sections {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 40px;
		padding: 36px 40px;
	}
}

/* Narrow desktops and landscape tablets: slimmer rail. */
@media (min-width: 992px) and (max-width: 1199.98px) {
	#skm-nav .skm-nav__bar {
		padding: 0 24px 0 20px;
	}

	#skm-nav .skm-nav__body {
		grid-template-columns: minmax(0, 1fr) 300px;
	}

	#skm-nav .skm-nav__sections {
		gap: 32px;
		padding: 32px;
	}

	#skm-nav .skm-nav__rail {
		padding: 32px 20px 0;
	}

	#skm-nav .skm-nav__card {
		gap: 12px;
		padding: 0 16px;
		font-size: 15px;
	}

	/* Keeps Jobs, Mountain Improvements and Contact on one line in the slimmer rail. */
	#skm-nav .skm-nav__footer {
		gap: 6px 14px;
		padding: 24px 20px 32px;
		font-size: 13px;
	}
}

/* Reduced motion: keep the fades, drop the movement and the accordion slide. */
@media (prefers-reduced-motion: reduce) {
	#skm-nav .skm-nav__body,
	#skm-nav .skm-nav__dock,
	#skm-nav.is-open .skm-nav__body,
	#skm-nav.is-open .skm-nav__dock {
		transform: none;
		transition: none;
	}

	#skm-nav .skm-nav__drawer,
	#skm-nav .skm-nav__section.is-open .skm-nav__drawer {
		transition: none;
	}

	#skm-nav .skm-nav__toggle svg {
		transition: none;
	}
}

/* ---------- Trigger (sits where the old desktop hamburger was) ---------- */

.skm-nav-active .skm-nav-trigger {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	display: flex;
	align-items: center;
	width: 60px;
	height: 90px;
	margin: 0;
	padding: 0 0 0 10px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
}

.skm-nav-active .skm-nav-trigger:focus {
	outline: none;
}

.skm-nav-active .skm-nav-trigger:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

.skm-nav-trigger__lines {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.skm-nav-trigger__lines span {
	display: block;
	width: 40px;
	height: 3px;
	background: currentColor;
	transition: width 0.2s ease;
}

.skm-nav-trigger__lines span:nth-child(2) {
	width: 30px;
}

.skm-nav-trigger__lines span:nth-child(3) {
	width: 20px;
}

.skm-nav-trigger:hover .skm-nav-trigger__lines span {
	width: 40px;
}

@media (prefers-reduced-motion: reduce) {
	.skm-nav-trigger__lines span {
		transition: none;
	}
}
