/*
  REVALYTICS — NAVIGATION
  Fixed pill nav, simple dropdowns, and full-screen mobile menu.
  Identical across all pages — update aria-current="page" per page only.
*/

/* ─── Fixed header wrapper (wirebar + nav) ───────────── */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

/* ─── Nav pill ───────────────────────────────────────── */
.nav-pill {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 60px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: block;
  padding: 0;
  border-radius: 99px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.nav-pill.scrolled {
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  top: 40px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2px 10px 2px 24px;
}

/* ─── Logo ───────────────────────────────────────────── */
.nav-left {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 28px;
  width: auto;
}

/* ─── Right side (menu + CTA) ────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.nav-item {
  position: relative;
}

/* ─── Nav links (text buttons) ───────────────────────── */
.nav-link-btn {
  background: transparent;
  border: none;
  font-family: var(--rev-font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--rev-navy-900);
  padding: 10px 16px;
  border-radius: 99px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
}

.nav-link-btn:hover {
  background: rgba(0, 86, 235, 0.05);
  color: var(--rev-blue);
}

/* ─── Chevron ────────────────────────────────────────── */
.nav-link-btn .nav-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.25s;
  stroke: currentColor;
}

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

/* ─── Demo CTA button ────────────────────────────────── */
.nav-demo-btn {
  background: var(--rev-blue);
  color: #fff;
  padding: 12px 20px;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-demo-btn:hover {
  background: #0048c8;
  transform: scale(1.02);
}

.nav-demo-btn svg {
  width: 18px;
  height: 18px;
}

/* ─── Simple dropdown ────────────────────────────────── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 6px;
  min-width: 170px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 1100;
  pointer-events: none;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Ghost bridge so dropdown doesn't vanish on hover gap */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--rev-navy-900, #04122d);
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown a:hover {
  background: rgba(0, 86, 235, 0.06);
  color: var(--rev-blue, #0056eb);
}

/* ─── Mega menu shells (defined, may be used by other pages) */
.mega-menu {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  min-width: 320px;
  z-index: 1100;
}

.mega-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 24px;
  pointer-events: auto;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-menu.products-mega  { width: 1040px; display: flex; gap: 0; padding: 0; overflow: hidden; }
.mega-menu.solutions-mega { width:  960px; display: flex; gap: 0; padding: 0; overflow: hidden; }
.mega-menu.resources-mega { width: 1020px; display: flex; gap: 0; padding: 0; overflow: hidden; }
.mega-menu.about-mega     { width:  620px; display: flex; gap: 0; padding: 0; overflow: hidden; }

.mega-visual-col {
  width: 210px;
  min-width: 210px;
  background: var(--rev-navy-900);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.mega-visual-img         { width: 100%; height: 100%; object-fit: cover; display: block; }
.mega-visual-placeholder {
  width: 100%; height: 100%; min-height: 320px;
  background: linear-gradient(160deg, #0d244f 0%, #0056eb 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.2); font-size: 13px; text-align: center;
}

.mega-content-col { flex: 1; padding: 24px 20px; }
.mega-grid-2x2    { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

.mega-col             { flex: 1; padding: 24px 16px; }
.mega-col:first-child { padding-left: 24px; }
.mega-col:last-child  { padding-right: 24px; }

.mega-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rev-text-muted);
  margin-bottom: 16px;
  font-weight: 600;
  padding-left: 12px;
}

.mega-list { display: flex; flex-direction: column; gap: 6px; }

.mega-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.mega-item:hover { background: rgba(0, 86, 235, 0.05); }

.mega-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--rev-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 86, 235, 0.25);
}

.mega-item:hover .mega-icon-wrap {
  background: var(--rev-navy-900);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 86, 235, 0.35);
}

.mega-icon-wrap svg { width: 22px; height: 22px; }

.mega-text h4 { font-size: 15px; font-weight: 600; color: var(--rev-navy-900); margin: 0 0 4px; }
.mega-text p  { font-size: 13px; color: var(--rev-text-muted); margin: 0; line-height: 1.4; }

/* ─── Mobile hamburger button ─────────────────────────── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--rev-blue);
}

.mobile-menu-btn svg {
  width: 28px;
  height: 28px;
  stroke: var(--rev-blue);
}

/* ─── Mobile full-screen panel ────────────────────────── */
.mobile-mega-menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 999;
  overflow-y: auto;
  padding: 140px 24px 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-mega-menu-panel.is-open {
  opacity: 1;
  visibility: visible;
}

/* ─── Mobile accordion (Solutions / Resources) ────────── */
.mob-acc-section {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mob-acc-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--rev-navy-900, #04122d);
  padding: 16px 0;
  cursor: pointer;
  text-align: left;
}

.mob-acc-trigger svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.mob-acc-section.open .mob-acc-trigger svg {
  transform: rotate(180deg);
}

.mob-sub-links {
  display: none;
  flex-direction: column;
  padding: 0 0 12px 12px;
  gap: 4px;
}

.mob-acc-section.open .mob-sub-links {
  display: flex;
}

.mob-sub-links a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--rev-navy-900, #04122d);
  padding: 8px 0;
  opacity: 0.72;
  transition: opacity 0.15s;
}

.mob-sub-links a:hover {
  opacity: 1;
}

/* Mobile accordion items (mega-style) */
.mobile-accordion-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 600;
  color: var(--rev-navy-900);
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.mobile-accordion-content      { display: none;  padding: 12px 0; }
.mobile-accordion-content.is-open { display: block; }

.mobile-mega-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  text-decoration: none;
  color: var(--rev-navy-900);
  font-weight: 500;
}

.mobile-mega-item .mega-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.mobile-mega-item .mega-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.mobile-item-text  { display: flex; flex-direction: column; gap: 2px; }
.mobile-item-title { font-size: 15px; font-weight: 600; color: var(--rev-navy-900); line-height: 1.3; }
.mobile-item-desc  { font-size: 12px; color: var(--rev-text-muted); line-height: 1.4; font-weight: 400; }

/* ─── Breakpoint: collapse nav at 992px ──────────────── */
@media (max-width: 992px) {
  .nav-menu,
  .nav-demo-btn {
    display: none;
  }

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

  .nav-pill {
    width: calc(100% - 32px);
    padding: 8px 12px 8px 20px;
    top: 40px;
  }
}

@media (max-width: 640px) {
  .nav-pill {
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
    top: 32px !important;
    border-radius: 0 !important;
    padding: 0 16px !important;
  }

  .nav-inner {
    padding: 2px 0 !important;
  }

  .nav-logo-img {
    height: 24px !important;
  }

  .mobile-menu-btn {
    padding: 4px !important;
  }

  .mobile-menu-btn svg {
    width: 24px !important;
    height: 24px !important;
  }
}
