/**
 * Teton Troutfitters — Header Styles
 *
 * Two-zone header: utility bar + main navigation.
 * All values use CSS custom properties defined below.
 * Scoped with .tt- prefix per agency spec Section 8.
 */

/* ================================================================
   Tokens — Header-specific color palette (spec Section 2.1)
   Prefixed --tt-hdr-* to avoid collision with page-level --tt-* tokens.
   ================================================================ */

:root {
	--tt-hdr-navy:       #0B1A2C;
	--tt-hdr-navy-dark:  #070F1A;
	--tt-hdr-navy-mid:   #142236;
	--tt-hdr-gold:       #C49A3C;
	--tt-hdr-gold-light: #D4A94E;
	--tt-hdr-teal:       #2B7A6F;
	--tt-hdr-cream:      #F2EDE2;
	--tt-hdr-cream-dim:  rgba(242, 237, 226, 0.55);
	--tt-hdr-white:      #FFFFFF;
	--tt-hdr-border:     rgba(255, 255, 255, 0.10);
	--tt-hdr-success:    #4CAF82;
}


/* ================================================================
   Box-sizing reset for all header elements
   ================================================================ */

[class^="tt-"],
[class*=" tt-"],
.tt-hamburger span {
	box-sizing: border-box;
}


/* ================================================================
   Section 1 — Utility Bar (34px, non-sticky)
   ================================================================ */

.tt-utility-bar {
	background: var(--tt-hdr-navy-dark);
	height: 34px;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 100vw;
	overflow: hidden;
	z-index: 1000;
	position: relative;
}

.tt-utility-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 40px;
}

.tt-utility-bar__left {
	display: flex;
	align-items: center;
	gap: 18px;
}

.tt-utility-bar__right {
	display: flex;
	align-items: center;
}

/* Location label */
.tt-utility-location {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tt-hdr-cream-dim);
	font-family: inherit;
	white-space: nowrap;
}

/* Phone number link in utility bar */
.tt-utility-phone {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--tt-hdr-gold);
	font-size: 11.5px;
	letter-spacing: 0.03em;
	text-decoration: none;
	font-family: inherit;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.tt-utility-phone:hover {
	color: var(--tt-hdr-gold-light);
}

.tt-utility-phone svg {
	width: 11px;
	height: 11px;
	flex-shrink: 0;
}

/* Season status indicator */
.tt-season-status {
	display: flex;
	align-items: center;
	gap: 6px;
}

.tt-status-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--tt-hdr-success);
	flex-shrink: 0;
}

.tt-status-label {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(242, 237, 226, 0.45);
	font-family: inherit;
	white-space: nowrap;
}


/* ================================================================
   Sticky Sentinel
   ================================================================ */

.tt-sticky-sentinel {
	height: 0;
	width: 100%;
	visibility: hidden;
	pointer-events: none;
}


/* ================================================================
   Section 2 — Main Navigation (72px, sticky)
   ================================================================ */

.tt-main-nav {
	background: var(--tt-hdr-navy);
	height: 72px;
	position: sticky;
	top: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 100vw;
	overflow: visible;
	border-top: 2px solid transparent;
	transition: height 0.25s ease, border-top-color 0.25s ease;
}

/* Sticky state */
.tt-main-nav.tt-header-sticky {
	height: 56px;
	border-top-color: var(--tt-hdr-teal);
}

.tt-main-nav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 40px;
	height: 100%;
	min-width: 0;
}


/* ================================================================
   Logo
   ================================================================ */

.tt-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}

.tt-logo__icon {
	width: 44px;
	height: auto;
}

.tt-logo-wordmark {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

.tt-logo-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 15px;
	letter-spacing: 0.04em;
	color: var(--tt-hdr-cream);
}

.tt-logo-sub {
	font-size: 9px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--tt-hdr-gold);
	margin-top: 3px;
	opacity: 0.9;
}


/* ================================================================
   Desktop Navigation
   ================================================================ */

.tt-nav-desktop {
	flex: 1;
	display: flex;
	justify-content: center;
}

.tt-nav-menu {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
}

.tt-nav-menu > li {
	position: relative;
}

