/* megamenu without JS (replaces jquery.megamenu.js + jquery.easing) */
#meganavigator li.havechild > .mega-content {
  left: 25px; top: 100%;
  visibility: hidden; opacity: 0;
  transition: opacity .2s, visibility 0s linear .25s;
}
#meganavigator li.havechild li.havechild > .mega-content { left: 100%; top: 0; }
#meganavigator li.havechild:hover > .mega-content,
#meganavigator li.havechild:focus-within > .mega-content {
  visibility: visible; opacity: 1;
  transition: opacity .2s linear .25s, visibility 0s linear .25s;
}
/* keep the last top-level dropdowns inside the container (JS clamped them before) */
#meganavigator > li.level1:last-child > .mega-content { left: auto; right: 25px; }
#meganavigator > li.level1:nth-last-child(-n+2) li.havechild > .mega-content { left: auto; right: 100%; }

/* lightbox (replaces fancybox) */
dialog.lb { max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0;
  background: rgba(30,30,30,.92); color: #fff; display: none; }
dialog.lb[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
dialog.lb img { max-width: calc(100vw - 120px); max-height: calc(100vh - 110px); object-fit: contain; cursor: pointer; }
dialog.lb p { margin: 10px 0 0; min-height: 1.4em; text-align: center; }
dialog.lb span { position: absolute; top: 14px; left: 18px; font-size: 13px; opacity: .8; }
dialog.lb button { position: absolute; background: rgba(30,30,30,.6); color: #ccc; border: 0; font-size: 40px; line-height: 1; padding: 6px 14px; cursor: pointer; }
dialog.lb button:hover, dialog.lb button:focus-visible { color: #fff; }
dialog.lb .lb-x { top: 0; right: 0; font-size: 32px; }
dialog.lb .lb-p { left: 6px; top: 50%; transform: translateY(-50%); }
dialog.lb .lb-n { right: 6px; top: 50%; transform: translateY(-50%); }
dialog.lb.lb-single .lb-p, dialog.lb.lb-single .lb-n { display: none; }
@media (max-width: 600px) { dialog.lb img { max-width: 100vw; } }
