/* ==========================================================================
   NYGCI — dropdown (mega) menus added to the React home page header.
   Every rule is scoped to .nm-* classes so nothing else on index.html changes.
   Look matches the header dropdowns on the capability pages.
   ========================================================================== */
/* ---------- Desktop menu links: one line, never wrapped ---------- */
.nm-trigger {
  display: inline-flex !important;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.nm-caret {
  width: 14px;
  height: 14px;
  opacity: .7;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  flex-shrink: 0;
}

.nm-trigger.nm-open {
  color: #fff !important;
}

.nm-trigger.nm-open .nm-caret {
  transform: rotate(180deg);
}

.nm-trigger.nm-open>span:last-child {
  width: 100% !important;
}

/* keep the orange underline while open */
/* Arrows only where there is room for them */
@media (max-width: 1439px) {
  .nm-caret {
    display: none;
  }
}

@media (min-width: 1280px) and (max-width: 1439px) {
  .nm-trigger {
    font-size: 14px !important;
  }
}

/* ---------- 1024–1279px: 4 long labels don't fit, so use the hamburger menu
   (the React build switches to the desktop menu too early at 1024px) ---------- */
@media (min-width: 1024px) and (max-width: 1279px) {
  [data-testid="site-nav"] nav>div.lg\:flex {
    display: none !important;
  }

  [data-testid="nav-mobile-toggle"] {
    display: block !important;
  }

  [data-testid="site-nav"]>div.lg\:hidden {
    display: block !important;
  }
}

/* ---------- Hamburger panel: left-aligned, scrollable, tidy ---------- */
[data-testid="site-nav"]>div.lg\:hidden {
  text-align: left;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nm-mtop {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: .35rem 0;
  color: #e2e8f0 !important;
  font-weight: 600 !important;
  text-align: left;
}

.nm-mtoggle {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: #cbd5e1;
}

.nm-mtoggle svg {
  width: 18px;
  height: 18px;
  transition: transform .3s;
}

.nm-mtoggle.nm-on {
  border-color: rgba(249, 115, 22, .5);
  color: #F97316;
}

.nm-mtoggle.nm-on svg {
  transform: rotate(180deg);
}

.nm-panel {
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  z-index: 60;
  width: min(1100px, calc(100vw - 32px));
  transform: translate(-50%, 12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s cubic-bezier(.22, 1, .36, 1), transform .35s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .35s;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.nm-panel.nm-show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition: opacity .3s cubic-bezier(.22, 1, .36, 1), transform .35s cubic-bezier(.22, 1, .36, 1), visibility 0s;
}

.nm-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

/* hover bridge */
.nm-inner {
  display: grid;
  grid-template-columns: 330px 1fr;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  background: #0F172A;
  border: 1px solid rgba(249, 115, 22, .22);
  border-top: 0;
  box-shadow: 0 40px 80px -20px rgba(2, 6, 23, .7);
}

.nm-intro {
  position: relative;
  padding: 2rem;
  color: #cbd5e1;
  background: radial-gradient(120% 90% at 0% 0%, rgba(249, 115, 22, .22), transparent 60%), #0B1120;
  border-right: 1px solid rgba(255, 255, 255, .06);
}

.nm-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  color: #F97316;
}

.nm-intro h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.12;
  color: #fff;
  font-size: 1.55rem;
  margin: .7rem 0 .8rem;
}

.nm-intro p {
  font-size: .88rem;
  line-height: 1.65;
  color: #94a3b8;
  margin: 0;
}

.nm-flow {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.nm-flow span {
  font-size: .68rem;
  padding: .3rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  color: #cbd5e1;
}

.nm-cta {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #F97316 !important;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}

.nm-cta svg {
  width: 14px;
  height: 14px;
  transition: transform .3s;
}

.nm-cta:hover svg {
  transform: translateX(4px);
}

.nm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .35rem;
  padding: 1.25rem;
  align-content: start;
}

.nm-link {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: .9rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .25s, border-color .25s, transform .25s cubic-bezier(.22, 1, .36, 1);
}

.nm-link:hover,
.nm-link:focus-visible {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(249, 115, 22, .25);
  transform: translateX(3px);
  outline: none;
}

.nm-ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(249, 115, 22, .12);
  color: #F97316;
  flex-shrink: 0;
}

.nm-ic svg {
  width: 18px;
  height: 18px;
}

.nm-link b {
  display: block;
  color: #fff;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
}

.nm-link small {
  display: block;
  color: #94a3b8;
  font-size: .78rem;
  line-height: 1.45;
  margin-top: .15rem;
}

/* Mobile (hamburger) menu: sub-links under each capability */
.nm-mlist {
  display: none;
  gap: .15rem;
  margin: -.4rem 0 .4rem .25rem;
  padding-left: .75rem;
  border-left: 1px solid rgba(249, 115, 22, .3);
  text-align: left;
}

.nm-mlist.nm-on {
  display: grid;
}

.nm-mlist a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .5rem;
  border-radius: 8px;
  color: #94a3b8 !important;
  font-size: .88rem;
  text-decoration: none;
}

