/* =========================================================================
   TripThis Top Navigation
   Marquee strip + teal top bar (logo, menu, user account). Poppins 15px.
   ========================================================================= */

/* Header dimensions live on :root so the (out-of-flow) header and the
   in-flow spacer share the exact same numbers — that keeps the CSS-reserved
   space and the JS-measured height identical, so nothing shifts on load. */
:root {
	--ttn-bar-height: 64px;
	--ttn-marquee-height: 29px;
}

.ttn-header {
	--ttn-teal: #2ab5b5;
	--ttn-teal-dark: #1a8a8a;
	--ttn-ink: #12212e;
	--ttn-muted: #7b8896;
	--ttn-line: #e7ebf0;
	--ttn-max-width: 1400px;
	--ttn-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 1000;
	font-family: var(--ttn-font);
	font-size: 15px;
	line-height: 1.5;
	color: #fff;
	transition: box-shadow .3s ease;
}

/* Spacer reserves the header height in the flow. CSS reserves the exact
   height at first paint (no shift when JS mounts); JS keeps it in sync if the
   real height ever differs (e.g. an unexpectedly tall marquee). */
.ttn-header-spacer {
	flex: 0 0 auto;
	height: var(--ttn-bar-height);
}

.ttn-header-spacer.has-marquee {
	height: calc(var(--ttn-bar-height) + var(--ttn-marquee-height));
}

.ttn-header a {
	text-decoration: none;
	color: #ffffff !important;
}

.ttn-header *,
.ttn-header *::before,
.ttn-header *::after {
	box-sizing: border-box;
}

/* Push the fixed header below the WordPress admin bar when it's showing,
   so logged-in users (admins) still see the marquee. WP adds the
   `admin-bar` body class and the bar is 32px tall (46px at <=782px). */
body.admin-bar .ttn-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .ttn-header {
		top: 46px;
	}
}

/* ---- Marquee (topmost strip) ------------------------------------------ */

.ttn-marquee {
	background:  var(--c-primary);
	color: #fff;
	overflow: hidden;
	white-space: nowrap;
	/* Deterministic height: the group's fixed padding + a line-height:1 line
	   add up to --ttn-marquee-height regardless of which font has loaded, so
	   the reserved space never changes when Poppins swaps in. */
	max-height: var(--ttn-marquee-height);
	transition: max-height .3s ease, opacity .3s ease;
}

.ttn-marquee__track {
	display: inline-flex;
	flex-wrap: nowrap;
	will-change: transform;
	animation: ttn-marquee-scroll 75s linear infinite;
}

.ttn-marquee:hover .ttn-marquee__track,
.ttn-marquee:focus-within .ttn-marquee__track {
	animation-play-state: paused;
}

.ttn-marquee__group {
	display: inline-flex;
	flex-wrap: nowrap;
	/* 8 + 8 padding + a 13px line-height:1 item = 29px (--ttn-marquee-height). */
	padding: 8px 0;
}

.ttn-marquee__item {
	display: inline-flex;
	align-items: center;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1;
}

.ttn-marquee__sep {
	margin: 0 1.6em;
	opacity: .55;
}

@keyframes ttn-marquee-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.ttn-marquee__track {
		animation: none;
	}
	.ttn-marquee__group:nth-child(2) {
		display: none;
	}
	.ttn-marquee__group {
		padding-left: 20px;
	}
}

/* ---- Top bar ---------------------------------------------------------- */

.ttn-topbar {
	background: var(--ttn-teal);
	position: relative; /* positioning context for the mega panel */
	transition: background-color .3s ease;
}

.is-scrolled .ttn-topbar {
        background-color:   #2ab5b5c9;
}   

.ttn-topbar__inner {
	max-width: var(--ttn-max-width);
	margin: 0 auto;
	min-height: var(--ttn-bar-height);
	padding: 0 28px;
	display: flex;
	align-items: center;
	gap: 14px;
}

/* Brand / logo */
.ttn-topbar__brand {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.ttn-topbar__brand a,
.ttn-topbar__brand a:hover,
.ttn-topbar__brand a:focus {
	color: #ffffff !important;
}

.ttn-logo {
	display: inline-flex;
	align-items: center;
	color: #fff;
}

.ttn-logo__word {
	font-family: var(--ttn-font);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1;
}

.ttn-logo__img {
	max-height: 38px;
	width: auto;
	display: block;
	filter: brightness(0) invert(1) !important;
}

/* Primary nav — shared base */
.ttn-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---- Bar nav (desktop, inline horizontal) ----------------------------- */

.ttn-nav--bar {
	flex: 1 1 auto;
}

.ttn-nav--bar .ttn-nav__list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 26px;
}



