/* ============================================================
   NexLead Digital - Modern Popup Navigation (Services)
   Stripe-style columns · White bg · Orange accent (#FF6A00)
   Popular & Related block · Rounded 18px · Soft shadow
   Slide-right / fade-in 250ms ease-out · Accordion on mobile
   ============================================================ */

/* Wrapper needed so the absolutely-positioned popup anchors to the
   Services nav link (the .has-mega li is forced to `position: static`). */
.nlp-anchor { position: relative; display: inline-flex; }

/* Click-outside backdrop */
.nlp-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 14, 22, .28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms;
  pointer-events: none;
}
.nlp-overlay.visible { opacity: 1; visibility: visible; pointer-events: auto; }

.nlp-root {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 480;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 250ms cubic-bezier(0.16, 1, 0.3, 1),
              visibility 250ms;
}
.nlp-root.open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }

.nlp-stage { position: relative; }

/* --- Panels --- */
.nlp-panel {
  position: absolute;
  top: 0; left: 0;
  background: var(--white, #fff);
  border: 1px solid #EEEEEE;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(11, 15, 25, .16), 0 6px 20px rgba(11, 15, 25, .06);
  overflow: hidden;
  transform-origin: left top;
  max-width: calc(100vw - 24px);
}

/* --- Stripe-style wide main panel: 3-column grid --- */
.nlp-panel--main {
  width: min(860px, calc(100vw - 24px));
}
.nlp-main-body { padding: 12px 14px 10px; }

.nlp-main-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.nlp-main-grid .nlp-link {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  height: 100%;
  background: #FBFBFC;
  border: 1px solid #F1F2F4;
  border-radius: 14px;
}
.nlp-main-grid .nlp-item { display: flex; }
.nlp-main-grid .nlp-ico { width: 42px; height: 42px; border-radius: 12px; font-size: 17px; }
.nlp-main-grid .nlp-label { font-size: 14.5px; font-weight: 600; }
.nlp-main-grid .nlp-caret {
  position: absolute; right: 12px; top: 12px;
  opacity: 1; transform: none;
}
.nlp-main-grid .nlp-link:hover { transform: translateY(-3px); border-color: #FFD2B3; box-shadow: 0 14px 30px rgba(255,106,0,.14); }
.nlp-main-grid .nlp-item.active > .nlp-link { background: linear-gradient(120deg,#FF6A00,#FF8A30); border-color: transparent; }

/* --- Popular & Related (compact strip) --- */
.nlp-related-strip { margin-top: 14px; padding-top: 12px; border-top: 1px solid #F1F2F4; }
.nlp-related-strip .nlp-head { display: block; padding: 0 2px 8px; }
.nlp-rel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nlp-rel-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 7px; border-radius: 999px;
  background: #FBFBFC; border: 1px solid #F1F2F4;
  text-decoration: none; color: #1A1D26; font-size: 13px; font-weight: 600;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.nlp-rel-chip:hover { transform: translateY(-2px); border-color: #FFD2B3; box-shadow: 0 8px 18px rgba(255,106,0,.12); }
.nlp-rel-chip-ico {
  width: 26px; height: 26px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#FF6A00,#FF9A4D); color: #fff; font-size: 12px;
}

/* --- Flyout sub panels --- */
.nlp-panel--fly { width: 340px; }

.nlp-panel.is-entering { animation: nlpSlideIn 250ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes nlpSlideIn {
  from { opacity: 0; transform: translateX(-14px) scale(.985); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* Panel chrome */
.nlp-dock {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #F1F2F4;
}
.nlp-caret-back {
  flex-shrink: 0;
  border: none; background: #FFF1E6; cursor: pointer;
  color: #FF6A00; width: 30px; height: 30px; border-radius: 9px;
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.nlp-caret-back:hover { background: #ffe0c7; }
.nlp-head {
  font-family: var(--font-head, inherit);
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #9AA0AE;
}
.nlp-dock .nlp-head { padding: 0; border: none; }

.nlp-body {
  padding: 8px 10px 12px;
}
.nlp-col .nlp-body { max-height: 420px; overflow-y: auto; overflow-x: hidden; padding-bottom: 10px;
  -webkit-overflow-scrolling: touch; }
.nlp-panel--fly .nlp-body { max-height: min(400px, calc(100vh - 220px)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nlp-body::-webkit-scrollbar { width: 6px; }
.nlp-body::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 999px; }
.nlp-body::-webkit-scrollbar-thumb:hover { background: #FF6A00; }
.nlp-body::-webkit-scrollbar-track { background: transparent; }

.nlp-list { list-style: none; margin: 0; padding: 0; }

.nlp-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 9px 11px;
  border: none; background: transparent;
  border-radius: 11px;
  text-align: left; cursor: pointer;
  color: #1A1D26; font: inherit; font-size: 14px; font-weight: 500;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.nlp-link:hover { background: #FFF4EC; color: #FF6A00; transform: translateX(3px) scale(1.01); }
.nlp-item.active > .nlp-link { background: linear-gradient(120deg, #FF6A00, #FF8A30); color: #fff; box-shadow: 0 10px 22px rgba(255, 106, 0, .32); }

.nlp-ico {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: #FFF1E6; color: #FF6A00; font-size: 15px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nlp-link:hover .nlp-ico { background: #fff; color: #FF6A00; }
.nlp-item.active > .nlp-link .nlp-ico { background: rgba(255,255,255,.22); color: #fff; }

.nlp-label { flex: 1; min-width: 0; line-height: 1.3; }
.nlp-sub { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 400; color: #A5ABB8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nlp-item.active > .nlp-link .nlp-sub { color: rgba(255,255,255,.85); }

.nlp-caret { flex-shrink: 0; font-size: 11px; color: #FF6A00;
  opacity: 0; transform: translateX(-5px); transition: opacity .22s ease, transform .22s ease; }
.nlp-link:hover .nlp-caret { opacity: 1; transform: translateX(0); }

/* --- Footer CTA --- */
.nlp-footer {
  padding: 12px 14px;
  border-top: 1px solid #F1F2F4;
  background: linear-gradient(120deg, #FF6A00, #FF8A30);
}
.nlp-footer-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 12px 16px; border-radius: 13px;
  background: #fff; color: #E05A00;
  font-size: 14px; font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nlp-footer-link span { display: flex; align-items: center; gap: 8px; }
.nlp-footer-link:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,.14); }

/* ============================================================
   Mobile (<= 768px): accordion inside the drawer
   ============================================================ */
@media (max-width: 768px) {
  .nlp-overlay { display: none; }
  .nlp-root {
    position: static !important;
    opacity: 1; visibility: visible; transform: none; pointer-events: auto;
    width: 100%; margin-top: 0;
  }
  .nlp-stage { display: flex; flex-direction: column; gap: 6px; }
  .nlp-panel {
    position: static !important; width: 100% !important; max-width: 100%;
    border: none; border-radius: 14px;
    box-shadow: 0 0 0 1px #EEEEEE; margin-top: 6px;
  }
  .nlp-panel.is-entering { animation: none; }
  .nlp-main-grid { grid-template-columns: 1fr 1fr; }
  .nlp-panel--fly .nlp-body { max-height: none; overflow: visible; }
  .nlp-caret-back { display: inline-flex; }
}
/* ============================================================
   Multi-level Services Mega Menu (svc2) — Stripe/Atlassian style
   Col 1: main service categories (320px)
   Col 2: selected category's sub-services (360px, vertical list)
   Col 3: optional child services (360px, future)
   Bottom: 4 trust badges + "View All Services" button
   White bg · #FF6B00 accent · #111 text · 16px radius · ~280ms
   ============================================================ */

.svc2-anchor { position: relative; display: inline-flex; }

/* Hover bridge: keeps the li :hover true (and swallows the mouse
   path) when moving from the link into the dropdown. */
.svc2-anchor::after {
  content: '';
  position: absolute;
  left: -30px; right: -30px; bottom: -16px;
  height: 18px;
}

.svc2-root {
  position: absolute;
  top: calc(100% + 8px);
  left: 12px;
  transform: translateY(12px);
  width: max-content;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: 0 32px 70px rgba(17, 17, 17, .16), 0 8px 22px rgba(17, 17, 17, .06);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(.16, 1, .3, 1),
              transform 300ms cubic-bezier(.16, 1, .3, 1),
              visibility 300ms;
}
.mega-services:hover .svc2-root,
.mega-services.open .svc2-root {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.svc2-stage {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  padding: 14px;
}

/* ---- Cascading panes ---- */
.svc2-panes {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: min(520px, calc(100vh - 230px));
  display: grid;
  grid-template-columns: 320px 0px 0px;
  grid-auto-rows: 64px;
  gap: 4px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: grid-template-columns 280ms cubic-bezier(.16, 1, .3, 1);
}
.svc2-panes.level-2 { grid-template-columns: 320px 360px 0px; }
.svc2-panes.level-3 { grid-template-columns: 320px 360px 360px; }
.svc2-panes::-webkit-scrollbar { width: 6px; }
.svc2-panes::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 999px; }
.svc2-panes::-webkit-scrollbar-thumb:hover { background: #FF6B00; }
.svc2-panes::-webkit-scrollbar-track { background: transparent; }

.svc2-item { display: contents; }

/* ---- Column 1: main service categories ---- */
.svc2-cat {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 64px;
  padding: 0 14px;
  border: none;
  background: transparent;
  border-radius: 12px;
  color: #111;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.svc2-cat:hover,
.svc2-cat.active {
  background: #FF6B00;
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 107, 0, .32);
  transform: translateX(2px);
}
.svc2-cat-ico {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  font-size: 15px;
  color: #FF6B00;
  transition: color .25s ease;
}
.svc2-cat:hover .svc2-cat-ico,
.svc2-cat.active .svc2-cat-ico { color: #fff; }
.svc2-cat-name {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  line-height: 1.2;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svc2-cat-arrow {
  flex-shrink: 0;
  font-size: 12px;
  color: #C7CBD1;
  transition: color .25s ease, transform .25s ease;
}
.svc2-cat:hover .svc2-cat-arrow,
.svc2-cat.active .svc2-cat-arrow { color: #fff; transform: translateX(2px); }

/* ---- Column 2: sub-services of the active category ---- */
.svc2-subpanel {
  grid-column: 2;
  grid-row: 1 / -1;
  position: sticky;
  top: 0;
  width: 360px;
  height: min(520px, calc(100vh - 230px));
  max-height: min(520px, calc(100vh - 230px));
  padding: 2px 2px 2px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
}
.svc2-panes.level-2 .svc2-subpanel.active { display: block; animation: svc2SlideFade 280ms cubic-bezier(.16, 1, .3, 1); }
.svc2-subpanel::-webkit-scrollbar { width: 6px; }
.svc2-subpanel::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 999px; }
.svc2-subpanel::-webkit-scrollbar-thumb:hover { background: #FF6B00; }
.svc2-subpanel::-webkit-scrollbar-track { background: transparent; }

.svc2-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #111;
  text-decoration: none;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.svc2-sub:hover {
  background: #FFF5EE;
  color: #FF6B00;
  transform: translateX(2px);
}
.svc2-sub-ico {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  font-size: 13px;
  color: #FF6B00;
}
.svc2-sub-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: inherit;
}

/* ---- Column 3: optional child services (future) ---- */
.svc2-childpane {
  grid-column: 3;
  grid-row: 1 / -1;
  position: sticky;
  top: 0;
  width: 360px;
  height: min(520px, calc(100vh - 230px));
  max-height: min(520px, calc(100vh - 230px));
  padding: 2px 2px 2px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
}
.svc2-panes.level-3 .svc2-childpane.active { display: block; animation: svc2SlideFade 280ms cubic-bezier(.16, 1, .3, 1); }

/* ---- Bottom bar: badges + CTA ---- */
.svc2-bottom {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 14px 6px 2px;
  border-top: 1px solid #F0F0F0;
}
.svc2-badges { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.svc2-badge {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #444;
}
.svc2-explore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  background: #FF6B00;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(255, 107, 0, .28);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.svc2-explore:hover { background: #FF8A30; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(255, 138, 48, .38); }

/* Keyboard focus ring */
.svc2-cat:focus-visible,
.svc2-sub:focus-visible,
.svc2-explore:focus-visible { outline: 3px solid #FF8A30; outline-offset: 2px; }

/* Slide-in: left -> right, fade */
@keyframes svc2SlideFade {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes svc2FadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Mobile (<= 991px): accordion, one item open at a time
   ============================================================ */
@media (max-width: 991px) {
  .svc2-anchor::after { display: none; }
  .svc2-root {
    position: static;
    width: 100%;
    max-width: none;
    transform: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
  }
  .mega-services.open-mega .svc2-root { display: block; }
  .svc2-stage {
    display: block;
    max-height: none;
    overflow: visible;
    padding: 6px 2px;
  }
  .svc2-panes {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .svc2-item { display: block; }
  .svc2-cat {
    height: 54px;
    width: 100%;
    border-radius: 10px;
  }
  .svc2-cat:hover,
  .svc2-cat.active { box-shadow: none; transform: none; }
  .svc2-cat-arrow { color: #C7CBD1; }
  .svc2-cat.active .svc2-cat-arrow { transform: rotate(90deg); color: #fff; }
  .svc2-subpanel {
    grid-column: auto;
    grid-row: auto;
    position: static;
    width: auto;
    height: auto;
    max-height: none;
    top: auto; bottom: auto; left: auto;
    padding: 2px 2px 2px 14px;
    overflow: visible;
    display: none;
  }
  .svc2-subpanel.active { display: block; animation: svc2FadeIn 300ms ease; }
  .svc2-childpane { display: none; }
  .svc2-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 4px 2px;
    margin-top: 8px;
  }
  .svc2-badges { gap: 6px 16px; }
}
