/**
 * Treethemes Navigation — Expanding pill (Hinte-style morphing MENU panel).
 */

.elementor-widget-treethemes--navigation:has(.tt-pill-nav) {
	overflow: visible;
}

.elementor-widget-treethemes--navigation:has(.tt-pill-nav) .elementor-widget-container {
	overflow: visible;
}

.tt-pill-nav {
	--tt-pill-btn-w: 110px;
	--tt-pill-btn-h: 45px;
	--tt-pill-btn-bg: #ffffff;
	--tt-pill-btn-color: #1d1d1b;
	--tt-pill-btn-radius: 23px;
	--tt-pill-panel-width: 480px;
	--tt-pill-panel-bg: #ffffff;
	--tt-pill-panel-radius: 23px;
	--tt-pill-panel-pad: 28px 36px 32px;
	--tt-pill-item-color: #1d1d1b;
	--tt-pill-item-hover: #1d1d1b;
	--tt-pill-item-size: 40px;
	--tt-pill-item-weight: 800;
	--tt-pill-item-gap: 10px;
	--tt-pill-cta-color: #e30613;
	--tt-pill-social-color: var(--tt-pill-item-color);
	--tt-pill-arrow-width: 48px;
	--tt-pill-arrow-gap: 15px;
	--tt-pill-ease: cubic-bezier(0.76, 0, 0.24, 1);
	--tt-pill-flip-ease: cubic-bezier(0.645, 0.045, 0.355, 1);
	--tt-pill-in-ease: cubic-bezier(0.215, 0.61, 0.355, 1);

	position: relative;
	display: inline-flex;
	align-items: center;
	z-index: 100050;
}

.tt-pill-nav .treethemes-menu-hamburger,
.tt-pill-nav .treethemes-nav-menu-container,
.tt-pill-nav .willows-nav-menu-container,
.tt-pill-nav .roots-nav-menu-container,
.tt-pill-nav .treethemes-menu-overlay {
	display: none !important;
}

/* ─── Trigger ─── */
.tt-pill-nav__trigger {
	position: relative;
	z-index: 20;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--tt-pill-btn-w);
	height: var(--tt-pill-btn-h);
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: var(--tt-pill-btn-radius);
	background: var(--tt-pill-btn-bg);
	color: var(--tt-pill-btn-color);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1;
	cursor: pointer;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
}

/* ─── Flip label ─── */
.tt-pill-nav__flip {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	perspective: 6em;
}

.tt-pill-nav__flip-front,
.tt-pill-nav__flip-back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	transition: transform 0.55s var(--tt-pill-flip-ease), opacity 0.35s linear 0.2s;
}

.tt-pill-nav__flip-front {
	transform-origin: center top;
}

.tt-pill-nav__flip-back {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: rotateX(-90deg) scaleX(0.9) translate3d(0, 10px, 0);
	transform-origin: center bottom;
}

.tt-pill-nav.is-flipped .tt-pill-nav__flip-front {
	opacity: 0;
	transform: rotateX(90deg) scaleX(0.9) translate3d(0, -10px, 0);
}

.tt-pill-nav.is-flipped .tt-pill-nav__flip-back {
	opacity: 1;
	transform: rotateX(0deg) scaleX(1) translateZ(0);
	transition: transform 0.75s var(--tt-pill-flip-ease), opacity 0.35s linear 0.3s;
}

/* ─── Panel ───
   The panel itself scales from the trigger size so overflow clips content
   to the morphing shape. Inner stays full-width and is revealed as it grows. */
.tt-pill-nav__panel {
	position: absolute;
	top: 0;
	right: 0;
	left: auto;
	z-index: 10;
	box-sizing: border-box;
	width: var(--tt-pill-btn-w);
	height: var(--tt-pill-btn-h);
	overflow: hidden;
	pointer-events: none;
	visibility: visible;
	opacity: 0;
	transition:
		width 0.75s var(--tt-pill-ease),
		height 0.75s var(--tt-pill-ease);
}

.tt-pill-nav.tt-pill-nav--left .tt-pill-nav__panel {
	right: auto;
	left: 0;
}

.tt-pill-nav.is-open .tt-pill-nav__panel,
.tt-pill-nav.is-closing .tt-pill-nav__panel {
	visibility: visible;
	opacity: 1;
}

.tt-pill-nav.is-open:not(.is-closing) .tt-pill-nav__panel {
	width: min(var(--tt-pill-panel-width), calc(100vw - 30px));
	height: var(--tt-pill-panel-h, 480px);
}

.tt-pill-nav.is-open-arrow .tt-pill-nav__panel {
	pointer-events: auto;
}

/* ─── Morph shape ─── */
.tt-pill-nav__morph {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	border-radius: var(--tt-pill-panel-radius);
	background: var(--tt-pill-panel-bg);
	pointer-events: none;
}