.ttn-nav--bar .ttn-nav__link {
	display: inline-block;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	padding: 8px 0;
	white-space: nowrap;
	color: rgba(255, 255, 255, .9);
	transition: color .15s ease;
}

.ttn-nav--bar .ttn-nav__link:hover,
.ttn-nav--bar .ttn-nav__item--mega:hover > .ttn-nav__link,
.ttn-nav--bar .ttn-nav__item--mega:focus-within > .ttn-nav__link {
	color: #fff;
}

/* ---- Drawer nav (mobile, vertical list) ------------------------------- */

.ttn-nav--drawer {
	width: 100%;
}

.ttn-nav--drawer .ttn-nav__list {
	display: flex;
	flex-direction: column;
}

.ttn-nav--drawer .ttn-nav__item {
	border-bottom: 1px solid var(--ttn-line);
}

.ttn-nav--drawer .ttn-nav__link {
	display: block;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	padding: 15px 4px;
	color: var(--ttn-ink);
	transition: color .15s ease;
}

.ttn-nav--drawer .ttn-nav__link:hover,
.ttn-nav--drawer .ttn-nav__item--mega.is-open > .ttn-nav__link {
	color: #fff;;
}

/* Chevron affordance on expandable (mega) items in the drawer. */
.ttn-nav--drawer .ttn-nav__item--mega > .ttn-nav__link {
	position: relative;
	padding-right: 28px;
}

.ttn-nav--drawer .ttn-nav__item--mega > .ttn-nav__link::after {
	content: "";
	position: absolute;
	right: 8px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	transition: transform .2s ease;
	opacity: .55;
}

.ttn-nav--drawer .ttn-nav__item--mega.is-open > .ttn-nav__link::after {
	transform: translateY(-30%) rotate(-135deg);
}

/* ---- User account (right) --------------------------------------------- */

