/**
 * Header — normal no topo; glass fixo após scroll.
 */

 .utf-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 200;
	width: 100%;
	color: #fff;
}

.admin-bar .utf-header {
	top: 32px;
}

/* —— Estado normal (topo) —— */
.utf-header__dock {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--utf-site-max);
	margin-inline: auto;
	padding-inline: var(--utf-content-padding);
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
}

.utf-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: var(--header-height, 72px);
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	transition:
		background 0.35s ease,
		border-radius 0.35s ease,
		box-shadow 0.35s ease,
		padding 0.35s ease,
		backdrop-filter 0.35s ease;
}

body.utf-is-home .utf-header:not(.is-scrolled) {
	position: absolute;
	background: transparent;
}

body:not(.utf-is-home) .utf-header:not(.is-scrolled) {
	background: var(--utf-dark);
}

.utf-header:not(.is-scrolled) .utf-header__nav {
	flex: 1;
	justify-content: flex-end;
}

.utf-header:not(.is-scrolled) .utf-header__logo {
	height: 48px;
	max-width: 140px;
}

.utf-header:not(.is-scrolled) .utf-header__menu a {
	font-size: 0.95rem;
}

.utf-header:not(.is-scrolled) .utf-header__cta {
	display: none;
}

.utf-header:not(.is-scrolled) .utf-header__toggle {
	border-color: rgba(255, 255, 255, 0.35);
	border-radius: 4px;
	background: transparent;
}

/* —— Estado glass (scroll) —— */
.utf-header.is-scrolled {
	position: fixed;
	padding: 0.65rem var(--utf-content-padding);
	background: transparent;
	pointer-events: none;
}

.utf-header.is-scrolled .utf-header__dock {
	pointer-events: auto;
}

.utf-header.is-scrolled .utf-header__bar {
	min-height: 64px;
	padding: 0.45rem 0.45rem 0.45rem 1.1rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	background: rgba(62, 43, 35, 0.72);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	box-shadow:
		0 12px 40px rgba(0, 0, 0, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.utf-header.is-scrolled .utf-header__nav {
	flex: 1;
	justify-content: center;
}

.utf-header.is-scrolled .utf-header__logo {
	height: 40px;
	max-width: 120px;
}

.utf-header.is-scrolled .utf-header__menu a {
	font-size: 0.92rem;
}

.utf-header.is-scrolled .utf-header__cta {
	display: inline-flex;
}

.utf-header__brand {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	text-decoration: none;
}

.utf-header__logo {
	display: block;
	width: auto;
}

.utf-header__site-name {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
}

.utf-header__toggle {
	display: none;
	flex-shrink: 0;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	cursor: pointer;
}

.utf-header__toggle-bar {
	display: block;
	width: 20px;
	height: 2px;
	margin-inline: auto;
	background: currentColor;
}

.utf-header__nav {
	display: flex;
	align-items: center;
	min-width: 0;
}

.utf-header__menu,
.utf-header__menu ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(1rem, 2.5vw, 2.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.utf-header__menu a {
	color: #fff;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.utf-header__menu a:hover,
.utf-header__menu .current-menu-item > a,
.utf-header__menu .current-menu-ancestor > a {
	color: var(--utf-accent);
}

.utf-header__menu .sub-menu {
	display: none;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0.5rem 0 0;
	padding: 0 0 0 1rem;
	list-style: none;
}

.utf-header__menu li:hover > .sub-menu,
.utf-header__menu li:focus-within > .sub-menu {
	display: flex;
}

.utf-header__cta {
	display: none;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 1.35rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	background: rgb(255 255 255 / 20%);
	color: #fff;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease;
}

.utf-header__cta:hover {
	background: rgb(255 255 255 / 40%);
	color: #ffffff;
}

@media (max-width: 999px) {
	.utf-header__toggle {
		display: inline-flex;
	}

	.utf-header__nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		flex: none;
		justify-content: flex-start;
		padding: 1rem var(--utf-content-padding) 1.25rem;
		background: var(--utf-dark);
		border-top: 1px solid rgba(255, 255, 255, 0.12);
	}

	.utf-header.is-scrolled .utf-header__nav {
		top: calc(100% + 0.5rem);
		padding: 1rem 1.1rem 1.15rem;
		border: 1px solid rgba(255, 255, 255, 0.15);
		border-radius: 10px;
		border-top: none;
		background: rgba(62, 43, 35, 0.95);
		backdrop-filter: blur(18px);
		-webkit-backdrop-filter: blur(18px);
	}

	.utf-header__bar {
		position: relative;
		flex-wrap: wrap;
	}

	.utf-header.is-open .utf-header__nav {
		display: block;
	}

	.utf-header__menu,
	.utf-header__menu ul {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.85rem;
	}

	.utf-header__menu .sub-menu {
		display: flex;
	}
}

@media (max-width: 782px) {
	.admin-bar .utf-header {
		top: 46px;
	}
}
