/* ──────────────────────────────────────────────────────────────────
   SHARED NAVIGATION — desktop dropdowns + mobile slide-down menu
   Loaded by every subpage. Selectors scoped to .nav and .mobile-*
   so they don't bleed into page-level button styles.
   Colors are literal (no var dependency) so the file works on any page.
   ────────────────────────────────────────────────────────────────── */

/* Container */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e9eaeb;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 40px;
}
.nav-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-logo img {
  height: 64px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Links list */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links > li > a {
  text-decoration: none;
  color: #181d27;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  transition: color 0.2s;
}
.nav-links > li > a:hover { color: #162154; }
.nav-links > li > a:focus-visible {
  outline: 2px solid #F0A500;
  outline-offset: 4px;
  border-radius: 3px;
}

/* Desktop dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #181d27;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  transition: color 0.2s;
}
.nav-dropdown-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
}
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown-toggle:hover { color: #162154; }
.nav-dropdown:hover .nav-dropdown-toggle svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #fff;
  border: 1px solid #e9eaeb;
  border-radius: 14px;
  padding: 14px;
  min-width: 460px;
  box-shadow:
    0 4px 6px rgba(13,22,56,0.04),
    0 16px 40px rgba(13,22,56,0.12),
    0 32px 64px rgba(13,22,56,0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.2s;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}
.nav-dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: #181d27;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.nav-dropdown-link svg {
  width: 14px;
  height: 14px;
  color: #F0A500;
  flex-shrink: 0;
  opacity: 0.85;
}
.nav-dropdown-link:hover {
  background: #f8f9fa;
  color: #162154;
  transform: translateX(2px);
}

/* Right-side actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-phone {
  text-decoration: none;
  color: #181d27;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-phone:hover { color: #162154; }
.nav-phone svg { color: #F0A500; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: #162154;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.nav-cta:hover { background: #1e2c6e; transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}
.hamburger:hover { background: #f8f9fa; }
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #181d27;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.hamburger.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile slide-down panel */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #e9eaeb;
  padding: 12px 16px 20px;
  z-index: 98;
  box-shadow: 0 4px 12px rgba(20,30,60,0.08), 0 12px 24px rgba(20,30,60,0.06);
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu-link {
  display: block;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 500;
  color: #181d27;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.mobile-menu-link:hover { background: #f8f9fa; color: #162154; }
.mobile-menu-link:focus-visible { outline: 2px solid #F0A500; outline-offset: -2px; }

.mobile-submenu-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-submenu-chev {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}
.mobile-submenu-toggle[aria-expanded="true"] .mobile-submenu-chev { transform: rotate(180deg); }
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 0 8px;
}
.mobile-submenu.open {
  max-height: 600px;
  padding: 4px 8px 8px;
}
.mobile-submenu-link {
  display: block;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #717680;
  text-decoration: none;
  border-radius: 7px;
  transition: background 0.15s, color 0.15s;
}
.mobile-submenu-link:hover { background: #f8f9fa; color: #162154; }

.mobile-menu-divider {
  height: 1px;
  background: #e9eaeb;
  margin: 10px 0;
}
.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-menu-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  border: 1.5px solid #e9eaeb;
  font-size: 16px;
  font-weight: 600;
  color: #181d27;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.mobile-menu-phone:hover { border-color: #162154; background: #f8f9fa; }
.mobile-menu-estimate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 8px;
  background: #162154;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.mobile-menu-estimate:hover { background: #1e2c6e; }

/* Responsive: collapse desktop, show hamburger */
@media (max-width: 900px) {
  .nav { padding: 0 16px; height: 68px; }
  .nav-inner { gap: 12px; }
  .nav-logo img { height: 50px; width: auto; }
  .nav-links { display: none; }
  .nav-right .nav-cta { display: none; }
  .nav-right { gap: 12px; }
  .nav-phone { font-size: 13px; gap: 4px; }
  .hamburger { display: flex; }
}
