/* ═══════════════════════════════════════════════════════════════
   NAVIGATION.CSS — MergerDomo
   Fully mobile-responsive (mobile-first refinements)
   Breakpoints: 1100px | 768px | 480px | 360px
═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────
   ANNOUNCEMENT BAR
─────────────────────────────────────────────────────────── */
.announcement-bar {
  background: var(--md-yellow);
  height: var(--ann-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--md-navy);
  padding: 0 12px;
  overflow: hidden;
}

.announcement-bar p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-bar .divider {
  margin: 0 10px;
  color: rgba(13, 27, 76, .35);
}

.announcement-bar .cta-link {
  font-weight: 700;
  color: var(--md-navy);
  text-decoration: none !important;
  border-bottom: 1.5px solid rgba(13, 27, 76, .3);
  transition: border-color .18s ease;
}

.announcement-bar .cta-link:hover {
  border-color: var(--md-navy);
}

/* ───────────────────────────────────────
   NAVBAR SHELL
─────────────────────────────────────────────────────────── */
.md-nav {
  background: var(--md-navy);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  position: relative;
}

.md-nav__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: space-between;
  position: relative;
}

/* Logo */
.md-nav__logo {
  flex-shrink: 0;
  margin-right: 32px;
}

.md-nav__logo img {
  height: 28px;
  display: block;
}

/* ───────────────────────────────────────
   NAV LIST + ITEMS  (desktop)
─────────────────────────────────────────────────────────── */
.md-nav__list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center !important;
  list-style: none;
  margin: 0 auto;
  padding: 0;
}

.md-nav__item {
  position: relative;
}

.md-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--nav-h);
  padding: 0 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s ease;
  position: relative;
  text-decoration: none !important;
  background: none;
  border: none;
  font-family: 'Roboto', sans-serif;
}

/* Yellow underline on hover */
.md-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--md-yellow);
  transform: scaleX(0);
  transition: transform .18s ease;
  border-radius: 2px 2px 0 0;
}

.md-nav__link:hover,
.md-nav__item:hover > .md-nav__link {
  color: #fff;
}

.md-nav__link:hover::after,
.md-nav__item:hover > .md-nav__link::after {
  transform: scaleX(1);
}

.md-nav__chevron {
  font-size: 10px;
  color: rgba(255, 255, 255, .4);
  transition: transform .18s ease, color .18s ease;
  pointer-events: none;
}

.md-nav__item:hover > .md-nav__link .md-nav__chevron {
  transform: rotate(180deg);
  color: var(--md-yellow);
}

/* ── Marketplace CTA pill ── */
.md-nav__item--mkt {
  padding-left: 16px;
}

.md-nav__item--mkt .md-nav__link {
  padding: 0;
  height: auto;
  color: var(--md-navy);
}

.md-nav__item--mkt .md-nav__link::after {
  display: none;
}

.md-nav__link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--md-yellow);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  transition: border .18s ease;
}

.md-nav__link-pill:hover {
  border: 1.5px solid var(--md-yellow);
}

/* ── Action buttons ── */
.md-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 32px;
  flex-shrink: 0;
}

.md-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  border: none;
  text-decoration: none !important;
}

.md-nav__btn--login {
  background: transparent;
  color: rgba(255, 255, 255, .72);
  border: 1.5px solid rgba(255, 255, 255, .2) !important;
}

.md-nav__btn--login:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .5) !important;
  background: rgba(255, 255, 255, .08);
}

.md-nav__btn--register {
  background: var(--md-yellow) !important;
  color: var(--md-navy) !important;
  border: 1.5px solid var(--md-yellow) !important;
}

.md-nav__btn--register:hover {
  background: transparent !important;
  color: var(--md-yellow) !important;
}

/* ───────────────────────────────────────
   MEGA MENU BASE  (desktop)
─────────────────────────────────────────────────────────── */
.md-mega,
.md-dropdown {
  position: absolute;
  top: calc(var(--nav-h) - 1px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 24px 64px rgba(13, 27, 76, .16), 0 4px 12px rgba(0, 0, 0, .07);
  border-top: 3px solid var(--md-yellow);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 1050;
  min-width: 620px;
}

.md-nav__item:hover > .md-mega,
.md-nav__item:hover > .md-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* Mega grid inner — 2 columns on desktop */
.md-mega__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 22px 24px 20px;
  gap: 0;
}

/* Column */
.md-mega__col {
  min-width: 260px;
  padding: 0 20px 0 0;
}

.md-mega__col:last-child {
  padding-right: 0;
}

/* Button row inside mega (desktop) */
.md-mega__button {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
  margin-top: 0;
  border-top: 1px solid #f1f5f9;
}

.md-mega__button .btn-cta-primary {
  padding: 10px 22px;
  font-size: 12px;
  border-radius: 10px;
  width: auto;
  min-width: unset;
}

