/*
 * P-Media sticky navigation v1
 * Inspired by the supplied sticky-menu prototype, but implemented without
 * jQuery, skrollr, Google Fonts or Font Awesome.
 * All selectors are pm-sticky-/pm-menu- scoped to avoid legacy menu collisions.
 */
.pm-sticky-shell{
  position:sticky;
  top:0;
  z-index:10000;
  width:100%;
  margin:8px auto 14px;
  padding:0 10px;
  box-sizing:border-box;
}

.pm-sticky-menu{
  --pm-menu-text:#eaf7ff;
  --pm-menu-muted:rgba(234,247,255,.72);
  --pm-menu-line:rgba(125,220,255,.20);
  --pm-menu-bg:linear-gradient(180deg,rgba(7,21,38,.94),rgba(3,10,22,.94));
  --pm-menu-btn:linear-gradient(180deg,rgba(255,255,255,.09),rgba(0,0,0,.16));
  --pm-menu-hover:linear-gradient(180deg,rgba(91,221,255,.18),rgba(0,0,0,.18));
  --pm-menu-shadow:0 16px 38px rgba(0,0,0,.30);

  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  width:100%;
  min-height:68px;
  padding:8px 10px;
  box-sizing:border-box;
  border:1px solid var(--pm-menu-line);
  border-radius:16px;
  background:var(--pm-menu-bg);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),var(--pm-menu-shadow);
  color:var(--pm-menu-text);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  transition:min-height .22s ease,padding .22s ease,box-shadow .22s ease;
}

body.theme-flash .pm-sticky-menu{
  --pm-menu-line:rgba(125,220,255,.24);
  --pm-menu-bg:
    radial-gradient(circle at 12% 20%,rgba(125,60,255,.20),transparent 28%),
    linear-gradient(180deg,rgba(6,12,30,.95),rgba(2,7,18,.96));
  --pm-menu-shadow:0 16px 40px rgba(0,0,0,.34),0 0 24px rgba(70,205,255,.07);
}

body.theme-day .pm-sticky-menu{
  --pm-menu-text:#10243a;
  --pm-menu-muted:#52677f;
  --pm-menu-line:rgba(16,36,58,.14);
  --pm-menu-bg:linear-gradient(180deg,rgba(255,255,255,.94),rgba(240,248,255,.88));
  --pm-menu-btn:linear-gradient(180deg,rgba(255,255,255,.96),rgba(235,244,255,.82));
  --pm-menu-hover:linear-gradient(180deg,rgba(255,255,255,1),rgba(224,240,255,.92));
  --pm-menu-shadow:0 14px 32px rgba(25,54,92,.13);
}

.pm-menu-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:112px;
  min-width:112px;
  height:50px;
  padding:2px 8px;
  box-sizing:border-box;
  border:0!important;
  border-radius:12px;
  background:rgba(4,11,25,.72)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07),0 8px 18px rgba(0,0,0,.16)!important;
  text-decoration:none!important;
  transition:width .24s ease,min-width .24s ease,height .24s ease,padding .24s ease,transform .12s ease;
}
.pm-menu-brand:hover{transform:translateY(-1px)}
.pm-menu-brand img{
  display:block;
  width:100%;
  height:auto;
  max-height:43px;
  object-fit:contain;
  transition:max-height .24s ease;
}
body.theme-day .pm-menu-brand{
  background:linear-gradient(135deg,#10243a,#132f4e)!important;
  box-shadow:0 8px 18px rgba(30,136,229,.16)!important;
}

.pm-menu-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.pm-menu-links,
.pm-menu-actions{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.pm-menu-actions{justify-content:flex-end}

.pm-sticky-menu a.pm-menu-link,
.pm-sticky-menu .pm-menu-more > summary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  padding:7px 11px;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.10);
  border-radius:11px;
  background:var(--pm-menu-btn);
  color:var(--pm-menu-text);
  font:700 13px/1.1 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
  list-style:none;
  transition:transform .10s ease,box-shadow .12s ease,background .12s ease,border-color .12s ease;
}
body.theme-day .pm-sticky-menu a.pm-menu-link,
body.theme-day .pm-sticky-menu .pm-menu-more > summary{
  border-color:rgba(16,36,58,.13);
}
.pm-menu-more > summary::-webkit-details-marker{display:none}
.pm-sticky-menu a.pm-menu-link:hover,
.pm-sticky-menu .pm-menu-more > summary:hover,
.pm-menu-more[open] > summary{
  transform:translateY(-1px);
  background:var(--pm-menu-hover);
  box-shadow:0 0 0 2px rgba(80,215,255,.15);
}
body.theme-day .pm-sticky-menu a.pm-menu-link:hover,
body.theme-day .pm-sticky-menu .pm-menu-more > summary:hover,
body.theme-day .pm-menu-more[open] > summary{
  box-shadow:0 0 0 2px rgba(30,136,229,.12);
}
.pm-sticky-menu a.pm-menu-link.active{
  border-color:rgba(255,166,45,.46);
  box-shadow:0 0 0 2px rgba(255,166,45,.17);
}

.pm-menu-icon{
  display:inline-grid;
  place-items:center;
  width:18px;
  height:18px;
  font-size:15px;
  line-height:1;
  opacity:.92;
}

