/* Impulse header: same header used on the home page, standalone version for pages
   that are not built with Elementor (portfolio PT/EN). */
:root{
  --ipx-header-h:80px;
  --ipx-header-gap:14px;
  --ipx-site-width:1200px;
  --ipx-site-padding:20px;
  --ipx-blue:#00bfff;
}
@media (max-width:767px){ :root{ --ipx-site-padding:16px; } }

body.ipx-lock{ overflow:hidden !important; position:fixed !important; width:100% !important; left:0; right:0; }

.ipx-header{
  position:fixed; top:0; left:0; right:0; width:100%;
  z-index:2147483646; background:transparent; pointer-events:none;
}
.ipx-header > *{ pointer-events:auto; }

.ipx-header__inner{
  box-sizing:border-box;
  width:min(var(--ipx-site-width), calc(100% - (var(--ipx-site-padding) * 2)));
  margin:var(--ipx-header-gap) auto 0;
  padding:16px 22px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:18px;
  border:2px solid var(--ipx-blue);
  border-radius:22px;
  background:rgba(26,26,26,.5);
  backdrop-filter:blur(14px) saturate(1.2);
  -webkit-backdrop-filter:blur(14px) saturate(1.2);
  transition:box-shadow .2s ease;
}
.ipx-header.is-scrolled .ipx-header__inner{ box-shadow:0 14px 40px rgba(0,0,0,.28); }

.ipx-brand{ display:flex; align-items:center; text-decoration:none; }
.ipx-brand__logo{ height:44px; width:auto; display:block; max-width:none; }

.ipx-nav{ display:flex; align-items:center; gap:34px; width:100%; }
.ipx-nav--desktop{ justify-self:end; justify-content:flex-end; padding-right:44px; }

.ipx-nav__link{
  display:inline-flex; align-items:center; height:44px; line-height:44px; padding:0 2px;
  text-decoration:none; color:rgba(255,255,255,.92);
  font-family:Text, Helvetica, Arial, sans-serif; font-size:16px; font-weight:700;
  transition:transform .18s ease, color .15s ease; transform-origin:center;
  -webkit-tap-highlight-color:transparent;
}
.ipx-nav__link:hover,
.ipx-nav__link:focus-visible{ color:var(--ipx-blue); transform:scale(1.04); }