.nm-mlist a:hover {
  background: rgba(255, 255, 255, .05);
  color: #fff !important;
}

.nm-mlist a svg {
  width: 15px;
  height: 15px;
  color: #F97316;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {

  .nm-panel,
  .nm-panel.nm-show,
  .nm-link,
  .nm-caret {
    transition: none;
  }
}

/* Hero & Footer adjustments */
[data-testid="hero-cta-watch-overview"],
.f-news,
[data-testid="footer-newsletter-form"],
footer form[data-testid="footer-newsletter-form"],
footer a[href="/#clients"] {
  display: none !important;
}

/* ==========================================================================
   Legal & Privacy Policy UI/UX — Matching NYGCI Subpages Design
   ========================================================================== */
[data-testid^="legal-page-"] section:first-of-type {
  background: radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.15), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.08), transparent 40%),
    linear-gradient(135deg, #020617 0%, #0B1120 50%, #0F172A 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-testid^="legal-page-"] section:first-of-type h1 {
  font-family: 'Fraunces', Georgia, serif !important;
  color: #ffffff !important;
  font-size: clamp(2.4rem, 1.8rem + 2.5vw, 4rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.15 !important;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

[data-testid^="legal-page-"] section:first-of-type p {
  color: #94a3b8 !important;
  font-size: 1.05rem !important;
  line-height: 1.7 !important;
}

/* Breadcrumb in Hero Banner */
[data-testid^="legal-page-"] section:first-of-type .text-sm {
  font-size: 0.82rem !important;
  letter-spacing: 0.02em;
}

[data-testid^="legal-page-"] section:first-of-type .text-sm a:hover {
  color: #F97316 !important;
}

/* Eyebrow Pill */
[data-testid^="legal-page-"] section:first-of-type .rounded-full {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.1) !important;
  border: 1px solid rgba(249, 115, 22, 0.3) !important;
  color: #F97316 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

/* Page Body & Container */
[data-testid^="legal-page-"] main {
  background: #f8fafc !important;
  padding-top: 4rem !important;
  padding-bottom: 5rem !important;
}

.dark [data-testid^="legal-page-"] main {
  background: #020617 !important;
}

/* Intro Executive Statement Card */
[data-testid^="legal-page-"] main>div>p:first-of-type {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 1.85rem 2.25rem;
  font-size: 0.98rem;
  line-height: 1.85;
  white-space: pre-line;
  color: #334155;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  margin-bottom: 2.5rem;
}

.dark [data-testid^="legal-page-"] main>div>p:first-of-type {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
}

/* Clean Legal Section Cards */
[data-testid^="legal-section-"],
.legal-card {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 12px !important;
  padding: 1.85rem 2.25rem !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
  margin-bottom: 1.5rem !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-testid^="legal-section-"]::before,
.legal-card::before {
  display: none !important;
}

[data-testid^="legal-section-"]:hover,
.legal-card:hover {
  border-color: rgba(249, 115, 22, 0.35) !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06) !important;
}

.dark [data-testid^="legal-section-"],
.dark .legal-card {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35) !important;
}

