/* =========================================================
   Nav 2026 — modern menu (replaces dropotron / navPanel)
   ========================================================= */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

#header {
  overflow: visible !important;
}

#header .header-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.35rem 0.5rem;
  position: relative;
  height: 100%;
  min-height: 4.5em;
  overflow: visible !important;
}

#header .header-bar > h1 {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  flex: 0 1 auto;
  margin: 0 !important;
  height: auto !important;
  line-height: normal !important;
  width: auto !important;
  max-width: calc(100% - 8.5rem);
  z-index: 2;
  min-width: 0;
}

#header .header-bar > h1 a.logo {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  display: block;
  max-width: 100%;
}

/* Logo | nav | actions(search/mail/hamburger) */
#header .header-actions {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto;
  margin-left: auto !important;
  margin-right: 0 !important;
  gap: 0.1rem;
  position: relative;
  z-index: 6;
}

#header .header-actions .nav-toggle {
  margin-left: 0.55rem;
}

.nav-drawer-head {
  display: none;
}

.nav-drawer-tools {
  display: none;
}

#nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

#nav .menu > li {
  position: relative;
  margin: 0 !important;
  padding: 0;
  display: flex;
  align-items: center;
}

#nav .menu > li > a {
  display: block !important;
  height: auto !important;
  line-height: 1.3 !important;
  padding: 1.4rem 0.75rem !important;
  color: #000 !important;
  font-size: var(--fs-ui);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

#nav .menu > li > a:hover,
#nav .menu > li.is-current > a {
  color: #8c3bc5 !important;
  border-bottom-color: #8c3bc5;
}

#nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 15rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: #111;
  z-index: 1200;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

#nav .has-sub:hover > .sub-menu,
#nav .has-sub:focus-within > .sub-menu,
#nav .has-sub.is-open > .sub-menu {
  display: block;
}

#nav .sub-menu a {
  display: block;
  padding: 0.55rem 0.3rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-meta);
  font-weight: 500;
  text-decoration: none;
  text-transform: none;
}

#nav .sub-menu a:hover {
  color: #fff;
  background: rgba(140, 59, 197, 0.35);
}

#nav .sub-toggle {
  display: none;
}

/* Search / Contact tools */
#header #accordion.header-tools,
#header .header-tools {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.05rem;
  position: relative !important;
  flex: 0 0 auto;
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  z-index: 5;
}

#header .header-tools .tool-search,
#header .header-tools .tool-contact,
#header .header-tools .accordion-click,
#header .header-tools a.tool-contact {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  width: 2.6rem !important;
  height: 2.6rem !important;
  min-width: 2.6rem !important;
  min-height: 2.6rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  color: #111 !important;
  cursor: pointer;
  text-decoration: none !important;
  z-index: 6;
  opacity: 1 !important;
  line-height: 1 !important;
}

#header .header-tools .tool-search:hover,
#header .header-tools .tool-contact:hover,
#header .header-tools .accordion-click:hover {
  color: #8c3bc5 !important;
  opacity: 1 !important;
}

#header .header-tools .fa {
  position: static !important;
  display: inline-block !important;
  font-size: 1.05rem;
  line-height: 1;
  pointer-events: none;
}

/*
 * Header search panel — keep original look:
 * full-bleed black bar under #header, centered form, #83b button
 */
#header .accordion-content,
#header #header-search-panel {
  --search-bar-bg: #000;
  --search-bar-pad: 10px;
  --search-form-max: 500px;
  --search-btn-bg: #83b;

  position: fixed;
  top: 4.5em;
  left: 0;
  right: 0;
  z-index: 10001;
  display: block;
  width: 100%;
  margin: 0;
  padding: var(--search-bar-pad);
  border: 0;
  background: var(--search-bar-bg);
  box-shadow: none;
  box-sizing: border-box;
}

#header .accordion-content[hidden],
#header #header-search-panel[hidden] {
  display: none !important;
}

#header .accordion-content form,
#header #header-search-panel form {
  max-width: var(--search-form-max);
  margin: 0 auto;
}

#header .accordion-content .listserch,
#header #header-search-panel .listserch {
  align-items: stretch;
}

#header .accordion-content input[type="text"],
#header .accordion-content input[type="search"],
#header #header-search-panel input[type="text"],
#header #header-search-panel input[type="search"] {
  width: 100%;
  background: #fff;
  color: #111;
  border: 0;
  box-shadow: none;
  padding: 0.75em 1em;
  box-sizing: border-box;
}

#header .accordion-content button,
#header .accordion-content .botton,
#header #header-search-panel button,
#header #header-search-panel .botton {
  width: 100%;
  height: 3.5em;
  padding: 0;
  border: 0;
  background: var(--search-btn-bg);
  color: #fff;
  font-size: 1em;
  cursor: pointer;
}

#header .accordion-content button:hover,
#header .accordion-content .botton:hover,
#header #header-search-panel button:hover,
#header #header-search-panel .botton:hover {
  opacity: 0.9;
}

