/* SyncListing - shared top nav (same logo position on every page) */

/* Keep sprite SVG out of document flow — iOS Safari otherwise adds huge
   blank scroll space under the footer from the 1024×1024 viewBox. */
body > svg[aria-hidden="true"] {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  left: 0 !important;
  top: 0 !important;
  pointer-events: none !important;
}

html {
  /* Avoid scrollbar-gutter:stable — it creates extra blank scroll on iOS Safari. */
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100%;
}

nav.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line, #e6edf4);
}

nav.top .nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  box-sizing: border-box;
}

nav.top .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.2px;
  line-height: 1;
  color: var(--ink, #14202b);
  text-decoration: none;
  flex-shrink: 0;
}

nav.top .brand:hover {
  color: var(--ink, #14202b);
}

nav.top .brand svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0, 50, 110, .22);
}

nav.top .spacer {
  flex: 1;
  min-width: 0;
}

nav.top .navlink {
  color: var(--soft, #5b6b7a);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  text-decoration: none;
}

nav.top .navlink:hover {
  color: var(--ink, #14202b);
  background: var(--bg, #f7fafd);
}

nav.top .navcta {
  background: linear-gradient(135deg, var(--blue1, #2ba8fb), var(--blue2, #0067ce));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(0, 80, 180, .28);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

nav.top .navcta:hover {
  transform: translateY(-1px);
  color: #fff;
}

.langbar {
  display: flex;
  gap: 4px;
  background: var(--bg, #f7fafd);
  border: 1px solid var(--line, #e6edf4);
  border-radius: 9px;
  padding: 3px;
  flex-shrink: 0;
}

.langbar button {
  background: transparent;
  border: 0;
  color: var(--soft, #5b6b7a);
  font-weight: 700;
  font-size: 12.5px;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 40px;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}

.langbar button.active {
  background: #fff;
  color: var(--blue2, #0067ce);
  box-shadow: 0 1px 3px rgba(0, 40, 90, .15);
}

/* SEO FR/EN switch — visible unless this page also has the EN/FR/ES langbar */
nav.top .lang-link {
  color: var(--soft, #5b6b7a);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

nav.top .lang-link:hover {
  color: var(--ink, #14202b);
  background: var(--bg, #f7fafd);
}

nav.top:has(.langbar) .lang-link {
  display: none;
}

/* With 3-lang switcher + long FR/ES CTAs, hide secondary links earlier (tablets). */
@media (max-width: 900px) {
  nav.top:has(.langbar) .navlink.nav-hide-sm {
    display: none;
  }
}

@media (max-width: 720px) {
  nav.top .navlink.nav-hide-sm {
    display: none;
  }
}

@media (max-width: 560px) {
  nav.top .nav-inner {
    padding: 0 12px;
    gap: 6px;
    min-height: 56px;
    flex-wrap: nowrap;
  }

  nav.top .brand {
    font-size: 15px;
    gap: 6px;
  }

  nav.top .brand svg {
    width: 26px;
    height: 26px;
  }

  nav.top .navlink {
    font-size: 13px;
    padding: 6px 6px;
  }

  nav.top .navcta {
    font-size: 12.5px;
    padding: 8px 10px;
  }

  .langbar {
    order: 2;
  }

  nav.top .navcta {
    order: 3;
  }

  .langbar button {
    padding: 8px 10px;
    font-size: 13px;
    min-width: 40px;
    min-height: 40px;
  }
}

@media (max-width: 400px) {
  nav.top .brand .brandword {
    display: none;
  }

  nav.top .navcta {
    padding: 8px 9px;
    font-size: 12px;
  }
}

/* ---- Language visibility (EN / FR / ES) ----
   Use !important so page-local rules (e.g. .hero-badges span) cannot unhide siblings.
   Prefer [hidden] from site-lang.js as a second line of defense. */
[data-fr],
[data-es],
[data-fr][hidden],
[data-es][hidden] {
  display: none !important;
}

body.fr [data-en],
body.es [data-en] {
  display: none !important;
}

body.fr [data-fr] {
  display: inline !important;
}

body.es [data-es] {
  display: inline !important;
}

body.fr [data-es],
body.es [data-fr] {
  display: none !important;
}

/* Block-level lang hosts (rare; keep panes/docs separate) */
body.fr div[data-fr],
body.fr p[data-fr],
body.fr li[data-fr],
body.fr section[data-fr],
body.fr article[data-fr],
body.es div[data-es],
body.es p[data-es],
body.es li[data-es],
body.es section[data-es],
body.es article[data-es] {
  display: block !important;
}

/* Full-page language panes (SEO articles, if used). */
.sl-lang-pane {
  display: none !important;
}

.sl-lang-pane[data-pane="en"] {
  display: block !important;
}

body.fr .sl-lang-pane[data-pane="en"],
body.es .sl-lang-pane[data-pane="en"] {
  display: none !important;
}

body.fr .sl-lang-pane[data-pane="fr"] {
  display: block !important;
}

body.es .sl-lang-pane[data-pane="es"] {
  display: block !important;
}

/* Privacy policy full-document language panes. */
#frDoc,
#esDoc {
  display: none !important;
}

body.fr #enDoc,
body.es #enDoc {
  display: none !important;
}

body.fr #frDoc {
  display: block !important;
}

body.es #esDoc {
  display: block !important;
}
