/**
 * Header + navigation shell.
 */

/* Skip link also here — header.css is always enqueued with the header */
.uw-skip-link {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	text-decoration: none;
	border-radius: 999px;
}

.uw-skip-link:focus,
.uw-skip-link:focus-visible {
	position: fixed;
	top: 0.75rem;
	left: var(--uw-gutter, 1rem);
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1.25rem;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
}

.uw-header,
.uw-header.wp-block-group {
	background: var(--wp--preset--color--white, #ffffff);
	gap: 0;
	/* Beat saved template-part inline margin-bottom:0 */
	margin-bottom: 50px !important;
}

.uw-header__top {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding-block: 1rem;
	padding-inline: var(--uw-gutter, 1rem);
	max-width: var(--uw-container);
	margin-inline: auto;
	width: 100%;
	box-sizing: border-box;
	overflow: visible;
}

.uw-header__logo-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	min-width: 0;
}

.uw-header__logo {
	display: flex;
	align-items: center;
	min-width: 0;
	flex: 1 1 auto;
}

.uw-header__lang-row {
	display: none;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

/* Desktop: language chips sit on the logo row (end) */
@media (min-width: 1024px) {
	.uw-header__top {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: space-between;
	}

	.uw-header__logo-row {
		flex: 1 1 auto;
		min-width: 0;
	}

	.uw-header__lang-row {
		display: block;
		width: auto;
		flex: 0 0 auto;
		margin-left: auto;
	}
}

/* Hamburger — hidden on desktop */
.uw-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0.55rem 0.65rem;
	border: 0;
	border-radius: 10px;
	background: var(--wp--preset--color--ink, #2a3738);
	color: var(--wp--preset--color--sand, #d9c8ac);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.uw-nav-toggle__box {
	position: relative;
	display: block;
	width: 22px;
	height: 16px;
}

.uw-nav-toggle__line {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transition:
		transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.25s ease,
		top 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.uw-nav-toggle__line:nth-child(1) {
	top: 0;
}

.uw-nav-toggle__line:nth-child(2) {
	top: 7px;
}

.uw-nav-toggle__line:nth-child(3) {
	top: 14px;
}

.uw-nav-toggle__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.uw-nav-backdrop {
	display: none;
}

/* In-panel close — desktop hidden */
.uw-nav-panel__head {
	display: none;
}

.uw-nav-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--wp--preset--color--sand, #d9c8ac);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.uw-nav-close__icon {
	position: relative;
	display: block;
	width: 18px;
	height: 18px;
}

.uw-nav-close__icon::before,
.uw-nav-close__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
}

.uw-nav-close__icon::before {
	transform: translateY(-50%) rotate(45deg);
}

.uw-nav-close__icon::after {
	transform: translateY(-50%) rotate(-45deg);
}

/* Desktop logo box — mobile sizing later */
.uw-header__logo img,
.uw-header__logo-image img {
	display: block;
	width: auto;
	height: auto;
	max-width: 300px;
	max-height: 100px;
	object-fit: contain;
}

.uw-header__nav-bar {
	background: transparent;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.uw-header > .uw-header__nav-bar,
.uw-header.wp-block-group > .uw-header__nav-bar,
.uw-header .uw-primary-nav,
.uw-header__nav-bar .uw-primary-nav,
.uw-header__nav-bar nav {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}

/* Navigation element itself is the full-bleed ink bar (compact height) */
.uw-header__nav-bar .wp-block-navigation.uw-primary-nav,
.uw-header__nav-bar .uw-primary-nav {
	display: flex;
	justify-content: center;
	align-items: stretch;
	width: 100%;
	max-width: none;
	margin: 0;
	margin-inline: 0;
	padding-block: 0;
	min-height: 0;
	background: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--fraunces, "Fraunces", Georgia, serif);
	font-style: normal;
	font-weight: 600;
	font-size: 20px;
	line-height: 25px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sand, #d9c8ac);
}

.uw-header__nav-bar .wp-block-navigation__container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: var(--uw-container);
	width: 100%;
}