.tt-nav-menu > li > a {
	display: flex;
	align-items: center;
	padding: 0 1rem;
	height: 72px;
	font-size: 12.5px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--tt-hdr-cream-dim);
	text-decoration: none;
	transition: color 0.2s ease;
	white-space: nowrap;
}

.tt-header-sticky .tt-nav-menu > li > a {
	height: 56px;
}

.tt-nav-menu > li > a:hover,
.tt-nav-menu > li.current-menu-item > a,
.tt-nav-menu > li.current-menu-ancestor > a {
	color: var(--tt-hdr-cream);
}

/* Dropdown arrow for items with children */
.tt-nav-menu > li.menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 3.5px solid transparent;
	border-right: 3.5px solid transparent;
	border-top: 4px solid currentColor;
	margin-left: 6px;
	transition: transform 0.2s ease;
}

.tt-nav-menu > li.menu-item-has-children:hover > a::after {
	transform: rotate(180deg);
}


/* ================================================================
   Dropdown (Trips submenu)
   ================================================================ */

.tt-nav-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	min-width: 220px;
	background: var(--tt-hdr-navy-mid);
	border-top: 2px solid var(--tt-hdr-gold);
	border-radius: 0 0 6px 6px;
	list-style: none;
	margin: 0;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tt-nav-menu > li.menu-item-has-children:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
}

.tt-nav-menu .sub-menu li a {
	display: block;
	padding: 10px 20px;
	font-size: 12.5px;
	color: var(--tt-hdr-cream);
	text-decoration: none;
	transition: color 0.15s ease;
	white-space: nowrap;
}

.tt-nav-menu .sub-menu li a:hover {
	color: var(--tt-hdr-gold);
}


/* ================================================================
   CTA Button Group (desktop)
   ================================================================ */

.tt-cta-group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

/* Secondary button — Call to Book (ghost) */
.tt-btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: transparent;
	color: var(--tt-hdr-cream-dim) !important;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.02em;
	text-decoration: none;
	border: 0.5px solid var(--tt-hdr-border);
	padding: 6px 12px;
	border-radius: 4px;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}

.tt-btn-secondary:hover {
	border-color: var(--tt-hdr-cream-dim);
	color: var(--tt-hdr-cream);
}

.tt-btn-secondary svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

/* Primary button — Book a Trip (gold fill) */
.tt-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--tt-hdr-gold);
	color: var(--tt-hdr-navy-dark);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	border: none;
	padding: 9px 18px;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	white-space: nowrap;
}

.tt-btn-primary:hover {
	background: var(--tt-hdr-gold-light);
}

.tt-btn-primary svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}


/* ================================================================
   Mobile Controls (hamburger + call button)
   ================================================================ */

.tt-mobile-controls {
	display: none;
	align-items: center;
	gap: 12px;
}

/* Hamburger button */
.tt-hamburger {
	position: relative;
	width: 36px;
	height: 36px;
	background: none;
	border: 1px solid var(--tt-hdr-border);
	border-radius: 4px;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	-webkit-tap-highlight-color: transparent;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease;
}

.tt-hamburger:hover,
.tt-hamburger:focus-visible {
	border-color: var(--tt-hdr-cream-dim);
	outline: none;
}

.tt-hamburger span {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: block;
	width: 18px;
	height: 2px;
	background-color: var(--tt-hdr-cream);
	border-radius: 1px;
	transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}

.tt-hamburger span:nth-child(1) { top: 10px; }
.tt-hamburger span:nth-child(2) { top: 17px; }
.tt-hamburger span:nth-child(3) { top: 24px; }

/* Hamburger → X transform */
.tt-mobile-menu-open .tt-hamburger span:nth-child(1) {
	top: 17px;
	transform: translateX(-50%) rotate(45deg);
}

.tt-mobile-menu-open .tt-hamburger span:nth-child(2) {
	opacity: 0;
}

.tt-mobile-menu-open .tt-hamburger span:nth-child(3) {
	top: 17px;
	transform: translateX(-50%) rotate(-45deg);
}


/* ================================================================
   Mobile Drawer
   ================================================================ */

.tt-mobile-drawer {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 360px;
	height: 100vh;
	height: 100dvh;
	background: var(--tt-hdr-navy-mid);
	z-index: 998;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	padding-top: 72px;
}

