/* ==========================================================================
   PARDAVIMOLOGIJA — Global Header V2 + Mega Menu
   Failas: /wp-content/themes/pardavimologija/assets/css/header.css
   Prefiksas .pgh- — nesikerta su .tc- (Tomo puslapis) ar būsimais blokais.
   ========================================================================== */

/* ---------- 0. Šriftai (tie patys lokalūs failai kaip Tomo puslapyje) ---------- */
@font-face{ font-family:'Fraunces'; font-style:normal; font-weight:300 500; font-display:swap; src:url('../fonts/fraunces-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF }
@font-face{ font-family:'Fraunces'; font-style:normal; font-weight:300 500; font-display:swap; src:url('../fonts/fraunces-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD }
@font-face{ font-family:'Inter'; font-style:normal; font-weight:400 600; font-display:swap; src:url('../fonts/inter-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF }
@font-face{ font-family:'Inter'; font-style:normal; font-weight:400 600; font-display:swap; src:url('../fonts/inter-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD }
@font-face{ font-family:'JetBrains Mono'; font-style:normal; font-weight:400 500; font-display:swap; src:url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF }
@font-face{ font-family:'JetBrains Mono'; font-style:normal; font-weight:400 500; font-display:swap; src:url('../fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD }

/* ---------- 1. Kintamieji (tie patys kaip Tomo puslapyje) ---------- */
.pgh,.pgh-menu{
  --pgh-bg:#0a0a0a; --pgh-bg-alt:#141414; --pgh-panel:#0e0e0e;
  --pgh-ink:#f4f0e8; --pgh-ink-2:#c8c4bc; --pgh-ink-3:#8b8680;
  --pgh-line:#2a2a2a; --pgh-line-soft:#1c1c1c;
  --pgh-brand:#2dd4bf; --pgh-brand-ink:#99f6e4; --pgh-brand-soft:#134e4a; --pgh-logo:#3cbfa9; --pgh-on-brand:#06201d;
  --pgh-fd:'Fraunces',Georgia,serif; --pgh-fb:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif; --pgh-fm:'JetBrains Mono',ui-monospace,Menlo,monospace;
  --pgh-ease:cubic-bezier(.2,.7,.2,1);
  --pgh-h:80px;           /* rezervuotas header aukštis (nekinta → nėra turinio šuolių) */
  --pgh-h-compact:50px;   /* vizualus aukštis paslinkus */
  --pgh-pad-x:64px;
  font-family:var(--pgh-fb); -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
:where(.pgh,.pgh-menu) *,:where(.pgh,.pgh-menu) *::before,:where(.pgh,.pgh-menu) *::after{ box-sizing:border-box }
:where(.pgh,.pgh-menu) :where(a){ color:inherit; text-decoration:none }
:where(.pgh,.pgh-menu) :where(ul,ol,p,h2){ margin:0; padding:0 }
:where(.pgh,.pgh-menu) :where(ul,ol){ list-style:none }
:where(.pgh,.pgh-menu) :where(button){ font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer }
.pgh :focus-visible,.pgh-menu :focus-visible{ outline:2px solid var(--pgh-brand); outline-offset:3px; border-radius:8px }
.pgh-ico{ display:block; width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round }

/* Pereiti prie turinio */
.pgh-skip{ position:fixed; left:16px; top:-80px; z-index:1100; padding:10px 16px; border-radius:10px; background:#2dd4bf; color:#06201d; font:500 14px/1.2 'Inter',system-ui,sans-serif; text-decoration:none }
.pgh-skip:focus{ top:12px }

/* Jutiklis kompaktiškai būsenai (IntersectionObserver, ne scroll įvykis) */
.pgh-sentinel{ position:absolute; top:0; left:0; width:1px; height:24px; pointer-events:none; visibility:hidden }

/* ---------- 2. HEADER JUOSTA ---------- */
/* Išorinis konteineris visada --pgh-h aukščio → turinys niekada nepasislenka.
   Vizualiai susitraukia tik vidinė juosta. */
.pgh{ position:sticky; top:0; z-index:900; height:var(--pgh-h); pointer-events:none }
body.admin-bar .pgh{ top:32px }
.pgh__bar{
  pointer-events:auto; position:relative;
  height:var(--pgh-h);
  background:rgba(10,10,10,.82); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  border-bottom:1px solid var(--pgh-line);
  transition:height .35s var(--pgh-ease), background-color .35s, box-shadow .35s;
}
.pgh.is-compact .pgh__bar{ height:var(--pgh-h-compact); background:rgba(10,10,10,.92); box-shadow:0 12px 40px -24px rgba(0,0,0,.9) }
.pgh__in{ height:100%; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:32px; padding:0 var(--pgh-pad-x); max-width:1920px; margin:0 auto }

/* Logotipas */
.pgh-logo{ display:inline-flex; align-items:center; gap:12px; color:var(--pgh-ink) }
.pgh-logo img{ width:34px; height:34px; display:block; transition:transform .35s var(--pgh-ease) }
.pgh.is-compact .pgh-logo img{ transform:scale(.88) }
.pgh-logo__w{ display:flex; flex-direction:column; font-family:var(--pgh-fd); font-weight:500; line-height:1.05 }
.pgh-logo__w span:first-child{ font-size:15px; letter-spacing:.14em; color:var(--pgh-ink) }
.pgh-logo__w span:last-child{ font-size:13px; letter-spacing:.32em; color:var(--pgh-logo) }

/* Pagrindinė navigacija */
.pgh-nav{ justify-self:center }
.pgh-nav ul{ display:flex; gap:36px }
.pgh-nav a{ position:relative; display:inline-block; padding:8px 0; font-size:14px; color:var(--pgh-ink-2); transition:color .2s }
.pgh-nav a::after{ content:''; position:absolute; left:0; right:0; bottom:2px; height:1px; background:var(--pgh-brand); transform:scaleX(0); transform-origin:left; transition:transform .3s var(--pgh-ease) }
.pgh-nav a:hover{ color:var(--pgh-ink) }
.pgh-nav a:hover::after{ transform:scaleX(1) }
.pgh-nav a[aria-current="page"]{ color:var(--pgh-brand) }
.pgh-nav a[aria-current="page"]::after{ transform:scaleX(1) }

/* Dešinė pusė */
.pgh-actions{ display:flex; align-items:center; gap:10px }
.pgh-cta{ display:inline-flex; align-items:center; gap:10px; padding:11px 20px; border-radius:999px; background:var(--pgh-brand); color:var(--pgh-on-brand) !important; font-size:14px; font-weight:500; line-height:1.2; white-space:nowrap; transition:background-color .3s var(--pgh-ease), gap .3s var(--pgh-ease), box-shadow .3s var(--pgh-ease) }
.pgh-cta:hover{ background:var(--pgh-brand-ink); gap:16px; box-shadow:0 0 0 6px rgba(45,212,191,.12) }
.pgh-login{ display:inline-flex; align-items:center; gap:8px; height:44px; padding:0 14px 0 12px; border-radius:999px; border:1px solid var(--pgh-line); font-size:14px; color:var(--pgh-ink-2); transition:border-color .25s, color .25s }
.pgh-login:hover{ border-color:var(--pgh-brand-soft); color:var(--pgh-ink) }
.pgh-login:hover .pgh-login__ico{ color:var(--pgh-brand) }
.pgh-login__ico{ width:18px; height:18px; transition:color .25s }
/* Hamburger: 3 linijos 26×2.5 px; hover – turkio linijos, +8 %, subtilus turkio fonas (220 ms) */
.pgh-burger{ display:inline-flex; align-items:center; justify-content:center; width:48px; height:48px; border-radius:50%; border:1px solid var(--pgh-line); background-color:transparent; color:var(--pgh-ink); transition:border-color .22s ease, background-color .22s ease, color .22s ease }
.pgh-burger__lines{ position:relative; display:block; width:26px; height:18px; transition:transform .22s ease }
.pgh-burger__lines i{ position:absolute; left:0; width:100%; height:2.5px; border-radius:2px; background:currentColor; transition:background-color .22s ease }
.pgh-burger__lines i:nth-child(1){ top:0 }
.pgh-burger__lines i:nth-child(2){ top:calc(50% - 1.25px) }
.pgh-burger__lines i:nth-child(3){ bottom:0 }
.pgh-burger:hover,.pgh-burger:focus-visible{ color:var(--pgh-brand); border-color:var(--pgh-brand-soft); background-color:rgba(45,212,191,.07) }
.pgh-burger:hover .pgh-burger__lines,.pgh-burger:focus-visible .pgh-burger__lines{ transform:scale(1.08) }

/* ---------- 3. MEGA MENU ---------- */
.pgh-menu{ position:fixed; inset:0; z-index:1000; display:block; pointer-events:none }
.pgh-menu__backdrop{ position:absolute; inset:0; background:rgba(5,5,5,.62); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); opacity:0; transition:opacity .4s var(--pgh-ease) }
.pgh-menu__panel{
  position:absolute; top:0; right:0; bottom:0;
  width:min(48vw, 920px); min-width:560px;
  display:flex; flex-direction:column;
  background:var(--pgh-panel); color:var(--pgh-ink);
  border-left:1px solid var(--pgh-line);
  box-shadow:-40px 0 120px -40px rgba(0,0,0,.8);
  transform:translateX(100%);
  transition:transform .5s var(--pgh-ease), visibility 0s linear .5s;
  visibility:hidden;
  overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
}
/* Atidaryta būsena (JS: .is-open; be JS: :target) */
.pgh-menu.is-open,.pgh-menu:target{ pointer-events:auto }
.pgh-menu.is-open .pgh-menu__backdrop,.pgh-menu:target .pgh-menu__backdrop{ opacity:1 }
.pgh-menu.is-open .pgh-menu__panel,.pgh-menu:target .pgh-menu__panel{ transform:none; visibility:visible; transition:transform .5s var(--pgh-ease), visibility 0s }
body.admin-bar .pgh-menu{ top:32px }

/* Viršus */
.pgh-menu__top{ position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 48px; background:rgba(14,14,14,.94); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border-bottom:1px solid var(--pgh-line-soft) }
.pgh-menu__title{ display:flex; align-items:center; gap:10px; font-family:var(--pgh-fm); font-size:11.5px; font-weight:400; letter-spacing:.16em; text-transform:uppercase; color:var(--pgh-ink-3) }
.pgh-menu__title i{ width:7px; height:7px; border-radius:50%; background:var(--pgh-brand); box-shadow:0 0 10px var(--pgh-brand) }
.pgh-x{ display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:50%; border:1px solid var(--pgh-line); color:var(--pgh-ink-2); transition:border-color .25s, color .25s, transform .4s var(--pgh-ease) }
.pgh-x:hover{ border-color:var(--pgh-brand); color:var(--pgh-ink); transform:rotate(90deg) }
.pgh-x svg{ width:16px; height:16px }

.pgh-menu__body{ flex:1; padding:32px 48px 40px }

/* Kontaktai */
.pgh-contact__k,.pgh-group__k{ font-family:var(--pgh-fm); font-size:11px; font-weight:500; letter-spacing:.16em; text-transform:uppercase; color:var(--pgh-ink-3) }
.pgh-contact{ padding-bottom:32px; border-bottom:1px solid var(--pgh-line) }
.pgh-contact__list{ display:grid; grid-template-columns:auto auto; justify-content:start; gap:12px 40px; margin-top:16px }
.pgh-contact__a{ display:flex; align-items:center; gap:14px; min-height:48px; padding:4px 0; font-size:17px; color:var(--pgh-ink); transition:color .25s }
.pgh-contact__ico{ flex-shrink:0; width:44px; height:44px; padding:11px; border-radius:12px; border:1px solid var(--pgh-line); color:var(--pgh-brand); transition:border-color .25s, background-color .25s }
.pgh-contact__a small{ display:block; font-family:var(--pgh-fm); font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--pgh-ink-3); margin-bottom:3px }
.pgh-contact__a:hover{ color:var(--pgh-brand) }
.pgh-contact__a:hover .pgh-contact__ico{ border-color:var(--pgh-brand-soft); background:rgba(45,212,191,.08) }

/* Navigacijos grupės: 2 stulpeliai (Sprendimai + Pardavimologija | Mokymai) */
.pgh-groups{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:40px 48px; padding-top:32px }
.pgh-groups__col{ display:flex; flex-direction:column; gap:40px }
.pgh-group__list{ margin-top:14px; border-top:1px solid var(--pgh-line-soft) }
.pgh-group__a{ display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; padding:9px 0; border-bottom:1px solid var(--pgh-line-soft); font-size:15.5px; line-height:1.35; color:var(--pgh-ink-2); transition:color .2s, padding .3s var(--pgh-ease) }
.pgh-group__a i{ font-style:normal; color:var(--pgh-brand); opacity:0; transform:translateX(-6px); transition:opacity .25s, transform .3s var(--pgh-ease) }
.pgh-group__a:hover{ color:var(--pgh-ink); padding-left:6px }
.pgh-group__a:hover i{ opacity:1; transform:none }
.pgh-group__a[aria-current="page"]{ color:var(--pgh-brand) }
.pgh-group__a[aria-current="page"] i{ opacity:1; transform:none }

/* Apačia: CTA + prisijungimas */
.pgh-menu__foot{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:40px; padding-top:28px; border-top:1px solid var(--pgh-line) }
.pgh-menu__foot .pgh-cta{ padding:15px 24px; font-size:15px }
.pgh-menu__foot .pgh-login{ height:50px; padding:0 18px 0 16px; font-size:15px }

/* Įėjimo animacija (subtili, grupėmis) */
.pgh-menu .pgh-anim{ opacity:0; transform:translateX(18px); transition:opacity .45s var(--pgh-ease), transform .45s var(--pgh-ease) }
.pgh-menu.is-open .pgh-anim,.pgh-menu:target .pgh-anim{ opacity:1; transform:none }
.pgh-menu.is-open .pgh-anim:nth-child(1){ transition-delay:.12s }
.pgh-menu.is-open .pgh-groups .pgh-anim{ transition-delay:.18s }
.pgh-menu.is-open .pgh-groups__col:nth-child(2) .pgh-anim{ transition-delay:.24s }
.pgh-menu.is-open .pgh-menu__foot.pgh-anim{ transition-delay:.3s }

/* Fono slinkimo užrakinimas (be turinio šuolio) */
html.pgh-lock{ overflow:hidden; scrollbar-gutter:stable }

/* ---------- 4. PRISITAIKYMAS ---------- */
/* Planšetė (iki 1180 px): prisijungimas – tik ikona */
@media (max-width:1180px){
  .pgh,.pgh-menu{ --pgh-pad-x:40px }
  .pgh-login--bar .pgh-login__t{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }
  .pgh-login--bar{ width:44px; padding:0; justify-content:center }
  .pgh-nav ul{ gap:28px }
}
/* Siauresnė planšetė (iki 900 px): pagrindinė navigacija pereina į Mega Menu */
@media (max-width:900px){
  .pgh-nav{ display:none }
  .pgh__in{ grid-template-columns:auto 1fr auto; gap:16px }
  .pgh-actions{ grid-column:3 }
  .pgh-menu__panel{ width:min(82vw, 720px); min-width:0 }
}
/* Telefonas (iki 640 px): tik logotipas + ☰, CTA ir prisijungimas – meniu viduje */
@media (max-width:640px){
  .pgh,.pgh-menu{ --pgh-h:64px; --pgh-h-compact:56px; --pgh-pad-x:20px }
  .pgh-actions .pgh-cta,.pgh-login--bar{ display:none }
  .pgh-logo img{ width:30px; height:30px }
  .pgh-logo__w span:first-child{ font-size:14px }
  .pgh-logo__w span:last-child{ font-size:12px }
  .pgh-menu__panel{ width:100%; border-left:0 }
  .pgh-menu__top{ padding:12px 20px; min-height:64px }
  .pgh-menu__body{ padding:24px 20px 32px }
  .pgh-contact{ padding-bottom:24px }
  .pgh-contact__list{ grid-template-columns:1fr; gap:4px }
  .pgh-groups{ grid-template-columns:minmax(0,1fr); gap:32px; padding-top:28px }
  .pgh-groups__col{ gap:32px }
  .pgh-group__a{ min-height:48px; font-size:16px }
  .pgh-group__a i{ opacity:1; transform:none; color:var(--pgh-ink-3) }
  .pgh-menu__foot{ flex-direction:column; align-items:stretch; margin-top:32px }
  .pgh-menu__foot .pgh-cta,.pgh-menu__foot .pgh-login{ justify-content:center; height:52px }
}
/* CTA meniu apačioje rodomas tik kai jo nėra juostoje */
@media (min-width:641px){ .pgh-menu__foot .pgh-cta{ display:none } }
@media (min-width:1181px){ .pgh-menu__foot{ display:none } }

/* WP admin juosta */
@media (max-width:782px){ body.admin-bar .pgh, body.admin-bar .pgh-menu{ top:46px } }
@media (max-width:600px){ body.admin-bar .pgh{ top:0 } }

/* Sumažintas judesys */
@media (prefers-reduced-motion:reduce){
  .pgh *,.pgh__bar,.pgh-menu *,.pgh-menu__panel,.pgh-menu__backdrop{ transition-duration:.01ms !important; transition-delay:0s !important; animation:none !important }
}