.md-mega__col + .md-mega__col {
  border-left: 1px solid #f1f5f9;
  padding-left: 20px;
}

/* Column heading */
.md-mega__heading {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--md-yellow-dark);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

/* Mega links */
.md-mega__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.md-mega__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  transition: background .16s ease, color .16s ease;
  text-decoration: none !important;
}

.md-mega__link:hover {
  background: var(--md-blue-light);
  color: var(--md-blue);
}

.md-mega__link:hover .md-mega__icon {
  background: var(--md-blue);
  color: #fff;
}

.md-mega__icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: background .16s ease, color .16s ease;
}

.md-mega__link-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  display: block;
  white-space: nowrap;
}

.md-mega__link-sub {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.3;
  margin-top: 1px;
  display: block;
}

/* Tag pill */
.md-mega__tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
  letter-spacing: .3px;
}

.md-mega__tag--free {
  background: #d1fae5;
  color: #065f46;
}

.md-mega__tag--new {
  background: #fef3c7;
  color: #92400e;
}

/* Feature block */
.md-mega__feature {
  background: linear-gradient(135deg, var(--md-navy) 0%, #1a2f6e 100%);
  border-radius: 10px;
  padding: 16px;
  color: #fff;
  margin-top: 8px;
}

.md-mega__feature-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--md-yellow);
  margin-bottom: 5px;
}

.md-mega__feature-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.3;
}

.md-mega__feature-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .6);
  line-height: 1.5;
  margin-bottom: 10px;
}

.md-mega__feature-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--md-yellow);
  color: var(--md-navy);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 5px;
  text-decoration: none !important;
  transition: background .16s ease;
}

.md-mega__feature-btn:hover {
  background: var(--md-yellow-dark);
  color: var(--md-navy) !important;
}

/* Simple dropdown */
.md-dropdown {
  min-width: 210px;
  padding: 10px 6px;
}

.md-dropdown__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  transition: background .16s ease, color .16s ease;
  text-decoration: none !important;
}

.md-dropdown__link:hover {
  background: var(--md-blue-light);
  color: var(--md-blue);
}

.md-dropdown__link i {
  font-size: 13px;
  color: #9ca3af;
  width: 16px;
}

.md-dropdown__link:hover i {
  color: var(--md-blue);
}

.md-dropdown__divider {
  height: 1px;
  background: #f1f5f9;
  margin: 5px 12px;
}

/* ───────────────────────────────────────
   HAMBURGER
─────────────────────────────────────────────────────────── */
.md-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.md-nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}

.md-nav__toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.md-nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.md-nav__toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ≤ 1100px  —  MOBILE: show hamburger, hide desktop nav
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {

  /* ── Navbar strip ── */
  .md-nav {
    height: var(--nav-h);
    position: relative;
    z-index: 1200;
  }

  .md-nav__inner {
    padding: 0 16px;
  }

  .md-nav__logo { margin-right: 0; }

  /* Show hamburger */
  .md-nav__toggle {
    display: flex;
    z-index: 1201;
    order: 3;
  }

  /* Hide desktop list + action buttons */
  .md-nav__list,
  .md-nav__actions {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE DRAWER  (two-panel slide pattern)
   Overlay + drawer are always in DOM, hidden by default.
   No overflow:hidden on <html>. Each panel scrolls on its own.
═══════════════════════════════════════════════════════════════ */

/* ── Overlay ── */
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1198;
  opacity: 0;
  transition: opacity .25s ease;
}
.mob-overlay.is-visible {
  display: block;
  opacity: 1;
}

/* ── Drawer shell ── */
.mob-drawer {
  display: none;
  position: fixed;
  top: calc(var(--ann-h) + var(--nav-h));
  left: 0;
  width: 100%;
  height: calc(100dvh - var(--ann-h) - var(--nav-h));
  background: var(--md-navy);
  z-index: 1199;
  overflow: hidden;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.mob-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 1100px) {
  .mob-drawer { display: block; }
}

/* ── Panel base ── */
.mob-panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transition: transform .25s ease, opacity .2s ease;
  will-change: transform;
  background: var(--md-navy);
  padding-bottom: 130px;
  box-sizing: border-box;
}

/* ── Root panel ── */
.mob-panel--root {
  transform: translateX(0);
  opacity: 1;
}
.mob-panel--root.is-hidden {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ── Sub panel ── */
.mob-panel--sub {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  padding-bottom: 24px;
}
.mob-panel--sub.is-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

/* ── Root list ── */
.mob-root-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
}

.mob-root-list li {
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mob-root-list li:last-child { border-bottom: none; }

.mob-root-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: none;
  border: none;
  font-family: 'Roboto', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, color .15s ease;
}
.mob-root-btn:hover,
.mob-root-btn:active {
  background: rgba(255,255,255,.05);
  color: #fff;
}
.mob-root-btn i {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  flex-shrink: 0;
}

