/* Homepage header adopted from the approved T01 master template.
   This file owns only the homepage header surface; page content remains in homepage.css. */
:root {
  --nao-header-navy: #173563;
  --nao-header-ink: #183458;
  --nao-header-sage: #84bb79;
  --nao-header-sage-dark: #5d9d61;
  --nao-header-line: #d7e2e6;
  --nao-header-shadow: 0 14px 28px rgba(23, 53, 99, .14);
}

.main-page-header {
  position: relative;
  z-index: 40;
  box-sizing: border-box;
  width: 100%;
  min-height: 88px;
  margin: 0;
  padding: 18px clamp(24px, 4vw, 68px);
  border-bottom: 1px solid var(--nao-header-line);
  background: rgba(255, 255, 255, .98);
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-page-header .logo { margin: 0; flex: 0 0 auto; }
.main-page-header .logo img { display: block; width: 174px; height: auto; }
.main-page-header .nav-container { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; justify-content: center; }
.main-menu { display: flex; gap: clamp(15px, 1.55vw, 28px); align-items: center; margin: 0; padding: 0; list-style: none; }
.main-page-header .nav-container a,
.nav-container .main-menu > li > a {
  padding: 7px 0;
  color: var(--nao-header-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}
.nav-container .main-menu > li > a::before { display: none; }
.nav-container .main-menu > li > a:hover,
.nav-container .main-menu > li > a:focus-visible { color: var(--nao-header-sage-dark); }
.main-menu .main-list-item { position: static; }
.main-menu .main-list-item > .nav-item { position: relative; display: block; text-decoration: none; }
.main-menu .main-list-item.is-mega-current > .nav-item { color: var(--nao-header-navy); }
.main-menu .main-list-item.is-mega-current > .nav-item::after {
  position: absolute;
  right: 0;
  bottom: -18px;
  left: 0;
  height: 2px;
  background: var(--nao-header-sage);
  content: '';
}

.call-out-container { display: flex; flex: 0 0 auto; align-items: center; gap: 18px; }
.phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: var(--nao-header-ink) !important;
  font-size: 14px !important;
  line-height: 1.2;
  text-decoration: none;
}
.phone-btn img { width: 15px; height: 15px; }
.call-out-container .book-appointment-menu-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--nao-header-sage);
  border-radius: 7px;
  background: var(--nao-header-sage);
  color: var(--nao-header-navy) !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.15;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.call-out-container .book-appointment-menu-btn:hover,
