/* Topbar, masthead, menu, offcanvas, busca, ticker */
.pe-topbar { background: var(--pe-topbar-bg); color: var(--pe-topbar-color); min-height: var(--pe-topbar-h); }
.pe-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--pe-topbar-h); }
.pe-topbar__menu { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; }
.pe-topbar__menu a, .pe-topbar__menu span {
	font-family: var(--pe-font-menu); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--pe-topbar-color);
}
.pe-topbar__menu a:hover { color: var(--pe-primary); }

.pe-socials { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.pe-social {
	display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
	background: #555; color: #fff; transition: transform 0.15s, opacity 0.15s;
}
.pe-social:hover { color: #fff; transform: translateY(-1px); opacity: 0.9; }
.pe-social--facebook { background: #3b5998; }
.pe-social--x { background: #14171a; }
.pe-social--instagram { background: #c13584; }
.pe-social--youtube { background: #e52d27; }
.pe-social--tiktok { background: #1b1b1f; }
.pe-social--pinterest { background: #e60023; }
.pe-social--whatsapp { background: #25a244; }
.pe-social--telegram { background: #229ed9; }
.pe-social--linkedin { background: #0a66c2; }

/* Masthead */
.pe-masthead { background: var(--pe-header-bg); position: relative; z-index: 50; }
.pe-masthead__row {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 16px;
	padding-block: var(--pe-header-pad);
}
.pe-masthead__left { display: flex; align-items: center; justify-self: start; min-width: 0; }
.pe-masthead__right { display: flex; align-items: center; justify-self: end; min-width: 0; }
.pe-brand { margin: 0; justify-self: center; text-align: center; min-width: 0; }
.pe-brand__link { display: inline-block; line-height: 0; max-width: 100%; }
.pe-brand__link:hover { color: inherit; }
.pe-logos { display: block; line-height: 0; }
.pe-logo { display: block; max-width: 100%; height: auto; object-fit: contain; }
.pe-brand--desktop .pe-logo { width: var(--pe-logo-w); }
.pe-brand--mobile { display: none; }
.pe-brand--mobile .pe-logo { width: var(--pe-logo-wm); }
.pe-logos--both .pe-logo--dark { display: none; }
html[data-theme="dark"] .pe-logos--both .pe-logo--light { display: none; }
html[data-theme="dark"] .pe-logos--both .pe-logo--dark { display: block; }
.pe-logo-text { font-family: var(--pe-font-heading); font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--pe-text); }

.pe-iconbtn {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
	background: transparent; border: 0; color: var(--pe-text); cursor: pointer; border-radius: 50%;
}
.pe-iconbtn:hover { color: var(--pe-primary); }
.pe-burger { display: none; margin-left: -10px; }
.pe-mode__sun { display: none; }
html[data-theme="dark"] .pe-mode__sun { display: inline-flex; }
html[data-theme="dark"] .pe-mode__moon { display: none; }
.pe-mode--mob { display: none; }
.pe-masthead__actions { display: none; }

/* Busca */
.pe-searchform { display: flex; align-items: stretch; border: 1px solid var(--pe-border-strong); background: var(--pe-input-bg); width: 100%; }
.pe-searchform__field {
	flex: 1; min-width: 0; border: 0; background: transparent; color: var(--pe-text); padding: 9px 12px;
	font-family: var(--pe-font-body); font-size: 13px; outline: 0; border-radius: 0; -webkit-appearance: none; appearance: none;
}
.pe-searchform__field::placeholder { color: #9a9aa3; opacity: 1; }
.pe-searchform__field::-webkit-search-cancel-button { display: none; }
.pe-searchform:focus-within { border-color: var(--pe-primary); }
.pe-searchform__submit {
	display: inline-flex; align-items: center; justify-content: center; width: 40px; border: 0; background: transparent;
	color: var(--pe-text); cursor: pointer; padding: 0;
}
.pe-searchform__submit:hover { color: var(--pe-primary); }
.pe-search-desk { width: 190px; }
.pe-msearch { border-top: 1px solid var(--pe-border); padding: 10px 0; background: var(--pe-header-bg); }
.pe-msearch[hidden] { display: none; }

/* Menu principal (desktop) */
.pe-nav { background: var(--pe-header-bg); border-bottom: 1px solid var(--pe-border); position: relative; z-index: 49; }
.pe-nav .pe-menu { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; margin: 0; padding: 0; }
.pe-nav .pe-menu > li { position: relative; display: flex; align-items: center; }
.pe-nav .pe-menu a {
	display: block; padding: 14px 10px; font-family: var(--pe-font-menu); font-size: 13px; font-weight: 500;
	letter-spacing: 0.02em; text-transform: uppercase; color: var(--pe-text); white-space: nowrap;
}
.pe-nav .pe-menu > li > a:hover,
.pe-nav .pe-menu > li.current-menu-item > a,
.pe-nav .pe-menu > li.current-menu-ancestor > a,
.pe-nav .pe-menu > li.current_page_item > a { color: var(--pe-primary); }
.pe-sub-toggle {
	display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 28px; margin-left: -8px; padding: 0;
	background: transparent; border: 0; color: inherit; cursor: pointer;
}
.pe-sub-toggle svg { transition: transform 0.2s; }
.pe-sub-toggle:hover { color: var(--pe-primary); }
.pe-nav .pe-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: 0; min-width: 230px; z-index: 60;
	background: var(--pe-surface); border: 1px solid var(--pe-border); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.pe-nav .pe-menu .sub-menu li { position: relative; display: flex; align-items: center; }
.pe-nav .pe-menu .sub-menu a { padding: 10px 18px; font-size: 12px; white-space: normal; flex: 1; }
.pe-nav .pe-menu .sub-menu a:hover { color: var(--pe-primary); background: var(--pe-surface-2); }
.pe-nav .pe-menu .sub-menu .sub-menu { top: -9px; left: 100%; }
.pe-nav .pe-menu li:hover > .sub-menu,
.pe-nav .pe-menu li:focus-within > .sub-menu,
.pe-nav .pe-menu li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.pe-nav .pe-menu li.is-open > .pe-sub-toggle svg { transform: rotate(180deg); }
.pe-nav .pe-menu > li:last-child .sub-menu, .pe-nav .pe-menu > li:nth-last-child(2) .sub-menu { left: auto; right: 0; }

/* Header fixa */
.pe-sticky-header .pe-masthead { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 900; }
.pe-sticky-menu .pe-masthead { display: contents; }
.pe-sticky-menu .pe-nav { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 900; }
.pe-sticky-hide-topbar .pe-topbar { transition: max-height 0.2s, opacity 0.2s; max-height: 80px; overflow: hidden; }
.pe-sticky-hide-topbar.is-scrolled .pe-topbar { max-height: 0; min-height: 0; opacity: 0; }
.pe-sticky-header.is-scrolled .pe-masthead { box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08); }

/* Offcanvas */
.pe-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.55); animation: pe-fade 0.2s ease; }
.pe-overlay[hidden] { display: none; }
@keyframes pe-fade { from { opacity: 0; } to { opacity: 1; } }
.pe-offcanvas {
	position: fixed; top: 0; bottom: 0; left: 0; z-index: 1001; width: min(88vw, 360px); display: flex; flex-direction: column;
	background: var(--pe-surface); color: var(--pe-text); transform: translateX(-102%); visibility: hidden;
	transition: transform 0.28s ease, visibility 0s linear 0.28s; box-shadow: 8px 0 30px rgba(0, 0, 0, 0.2); outline: 0;
}
.pe-offcanvas.is-open { transform: none; visibility: visible; transition: transform 0.28s ease, visibility 0s; }
.pe-offcanvas__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--pe-border); }
.pe-offcanvas__head .pe-brand { justify-self: start; text-align: left; display: block; }
.pe-offcanvas__head .pe-logo { width: min(var(--pe-logo-wm), 180px); }
.pe-offcanvas__body { overflow-y: auto; padding: 16px 20px 28px; flex: 1; overscroll-behavior: contain; }
.pe-offcanvas__search { margin-bottom: 16px; }
.pe-offnav .pe-menu { list-style: none; margin: 0; padding: 0; }
.pe-offnav .pe-menu li { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--pe-border); }
.pe-offnav .pe-menu li > a { flex: 1; padding: 13px 0; font-family: var(--pe-font-menu); font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.02em; }
.pe-offnav .pe-menu .pe-sub-toggle { width: 44px; height: 44px; margin: 0; }
.pe-offnav .pe-menu li.is-open > .pe-sub-toggle svg { transform: rotate(180deg); }
.pe-offnav .pe-menu .sub-menu { display: none; flex-basis: 100%; list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; }
.pe-offnav .pe-menu li.is-open > .sub-menu { display: block; }
.pe-offnav .pe-menu .sub-menu li { border-bottom: 0; }
.pe-offnav .pe-menu .sub-menu li > a { padding: 9px 0; font-size: 13px; text-transform: none; }
.pe-offnav .pe-menu .current-menu-item > a { color: var(--pe-primary); }
.pe-socials--off { margin-top: 22px; }

/* Ticker */
.pe-ticker { background: var(--pe-ticker-bg); color: var(--pe-ticker-color); font-size: 13px; overflow: hidden; max-width: 100%; }
.pe-ticker__viewport { overflow: hidden; }
.pe-ticker__track { display: flex; width: max-content; animation: pe-marquee var(--pe-ticker-dur) linear infinite; will-change: transform; }
.pe-ticker__group { display: flex; flex: none; gap: 44px; padding: 9px 22px 9px 0; }
.pe-ticker__item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: inherit; }
.pe-ticker__item:hover { color: inherit; text-decoration: underline; }
.pe-ticker__cat { font-family: var(--pe-font-heading); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--pe-primary); color: #fff; padding: 2px 6px; }
.pe-ticker--pause:hover .pe-ticker__track, .pe-ticker:focus-within .pe-ticker__track { animation-play-state: paused; }
@keyframes pe-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.pe-ticker__track { animation: none; }
	.pe-ticker__viewport { overflow-x: auto; }
	.pe-ticker__group[aria-hidden="true"] { display: none; }
}

/* Mobile */
@media (max-width: 900px) {
	.pe-masthead__row { grid-template-columns: 88px minmax(0, 1fr) 88px; column-gap: 0; padding-block: 8px; }
	.pe-nav { display: none; }
	.pe-burger { display: inline-flex; }
	.pe-brand--desktop { display: none; }
	.pe-brand--mobile { display: block; }
	.pe-mode--desk { display: none; }
	.pe-mode--mob { display: inline-flex; }
	.pe-search-desk { display: none; }
	.pe-masthead__actions { display: flex; align-items: center; margin-right: -10px; }
	.pe-masthead__right { justify-content: flex-end; }
	.pe-masthead__brandrow { border-bottom: 1px solid var(--pe-border); }
	.pe-sticky-menu .pe-masthead { display: block; }
}
@media (max-width: 380px) {
	.pe-masthead__row { grid-template-columns: 80px minmax(0, 1fr) 80px; }
	.pe-iconbtn { width: 40px; height: 40px; }
}