.pm-menu-more{position:relative}
.pm-menu-more > summary::after{
  content:"";
  width:0;
  height:0;
  margin-left:2px;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid currentColor;
  opacity:.70;
  transition:transform .15s ease;
}
.pm-menu-more[open] > summary::after{transform:rotate(180deg)}
.pm-menu-dropdown{
  position:absolute;
  left:0;
  top:calc(100% + 8px);
  z-index:10002;
  display:grid;
  gap:6px;
  width:max-content;
  min-width:190px;
  padding:8px;
  border:1px solid var(--pm-menu-line);
  border-radius:13px;
  background:rgba(5,15,29,.98);
  box-shadow:0 18px 38px rgba(0,0,0,.34);
}
body.theme-day .pm-menu-dropdown{
  background:rgba(249,253,255,.98);
  box-shadow:0 18px 38px rgba(25,54,92,.16);
}
.pm-menu-dropdown .pm-menu-link{
  width:100%;
  justify-content:flex-start!important;
}

.pm-menu-flash{
  border-color:rgba(158,100,255,.30)!important;
  background:linear-gradient(180deg,rgba(115,70,255,.18),rgba(0,174,255,.10))!important;
}
.pm-menu-contact{
  border-color:rgba(70,210,255,.32)!important;
  background:linear-gradient(180deg,rgba(55,203,255,.24),rgba(0,116,190,.17))!important;
}
body.theme-day .pm-menu-contact{
  border-color:rgba(30,136,229,.24)!important;
  background:linear-gradient(180deg,rgba(230,245,255,.98),rgba(211,233,252,.90))!important;
}

.pm-menu-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:44px;
  height:40px;
  padding:0!important;
  border:1px solid var(--pm-menu-line)!important;
  border-radius:12px!important;
  background:var(--pm-menu-btn)!important;
  color:var(--pm-menu-text)!important;
  cursor:pointer;
  box-shadow:none!important;
}
.pm-menu-toggle__bars,
.pm-menu-toggle__bars::before,
.pm-menu-toggle__bars::after{
  display:block;
  width:22px;
  height:2px;
  border-radius:2px;
  background:currentColor;
  transition:transform .18s ease,opacity .18s ease;
}
.pm-menu-toggle__bars{position:relative}
.pm-menu-toggle__bars::before,
.pm-menu-toggle__bars::after{content:"";position:absolute;left:0}
.pm-menu-toggle__bars::before{top:-7px}
.pm-menu-toggle__bars::after{top:7px}
.pm-sticky-menu.is-open .pm-menu-toggle__bars{background:transparent}
.pm-sticky-menu.is-open .pm-menu-toggle__bars::before{transform:translateY(7px) rotate(45deg)}
.pm-sticky-menu.is-open .pm-menu-toggle__bars::after{transform:translateY(-7px) rotate(-45deg)}

.pm-sticky-shell.is-compact .pm-sticky-menu{
  min-height:54px;
  padding-top:5px;
  padding-bottom:5px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 10px 28px rgba(0,0,0,.24);
}
.pm-sticky-shell.is-compact .pm-menu-brand{
  width:78px;
  min-width:78px;
  height:38px;
  padding:2px 7px;
}
.pm-sticky-shell.is-compact .pm-menu-brand img{max-height:31px}

@media (max-width:820px){
  .pm-sticky-menu{grid-template-columns:auto auto;min-height:58px;gap:8px}
  .pm-menu-brand{width:92px;min-width:92px;height:42px}
  .pm-menu-brand img{max-height:35px}
  .pm-menu-toggle{display:inline-flex;justify-self:end}
  .pm-menu-panel{
    display:none;
    grid-column:1/-1;
    width:100%;
    padding-top:7px;
    border-top:1px solid var(--pm-menu-line);
  }
  .pm-sticky-menu.is-open .pm-menu-panel{display:flex;flex-direction:column;align-items:stretch}
  .pm-menu-links,.pm-menu-actions{display:grid;grid-template-columns:1fr;width:100%;gap:6px}
  .pm-sticky-menu a.pm-menu-link,
  .pm-sticky-menu .pm-menu-more > summary{width:100%;justify-content:flex-start;min-height:42px;padding:10px 12px}
  .pm-menu-more{width:100%}
  .pm-menu-dropdown{
    position:static;
    width:100%;
    min-width:0;
    margin-top:6px;
    box-sizing:border-box;
    box-shadow:none;
    background:rgba(0,0,0,.10);
  }
  body.theme-day .pm-menu-dropdown{background:rgba(30,136,229,.045);box-shadow:none}
  .pm-sticky-shell.is-compact .pm-menu-brand{width:74px;min-width:74px;height:36px}
}

@media (max-width:480px){
  .pm-sticky-shell{padding:0 6px;margin-top:6px}
  .pm-sticky-menu{border-radius:14px;padding-left:8px;padding-right:8px}
}

@media (prefers-reduced-motion:reduce){
  .pm-sticky-menu,.pm-menu-brand,.pm-menu-brand img,
  .pm-menu-toggle__bars,.pm-menu-toggle__bars::before,.pm-menu-toggle__bars::after{
    transition:none!important;
  }
}
