/* Camada 3 — header preta; busca; fixação. */
.tre-masthead {
	position: relative;
	z-index: 30;
	background: var(--tre-header-bg);
	color: #fff;
	border-bottom: 4px solid var(--tre-primary);
}

.tre-masthead__in {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 92px;
}

.tre-masthead__left {
	display: flex;
	align-items: center;
	padding-right: 16px;
	border-right: 1px solid rgba(255, 255, 255, .22);
	align-self: stretch;
}

.tre-hamb {
	color: #fff;
	margin-left: -9px;
}

.tre-hamb:hover {
	background: rgba(255, 255, 255, .1);
}

.tre-masthead__brand {
	flex: none;
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.tre-brand {
	margin: 0;
	font-size: inherit;
	line-height: 0;
}

.tre-brand__mobile {
	display: none;
}

.tre-logo {
	display: inline-flex;
	align-items: center;
	color: #fff;
	line-height: 1;
}

.tre-logo__img {
	height: auto;
	object-fit: contain;
}

.tre-logo__img--dark {
	display: none;
}

html[data-theme="dark"] .tre-logo__img--light {
	display: none;
}

html[data-theme="dark"] .tre-logo__img--dark {
	display: block;
}

.tre-logo__text {
	font-family: var(--tre-font-heading);
	font-weight: 900;
	font-size: 32px;
	letter-spacing: -.03em;
	line-height: 1;
	white-space: nowrap;
}

.tre-logo--mobile .tre-logo__text {
	font-size: 22px;
}

.tre-logo--footer {
	color: var(--tre-heading);
}

.tre-logo--footer .tre-logo__text {
	white-space: normal;
	font-size: 30px;
}

.tre-wpill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 13px 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	line-height: 1;
}

.tre-wpill b {
	display: block;
	font-size: 15px;
	font-weight: 800;
}

.tre-wpill small {
	display: block;
	margin-top: 2px;
	font-size: 8.5px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #d1d5db;
	max-width: 80px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Espaço institucional. */
.tre-hdrad {
	flex: 1;
	min-width: 0;
	max-width: 620px;
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 76px;
	padding: 10px 18px 10px 20px;
	border-radius: 4px;
	background: linear-gradient(100deg, #2b1d3b 0%, #5b1530 45%, var(--tre-primary) 100%);
	color: #fff;
	overflow: hidden;
}

.tre-hdrad:hover {
	color: #fff;
}

.tre-hdrad--img,
.tre-hdrad--code {
	padding: 0;
	background: none;
	justify-content: center;
}

.tre-hdrad__img {
	max-height: 90px;
	width: auto;
}

.tre-hdrad__name {
	flex: 0 1 auto;
	max-width: 34%;
	overflow: hidden;
	text-overflow: ellipsis;
	font-family: var(--tre-font-heading);
	font-size: 20px;
	font-weight: 900;
	letter-spacing: -.02em;
	white-space: nowrap;
}

.tre-hdrad__logo img {
	max-height: 40px;
	width: auto;
}

.tre-hdrad__text {
	flex: 1;
	min-width: 0;
	line-height: 1.2;
}

.tre-hdrad__text small,
.tre-hdrad__text strong {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tre-hdrad__text small {
	font-size: 13px;
	opacity: .9;
}

.tre-hdrad__text strong {
	font-family: var(--tre-font-heading);
	font-size: 19px;
	font-weight: 900;
}

.tre-hdrad__btn {
	flex: none;
	padding: 9px 16px;
	border-radius: 999px;
	background: #fff;
	color: #111827;
	font-family: var(--tre-font-heading);
	font-size: 14px;
	font-weight: 800;
}

.tre-masthead__right {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.tre-hdrad + .tre-masthead__right {
	margin-left: 0;
}

.tre-searchbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: var(--tre-primary);
	color: #fff;
}

.tre-searchbtn:hover {
	background: var(--tre-primary-hover);
}

.tre-mode {
	color: #fff;
}

.tre-mode:hover {
	background: rgba(255, 255, 255, .1);
}

.tre-mode__moon,
html[data-theme="dark"] .tre-mode__sun {
	display: none;
}

html[data-theme="dark"] .tre-mode__moon {
	display: inline-flex;
}

.tre-mode--text {
	align-self: flex-start;
	color: var(--tre-heading);
}

.tre-mode--text span {
	align-items: center;
	gap: 6px;
}

.tre-mode--text .tre-mode__sun {
	display: none;
}

.tre-mode--text .tre-mode__moon {
	display: inline-flex;
}

html[data-theme="dark"] .tre-mode--text .tre-mode__sun {
	display: inline-flex;
}

html[data-theme="dark"] .tre-mode--text .tre-mode__moon {
	display: none;
}

/* Busca. */
.tre-searchpanel {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 210;
	padding: 22px 0;
	background: var(--tre-header-bg);
	border-bottom: 4px solid var(--tre-primary);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}

.tre-searchpanel__in {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tre-searchpanel .tre-searchform {
	flex: 1;
}

.tre-searchpanel__close {
	color: #fff;
	background: rgba(255, 255, 255, .12);
}

.tre-searchpanel__close:hover {
	background: var(--tre-primary);
}

.tre-searchform {
	position: relative;
	display: flex;
}

.tre-searchform__input {
	width: 100%;
	min-height: 48px;
	padding: 10px 56px 10px 18px;
	border: 2px solid var(--tre-border);
	border-radius: 999px;
	background: var(--tre-surface);
	color: var(--tre-text);
	font-size: 16px;
}

.tre-searchform__input:focus {
	outline: none;
	border-color: var(--tre-primary);
	box-shadow: var(--tre-focus);
}

.tre-searchform__btn {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: var(--tre-primary);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Fixação ao rolar (sem cobrir o início da notícia: o fluxo continua reservado). */
.tre-sticky-header .tre-masthead,
.tre-sticky-menu .tre-nav,
.tre-sticky-both .tre-nav,
.tre-sticky-both .tre-masthead {
	position: sticky;
}

.tre-sticky-header .tre-masthead,
.tre-sticky-menu .tre-nav,
.tre-sticky-both .tre-nav {
	top: 0;
	z-index: 60;
}

.tre-sticky-both .tre-masthead {
	top: 34px;
	z-index: 59;
}

.admin-bar.tre-sticky-header .tre-masthead,
.admin-bar.tre-sticky-menu .tre-nav,
.admin-bar.tre-sticky-both .tre-nav {
	top: 32px;
}

.admin-bar.tre-sticky-both .tre-masthead {
	top: 66px;
}

html:has(body.tre-sticky-header),
html:has(body.tre-sticky-menu),
html:has(body.tre-sticky-both) {
	scroll-padding-top: 140px;
}