@media screen and (max-width: 736px) {
  #header .accordion-content,
  #header #header-search-panel {
    padding: var(--search-bar-pad) 0.75rem;
  }
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  position: relative;
  padding: 0;
  flex: 0 0 auto;
  z-index: 10070;
  -webkit-appearance: none;
  appearance: none;
}

.nav-toggle__bar {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  height: 2px;
  background: #111;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
  pointer-events: none;
}

.nav-toggle__bar:nth-child(1) { top: 0.75rem; }
.nav-toggle__bar:nth-child(2) { top: 1.2rem; }
.nav-toggle__bar:nth-child(3) { top: 1.65rem; }

body.nav-open .nav-toggle__bar:nth-child(1) {
  top: 1.2rem;
  transform: rotate(45deg);
}
body.nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bar:nth-child(3) {
  top: 1.2rem;
  transform: rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

/* Lightbox */
.aig-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 3.5rem 0.85rem 1.25rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: rgba(10, 10, 12, 0.88);
}
.aig-lightbox[hidden] { display: none !important; }
.aig-lightbox__img {
  display: block;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(88vh, 88dvh);
  /* grid item default min-size:auto prevents shrink → overflow on tall images */
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  background: #000;
}
.aig-lightbox__close {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 20001;
  box-sizing: border-box;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #111;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  text-transform: none;
  text-overflow: clip;
  white-space: normal;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.aig-lightbox__close:hover {
  opacity: 1;
  background: #222;
}

@media screen and (max-width: 736px) {
  .aig-lightbox {
    padding: 3.25rem 0.65rem 1rem;
  }

  .aig-lightbox__img {
    max-width: 100%;
    max-height: min(85vh, 85dvh);
  }
}

/* ---------- Desktop ---------- */
@media screen and (min-width: 981px) {
  #header nav,
  #header .container nav,
  #header .header-bar #nav,
  #header #nav,
  #nav.site-nav:not(.nav-is-drawer) {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    height: auto !important;
    line-height: 1.4 !important;
    flex: 1 1 auto;
    display: flex !important;
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 0.25rem;
    transform: none !important;
    width: auto !important;
    background: transparent !important;
    padding: 0 !important;
    overflow: visible !important;
    z-index: auto;
  }

  #header .header-actions {
    margin-left: 0 !important;
  }

  .nav-drawer-head,
  .nav-drawer-tools,
  .nav-toggle,
  .nav-backdrop {
    display: none !important;
  }
}