.ipx-burger{
  display:none; width:46px; height:46px; border-radius:14px;
  border:1px solid rgba(0,191,255,.75); background:rgba(0,191,255,.12);
  align-items:center; justify-content:center; flex-direction:column; gap:6px;
  cursor:pointer; outline:none; box-shadow:none; padding:0;
  -webkit-tap-highlight-color:transparent;
}
.ipx-burger span{
  width:22px; height:2px; background:rgba(255,255,255,.95); border-radius:2px; display:block;
  transition:transform .2s ease, opacity .2s ease; transform-origin:center;
}
.ipx-burger[aria-expanded="true"] span:nth-child(1){ transform:translateY(8px) rotate(45deg); }
.ipx-burger[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.ipx-burger[aria-expanded="true"] span:nth-child(3){ transform:translateY(-8px) rotate(-45deg); }

.ipx-overlay{
  position:fixed; inset:0; background:#000; opacity:0; visibility:hidden; pointer-events:none;
  z-index:2147483645; transition:opacity .2s ease, visibility .2s ease;
}
.ipx-overlay.is-open{ opacity:.92; visibility:visible; pointer-events:auto; }

#ipxMobileMenu{ display:none !important; }
#ipxMobileMenu:not([hidden]){ display:flex !important; }

@media (max-width:900px){
  .ipx-nav--desktop{ display:none; }
  .ipx-burger{ display:flex; justify-self:end; }
  .ipx-header__inner{ margin-top:10px; padding:12px 14px; gap:12px; border-radius:16px; border-width:1px; }
  .ipx-brand__logo{ height:38px; }

  #ipxMobileMenu.ipx-mobile{
    position:fixed; left:0; right:0; top:calc(var(--ipx-header-h) + 18px); bottom:0;
    z-index:2147483646; background:transparent;
    align-items:flex-start; justify-content:center; padding:14px 16px 22px;
  }
  #ipxMobileMenu .ipx-mobile__top{ width:0; height:0; margin:0; padding:0; border:0; }
  #ipxMobileMenu .ipx-close{
    position:fixed; top:calc(24px + env(safe-area-inset-top)); right:calc(var(--ipx-site-padding) + 14px);
    z-index:2147483647; width:46px; height:46px; border-radius:14px;
    border:1px solid rgba(0,191,255,.75); background:rgba(0,191,255,.12);
    cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0;
  }
  .ipx-close span{
    position:absolute; top:50%; left:50%; width:20px; height:2px; background:#fff; border-radius:2px; display:block;
  }
  .ipx-close span:nth-child(1){ transform:translate(-50%,-50%) rotate(45deg); }
  .ipx-close span:nth-child(2){ transform:translate(-50%,-50%) rotate(-45deg); }

  #ipxMobileMenu .ipx-nav--mobile{
    box-sizing:border-box;
    width:min(560px, 94vw);
    max-height:calc(100vh - (var(--ipx-header-h) + 120px)); overflow:auto;
    margin:0; padding:20px 16px; border-radius:18px;
    background:rgba(11,11,11,.92); border:1px solid rgba(0,191,255,.28);
    box-shadow:0 18px 60px rgba(0,0,0,.55);
    display:flex; flex-direction:column; gap:14px; align-items:center;
    animation:ipxPop .16s ease-out both;
  }
  .ipx-nav__m{
    box-sizing:border-box; width:100%; padding:16px; border-radius:16px;
    border:1px solid rgba(0,191,255,.75); background:rgba(0,191,255,.12);
    color:#fff; font-family:Text, Helvetica, Arial, sans-serif; font-weight:800; font-size:18px;
    text-decoration:none; display:flex; align-items:center; justify-content:center;
    transition:transform .15s ease; -webkit-tap-highlight-color:transparent;
  }
  .ipx-nav__m:hover, .ipx-nav__m:focus-visible{ transform:scale(1.02); }
  @keyframes ipxPop{ from{ transform:translateY(10px) scale(.98); opacity:0; } to{ transform:none; opacity:1; } }
}
body.ipx-menu-open #ipxBurger{ opacity:0; pointer-events:none; }

/* Language selector (positioned by site-ui.js, same as the home page). */
@media (min-width:901px){
  .ipx-header__inner{ max-width:calc(100% - (var(--language-side-space, 128px) * 2)); }
}
#lang-switch.lang-switch{
  position:fixed; z-index:2147483647; top:28px; right:16px;
  width:max-content; max-width:calc(100vw - 32px);
  display:flex; flex-wrap:nowrap; align-items:center; gap:10px; white-space:nowrap; margin:0;
  background:rgba(21,21,21,.55); border:1px solid rgba(0,222,255,.28);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  padding:6px 14px; border-radius:999px; line-height:1.25;
  user-select:none; isolation:isolate;
  font-family:"URW", "URW Gothic", "URW Gothic L", Arial, Helvetica, sans-serif; font-weight:700;
}
#lang-switch[style*="left"]{ right:auto; }
#lang-switch .lang-btn{
  flex:0 0 auto; font-family:inherit; font-weight:700; color:#fff; font-size:13px;
  text-decoration:none; opacity:.7; transition:opacity .2s ease, color .2s ease;
}
#lang-switch .lang-btn:hover, #lang-switch .lang-btn.is-active{ opacity:1; color:#00deff; }
#lang-switch .lang-sep{ color:#fff; opacity:.35; font-weight:700; }
#lang-switch.lang-hidden{ opacity:0 !important; pointer-events:none !important; }
@media (max-width:768px){ #lang-switch .lang-btn{ font-size:12px; } }
