/* ============================================================
   NAVBAR STYLES — able-estimating
   ============================================================ */

.nav-item .active,
.dropdown .active {
  background: #f2f2fb;
}

/* ── NAV WRAPPER ────────────────────────────────────────────── */
/* nav#mainNav {
  background: #fff;
  border-bottom: 1px solid #e8e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
  width: 100%;
} */

nav#mainNav {
  background-color: #fff;
  border-bottom: 1px solid #e8e8f0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
}

/* Push page content below the fixed nav */
body {
  padding-top: 80px;
}

/* Mobile: keep mobile menu flush below fixed nav */
.mobile-menu {
  top: 80px;
}

.nav-inner {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 11px 50px;
  gap: 0;
}

/* ── LOGO ──────────────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1a1a2e;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 20px;
}

/* ── MAIN MENU ─────────────────────────────────────────────── */
.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: 2px;
  flex: 1;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: #3C3C3C;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  white-space: nowrap;
  transition: color .15s, background .15s;
  user-select: none;
}

.nav-link:hover,
.nav-item.open > .nav-link {
  color: #1a1a2e;
  background: #f2f2fb;
}

/* ── CHEVRONS ─────────────────────────────────────────────── */
.chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform .2s;
  display: block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
}

.nav-item.open > .nav-link .chevron {
  transform: rotate(180deg);
}

.chevron-right {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 15 12 9 18'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── DROPDOWN ──────────────────────────────────────────────── */
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #fff;
  border: 1px solid #e8e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 220px;
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s;
  z-index: 100;
  list-style: none;
}

.nav-item.open > .dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* ── DROPDOWN ITEMS ─────────────────────────────────────────── */
.dd-item {
  position: relative;
}

.dd-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: #555570;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
  gap: 8px;
  transition: color .12s, background .12s;
  user-select: none;
}

.dd-link:hover,
.dd-item.open > .dd-link {
  color: #1a1a2e;
  background: #f2f2fb;
}

/* ── LEVEL-2 SUBMENU ────────────────────────────────────────── */
.sub-dropdown {
  position: absolute;
  top: -6px;
  left: calc(100% + 6px);
  background: #fff;
  border: 1px solid #e8e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 210px;
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity .15s, transform .15s;
  z-index: 200;
  list-style: none;
}

.dd-item.open > .sub-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

/* ── LEVEL-3 SUBMENU ────────────────────────────────────────── */
.sub-sub-dropdown {
  position: absolute;
  top: -6px;
  left: calc(100% + 6px);
  background: #fff;
  border: 1px solid #e8e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 200px;
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity .15s, transform .15s;
  z-index: 300;
  list-style: none;
}

.sub-dd-item.open > .sub-sub-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.sub-dd-item {
  position: relative;
}

.sub-dd-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #555570;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
  gap: 8px;
  transition: color .12s, background .12s;
  user-select: none;
}

.sub-dd-link:hover,
.sub-dd-item.open > .sub-dd-link {
  color: #1a1a2e;
  background: #f2f2fb;
}

/* ── LEAF ITEMS ─────────────────────────────────────────────── */
.leaf {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #555570;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
  cursor: pointer;
  transition: color .12s, background .12s;
}

.leaf:hover {
  color: #1a1a2e;
  background: #f2f2fb;
}

/* ── NAV ACTIONS ────────────────────────────────────────────── */
.nav-actions {
  display: flex;
}

/* ── HAMBURGER ──────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background .15s;
  flex-shrink: 0;
}

.hamburger:hover {
  background: #f2f2fb;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1a2e;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU OVERLAY ────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  overflow-y: auto;
  z-index: 999;
  padding: 12px 16px 40px;
  border-top: 1px solid #e8e8f0;
}

.mobile-menu.open {
  display: block;
}

/* ── MOBILE ITEMS ───────────────────────────────────────────── */
.m-item {
  border-radius: 8px;
  overflow: visible;
}

/* Split row: text link + arrow button side by side */
.m-link-row {
  display: flex;
  align-items: center;
  border-radius: 8px;
  transition: background .12s;
}

.m-link-row:hover {
  background: #f5f5fb;
}

.m-item.open > .m-link-row {
  background: #f5f5fb;
}

.m-link-text {
  flex: 1;
  padding: 12px 12px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  text-decoration: none;
  font-family: inherit;
  display: block;
}

/* Plain top-level items with no sub (just a link, full width) */
.m-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a2e;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: background .12s;
  text-decoration: none;
}

.m-link:hover {
  background: #f5f5fb;
}

/* Arrow-only button (chevron toggle) */
.m-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background .12s;
}

.m-arrow:hover {
  background: #ededf8;
}

.m-arrow .chevron {
  transition: transform .2s;
}

.m-item.open > .m-link-row .m-arrow .chevron {
  transform: rotate(180deg);
}

/* ── MOBILE LEVEL-2 ─────────────────────────────────────────── */
.m-sub {
  display: none;
  padding: 2px 0 4px 14px;
  list-style: none;
}

.m-item.open > .m-sub {
  display: block;
}

.m-sub-item {
  position: relative;
}

/* Split row for level-2 items that have sub-menus */
.m-sub-link-row {
  display: flex;
  align-items: center;
  border-radius: 7px;
  transition: background .12s;
}

.m-sub-link-row:hover {
  background: #f2f2fb;
}

.m-sub-item.open > .m-sub-link-row {
  background: #ededf8;
}

.m-sub-link-text {
  flex: 1;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #555570;
  text-decoration: none;
  font-family: inherit;
  display: block;
}

/* Plain level-2 link (no sub-menu) */
.m-sub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #555570;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border-radius: 7px;
  transition: background .12s;
  text-decoration: none;
}

.m-sub-link:hover {
  background: #f2f2fb;
  color: #1a1a2e;
}

/* Arrow button for level-2 */
.m-sub-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background .12s;
}

.m-sub-arrow:hover {
  background: #ededf8;
}

.m-sub-arrow .chevron-right {
  transition: transform .2s;
}

.m-sub-item.open > .m-sub-link-row .m-sub-arrow .chevron-right {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  transform: rotate(90deg);
}

/* ── MOBILE LEVEL-3 ─────────────────────────────────────────── */
.m-sub2 {
  display: none;
  padding: 2px 0 4px 14px;
  list-style: none;
}

.m-sub-item.open > .m-sub2 {
  display: block;
}

.m-sub2-item {}

.m-sub2-link {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: #888;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border-radius: 7px;
  transition: background .12s;
  text-decoration: none;
}

.m-sub2-link:hover {
  background: #f2f2fb;
  color: #1a1a2e;
}

/* ── MOBILE DIVIDER ─────────────────────────────────────────── */
.m-divider {
  border: none;
  border-top: 1px solid #e8e8f0;
  margin: 8px 0;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-menu,
  .nav-actions {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-inner {
    justify-content: space-between;
    max-width: 100%;
    padding: 11px 25px;
  }

  .logo {
    margin-right: 0;
  }
}