.tt-pill-nav.tt-pill-nav--left .tt-pill-nav__morph {
	right: auto;
	left: 0;
}

/* ─── Inner content ─── */
.tt-pill-nav__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	padding: var(--tt-pill-panel-pad);
	padding-top: calc(var(--tt-pill-btn-h) + 18px);
	opacity: 1;
	transition: opacity 0.4s ease;
}

.tt-pill-nav.is-closing .tt-pill-nav__inner {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

/* ─── Nav list ─── */
.tt-pill-nav__nav,
.tt-pill-nav__nav .treethemes-nav-menu-nav,
.tt-pill-nav__nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tt-pill-nav__nav > ul > li.menu-item {
	margin: 0;
	padding-top: var(--tt-pill-item-gap);
	list-style: none;
}

.tt-pill-nav__nav > ul > li.menu-item:first-child {
	padding-top: 0;
}

.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a .menu-text,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a .treethemes-nav-inner,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a .treethemes-nav-text,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a .tt-pill-nav__label {
	color: var(--tt-pill-item-color) !important;
}

.tt-pill-nav__nav > ul > li.menu-item > a {
	display: flex;
	align-items: center;
	font-size: var(--tt-pill-item-size);
	font-weight: var(--tt-pill-item-weight);
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	text-decoration: none;
	outline: none;
}

@keyframes tt-pill-item-in {
	from {
		opacity: 0;
		transform: translate3d(0, 18px, 0);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

@keyframes tt-pill-social-in {
	from {
		opacity: 0;
		transform: translate3d(0, 12px, 0);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

@keyframes tt-pill-arrow-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ─── Item text (open / close animation) ─── */
.tt-pill-nav__nav > ul > li.menu-item > a .menu-text,
.tt-pill-nav__nav > ul > li.menu-item > a .treethemes-nav-text,
.tt-pill-nav__nav > ul > li.menu-item > a .tt-pill-nav__label {
	display: inline-block;
	color: inherit;
	max-width: calc(100% - var(--tt-pill-arrow-width) - var(--tt-pill-arrow-gap));
	opacity: 0;
	transform: translate3d(0, 18px, 0);
}

/* Open: stagger in (keyframes so the first open is not skipped while hidden). */
.tt-pill-nav.is-open-instant .tt-pill-nav__nav > ul > li.menu-item > a .menu-text,
.tt-pill-nav.is-open-instant .tt-pill-nav__nav > ul > li.menu-item > a .treethemes-nav-text,
.tt-pill-nav.is-open-instant .tt-pill-nav__nav > ul > li.menu-item > a .tt-pill-nav__label {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	animation: tt-pill-item-in 0.45s ease both;
	animation-delay: calc(var(--tt-pill-index, 0) * 0.07s + 0.12s);
}

.tt-pill-nav__nav .treethemes-nav-text-hover,
.tt-pill-nav__nav .treethemes-submenu-indicator {
	display: none !important;
}

/* ─── Arrow ─── */
.tt-pill-nav__arrow {
	display: flex;
	align-items: center;
	flex: 0 0 var(--tt-pill-arrow-width);
	width: var(--tt-pill-arrow-width);
	height: calc(0.6 * var(--tt-pill-arrow-width));
	margin-right: var(--tt-pill-arrow-gap);
	overflow: hidden;
	opacity: 0;
	box-sizing: content-box;
}

.tt-pill-nav.is-open-arrow .tt-pill-nav__arrow {
	opacity: 1;
	animation: tt-pill-arrow-in 0.01s var(--tt-pill-in-ease) both;
	animation-delay: calc(var(--tt-pill-index, 0) * 0.1s + 0.55s);
}

.tt-pill-nav__arrow-line {
	position: relative;
	display: block;
	width: 100%;
	height: 0.1em;
	margin-left: calc(0px - var(--tt-pill-arrow-width) - var(--tt-pill-arrow-gap));
	background: currentColor;
	transition: margin-left 0.65s var(--tt-pill-in-ease);
}

.tt-pill-nav__arrow-line::before,
.tt-pill-nav__arrow-line::after {
	content: "";
	position: absolute;
	right: 0;
	width: 40%;
	height: 0.1em;
	background: currentColor;
	transform-origin: right center;
}

.tt-pill-nav__arrow-line::before {
	transform: rotate(45deg) translateX(0.05em);
}

.tt-pill-nav__arrow-line::after {
	transform: rotate(-45deg) translateX(0.05em);
}

/* ─── Hover ─── */
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a:hover,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a:hover .menu-text,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a:hover .treethemes-nav-inner,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a:hover .treethemes-nav-text,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__nav > ul > li.menu-item > a:hover .tt-pill-nav__label {
	color: var(--tt-pill-item-hover) !important;
}

.tt-pill-nav__nav > ul > li.menu-item > a:hover .tt-pill-nav__arrow-line {
	margin-left: -0.07em;
}

.tt-pill-nav__nav > ul > li.menu-item > a .tt-pill-nav__arrow + .menu-text,
.tt-pill-nav__nav > ul > li.menu-item > a .tt-pill-nav__arrow + .tt-pill-nav__label,
.tt-pill-nav__nav > ul > li.menu-item > a .tt-pill-nav__arrow + .treethemes-nav-inner {
	margin-left: calc(0px - var(--tt-pill-arrow-width) - var(--tt-pill-arrow-gap));
	transition: margin-left 0.65s var(--tt-pill-in-ease);
}

.tt-pill-nav__nav > ul > li.menu-item > a:hover .tt-pill-nav__arrow + .menu-text,
.tt-pill-nav__nav > ul > li.menu-item > a:hover .tt-pill-nav__arrow + .tt-pill-nav__label,
.tt-pill-nav__nav > ul > li.menu-item > a:hover .tt-pill-nav__arrow + .treethemes-nav-inner {
	margin-left: 0;
}

/* ─── CTA ─── */
.tt-pill-nav__cta {
	margin-top: 18px;
}

.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__cta-link,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__cta-link .tt-pill-nav__label {
	color: var(--tt-pill-cta-color) !important;
}

.tt-pill-nav__cta-link {
	display: flex;
	align-items: center;
	font-size: calc(var(--tt-pill-item-size) * 0.72);
	font-weight: var(--tt-pill-item-weight);
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	text-decoration: none;
}

.tt-pill-nav__cta-link .tt-pill-nav__label {
	display: inline-block;
	opacity: 0;
	transform: translate3d(0, 18px, 0);
}

.tt-pill-nav.is-open-instant .tt-pill-nav__cta-link .tt-pill-nav__label {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	animation: tt-pill-item-in 0.45s ease both;
	animation-delay: calc(var(--tt-pill-index, 0) * 0.07s + 0.12s);
}

.tt-pill-nav__cta-link:hover .tt-pill-nav__arrow-line {
	margin-left: -0.07em;
}

.tt-pill-nav__cta-link .tt-pill-nav__arrow + .tt-pill-nav__label {
	margin-left: calc(0px - var(--tt-pill-arrow-width) - var(--tt-pill-arrow-gap));
	transition: margin-left 0.65s var(--tt-pill-in-ease);
}

.tt-pill-nav__cta-link:hover .tt-pill-nav__arrow + .tt-pill-nav__label {
	margin-left: 0;
}

/* ─── Social ─── */
.tt-pill-nav__social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	list-style: none;
	margin: 28px 0 0;
	padding: 12px 0 0;
}

.tt-pill-nav__social-item {
	flex: 0 0 auto;
}

.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__social-link,
.elementor-widget-treethemes--navigation .tt-pill-nav .tt-pill-nav__social-link .tt-pill-nav__label {
	color: var(--tt-pill-social-color) !important;
}

.tt-pill-nav__social-link {
	position: relative;
	display: inline-block;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.tt-pill-nav__social-link .tt-pill-nav__label {
	display: inline-block;
	opacity: 0;
	transform: translate3d(0, 12px, 0);
}

.tt-pill-nav.is-open-instant .tt-pill-nav__social-link .tt-pill-nav__label {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	animation: tt-pill-social-in 0.4s ease both;
	animation-delay: calc(var(--tt-pill-index, 0) * 0.07s + 0.18s);
}

.tt-pill-nav__social-link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.75s var(--tt-pill-flip-ease);
}

.tt-pill-nav__social-link:hover::after {
	transform: scaleX(1);
}

/* ─── Submenu ─── */
.tt-pill-nav__nav .sub-menu {
	display: none;
	list-style: none;
	margin: 6px 0 4px;
	padding: 0 0 0 8px;
}

.tt-pill-nav__nav li.menu-item.is-submenu-open > .sub-menu {
	display: block;
}

.tt-pill-nav__nav .sub-menu .menu-item > a {
	display: block;
	padding: 4px 0;
	color: var(--tt-pill-item-color) !important;
	font-size: calc(var(--tt-pill-item-size) * 0.42);
	font-weight: 600;
	text-transform: uppercase;
	text-decoration: none;
	opacity: 0.7;
}

.tt-pill-nav__nav .sub-menu .menu-item > a:hover {
	opacity: 1;
}

.tt-pill-nav__nav .treethemes-mega-menu-panel {
	display: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 767px) {
	.tt-pill-nav {
		--tt-pill-panel-width: 100vw;
		--tt-pill-item-size: 28px;
		--tt-pill-arrow-width: 38px;
		--tt-pill-arrow-gap: 10px;
		--tt-pill-panel-pad: 20px 22px 24px;
	}
}