.tt-mobile-menu-open .tt-mobile-drawer {
	transform: translateX(0);
}

/* Overlay behind drawer */
.tt-mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 997;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tt-mobile-menu-open .tt-mobile-overlay {
	opacity: 1;
	visibility: visible;
}

/* Scroll lock */
body.tt-mobile-menu-open {
	overflow: hidden;
}

/* Mobile nav menu */
.tt-mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tt-mobile-menu > li > a {
	display: block;
	padding: 13px 20px;
	font-size: 13px;
	color: var(--tt-hdr-cream-dim);
	text-decoration: none;
	border-bottom: 0.5px solid var(--tt-hdr-border);
	transition: color 0.15s ease;
}

.tt-mobile-menu > li > a:hover,
.tt-mobile-menu > li.current-menu-item > a {
	color: var(--tt-hdr-cream);
}

/* Mobile sub-menu (expanded, not nested dropdown) */
.tt-mobile-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	background: rgba(0, 0, 0, 0.15);
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.tt-mobile-menu > li.tt-submenu-open > .sub-menu {
	max-height: 500px;
}

.tt-mobile-menu .sub-menu li a {
	display: block;
	padding: 11px 20px 11px 36px;
	font-size: 12.5px;
	color: var(--tt-hdr-cream-dim);
	text-decoration: none;
	border-bottom: 0.5px solid var(--tt-hdr-border);
	transition: color 0.15s ease;
}

.tt-mobile-menu .sub-menu li a:hover {
	color: var(--tt-hdr-gold);
}

/* Mobile submenu toggle arrow */
.tt-mobile-menu > li.menu-item-has-children > a {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.tt-mobile-menu > li.menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.2s ease;
}

.tt-mobile-menu > li.tt-submenu-open > a::after {
	transform: rotate(180deg);
}

/* Mobile menu footer CTAs */
.tt-mobile-menu-ctas {
	padding: 16px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tt-mob-btn-phone {
	display: block;
	border: 0.5px solid var(--tt-hdr-gold);
	color: var(--tt-hdr-gold);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 12px;
	border-radius: 4px;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.tt-mob-btn-phone:hover {
	background: var(--tt-hdr-gold);
	color: var(--tt-hdr-navy-dark);
}

.tt-mob-btn-book {
	display: block;
	background: var(--tt-hdr-gold);
	color: var(--tt-hdr-navy-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 13px;
	border-radius: 4px;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.tt-mob-btn-book:hover {
	background: var(--tt-hdr-gold-light);
}


/* ================================================================
   Responsive — Tablet (≤ 1024px)
   ================================================================ */

@media (max-width: 1024px) {
	.tt-utility-bar__inner,
	.tt-main-nav__inner {
		padding: 0 24px;
	}

	.tt-nav-menu > li > a {
		padding: 0 0.65rem;
		font-size: 11.5px;
	}

	.tt-btn-secondary {
		font-size: 12px;
		padding: 5px 10px;
	}

	.tt-btn-primary {
		font-size: 11px;
		padding: 8px 14px;
	}
}


/* ================================================================
   Responsive — Mobile (≤ 767px)
   ================================================================ */

@media (max-width: 767px) {
	/* Hide utility bar */
	.tt-utility-bar {
		display: none;
	}

	/* Main nav adjustments */
	.tt-main-nav {
		height: 60px;
	}

	.tt-main-nav.tt-header-sticky {
		height: 60px;
		border-top-color: transparent;
	}

	.tt-main-nav__inner {
		padding: 0 16px;
	}

	/* Hide desktop nav + CTA group */
	.tt-nav-desktop {
		display: none;
	}

	.tt-cta-group {
		display: none;
	}

	/* Show mobile controls */
	.tt-mobile-controls {
		display: flex;
	}

	/* Mobile call button */
	.tt-mobile-call {
		padding: 7px 14px;
		font-size: 11px;
	}

	.tt-mobile-call svg {
		width: 11px;
		height: 11px;
	}

	/* Logo adjustments */
	.tt-logo__icon {
		width: 42px;
		height: auto;
	}

	.tt-logo-wordmark {
		display: none;
	}

	/* Mobile drawer top offset matches header */
	.tt-mobile-drawer {
		padding-top: 60px;
	}
}