.uw-header__nav-bar .wp-block-navigation__container > li {
	display: flex;
	margin: 0;
}

.uw-header__nav-bar .uw-primary-nav__empty {
	margin: 0;
	padding: 0.75rem 1rem;
	color: var(--wp--preset--color--sand);
	font-size: 0.875rem;
	text-transform: none;
	letter-spacing: normal;
	font-weight: 400;
}

.uw-header__nav-bar .uw-primary-nav__empty a {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
}

@media (min-width: 1024px) {
	.uw-header__nav-bar .wp-block-navigation .wp-block-navigation-item__content,
	.uw-header__nav-bar .wp-block-navigation a {
		padding-inline: 0;
	}

	.uw-header__nav-bar .wp-block-navigation__container {
		flex-wrap: nowrap;
		justify-content: center;
		padding-inline: var(--uw-gutter, 1rem);
	}
}

/* Compact horizontal nav — fits without wrapping */
@media (min-width: 1024px) and (max-width: 1199px) {
	.uw-header__logo img,
	.uw-header__logo-image img {
		max-width: 220px;
		max-height: 72px;
	}

	.uw-header__nav-bar .wp-block-navigation.uw-primary-nav,
	.uw-header__nav-bar .uw-primary-nav {
		font-size: 15px;
		line-height: 1.2;
		letter-spacing: 0.02em;
	}

	.uw-header__nav-bar .wp-block-navigation,
	.uw-header__nav-bar .wp-block-navigation__container {
		gap: 12px;
	}

	.uw-header__nav-bar .wp-block-navigation .wp-block-navigation-item__content,
	.uw-header__nav-bar .wp-block-navigation a {
		padding: 14px 0.35rem;
	}

	.uw-header__nav-bar .wp-block-navigation li:not(.current-menu-item):not(.current_page_item) > a:hover::after,
	.uw-header__nav-bar .wp-block-navigation li:not(.current-menu-item):not(.current_page_item) > a:focus-visible::after {
		width: calc(100% - 0.5rem);
	}
}

@media (min-width: 1200px) and (max-width: 1440px) {
	.uw-header__nav-bar .wp-block-navigation.uw-primary-nav,
	.uw-header__nav-bar .uw-primary-nav {
		font-size: 17px;
		line-height: 1.25;
	}

	.uw-header__nav-bar .wp-block-navigation,
	.uw-header__nav-bar .wp-block-navigation__container {
		gap: 15px;
	}

	.uw-header__nav-bar .wp-block-navigation .wp-block-navigation-item__content,
	.uw-header__nav-bar .wp-block-navigation a {
		padding: 15px 0.4rem;
	}
}

@media (min-width: 1441px) and (max-width: 1680px) {
	.uw-header__nav-bar .wp-block-navigation,
	.uw-header__nav-bar .wp-block-navigation__container {
		gap: 25px;
	}
}

@media (min-width: 1681px) {
	.uw-header__nav-bar .wp-block-navigation,
	.uw-header__nav-bar .wp-block-navigation__container {
		gap: 30px;
	}
}

