/* Portal Editorial OP — cabeçalho, barra de editorias, busca, ticker e menu lateral. */

.peop-header {
	position: relative;
	z-index: 50;
	background: var(--peop-header-bg);
	color: var(--peop-header-text);
}

.peop-has-sticky .peop-header {
	position: sticky;
	top: 0;
}

.admin-bar.peop-has-sticky .peop-header {
	top: 32px;
}

.peop-header.is-scrolled {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Faixa da logo: grade 1fr | auto | 1fr = logo realmente centralizada */
.peop-topbar {
	border-bottom: 1px solid var(--peop-border);
	background: var(--peop-header-bg);
}

.peop-topbar__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	min-height: var(--peop-header-h);
}

.peop-topbar__left {
	display: flex;
	align-items: center;
	justify-self: start;
	margin-left: -8px;
}

.peop-topbar__right {
	display: flex;
	align-items: center;
	justify-self: end;
	gap: 10px;
	min-width: 0;
}

.peop-brand {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: 0;
	text-align: center;
}

.peop-brand__mobile {
	display: none;
}

.peop-logo--desktop .peop-logo__img {
	width: var(--peop-logo-desktop-w);
}

:root[data-theme="dark"] .peop-logo--desktop .peop-logo__img {
	width: var(--peop-logo-desktop-w-dark);
}

.peop-logo--mobile .peop-logo__img {
	width: var(--peop-logo-mobile-w);
}

:root[data-theme="dark"] .peop-logo--mobile .peop-logo__img {
	width: var(--peop-logo-mobile-w-dark);
}

.peop-login {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 4px;
	color: var(--peop-header-text);
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.peop-login:hover {
	color: var(--peop-header-text);
	text-decoration: underline;
}

.peop-cta {
	min-height: 32px;
	padding: 5px 12px;
	font-size: 17px;
	white-space: nowrap;
}

/* Alternância claro/noturno: lua no modo claro, sol no noturno */
.peop-theme-toggle__moon,
.peop-theme-toggle__sun {
	display: inline-flex;
}

:root:not([data-theme="dark"]) .peop-theme-toggle__sun,
:root[data-theme="dark"] .peop-theme-toggle__moon {
	display: none;
}

/* Busca do cabeçalho: abre por cima da faixa, sem deslocar a logo */
.peop-searchbar {
	position: absolute;
	top: 0;
	right: var(--peop-gutter);
	bottom: 0;
	left: calc(var(--peop-gutter) + 44px);
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--peop-header-bg);
}

.peop-searchbar .peop-search-form {
	flex: 1;
	max-width: 760px;
	margin-inline: auto;
}

/* Barra de editorias */
.peop-nav {
	border-bottom: 1px solid var(--peop-border);
	background: var(--peop-nav-bg);
}

.peop-nav__scroller {
	display: flex;
	justify-content: center;
}

.peop-nav__menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 48px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.peop-nav__menu > li {
	position: relative;
	display: flex;
	align-items: center;
}

.peop-nav__menu a {
	display: block;
	padding: 12px 0;
	color: var(--peop-nav-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 24px;
	text-decoration: none;
	white-space: nowrap;
}

.peop-nav__menu a:hover,
.peop-nav__menu .current-menu-item > a,
.peop-nav__menu .current-menu-ancestor > a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.peop-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 60;
	display: none;
	min-width: 220px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	transform: translateX(-50%);
	border: 1px solid var(--peop-border);
	border-radius: 6px;
	background: var(--peop-header-bg);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.peop-nav li:hover > .sub-menu,
.peop-nav li:focus-within > .sub-menu,
.peop-nav li.is-open > .sub-menu {
	display: block;
}

.peop-nav .sub-menu a {
	padding: 8px 16px;
	font-size: 16px;
	font-weight: 600;
	white-space: normal;
}

.peop-subtoggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin-left: 2px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--peop-nav-text);
	cursor: pointer;
}

