/* Healthaton shared navigation bar.
   Every page links this one file, so the header looks identical everywhere.
   It uses its own class names (ht-nav-*) and fixed colours, so it does not
   depend on each page's Tailwind colour settings. */

.ht-nav {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  background: rgba(247, 249, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #dfe9f7;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.ht-nav *, .ht-nav *::before, .ht-nav *::after { box-sizing: border-box; }

/* Main row */
.ht-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 80px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.ht-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: #0b2d5b;
}
.ht-nav-brand img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 9999px;
}
.ht-nav-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.ht-nav-brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0b2d5b;
}
.ht-nav-brand-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f8f2f;
}

/* Desktop links */
.ht-nav-links { display: none; align-items: center; gap: 8px; }
.ht-nav-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #44474f;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.ht-nav-link:hover { color: #0b2d5b; background: #edf4ff; }
.ht-nav-link.is-active { color: #2f8f2f; background: #e8f8e5; }

/* Right side */
.ht-nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ht-nav-cta {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 9999px;
  background: #2f8f2f;
  color: #ffffff;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  transition: background-color 0.15s ease;
}
.ht-nav-cta:hover { background: #00530b; color: #ffffff; }
/* Hide the button until the script has set this page's label (avoids a flash of the wrong text) */
.ht-nav:not(.is-ready) .ht-nav-cta { visibility: hidden; }

/* Mobile menu button */
.ht-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid #dfe9f7;
  border-radius: 12px;
  background: #ffffff;
  color: #0b2d5b;
  cursor: pointer;
}
.ht-nav-toggle svg { width: 22px; height: 22px; }
.ht-nav-toggle .ht-icon-close { display: none; }
.ht-nav.is-open .ht-nav-toggle .ht-icon-menu { display: none; }
.ht-nav.is-open .ht-nav-toggle .ht-icon-close { display: block; }

/* Mobile drop-down panel */
.ht-nav-mobile {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid #dfe9f7;
  background: #f7f9ff;
}
.ht-nav.is-open .ht-nav-mobile { display: block; }
.ht-nav-mobile .ht-nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
}

/* Phones: compact top bar so logo, button and menu fit on one row */
@media (max-width: 639px) {
  .ht-nav-bar { gap: 10px; }
  .ht-nav-actions { gap: 8px; }
  .ht-nav-brand { gap: 8px; min-width: 0; }
  .ht-nav-brand img { width: 36px; height: 36px; }
  .ht-nav-brand-name { font-size: 17px; }
  .ht-nav-brand-tag { font-size: 8.5px; letter-spacing: 0.06em; }
  .ht-nav-cta { padding: 9px 14px; font-size: 13px; min-width: 124px; }
}
/* Very narrow phones: keep just the logo mark */
@media (max-width: 359px) {
  .ht-nav-brand-text { display: none; }
}

/* Tablet and up */
@media (min-width: 640px) {
  .ht-nav-bar { padding: 0 32px; }
}

/* Desktop: show links + button, hide the mobile menu */
@media (min-width: 900px) {
  /* Three fixed zones: logo left | links exactly centred | button right.
     The side zones are equal width, so the links never move when the
     button text changes from page to page. */
  .ht-nav-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding: 0 48px;
  }
  .ht-nav-brand { justify-self: start; }
  .ht-nav-links { display: flex; justify-self: center; }
  .ht-nav-actions { justify-self: end; }
  .ht-nav-cta { min-width: 148px; }
  .ht-nav-toggle { display: none; }
  .ht-nav-mobile, .ht-nav.is-open .ht-nav-mobile { display: none; }
}