.ttn-topbar__account {
	flex: 0 0 auto;
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ttn-account {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ttn-account__link,
.ttn-account--guest
{
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	background: rgba(255, 255, 255, .14);
	padding: 6px 14px 6px 6px;
	border-radius: 999px;
	transition: background .15s ease;
}

.ttn-account--guest {
	padding: 8px 16px;
}

.ttn-account__link:hover,
.ttn-account--guest:hover {
	background: rgba(255, 255, 255, .24);
}

.ttn-avatar {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	color: var(--ttn-teal-dark);
	display: grid;
	place-items: center;
	font-size: .82rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .02em;
}

.ttn-avatar--guest {
	background: rgba(255, 255, 255, .18);
	color: #fff;
}

.ttn-account__meta {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
	line-height: 1.15;
}

.ttn-account__label {
	font-size: 12px;
	font-weight: 600;
	color: rgba(255, 255, 255, .78);
}

.ttn-account__email {
	color: #ffffff !important;
	font-size: 13px;
	font-weight: 500;
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ttn-account__login {
	font-size: 14px;
	font-weight: 600;
        color: #ffffff !important;
}

/* Register CTA — solid white pill so it reads as the primary guest action. */
.ttn-account__register {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	padding: 9px 18px;
	border-radius: 999px;
	 color: #ffffff !important;
	background: rgba(255, 255, 255, .14);
	font-size: 14px;
	font-weight: 600;
	transition: background .15s ease, color .15s ease;
}

.ttn-account__register:hover,
.ttn-account__register:focus {
	background: rgba(255, 255, 255, .88);
	color: var(--ttn-teal-dark) !important;
}

.ttn-account__logout {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: rgba(255, 255, 255, .9);
	background: rgba(255, 255, 255, .10);
	transition: background .15s ease, color .15s ease;
}

.ttn-account__logout:hover {
	background: rgba(255, 255, 255, .24);
	color: #fff !important;
}

.ttn-icon {
	color: #ffffff !important;
	display: block;
}

/* ---- Mega menu -------------------------------------------------------- */

.ttn-mega__content {
	font-size: 15px;
	line-height: 1.6;
}

.ttn-mega__content a {
	color: var(--ttn-teal-dark);
}

.ttn-mega__content a:hover {
	text-decoration: underline;
}

/* Bar (desktop): full-width dropdown panel, opens on hover / focus. */
.ttn-nav--bar .ttn-nav__item--mega .ttn-mega {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: #fff;
	color: var(--ttn-ink);
	border-top: 1px solid rgba(0, 0, 0, .06);
	box-shadow: 0 20px 40px -24px rgba(18, 33, 46, .35);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	z-index: 5;
}

.ttn-nav--bar .ttn-nav__item--mega:hover > .ttn-mega,
.ttn-nav--bar .ttn-nav__item--mega:focus-within > .ttn-mega {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Invisible hover bridge so moving the cursor into the panel keeps it open. */
.ttn-nav--bar .ttn-nav__item--mega .ttn-mega::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 24px;
}

.ttn-nav--bar .ttn-mega__inner {
	max-width: var(--ttn-max-width);
	margin: 0 auto;
	padding: 28px 28px 34px;
}

/* Drawer (mobile): static accordion panel, opens on tap. */
.ttn-nav--drawer .ttn-mega {
	display: none;
	background: #f5f7f9;
	color: var(--ttn-ink);
	border-radius: 10px;
	margin: 0 0 12px;
}

.ttn-nav--drawer .ttn-nav__item--mega.is-open .ttn-mega {
	display: block;
}

.ttn-nav--drawer .ttn-mega__inner {
	padding: 14px 16px 18px;
}

/* ---- Scrolled / stuck state ------------------------------------------- */

.ttn-header.is-scrolled {
	box-shadow: 0 6px 24px rgba(18, 33, 46, .12);
}

/* Collapse the marquee when the page is scrolled. */
.ttn-header.is-scrolled .ttn-marquee {
	max-height: 0;
	opacity: 0;
	pointer-events: none;
}

/* ---- Menu button (hamburger — mobile/tablet only) --------------------- */

.ttn-menu-toggle {
	flex: 0 0 auto;
	display: flex; /* always visible, incl. desktop alongside the inline nav */
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	background: rgba(255, 255, 255, .10);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	color: rgba(255, 255, 255, .9);
	transition: background .15s ease, color .15s ease;
}

.ttn-menu-toggle:hover {
	background: rgba(255, 255, 255, .24);
	color: #fff;
}

.ttn-menu-toggle .eicon-menu-bar {
	font-size: 22px;
	line-height: 1;
}

/* ---- Offcanvas drawer ------------------------------------------------- */

.ttn-offcanvas {
	--ttn-teal-dark: #1a8a8a;
	--ttn-ink: #12212e;
	--ttn-muted: #7b8896;
	--ttn-line: #e7ebf0;
	--ttn-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

	position: fixed;
	inset: 0;
	z-index: 1100;
	font-family: var(--ttn-font);
	font-size: 15px;
	line-height: 1.5;
}

.ttn-offcanvas[hidden] {
	display: none;
}

.ttn-offcanvas *,
.ttn-offcanvas *::before,
.ttn-offcanvas *::after {
	box-sizing: border-box;
}

.ttn-offcanvas a {
	text-decoration: none;
	color: inherit;
}

.ttn-offcanvas__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 33, 46, .45);
	opacity: 0;
	transition: opacity .3s ease;
}

.ttn-offcanvas__panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: min(85vw, 380px);
	background: #fff;
	color: var(--ttn-ink);
	box-shadow: -20px 0 50px -30px rgba(18, 33, 46, .6);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform .3s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.ttn-offcanvas.is-open .ttn-offcanvas__backdrop {
	opacity: 1;
}

.ttn-offcanvas.is-open .ttn-offcanvas__panel {
	transform: translateX(0);
}

.ttn-offcanvas__head {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: #fff;
	border-bottom: 1px solid var(--ttn-line);
}

.ttn-offcanvas__title {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ttn-muted);
}

.ttn-offcanvas__close {
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 30px;
	line-height: 1;
	color: var(--ttn-ink);
	border-radius: 50%;
	transition: background .15s ease;
}

.ttn-offcanvas__close:hover {
	background: #eef1f4;
}

.ttn-offcanvas .ttn-nav {
	padding: 6px 20px 28px;
}

/* Lock background scroll while the drawer is open. */
body.ttn-offcanvas-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.ttn-offcanvas__panel,
	.ttn-offcanvas__backdrop {
		transition: none;
	}
}

/* ---- Responsive ------------------------------------------------------- */

/* Tablet / mobile: hide the inline bar nav (the hamburger + drawer remain). */
@media (max-width: 1024px) {
	.ttn-nav--bar {
		display: none;
	}
}

@media (max-width: 600px) {
	.ttn-topbar__inner {
		padding: 0 16px;
	}

	.ttn-account__meta {
		display: none; /* keep just the avatar on very small screens */
	}

	.ttn-account__link {
		padding: 5px;
	}
}