.peop-subtoggle[aria-expanded="true"] .peop-icon {
	transform: rotate(180deg);
}

/* Ticker */
.peop-ticker {
	background: var(--peop-ticker-bg);
	color: var(--peop-ticker-text);
}

.peop-ticker__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 40px;
}

.peop-ticker__label {
	flex: none;
	padding: 4px 8px;
	border-radius: 3px;
	background: var(--peop-accent);
	color: var(--peop-accent-text);
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.peop-ticker__viewport {
	position: relative;
	flex: 1;
	min-width: 0;
	overflow: hidden;
}

.peop-ticker__track {
	display: flex;
	gap: 48px;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
}

.peop-ticker__item a {
	color: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.peop-ticker__item a:hover {
	color: inherit;
	text-decoration: underline;
}

.peop-ticker.is-animated .peop-ticker__track {
	animation: peop-ticker var(--peop-ticker-duration, 40s) linear infinite;
	will-change: transform;
}

.peop-ticker.is-paused .peop-ticker__track,
.peop-ticker:focus-within .peop-ticker__track,
.peop-ticker.pause-on-hover:hover .peop-ticker__track {
	animation-play-state: paused;
}

.peop-ticker.is-static .peop-ticker__viewport {
	overflow-x: auto;
}

.peop-ticker__pause {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.peop-ticker__play-icon,
.peop-ticker.is-paused .peop-ticker__pause-icon {
	display: none;
}

.peop-ticker.is-paused .peop-ticker__play-icon {
	display: inline-flex;
}

@keyframes peop-ticker {
	from {
		transform: translate3d(0, 0, 0);
	}

	to {
		transform: translate3d(var(--peop-ticker-distance, -50%), 0, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.peop-ticker .peop-ticker__track {
		animation: none !important;
	}

	.peop-ticker .peop-ticker__viewport {
		overflow-x: auto;
	}
}

/* Menu lateral (da esquerda para a direita) */
.peop-offcanvas {
	position: fixed;
	inset: 0;
	z-index: 1000;
}

.admin-bar .peop-offcanvas {
	top: 32px;
}

.peop-offcanvas__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.peop-offcanvas__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: min(380px, 88vw);
	padding: 12px 20px 32px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--peop-bg);
	color: var(--peop-text);
	box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
	transform: translateX(-100%);
	transition: transform 0.28s ease;
}

.peop-offcanvas__panel:focus {
	outline: none;
}

.peop-offcanvas.is-open .peop-offcanvas__overlay {
	opacity: 1;
}

.peop-offcanvas.is-open .peop-offcanvas__panel {
	transform: none;
}

html.peop-lock,
html.peop-lock body {
	overflow: hidden;
}

.peop-offcanvas__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.peop-offcanvas__title {
	margin: 0;
	color: var(--peop-title);
	font-size: 22px;
	font-weight: 800;
}

.peop-offcanvas__close {
	color: var(--peop-title);
}

.peop-offcanvas__menu,
.peop-offcanvas__menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.peop-offcanvas__menu li {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	border-bottom: 1px solid var(--peop-border);
}

.peop-offcanvas__menu a {
	flex: 1;
	min-width: 0;
	padding: 12px 0;
	color: var(--peop-primary-dark);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.peop-offcanvas__menu .current-menu-item > a {
	text-decoration: underline;
	text-underline-offset: 5px;
}

.peop-offcanvas__menu .sub-menu {
	display: none;
	flex-basis: 100%;
	padding-left: 16px;
}

.peop-offcanvas__menu li.is-open > .sub-menu {
	display: block;
}

.peop-offcanvas__menu .sub-menu li:last-child {
	border-bottom: 0;
}

.peop-offcanvas__menu .sub-menu a {
	font-size: 17px;
	font-weight: 600;
}

.peop-offcanvas__menu .peop-subtoggle {
	width: 44px;
	height: 44px;
	color: var(--peop-primary-dark);
}

.peop-offcanvas__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.peop-theme-toggle--text {
	gap: 8px;
}

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