.dark [data-testid^="legal-section-"]:hover,
.dark .legal-card:hover {
  border-color: rgba(249, 115, 22, 0.35) !important;
  box-shadow: 0 8px 24px -2px rgba(0, 0, 0, 0.5) !important;
}

[data-testid^="legal-section-"] h2,
.legal-card h2 {
  font-family: 'Fraunces', Georgia, serif !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: #0f172a !important;
  margin-bottom: 0.85rem !important;
  line-height: 1.4 !important;
}

.dark [data-testid^="legal-section-"] h2,
.dark .legal-card h2 {
  color: #ffffff !important;
}

[data-testid^="legal-section-"] p,
.legal-card p {
  white-space: pre-line !important;
  line-height: 1.85 !important;
  color: #475569 !important;
  font-size: 0.95rem !important;
}

.dark [data-testid^="legal-section-"] p,
.dark .legal-card p {
  color: #94a3b8 !important;
}

/* Ensure footer bottom line pages row and copyright remain fully visible */
[data-testid="site-footer"] .border-white\/10,
footer .border-white\/10,
.f-bottom {
  display: flex !important;
}

/* ==========================================================================
   Footer Layout & Spacing: Exact Match with Capability Pages
   ========================================================================== */
.site-footer,
footer[data-testid="site-footer"] {
  background: #0B1120 !important;
  border-top: 1px solid rgba(255, 255, 255, .1) !important;
  color: #94a3b8 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.site-footer > .container,
footer[data-testid="site-footer"] > .container {
  width: min(1320px, 100% - 3rem) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 1.5rem !important;
}

.f-grid,
footer[data-testid="site-footer"] .f-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2.5rem !important;
  padding: 5rem 0 0 !important;
}