.uw-header__nav-bar .wp-block-navigation .wp-block-navigation-item__content,
.uw-header__nav-bar .wp-block-navigation a {
	position: relative;
	z-index: 0;
	display: flex;
	align-items: center;
	isolation: isolate;
	font-family: inherit;
	font-style: inherit;
	font-weight: inherit;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: var(--wp--preset--color--sand, #d9c8ac);
	padding: 17px 1rem;
	text-decoration: none;
	overflow: hidden;
	transition: color 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.uw-header__nav-bar .wp-block-navigation a:hover,
.uw-header__nav-bar .wp-block-navigation a:focus,
.uw-header__nav-bar .wp-block-navigation a:active {
	text-decoration: none;
}

/* ::before reserved for active mist tab only */

/* Hairline that blooms from the optical center */
.uw-header__nav-bar .wp-block-navigation a::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 10px;
	width: 0;
	height: 1px;
	z-index: -1;
	background: color-mix(in srgb, var(--wp--preset--color--sand, #d9c8ac) 70%, white);
	transform: translateX(-50%);
	opacity: 0;
	pointer-events: none;
	transition:
		width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.35s ease;
}

/* Inactive (including has-sand-color utility) */
.uw-header__nav-bar .wp-block-navigation.has-sand-color .wp-block-navigation-item__content,
.uw-header__nav-bar .wp-block-navigation.has-sand-color a {
	color: var(--wp--preset--color--sand, #d9c8ac);
	text-decoration: none;
}

.uw-header__nav-bar .wp-block-navigation li:not(.current-menu-item):not(.current_page_item) > a:hover,
.uw-header__nav-bar .wp-block-navigation li:not(.current-menu-item):not(.current_page_item) > a:focus-visible {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.uw-header__nav-bar .wp-block-navigation li:not(.current-menu-item):not(.current_page_item) > a:hover::after,
.uw-header__nav-bar .wp-block-navigation li:not(.current-menu-item):not(.current_page_item) > a:focus-visible::after {
	width: calc(100% - 1.5rem);
	opacity: 1;
}

/* Active mist tab lives on ::before so it can animate in without scaling text */
.uw-header__nav-bar .wp-block-navigation .current-menu-item > a,
.uw-header__nav-bar .wp-block-navigation .current_page_item > a,
.uw-header__nav-bar .wp-block-navigation.has-sand-color .current-menu-item > a,
.uw-header__nav-bar .wp-block-navigation.has-sand-color .current_page_item > a,
.uw-header__nav-bar .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.uw-header__nav-bar .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	background: transparent;
	color: #2a3738 !important;
	text-decoration: none;
	overflow: hidden;
	letter-spacing: 0.03em;
}

.uw-header__nav-bar .wp-block-navigation .current-menu-item > a::before,
.uw-header__nav-bar .wp-block-navigation .current_page_item > a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--wp--preset--color--mist);
	pointer-events: none;
	animation: uw-nav-active-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.uw-header__nav-bar .wp-block-navigation .current-menu-item > a::after,
.uw-header__nav-bar .wp-block-navigation .current_page_item > a::after {
	content: none;
	display: none;
}

.uw-header__nav-bar .wp-block-navigation .current-menu-item > a:hover,
.uw-header__nav-bar .wp-block-navigation.has-sand-color .current-menu-item > a:hover,
.uw-header__nav-bar .wp-block-navigation .current_page_item > a:hover {
	color: #2a3738 !important;
	text-decoration: none;
}

@keyframes uw-nav-active-in {
	0% {
		opacity: 0;
		clip-path: inset(0 48% 0 48%);
		transform: scaleY(0.65);
	}
	55% {
		opacity: 1;
		clip-path: inset(0 0 0 0);
		transform: scaleY(1.04);
	}
	100% {
		opacity: 1;
		clip-path: inset(0 0 0 0);
		transform: scaleY(1);
	}
}

/* —— Hamburger / off-canvas (< desktop) —— */
@media (max-width: 1023px) {
	.uw-nav-toggle {
		display: inline-flex;
		position: relative;
		z-index: 1002;
	}

	.uw-header__nav-bar {
		/* Panel lives fixed; bar itself collapses */
		height: 0;
		overflow: visible;
	}

	.uw-nav-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 1000;
		background: rgba(42, 55, 56, 0.45);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.35s ease;
	}

	.uw-nav-backdrop.is-visible {
		opacity: 1;
		pointer-events: auto;
	}

	.uw-header__nav-bar .wp-block-navigation.uw-primary-nav,
	.uw-header__nav-bar .uw-primary-nav {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: auto;
		z-index: 1001;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		/* inset left/right only — width:100% + padding overflows the viewport */
		width: auto;
		max-width: 100%;
		max-height: min(85vh, 640px);
		margin: 0;
		padding: 1rem var(--uw-gutter, 1.25rem) 1.5rem;
		box-sizing: border-box;
		background: var(--wp--preset--color--ink, #2a3738);
		font-size: 18px;
		line-height: 1.25;
		border-radius: 0 0 16px 16px;
		transform: translateY(-110%);
		visibility: hidden;
		transition:
			transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
			visibility 0.4s;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		box-shadow: 0 16px 40px rgba(42, 55, 56, 0.28);
	}

	.uw-header__nav-bar .uw-primary-nav.is-open {
		transform: translateY(0);
		visibility: visible;
	}

	.uw-header__nav-bar .uw-primary-nav *,
	.uw-header__nav-bar .uw-primary-nav *::before,
	.uw-header__nav-bar .uw-primary-nav *::after {
		box-sizing: border-box;
		max-width: 100%;
	}

	.uw-nav-panel__head {
		display: flex;
		justify-content: flex-end;
		align-items: center;
		flex-shrink: 0;
		margin: 0 0 1.25rem;
	}

	.uw-header__nav-bar .wp-block-navigation__container {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0.25rem;
		width: 100%;
		max-width: 100%;
		margin: 0;
		padding: 0;
	}

	.uw-header__nav-bar .wp-block-navigation__container > li {
		display: block;
		width: 100%;
		max-width: 100%;
		margin: 0;
	}

	.uw-header__nav-bar .wp-block-navigation .wp-block-navigation-item__content,
	.uw-header__nav-bar .wp-block-navigation a {
		width: 100%;
		max-width: 100%;
		padding: 0.95rem 1rem;
		justify-content: flex-start;
	}

	body.uw-nav-open,
	html.uw-nav-open {
		overflow-x: hidden;
	}

	.uw-header__nav-bar .wp-block-navigation .current-menu-item > a,
	.uw-header__nav-bar .wp-block-navigation .current_page_item > a {
		border-radius: 10px;
	}

	.uw-header__nav-bar .wp-block-navigation .current-menu-item > a::before,
	.uw-header__nav-bar .wp-block-navigation .current_page_item > a::before {
		border-radius: 10px;
	}

	.uw-header__nav-bar .wp-block-navigation a::after {
		bottom: 0.65rem;
	}

	body.uw-nav-open {
		overflow: hidden;
	}

	/* Hamburger lives in the header — hide it while the drawer is open */
	body.uw-nav-open .uw-nav-toggle {
		visibility: hidden;
		pointer-events: none;
	}
}

@media (max-width: 1023px) {
	/*
	 * [ Logo …………… ] [ ☰ ]
	 * [ Language full-width dropdown ]
	 */
	.uw-header,
	.uw-header.wp-block-group {
		overflow: visible;
	}

	.uw-header__top {
		gap: 0.75rem;
		padding-block: 0.85rem;
		overflow: visible;
	}

	.uw-header__logo-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
	}

	.uw-header__logo img,
	.uw-header__logo-image img {
		max-width: 100%;
		max-height: 64px;
		width: auto;
		height: auto;
	}

	.uw-nav-toggle {
		flex: 0 0 auto;
		padding: 0.6rem 0.7rem;
	}
}

@media (max-width: 781px) {
	.uw-header,
	.uw-header.wp-block-group {
		margin-bottom: 24px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.uw-header__nav-bar .wp-block-navigation a,
	.uw-header__nav-bar .wp-block-navigation a::before,
	.uw-header__nav-bar .wp-block-navigation a::after {
		transition: none !important;
		animation: none !important;
	}

	.uw-header__nav-bar .wp-block-navigation .current-menu-item > a::before,
	.uw-header__nav-bar .wp-block-navigation .current_page_item > a::before {
		clip-path: none;
		transform: none;
		opacity: 1;
	}
}