.call-out-container .book-appointment-menu-btn:focus-visible {
  border-color: var(--nao-header-sage-dark);
  background: var(--nao-header-sage-dark);
  color: #fff !important;
}
.main-page-header .ad-menu-btn {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.main-page-header .ad-menu-btn img { display: block; width: 24px; height: 24px; object-fit: contain; }

.sub-menu {
  display: none;
  position: absolute;
  top: 95px;
  z-index: 41;
  width: 450px;
  margin: 0;
  padding: 9px;
  border: 1px solid var(--nao-header-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--nao-header-shadow);
  list-style: none;
}
.main-menu .sub-menu li { max-width: 250px; padding: 0; }
.main-menu .sub-menu li a {
  display: block;
  padding: 10px 14px;
  border-radius: 4px;
  text-decoration: none;
}
.main-menu .sub-menu li a:hover,
.main-menu .sub-menu li a:focus-visible { background: var(--nao-header-navy); color: #fff; }
.main-page-header.has-nao-mega { overflow: visible; }
.main-page-header.has-nao-mega .main-menu > .main-list-item > .sub-menu { display: none !important; }

.nao-mega-menu {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  left: 0;
  z-index: 39;
  display: block;
  min-height: 300px;
  overflow: hidden;
  border-bottom: 1px solid rgba(23, 53, 99, .13);
  background: #fff;
  box-shadow: 0 24px 38px rgba(16, 41, 77, .12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.16, 1, .3, 1), visibility 220ms linear;
  visibility: hidden;
}
.nao-mega-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); visibility: visible; }
.nao-mega-content { position: relative; z-index: 1; width: min(970px, calc(100% - clamp(295px, 27vw, 410px))); min-height: 300px; margin-left: clamp(255px, 25vw, 390px); padding: 39px 34px 34px 10px; }
.nao-mega-star { position: absolute; bottom: -190px; left: -64px; z-index: 0; display: block; width: clamp(310px, 27vw, 430px); height: auto; mix-blend-mode: multiply; opacity: 0; pointer-events: none; transform: translate3d(-62px, 85px, 0) rotate(-150deg) scale(.62); transform-origin: 50% 50%; }
.nao-mega-menu.is-open .nao-mega-star { opacity: 1; animation: nao-mega-star-in 680ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes nao-mega-star-in {
  0% { opacity: 0; transform: translate3d(-62px, 85px, 0) rotate(-150deg) scale(.62); }
  68% { opacity: 1; transform: translate3d(5px, -7px, 0) rotate(0) scale(1.04); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}
.nao-mega-heading { margin: 0 0 23px; color: var(--nao-header-navy); font-family: 'Tiempos Fine', Georgia, serif; font-size: clamp(30px, 2.4vw, 42px); font-weight: 300; letter-spacing: -.035em; line-height: 1; }
.nao-mega-columns { display: grid; grid-template-columns: repeat(var(--nao-mega-columns), minmax(130px, 1fr)); gap: 22px 38px; max-width: 850px; }
.nao-mega-column { display: grid; align-content: start; gap: 2px; }
.nao-mega-link { display: inline-flex; min-height: 29px; align-items: center; color: var(--nao-header-ink); font-size: 14px; line-height: 1.25; text-decoration: none; transition: color 150ms ease, transform 150ms ease; }
.nao-mega-link::after { width: 0; overflow: hidden; color: var(--nao-header-sage-dark); content: ' ↗'; transition: width 150ms ease; }
.nao-mega-link:hover, .nao-mega-link:focus-visible { color: var(--nao-header-sage-dark); transform: translateX(3px); }
.nao-mega-link:hover::after, .nao-mega-link:focus-visible::after { width: 17px; }

.menu-dropdown {
  position: fixed;
  top: 0;
  right: -100%;
  z-index: 99999;
  box-sizing: border-box;
  width: min(480px, 100vw);
  height: 100vh;
  padding: 28px 40px 28px 66px;
  background: var(--nao-header-navy);
  transition: right 220ms cubic-bezier(.16, 1, .3, 1);
}
.menu-dropdown.active { right: 0; }
.menu-dropdown .inner-logo { display: block; width: 190px; margin: 0; }
.menu-dropdown .inner-logo img { display: block; width: 190px; max-width: 100%; height: auto; }
.menu-dropdown > .ad-menu-btn { position: absolute; top: 26px; right: 24px; }
.menu-dropdown > .ad-menu-btn img { width: 24px; height: 24px; }
.inner-nav-container { display: flex; height: 80%; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 62px; overflow: auto; }
.inner-nav-container a { min-height: 44px; padding: 9px 14px; border-radius: 8px; color: #fff !important; font-size: 20px; line-height: 1.3; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.inner-nav-container a:hover, .inner-nav-container a:focus-visible { background: var(--nao-header-sage); color: var(--nao-header-navy) !important; }
body.menu-open { overflow: hidden; }

@media (max-width: 1190px) {
  .main-page-header { gap: 20px; padding-inline: 28px; }
  .main-page-header .logo img { width: 154px; }
  .main-menu { gap: 13px; }
  .main-page-header .nav-container a { font-size: 13px; }
  .phone-btn { display: none; }
}
@media (max-width: 920px) {
  .main-page-header { min-height: 72px; padding: 14px 24px; }
  .main-page-header .logo img { width: 146px; }
  .main-page-header .nav-container { display: none; }
  .call-out-container { margin-left: auto; }
  .nao-mega-menu { display: none; }
}
@media (max-width: 600px) {
  .main-page-header { min-height: 64px; gap: 10px; padding: 12px 18px; }
  .main-page-header .logo img { width: 132px; }
  .call-out-container { gap: 8px; }
  .call-out-container .book-appointment-menu-btn { display: none; }
  .call-out-container .phone-btn { display: inline-flex; margin: 0; font-size: 12px !important; line-height: 1; }
  .call-out-container .phone-btn img { width: 14px; height: 14px; }
  .main-page-header .call-out-container > .ad-menu-btn { width: 36px; height: 36px; }
  .menu-dropdown { padding: 25px 20px 25px 48px; }
  .inner-nav-container a { font-size: 20px; line-height: 1.45; }
}
@media (max-width: 360px) {
  .main-page-header .call-out-container .phone-btn { width: 24px; overflow: hidden; font-size: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .nao-mega-menu, .menu-dropdown, .nao-mega-link, .nao-mega-rail-link, .call-out-container .book-appointment-menu-btn { transition: none; }
  .nao-mega-menu.is-open .nao-mega-star { animation: none; transform: none; }
}
