/* ============================================================
   RR WEB SERVICES — rr-nav.css
   Fixed nav · mega menu · dropdowns · mobile drawer
   ============================================================ */

/* ── FIXED NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  gap: 6px;
  background: rgba(8,15,30,0);
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s, backdrop-filter .35s, box-shadow .35s;
}
.nav.scrolled {
  background: rgba(8,15,30,0.96);
  border-color: rgba(255,255,255,0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 24px rgba(0,0,0,0.30);
}

/* ── Light-background pages: nav solid from load ── */
/* Tools hub, individual tool pages, and any page without a dark hero */
body.rr-tools-hub .nav,
body.rr-tool-page .nav,
body.page-template-page-sitemap .nav,
body.page-template-page-free-tools .nav {
  background: rgba(8,15,30,0.96) !important;
  border-color: rgba(255,255,255,0.08) !important;
  box-shadow: 0 1px 24px rgba(0,0,0,0.30) !important;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}
.nav-logo img {
  height: auto;
  width: 160px;
  display: block;
}
.nav-logo span { display: none; }

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links > li {
  position: relative;
}
.nav-links > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(240,244,250,0.72);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li > a.active,
.nav-links > li:hover > a {
  color: #FFFFFF !important;
  background: rgba(255,255,255,0.07);
}
.nav-caret {
  transition: transform .25s;
  opacity: .6;
  flex-shrink: 0;
}
.nav-links > li:hover .nav-caret,
.nav-links > li > a[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
  opacity: 1;
}

/* ── DROPDOWN BASE ── */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  /* Invisible padding bridge fills the gap so mouse can travel to dropdown */
  padding-top: 10px;
}
.nav-has-drop:hover .nav-dropdown,
.nav-has-drop:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
/* Keep dropdown open while hovering it directly */
.nav-dropdown:hover {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* ── SIMPLE DROPDOWN ── */
.nav-drop-simple {
  min-width: 240px;
  background: #0C1828;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.20);
}
.nav-drop-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .18s;
}
.nav-drop-item:hover { background: rgba(255,255,255,0.07); }
.nav-drop-ico { font-size: 18px; flex-shrink: 0; line-height: 1.4; }
.nav-drop-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 2px;
  line-height: 1.3;
}
.nav-drop-desc { font-size: 11.5px; color: rgba(240,244,250,0.45); line-height: 1.4; }
.nav-drop-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 6px 8px; }
.nav-drop-all {
  display: block;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  transition: opacity .2s;
}
.nav-drop-all:hover { opacity: .75; }

/* ── MEGA MENU ── */
.nav-mega {
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: min(820px, 90vw);
  background: #0C1828;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.20);
}
.nav-has-drop:hover .nav-mega,
.nav-has-drop:focus-within .nav-mega {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}
.nav-mega-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 220px;
  gap: 4px;
}
.nav-mega-col { padding: 12px 8px; }
.nav-mega-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.30);
  padding: 0 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .18s;
}
.nav-mega-item:hover { background: rgba(255,255,255,0.07); }
.nav-mega-ico { font-size: 18px; flex-shrink: 0; line-height: 1.4; }
.nav-mega-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 2px;
  line-height: 1.3;
}
.nav-mega-desc { font-size: 11.5px; color: rgba(240,244,250,0.42); line-height: 1.4; }

/* Promo panel */
.nav-mega-promo {
  background: linear-gradient(160deg, rgba(212,130,10,0.12), rgba(26,58,107,0.15));
  border: 1px solid rgba(212,130,10,0.20);
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  margin: 4px;
}
.nav-mega-promo-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.nav-mega-promo-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 10px;
}
.nav-mega-promo-body {
  font-size: 12.5px;
  color: rgba(240,244,250,0.52);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}
