/* ============================================================
   PIANISTA HEADER CONTROLLER — v4.1.8
   Fonte unica de verdade (plugin). Wrapper externo = unico elemento
   fixed (garante header.offsetHeight correto para o spacer).
   ============================================================ */

:root{
  --ph-blur: 14px;
  --ph-bg: rgba(17,17,18,.55);
  --ph-bg-solid: rgba(17,17,18,.92);
  --ph-border: rgba(255,255,255,.08);
  --ph-accent: #CB1516;
  --ph-pad: 18px;
  --ph-height: 120px;
  --ph-height-compact: 64px;
  --ph-text: #fff;
  --wp-admin-offset: 0px;
}
body.admin-bar{ --wp-admin-offset: 32px; }
@media (max-width:782px){
  body.admin-bar{ --wp-admin-offset: 46px; }
}

/* ---------- HEADER FIXO (wrapper externo = unico fixed) ---------- */
.elementor-location-header.ph-controlled{
  position: fixed;
  top: var(--wp-admin-offset);
  left: 0;
  right: 0;
  z-index: 9999;
}

#ph-header-spacer{ width: 100%; }

/* ---------- GLASS / SHRINK (container interno, em fluxo normal) ---------- */
.pianista-header{
  position: relative;
  height: var(--ph-height) !important;
  min-height: var(--ph-height) !important;
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: height .35s ease, border-color .35s ease;
  transform: translateZ(0);
  will-change: height;
}
.pianista-header::before{
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background .35s ease, backdrop-filter .35s ease;
  z-index: -1;
}
body.ph-compact .pianista-header{ height: var(--ph-height-compact) !important; min-height: var(--ph-height-compact) !important; border-bottom-color: var(--ph-border); }
body.ph-compact .pianista-header::before{ background: var(--ph-bg-solid); backdrop-filter: blur(var(--ph-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--ph-blur)) saturate(140%); }

/* ---------- WRAPPER INTERNO ---------- */
.ph-wrap{
  max-width: 1440px !important;
  margin: 0 auto !important;
  padding: 0 80px !important;
  height: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 24px !important;
}
.ph-logo{ justify-self: start !important; width: auto !important; flex: none !important; }
.ph-menu-container{ justify-self: center !important; width: auto !important; flex: none !important; }
@media (max-width:1023px){
  .ph-wrap{ padding: 0 40px !important; }
}
@media (max-width:767px){
  .ph-wrap{ padding: 0 20px !important; }
}

/* ---------- LOGO / ICONE (stack injetado via JS) ---------- */
.ph-brand{ display: flex; align-items: center; height: 100%; }
.ph-logo-stack{ position: relative; display: block; height: 56px; width: 260px; }
.ph-logo-stack img{
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  height: 56px !important; width: auto !important; max-width: none !important; transition: opacity .25s ease;
}
.ph-logo-stack .ph-logo-icon{ height: 36px !important; opacity: 0; }
body.ph-compact .ph-logo-full{ opacity: 0; }
body.ph-compact .ph-logo-icon{ opacity: 1; }
body.ph-compact .elementor-location-header:hover .ph-logo-full{ opacity: 1; }
body.ph-compact .elementor-location-header:hover .ph-logo-icon{ opacity: 0; }

/* ---------- MENU DESKTOP ---------- */
.ph-menu .menu{ display: flex; align-items: center; gap: clamp(16px,2.6vw,40px); margin: 0; padding: 0; list-style: none; }
.ph-menu a{
  color: var(--ph-text) !important;
  font-family: 'Manrope', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  opacity: .9;
  padding: 12px 8px;
  border-radius: 0;
  position: relative;
  transition: opacity .25s ease;
}
.ph-menu a:hover{ opacity: 1; }
.ph-menu a::before, nav li::before, nav li::after{ content: none !important; }
.ph-menu a::after{
  content: '';
  position: absolute; left: 8px; right: 8px; bottom: 7px;
  height: 2px; background: var(--ph-accent); border-radius: 0;
  opacity: 0; transform: scaleX(0); transform-origin: left;
  transition: opacity .25s ease, transform .35s cubic-bezier(.4,0,.2,1);
}
.ph-menu a:hover::after,
.ph-menu .current-menu-item > a::after,
.ph-menu .current_page_item > a::after{ opacity: 1; transform: scaleX(1); }

/* ---------- RESPONSIVO ---------- */
@media (max-width:1024px){
  .ph-logo-stack{ height: 48px; width: auto; }
  .ph-logo-stack img{ height: 48px !important; }
  .ph-logo-stack .ph-logo-icon{ height: 30px !important; }
  .elementor-location-header .elementor-menu-toggle,
  .elementor-location-header .elementor-nav-menu--dropdown{ display: none !important; }
}
@media (max-width:767px){
  .ph-wrap{ gap: 16px; }
  .ph-logo-stack{ height: 34px; }
  .ph-logo-stack img{ height: 34px !important; }
  .ph-logo-stack .ph-logo-icon{ height: 26px !important; }
}

/* ---------- Widgets flutuantes escondidos durante o menu aberto ---------- */
body.ph-menu-open [id*="maestro" i], .maestro, .maestro-toggle, .maestro-button, .maestro-fab{ z-index: 1 !important; }

/* ---------- Acessibilidade / Maestro escondidos durante menu aberto ---------- */
body.ph-menu-open #acsb-trigger, body.ph-menu-open .acsb-trigger, body.ph-menu-open .acsb-widget,
body.ph-menu-open .acsb-widget-button, body.ph-menu-open .uwy.userway_p1, body.ph-menu-open .userway.userway_p1,
body.ph-menu-open .userway_widget, body.ph-menu-open #pianista-accessibility-advanced,
body.ph-menu-open .pianista-accessibility-advanced, body.ph-menu-open #paa-trigger, body.ph-menu-open .paa-trigger,
body.ph-menu-open [id*="pianista-access"], body.ph-menu-open [class*="pianista-access"],
body.ph-menu-open [aria-label*="Accessibility"], body.ph-menu-open [aria-label*="Acessibilidade"],
body.ph-menu-open [title*="Accessibility"], body.ph-menu-open [title*="Acessibilidade"]{
  opacity: 0 !important; pointer-events: none !important; visibility: hidden !important;
}


/* TUDO QUADRADO: sem cantos arredondados em nenhum elemento do header, inclusive o toggle do menu mobile do Elementor. */
.pianista-header, .pianista-header * { border-radius: 0 !important; }