/* AG Locks Global Header */
body.agh-menu-open {
  overflow: hidden !important;
}

#ag-global-header,
#ag-global-header * {
  box-sizing: border-box;
}

#ag-global-header {
  position: relative;
  z-index: 99990;
  width: 100%;
  margin: 0;
  padding: 12px 0 0;
  color: #fff;
  background: transparent;
  font-family: "Poppins", sans-serif;
  line-height: normal;
}

#ag-global-header.agh-is-sticky:not(.agh-merge-enabled) {
  position: sticky;
  top: 0;
}

.admin-bar #ag-global-header.agh-is-sticky:not(.agh-merge-enabled) {
  top: 32px;
}

/* Merge mode starts out of normal document flow, preventing a separate
   header bar from flashing above the hero before JavaScript relocates it. */
#ag-global-header.agh-merge-enabled {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding-top: 0;
  background: transparent;
}

/* Once detected, the header is physically moved inside the page hero. */
#ag-global-header.agh-is-merged {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  margin: 0 0 var(--agh-hero-content-gap, 0px);
  padding: 0;
  background: transparent;
}

#ag-global-header.agh-is-merged .agh-card {
  width: 100%;
  max-width: none;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#ag-global-header.agh-is-merged .agh-inner {
  width: min(calc(100% - 40px), var(--agh-hero-content-width, var(--agh-content-width, 1440px)));
  max-width: none;
}

.agh-sticky-placeholder {
  display: block;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
}

/* Optional sticky mode: transparent in the hero, solid only after scrolling. */
#ag-global-header.agh-is-merged.agh-is-fixed {
  position: fixed;
  z-index: 100000;
  top: var(--agh-fixed-top, 0px);
  right: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 8px 0;
}

#ag-global-header.agh-is-merged.agh-is-fixed .agh-card {
  width: min(calc(100% - 24px), 1760px);
  margin: 0 auto;
  background: var(--agh-navy, #051829);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(5, 24, 41, 0.22);
}

#ag-global-header a {
  color: inherit;
  text-decoration: none;
}

#ag-global-header button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

#ag-global-header .agh-card {
  width: calc(100% - 24px);
  margin: 0 auto;
  overflow: visible;
  background: var(--agh-navy, #051829);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(5, 24, 41, 0.08);
}

#ag-global-header .agh-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 64px), var(--agh-content-width, 1440px));
  min-height: 82px;
  margin: 0 auto;
  gap: 30px;
}

#ag-global-header .agh-logo-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

#ag-global-header .agh-logo {
  display: block;
  width: 105px;
  height: 55px;
  margin: 0;
  object-fit: contain;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

#ag-global-header .agh-site-name {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

#ag-global-header .agh-desktop-nav {
  min-width: 0;
  margin-left: auto;
}

#ag-global-header .agh-menu,
#ag-global-header .agh-mobile-menu,
#ag-global-header .agh-menu ul,
#ag-global-header .agh-mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#ag-global-header .agh-menu {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
}

#ag-global-header .agh-menu > li {
  position: relative;
  margin: 0;
  padding: 0;
}

#ag-global-header .agh-menu > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease;
}

#ag-global-header .agh-menu > li > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--agh-green, #a8e063);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

#ag-global-header .agh-menu > li:hover > a,
#ag-global-header .agh-menu > li.current-menu-item > a,
#ag-global-header .agh-menu > li.current-menu-ancestor > a {
  color: #fff;
}

#ag-global-header .agh-menu > li:hover > a::after,
#ag-global-header .agh-menu > li.current-menu-item > a::after,
#ag-global-header .agh-menu > li.current-menu-ancestor > a::after {
  transform: scaleX(1);
}