.nav-mega-promo-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  background: var(--gold);
  color: #FFFFFF;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 3px 12px rgba(212,130,10,0.30);
  align-self: flex-start;
}
.nav-mega-promo-btn:hover { background: #C4780A; transform: translateY(-1px); }

/* Book a Call — secondary CTA */
.nav-book {
  padding: 7px 14px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: var(--r-sm);
  color: rgba(240,244,250,0.80);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: all .2s;
  flex-shrink: 0;
}
.nav-book:hover {
  border-color: rgba(255,255,255,0.55);
  color: #FFFFFF !important;
  background: rgba(255,255,255,0.06);
}

/* Primary CTA */
.nav-cta {
  padding: 8px 18px;
  background: var(--accent);
  border: none;
  border-radius: var(--r-sm);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 2px 10px rgba(26,58,107,0.25);
  flex-shrink: 0;
}
.nav-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(26,58,107,0.35);
  color: #FFFFFF !important;
}

/* Hamburger */
.nav-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}
.nav-ham span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #FFFFFF;
  transition: all .3s;
}

/* ── MOBILE DRAWER ── */
#rr-drawer {
  position: fixed !important;
  top: 0; right: 0; bottom: 0;
  left: auto !important;
  width: min(360px, 96vw) !important;
  transform: translateX(100%) !important;
  z-index: 9999 !important;
  background: #0C1828 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  transition: transform .4s cubic-bezier(.4,0,.2,1) !important;
  box-shadow: -12px 0 48px rgba(0,0,0,0.5) !important;
}
#rr-drawer.open { transform: translateX(0) !important; }
#rr-overlay {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 9998 !important;
  background: rgba(4,8,20,0.60) !important;
}
#rr-overlay.open { display: block !important; }

/* Drawer head */
.drw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.drw-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.drw-logo img {
  height: auto;
  width: 140px;
  display: block;
}
.drw-logo span { display: none; }
.drw-close {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.drw-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Drawer body */
.drw-body {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
}

/* Accordion groups */
.drw-group { margin-bottom: 2px; }
.drw-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 14px 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: rgba(240,244,250,0.85);
  cursor: pointer;
  border-radius: 8px;
  transition: background .2s, color .2s;
  text-align: left;
}
.drw-group-toggle:hover { background: rgba(255,255,255,0.06); color: #fff; }
.drw-group-toggle[aria-expanded="true"] { color: #fff; background: rgba(255,255,255,0.06); }
.drw-caret { transition: transform .25s; flex-shrink: 0; stroke: currentColor; opacity: .5; }
.drw-group-toggle[aria-expanded="true"] .drw-caret { transform: rotate(180deg); opacity: 1; }

.drw-group-body {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 8px 12px;
  border-left: 2px solid rgba(212,130,10,0.30);
  margin: 0 12px 8px 24px;
}
.drw-group-body.open { display: flex; }
.drw-group-body a {
  font-size: 14px;
  color: rgba(240,244,250,0.62);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 6px;
  transition: color .18s, background .18s;
  display: block;
}
.drw-group-body a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.drw-view-all {
  font-size: 12.5px !important;
  color: var(--gold) !important;
  font-weight: 700 !important;
  margin-top: 4px;
}

/* Direct links */
.drw-link {
  display: block;
  padding: 14px 12px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(240,244,250,0.85);
  text-decoration: none;
  border-radius: 8px;
  transition: all .2s;
}
.drw-link:hover { color: #fff; background: rgba(255,255,255,0.06); }

/* Drawer footer */
.drw-footer {
  padding: 16px 20px 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.drw-clarity {
  text-align: center;
  font-size: 12px;
  color: rgba(212,130,10,0.70);
  text-decoration: none;
  padding-top: 4px;
  transition: color .2s;
}
.drw-clarity:hover { color: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .nav { padding: 0 32px; gap: 4px; }
  .nav-links > li > a { padding: 6px 9px; font-size: 13px; }
  .nav-book { display: none; }
}
@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .nav-links,
  .nav-book,
  .nav-cta { display: none !important; }
  .nav-ham { display: flex !important; }
}
@media (max-width: 600px) {
  .nav { padding: 0 18px; }
}
