/* ============================================================================
   Site header for the static service pages.

   These pages are Design Canvas exports and do not go through the Astro build,
   so they cannot import src/styles/site.css. This file mirrors the header
   rules in that file 1:1 (.hdr / .nav / .nav-dropdown / .mobile-menu) so the
   header is pixel-identical everywhere. If you change one, change both.
   The .tp-lock logo rules already come from the design system's
   colors_and_type.css, which both pages load.
   ========================================================================== */

#sitenav {
  position: sticky !important;
  top: 0 !important;
  left: auto !important;
  right: auto !important;
  z-index: 1000 !important;
  background: #000 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-family: 'Outfit', system-ui, sans-serif;
}

#sitenav .sh-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 16px;
}

#sitenav a { text-decoration: none; }

/* ---- Logo ---- */
#sitenav .sh-logo { display: inline-flex; align-items: center; }

/* ---- Nav ---- */
#sitenav .sh-nav { display: flex; align-items: center; gap: 30px; }
#sitenav .sh-nav > a {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  transition: color 200ms cubic-bezier(.2, .7, .2, 1);
}
#sitenav .sh-nav > a:hover { color: #2F8F6B; }

#sitenav .sh-services { position: relative; }
#sitenav .sh-services summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  transition: color 200ms cubic-bezier(.2, .7, .2, 1);
}
#sitenav .sh-services summary::-webkit-details-marker { display: none; }
#sitenav .sh-services summary:hover,
#sitenav .sh-services.active summary,
#sitenav .sh-services[open] summary { color: #2F8F6B; }
#sitenav .sh-services summary svg {
  width: 15px;
  height: 15px;
  transition: transform 200ms cubic-bezier(.2, .7, .2, 1);
}
#sitenav .sh-services[open] summary svg { transform: rotate(180deg); }

#sitenav .sh-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%);
  /* nine services: three columns, matching the Astro header */
  width: 712px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 6px;
  padding: 10px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
}
#sitenav .sh-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 18px;
}
#sitenav .sh-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 13px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
}
#sitenav .sh-dropdown a:hover,
#sitenav .sh-dropdown a[aria-current="page"] { background: rgba(255, 255, 255, .08); }
#sitenav .sh-dropdown a svg { width: 15px; height: 15px; color: #2F8F6B; flex: none; }

/* ---- Call to action ---- */
#sitenav .sh-cta { display: flex; gap: 10px; align-items: center; }
#sitenav .sh-btn {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 11px;
  padding: 11px 19px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1;
  background: #2F8F6B;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(47, 143, 107, .22);
  transition: all 200ms cubic-bezier(.2, .7, .2, 1);
}
#sitenav .sh-btn:hover { background: #1F5E47; }
#sitenav .sh-btn:active { transform: translateY(1px); }
#sitenav .sh-btn svg { width: 17px; height: 17px; stroke-width: 2; }

#sitenav .sh-menu-btn {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  padding: 0;
}
#sitenav .sh-menu-btn svg { width: 20px; height: 20px; }

/* ---- Mobile menu ---- */
.sh-mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  z-index: 999;
  background: rgba(26, 26, 26, .98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 20px 30px;
  flex-direction: column;
  gap: 4px;
  font-family: 'Outfit', system-ui, sans-serif;
}
.sh-mobile-menu.open { display: flex; }
.sh-mobile-menu a {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  padding: 14px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.sh-mobile-services summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
  padding: 14px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}
.sh-mobile-services summary::-webkit-details-marker { display: none; }
.sh-mobile-services summary svg {
  width: 19px;
  height: 19px;
  transition: transform 200ms cubic-bezier(.2, .7, .2, 1);
}
.sh-mobile-services[open] summary svg { transform: rotate(180deg); }
.sh-mobile-submenu {
  display: flex;
  flex-direction: column;
  padding: 4px 0 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.sh-mobile-menu .sh-mobile-submenu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 6px; border: 0; font-size: 16px; color: #fff; }
.sh-mobile-menu .sh-mobile-submenu a svg { width: 15px; height: 15px; flex: none; color: #2F8F6B; }
.sh-mobile-menu .sh-mobile-submenu a:hover { color: #2F8F6B; }
.sh-mobile-menu .sh-btn {
  margin-top: 18px;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 11px 19px;
  font-size: 14.5px;
  font-weight: 600;
  background: #2F8F6B;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.sh-mobile-menu .sh-btn svg { width: 17px; height: 17px; stroke-width: 2; }
/* no scroll lock: on iOS it does not lock anyway and it turns a sticky header loose */

@media (max-width: 820px) {
  #sitenav .sh-nav,
  #sitenav .sh-cta .sh-btn { display: none; }
  #sitenav .sh-menu-btn { display: inline-flex; }
  /* fixed, not sticky, on phones: iOS keeps scrolling under an overflow lock and a sticky header
     rides away with the page */
  html #sitenav { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; }
  html body { padding-top: 71px !important; } /* the page's own reset zeroes body padding later in the head */
}
/* the second dropdown: one column of audiences */
#sitenav .sh-dropdown.sh-dropdown-audience { width: 270px; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: 1fr; }

@media (max-width: 560px) {
  #sitenav .sh-wrap { padding: 0 20px; }
}

/* sh-dropdown-narrow-guard: never let the three-column menu overflow a small window */
@media (max-width: 860px) {
  #sitenav .sh-dropdown {
    width: min(92vw, 520px);
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, auto);
  }
}