/* ---------- Mobile drawer ---------- */
@media screen and (max-width: 980px) {
  #header {
    z-index: 1000;
  }

  /* Full-bleed header bar so icons sit on the screen edge */
  #header .container.header-bar,
  #header .header-bar.container,
  #header .header-bar {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0.65rem 0 0.75rem !important;
    box-sizing: border-box !important;
  }

  #header .header-tools .header-tools__desktop,
  #header .header-tools .tool-search.header-tools__desktop,
  #header .header-tools .tool-contact.header-tools__desktop,
  #header .header-tools a.tool-contact.header-tools__desktop {
    display: none !important;
  }

  #header .header-bar > h1 {
    left: auto !important;
    width: auto !important;
    max-width: calc(100% - 6.5rem) !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  #header .header-actions {
    margin-left: auto !important;
    margin-right: 0 !important;
    flex: 0 0 auto;
  }

  #header .header-tools {
    margin: 0 !important;
  }

  #header .nav-toggle,
  .nav-toggle {
    display: inline-block !important;
    z-index: 10080 !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Hide in-header copy if JS hasn't moved it yet */
  #header #nav:not(.nav-is-drawer),
  #header .container nav:not(.nav-is-drawer) {
    display: none !important;
  }

  /*
   * Drawer lives on body (.nav-is-drawer) so it is never clipped by #header.
   */
  #nav.nav-is-drawer,
  body > #nav.site-nav.nav-is-drawer,
  nav#nav.nav-is-drawer {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    width: min(20rem, 88vw) !important;
    max-width: 88vw !important;
    height: 100% !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #111 !important;
    color: #fff !important;
    z-index: 10090 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(110%, 0, 0) !important;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
    box-shadow: none;
    pointer-events: none;
  }

  body.nav-open #nav.nav-is-drawer,
  body.nav-open body > #nav.site-nav.nav-is-drawer,
  body.nav-open nav#nav.nav-is-drawer {
    transform: translate3d(0, 0, 0) !important;
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden !important;
  }

  body.nav-open #header {
    z-index: 10070 !important;
  }

  #nav.nav-is-drawer .nav-drawer-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: 1rem 1rem 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: #0a0a0a;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  #nav.nav-is-drawer .nav-drawer-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  #nav.nav-is-drawer .nav-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 2.6rem !important;
    height: 2.6rem !important;
    min-width: 2.6rem !important;
    min-height: 2.6rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 0;
    background: transparent !important;
    color: #fff !important;
    font-size: 0 !important;
    font-weight: 400 !important;
    line-height: 0 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-indent: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  #nav.nav-is-drawer .nav-close > span {
    position: relative;
    display: block;
    width: 0.95rem;
    height: 0.95rem;
    font-size: 0;
    line-height: 0;
    color: transparent;
    overflow: hidden;
  }

  #nav.nav-is-drawer .nav-close > span::before,
  #nav.nav-is-drawer .nav-close > span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    margin: 0;
    background: #fff;
    border-radius: 1px;
  }

  #nav.nav-is-drawer .nav-close > span::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  #nav.nav-is-drawer .nav-close > span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  #nav.nav-is-drawer .nav-close:hover,
  #nav.nav-is-drawer .nav-close:focus {
    background: rgba(140, 59, 197, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
  }

  #nav-backdrop.nav-backdrop,
  .nav-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 10085 !important;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    width: 100% !important;
    height: 100% !important;
  }

  #nav-backdrop.nav-backdrop[hidden],
  .nav-backdrop[hidden] {
    display: none !important;
  }

  #nav.nav-is-drawer .menu {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    padding: 0 0 2rem;
  }

  #nav.nav-is-drawer .menu > li {
    display: grid;
    grid-template-columns: 1fr auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
  }

  #nav.nav-is-drawer .menu > li > a {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 1rem 1.2rem !important;
    border-bottom: 0 !important;
    height: auto !important;
  }

  #nav.nav-is-drawer .menu > li > a:hover,
  #nav.nav-is-drawer .menu > li.is-current > a {
    color: #fff !important;
    background: rgba(140, 59, 197, 0.28);
  }

  #nav.nav-is-drawer .sub-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 3rem;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 0;
  }

  #nav.nav-is-drawer .sub-toggle::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  #nav.nav-is-drawer .has-sub.is-open > .sub-toggle::before {
    transform: rotate(-135deg);
  }

  #nav.nav-is-drawer .sub-menu {
    position: static !important;
    display: none !important;
    grid-column: 1 / -1;
    background: #0a0a0a;
    box-shadow: none;
    padding: 0 0 0.4rem;
    padding-left: 0;
    min-width: 0;
  }

  #nav.nav-is-drawer .sub-menu > li {
    padding-left: 1em;
  }

  #nav.nav-is-drawer .has-sub:hover > .sub-menu,
  #nav.nav-is-drawer .has-sub:focus-within > .sub-menu {
    display: none !important;
  }

  #nav.nav-is-drawer .has-sub.is-open > .sub-menu {
    display: block !important;
  }

  #nav.nav-is-drawer .dtnon {
    display: grid !important;
  }

  #nav.nav-is-drawer .nav-drawer-tools {
    display: flex !important;
    flex-direction: column;
    flex: 0 0 auto;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: #0a0a0a;
  }

  #nav.nav-is-drawer .nav-drawer-tools__btn {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    width: 100% !important;
    min-height: 3.25rem;
    margin: 0 !important;
    padding: 1rem 1.2rem !important;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: var(--fs-ui, 0.84rem);
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  #nav.nav-is-drawer .nav-drawer-tools__btn:first-child {
    border-top: 0;
  }

  #nav.nav-is-drawer .nav-drawer-tools__btn:hover,
  #nav.nav-is-drawer .nav-drawer-tools__btn:focus-visible {
    color: #fff !important;
    background: rgba(140, 59, 197, 0.28);
    outline: none;
  }

  #nav.nav-is-drawer .nav-drawer-tools__btn .fa {
    display: inline-block;
    width: 1.15rem;
    font-size: 1rem;
    text-align: center;
    opacity: 0.9;
  }

  #nav.nav-is-drawer .nav-drawer-search {
    display: block;
    padding: 0 1rem 1rem;
    background: #0a0a0a;
    border-top: 0;
  }

  #nav.nav-is-drawer .nav-drawer-search[hidden] {
    display: none !important;
  }

  #nav.nav-is-drawer .nav-drawer-search__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: stretch;
  }

  #nav.nav-is-drawer .nav-drawer-search input[type="search"] {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #fff;
    color: #111;
    font-size: var(--fs-ui, 0.84rem);
    line-height: 1.3;
    box-sizing: border-box;
  }

  #nav.nav-is-drawer .nav-drawer-search__submit {
    margin: 0;
    padding: 0 0.95rem;
    border: 0;
    background: #83b;
    color: #fff;
    font-size: var(--fs-ui, 0.84rem);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
  }

  #nav.nav-is-drawer .nav-drawer-search__submit:hover,
  #nav.nav-is-drawer .nav-drawer-search__submit:focus-visible {
    opacity: 0.92;
    outline: none;
  }

  #nav.nav-is-drawer .nav-drawer-tools__btn[aria-expanded="true"] {
    background: rgba(140, 59, 197, 0.22);
  }
}