#ag-global-header .agh-menu .sub-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  z-index: 20;
  display: grid;
  width: max-content;
  min-width: 210px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(5, 24, 41, 0.08);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(5, 24, 41, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

#ag-global-header .agh-menu li:hover > .sub-menu,
#ag-global-header .agh-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

#ag-global-header .agh-menu .sub-menu a {
  display: block;
  padding: 11px 12px;
  color: var(--agh-navy, #051829);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

#ag-global-header .agh-menu .sub-menu a:hover {
  background: #eef2f4;
}

#ag-global-header .agh-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#ag-global-header .agh-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 19px;
  color: var(--agh-navy, #051829);
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#ag-global-header .agh-call:hover {
  background: var(--agh-green, #a8e063);
  transform: translateY(-2px);
}

#ag-global-header .agh-social,
#ag-global-header .agh-menu-toggle,
#ag-global-header .agh-mobile-close,
#ag-global-header .agh-mobile-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

#ag-global-header .agh-social:hover,
#ag-global-header .agh-menu-toggle:hover,
#ag-global-header .agh-mobile-close:hover,
#ag-global-header .agh-mobile-socials a:hover {
  color: var(--agh-navy, #051829);
  background: var(--agh-green, #a8e063);
  transform: translateY(-2px);
}

#ag-global-header .agh-menu-toggle {
  display: none;
}

#ag-global-header .agh-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: block;
  background: rgba(5, 24, 41, 0.62);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#ag-global-header .agh-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

#ag-global-header .agh-mobile-panel {
  position: fixed;
  z-index: 99999;
  top: 15px;
  right: 15px;
  bottom: 15px;
  display: flex;
  flex-direction: column;
  width: calc(100vw - 30px);
  max-width: 390px;
  padding: 20px 24px 24px;
  overflow-y: auto;
  color: #fff;
  background: var(--agh-navy, #051829);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: -10px 10px 40px rgba(0, 0, 0, 0.5);
  visibility: hidden;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s ease;
}

#ag-global-header .agh-mobile-panel.is-active {
  visibility: visible;
  transform: translateX(0);
}

#ag-global-header .agh-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#ag-global-header .agh-mobile-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

#ag-global-header .agh-mobile-nav {
  flex: 1;
  padding: 18px 0 26px;
}

#ag-global-header .agh-mobile-menu {
  display: grid;
  gap: 4px;
}

#ag-global-header .agh-mobile-menu > li {
  margin: 0;
  padding: 0;
}

#ag-global-header .agh-mobile-menu > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 17px;
  font-weight: 700;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

#ag-global-header .agh-mobile-menu > li > a::after {
  content: "\f061";
  color: var(--agh-green, #a8e063);
  font-family: "Font Awesome 6 Free";
  font-size: 13px;
  font-weight: 900;
}

#ag-global-header .agh-mobile-menu > li > a:hover {
  padding-left: 8px;
  color: var(--agh-green, #a8e063);
}

#ag-global-header .agh-mobile-menu .sub-menu {
  display: grid;
  gap: 2px;
  padding: 5px 0 10px 15px;
}

#ag-global-header .agh-mobile-menu .sub-menu a {
  display: block;
  padding: 8px 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 600;
}

#ag-global-header .agh-mobile-menu .sub-menu a:hover {
  color: var(--agh-green, #a8e063);
}

#ag-global-header .agh-mobile-footer {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#ag-global-header .agh-mobile-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  width: 100%;
  padding: 0 18px;
  color: var(--agh-navy, #051829);
  background: var(--agh-green, #a8e063);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

#ag-global-header .agh-mobile-socials {
  display: flex;
  gap: 10px;
}

@media (max-width: 1120px) {
  #ag-global-header .agh-desktop-nav {
    display: none;
  }

  #ag-global-header .agh-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 760px) {
  #ag-global-header {
    padding-top: 6px;
  }

  #ag-global-header .agh-card {
    width: calc(100% - 12px);
    border-radius: 8px;
  }

  #ag-global-header.agh-is-merged .agh-card {
    width: 100%;
    border-radius: 0;
  }

  #ag-global-header.agh-is-merged .agh-inner {
    width: min(calc(100% - 36px), var(--agh-hero-content-width, 100%));
  }

  #ag-global-header.agh-is-merged.agh-is-fixed .agh-card {
    width: calc(100% - 12px);
    border-radius: 8px;
  }

  #ag-global-header .agh-inner {
    width: calc(100% - 36px);
    min-height: 72px;
  }

  #ag-global-header .agh-call,
  #ag-global-header .agh-social {
    display: none;
  }

  #ag-global-header .agh-logo {
    width: 100px;
    height: 52px;
  }
}

@media (max-width: 782px) {
  .admin-bar #ag-global-header.agh-is-sticky:not(.agh-merge-enabled) {
    top: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #ag-global-header *,
  #ag-global-header *::before,
  #ag-global-header *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