.mob-root-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--md-yellow);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease;
}
.mob-root-link:hover { background: rgba(255,255,255,.05); }

/* ── Action buttons (pinned bottom of root panel) ── */
.mob-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 20px;
  background: var(--md-navy);
  border-top: 1px solid rgba(255,255,255,.1);
  z-index: 10;
  box-shadow: 0 -6px 24px rgba(0,0,0,.3);
  box-sizing: border-box;
}

.mob-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.mob-btn--login {
  background: transparent;
  color: rgba(255,255,255,.8);
  border: 1.5px solid rgba(255,255,255,.22);
}
.mob-btn--login:hover { background: rgba(255,255,255,.08); color:#fff; }
.mob-btn--register {
  background: var(--md-yellow);
  color: var(--md-navy);
  border: 1.5px solid var(--md-yellow);
}
.mob-btn--register:hover { background: transparent; color: var(--md-yellow); }

/* ── Sub-panel header (back button) ── */
.mob-sub-header {
  position: sticky;
  top: 0;
  background: var(--md-navy);
  z-index: 5;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 0;
}
.mob-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}
.mob-back-btn i {
  font-size: 13px;
  color: var(--md-yellow);
}

/* ── Sub-panel body — reuse existing mega/dropdown styles ── */
.mob-sub-body {
  padding: 0;
}

/* inside sub-panel, mega__inner resets to single column */
.mob-sub-body .md-mega__inner {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: unset !important;
  padding: 12px 16px 20px !important;
  gap: 0 !important;
}

.mob-sub-body .md-mega__col {
  padding: 12px 0 0;
  width: 100%;
  box-sizing: border-box;
}
.mob-sub-body .md-mega__col:first-child { padding-top: 4px; }
.mob-sub-body .md-mega__col + .md-mega__col {
  border-left: none !important;
  padding-left: 0 !important;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 4px;
}

.mob-sub-body .md-mega__heading {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--md-yellow);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 8px;
  margin-bottom: 6px;
}

.mob-sub-body .md-mega__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mob-sub-body .md-mega__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.mob-sub-body .md-mega__link:hover,
.mob-sub-body .md-mega__link:active {
  background: rgba(255,255,255,.06);
}

.mob-sub-body .md-mega__icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.mob-sub-body .md-mega__link-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  display: block;
  line-height: 1.25;
}
.mob-sub-body .md-mega__link-sub {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  display: block;
  margin-top: 1px;
  line-height: 1.3;
}

.mob-sub-body .md-mega__tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
  letter-spacing: .3px;
  white-space: nowrap;
}
.mob-sub-body .md-mega__tag--free { background: #d1fae5; color: #065f46; }
.mob-sub-body .md-mega__tag--new  { background: #fef3c7; color: #92400e; }

.mob-sub-body .md-mega__feature { display: none; }

.mob-sub-body .md-mega__button {
  display: flex !important;
  justify-content: center !important;
  padding: 14px 0 4px !important;
  margin-top: 4px !important;
  border-top: 1px solid rgba(255,255,255,.1) !important;
}
.mob-sub-body .md-mega__button .btn-cta-primary {
  width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 11px 16px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}

/* simple dropdown inside sub-panel */
.mob-sub-body .md-dropdown {
  padding: 8px 16px 16px;
}
.mob-sub-body .md-dropdown__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  border-radius: 8px;
  font-size: 13.5px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease;
}
.mob-sub-body .md-dropdown__link:hover { background: rgba(255,255,255,.06); color:#fff; }
.mob-sub-body .md-dropdown__link i { color: rgba(255,255,255,.4); }
.mob-sub-body .md-dropdown__divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 4px 0;
}

/* ═══════════════════════════════════════════════════════════════
   SMALL PHONE TWEAKS  ≤ 768px
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .announcement-bar { font-size: 12px; padding: 0 10px; }
  .md-nav__inner { padding: 0 14px; }
  .md-nav__logo img { height: 24px; }
}

@media (max-width: 480px) {
  .announcement-bar { font-size: 11px; }
  .announcement-bar .divider:first-of-type { display: none; }
  .md-nav__inner { padding: 0 12px; }
  .md-nav__logo img { height: 22px; }
  .md-nav__toggle { padding: 6px; }
  .mob-root-btn { font-size: 14px; padding: 14px 16px; }
  .mob-sub-body .md-mega__inner { padding: 10px 12px 16px !important; }
}

@media (max-width: 360px) {
  .announcement-bar { font-size: 10.5px; }
  .announcement-bar .divider { display: none; }
  .md-nav__logo img { height: 20px; }
  .mob-root-btn { font-size: 13.5px; padding: 13px 14px; }
}