@media (min-width: 768px) {
  .f-grid,
  footer[data-testid="site-footer"] .f-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (min-width: 1024px) {
  .f-grid,
  footer[data-testid="site-footer"] .f-grid {
    grid-template-columns: 4fr 2fr 2fr 2fr !important;
    gap: 3rem !important;
  }
}

/* Ensure social icon links align their svg dead center and stay in single row */
footer .flex.items-center.gap-2,
.f-social {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: .5rem !important;
  margin-top: 1rem !important;
}

[data-testid^="social-"],
.f-social a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.5rem !important;
  height: 2.5rem !important;
  padding: 0 !important;
  margin: 0 !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

[data-testid^="social-"] svg,
.f-social a svg {
  margin: 0 auto !important;
  display: block !important;
  width: 1rem !important;
  height: 1rem !important;
  flex-shrink: 0 !important;
}

/* Bottom copyright & legal links bar */
.f-bottom,
footer[data-testid="site-footer"] .f-bottom {
  margin-top: 4rem !important;
  padding: 2rem 0 1.25rem !important;
  border-top: 1px solid rgba(255, 255, 255, .1) !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: .78rem !important;
}

/* Legal & Privacy pages: natural flow matching capability pages */
[data-testid^="legal-page-"] {
  min-height: auto !important;
}

[data-testid^="legal-page-"] main {
  flex: none !important;
  padding-bottom: 3.5rem !important;
}

[data-testid^="legal-page-"] footer[data-testid="site-footer"] {
  margin-top: 0 !important;
  padding-bottom: 0 !important;
}

    /* ==========================================================================
   Consultation / Contact Modal (Home page & Subpages)
   ========================================================================== */
    .nygci-modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 10000;
      background: rgba(11, 17, 32, 0.82);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity .3s cubic-bezier(.22, 1, .36, 1), visibility .3s cubic-bezier(.22, 1, .36, 1);
    }

    .nygci-modal-overlay.is-active {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .nygci-modal-box {
      position: relative;
      width: 100%;
      max-width: 540px;
      background: #0F172A;
      border: 1px solid rgba(249, 115, 22, 0.3);
      box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 35px -5px rgba(249, 115, 22, 0.2);
      border-radius: 20px;
      overflow: hidden;
      transform: translateY(24px) scale(0.97);
      transition: transform .35s cubic-bezier(.22, 1, .36, 1);
      color: #fff;
      font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    .nygci-modal-overlay.is-active .nygci-modal-box {
      transform: translateY(0) scale(1);
    }

    .nygci-modal-glow {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 140px;
      background: radial-gradient(circle at 50% -20%, rgba(249, 115, 22, 0.3), transparent 70%);
      pointer-events: none;
    }

    .nygci-modal-close {
      position: absolute;
      top: 1.25rem;
      right: 1.25rem;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #94a3b8;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all .2s;
      z-index: 2;
    }

    .nygci-modal-close:hover {
      background: rgba(249, 115, 22, 0.2);
      border-color: #F97316;
      color: #fff;
      transform: rotate(90deg);
    }

    .nygci-modal-close svg {
      width: 18px;
      height: 18px;
    }

    .nygci-modal-content {
      padding: clamp(1.75rem, 1.4rem + 1vw, 2.5rem);
      position: relative;
      z-index: 1;
    }

    .nygci-modal-head {
      margin-bottom: 1.75rem;
    }

    .nygci-modal-head .modal-pill {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      margin-bottom: .6rem;
      font-size: .68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .12em;
      padding: .35rem .75rem;
      border-radius: 999px;
      border: 1px solid rgba(249, 115, 22, 0.3);
      background: rgba(249, 115, 22, 0.1);
      color: #F97316;
    }

    .nygci-modal-head .modal-pill i.dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #F97316;
    }

    .nygci-modal-head h3 {
      font-family: 'Fraunces', Georgia, serif;
      font-size: clamp(1.4rem, 1.2rem + .6vw, 1.85rem);
      font-weight: 700;
      color: #fff;
      margin: 0 0 .4rem;
      line-height: 1.2;
    }

    .nygci-modal-head p {
      color: #94a3b8;
      font-size: .88rem;
      line-height: 1.5;
      margin: 0;
    }

    .nygci-form-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;
    }

    @media (min-width: 500px) {
      .nygci-form-grid.two-cols {
        grid-template-columns: 1fr 1fr;
      }
    }

    .nygci-field {
      display: flex;
      flex-direction: column;
      gap: .4rem;
    }

    .nygci-field label {
      font-size: .78rem;
      font-weight: 600;
      letter-spacing: .04em;
      color: #cbd5e1;
    }

    .nygci-field label span {
      color: #F97316;
    }

    .nygci-field input,
    .nygci-field textarea {
      width: 100%;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 10px;
      padding: .75rem .95rem;
      font: inherit;
      font-size: .9rem;
      color: #fff;
      transition: border-color .2s, background .2s, box-shadow .2s;
      box-sizing: border-box;
    }

    .nygci-field input:focus,
    .nygci-field textarea:focus {
      outline: none;
      background: rgba(255, 255, 255, 0.07);
      border-color: #F97316;
      box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
    }

    .nygci-field textarea {
      resize: vertical;
      min-height: 90px;
    }

    .nygci-modal-btn {
      width: 100%;
      margin-top: .5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: .5rem;
      padding: .85rem 1.5rem;
      font-size: .95rem;
      font-weight: 700;
      border-radius: 999px;
      background: #F97316;
      color: #fff;
      border: none;
      cursor: pointer;
      transition: background .2s, transform .2s;
    }

    .nygci-modal-btn:hover {
      background: #EA580C;
      transform: translateY(-1px);
    }

    .nygci-modal-success {
      text-align: center;
      padding: 2.5rem 1rem;
    }

    .nygci-modal-success .success-ic {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      background: rgba(249, 115, 22, 0.15);
      border: 2px solid #F97316;
      color: #F97316;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 1.25rem;
    }

    .nygci-modal-success .success-ic svg {
      width: 32px;
      height: 32px;
    }

    .nygci-modal-success h4 {
      font-family: 'Fraunces', Georgia, serif;
      font-size: 1.6rem;
      color: #fff;
      margin: 0 0 .5rem;
    }

    .nygci-modal-success p {
      color: #94a3b8;
      font-size: .95rem;
      line-height: 1.6;
      max-width: 22rem;
      margin: 0 auto 1.5rem;
    }
/* Hide Routing to Office box from cart drawer and all pages */
[data-testid='routing-office'], .routing-office { display: none !important; }
