/* assets/altercv-nav.css
 *
 * Site-wide navigation additions:
 *   1. "Visa Sponsorship Jobs" dropdown with a country submenu
 *   2. A working mobile menu
 *
 * (2) is a fix, not a feature. The existing stylesheet hides .nav-links
 * entirely below 900px with nothing in its place, so on a phone the site had
 * no navigation at all beyond the logo. Most job seekers browse on a phone.
 *
 * Relies on the design tokens already declared in each page's :root
 * (--brand, --ink-2, --line, …) and falls back if one is missing.
 */

/* ---------------- dropdown ---------------- */
/*
 * Opening is CSS-only (:hover / :focus-within) with a hover bridge across the
 * gap. The previous version toggled on click while ALSO opening on hover, so
 * on a desktop the panel was already open when the click landed and the click
 * closed it — the menu read as broken. The trigger is now a plain link that
 * navigates, and the panel is presentation only.
 */
.navdrop { position: relative; }

.navdrop-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 6px 0;
  font-family: inherit; font-size: inherit; font-weight: 500;
  color: var(--ink-2, #18263C); cursor: pointer; text-decoration: none;
  transition: color .15s ease;
}
.navdrop:hover .navdrop-trigger,
.navdrop:focus-within .navdrop-trigger { color: var(--brand, #2A9D9F); }
.navdrop-trigger .chev {
  width: 8px; height: 8px;
  border-right: 1.9px solid currentColor; border-bottom: 1.9px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .2s ease;
}
.navdrop:hover .navdrop-trigger .chev,
.navdrop:focus-within .navdrop-trigger .chev { transform: rotate(225deg) translateY(1px); }

/* Bridges the 12px gap so the panel does not close as the pointer travels. */
.navdrop::after {
  content: ''; position: absolute; left: -12px; right: -12px; top: 100%; height: 16px;
}

.navdrop-panel {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: min(560px, 94vw);
  background: #fff; border: 1px solid var(--line, #E7E2D5);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(7,16,28,.04), 0 18px 48px rgba(7,16,28,.14);
  padding: 6px; z-index: 200;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.navdrop:hover .navdrop-panel,
.navdrop:focus-within .navdrop-panel {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.navdrop-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 12px 14px 10px;
}
.navdrop-head strong {
  font-size: 14px; font-weight: 700; color: var(--ink, #07101C); letter-spacing: -.01em;
}
.navdrop-head span { font-size: 11.5px; color: var(--ink-4, #94A0B4); font-variant-numeric: tabular-nums; }

.navdrop-body { padding: 0 6px; }
.navdrop-group + .navdrop-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, #E7E2D5); }
.navdrop-group h5 {
  margin: 0 0 4px; padding: 0 8px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-4, #94A0B4);
}
.navdrop-list { display: grid; grid-template-columns: 1fr; gap: 1px; }
.navdrop-list.two { grid-template-columns: 1fr 1fr; }
.navdrop-panel { width: min(620px, 94vw); }

.navdrop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px; border-radius: 9px; text-decoration: none;
  transition: background .12s ease;
}
.navdrop-item:hover { background: var(--brand-soft, #D5F0EF); }

/* Hairline + radius stop a white flag (CH, NL, FR) dissolving into the panel. */
.navdrop-flag {
  width: 24px; height: 18px; flex-shrink: 0; display: block;
  border-radius: 3px; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(7,16,28,.10);
}
.navdrop-name {
  font-size: 13.5px; font-weight: 600; color: var(--ink-2, #18263C);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.navdrop-count {
  margin-left: auto; font-size: 11.5px; font-weight: 600;
  color: var(--ink-3, #4A5568); font-variant-numeric: tabular-nums;
}
.navdrop-item:hover .navdrop-count { color: var(--brand-deep, #094D4F); }
.navdrop-empty { padding: 12px; font-size: 13px; color: var(--ink-4, #94A0B4); margin: 0; }

.navdrop-foot { margin-top: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--line, #E7E2D5); }
/* The arrow lives in the link text, not a ::after. As a pseudo-element it
   rendered on its own line inside the flex container on the live homepage —
   the host page's own link styling interferes — and chasing that interaction
   is not worth it when a character in the string cannot detach. */
.navdrop-foot a {
  font-size: 13px; font-weight: 700; color: var(--brand-deep, #094D4F);
  text-decoration: none; white-space: nowrap;
}
.navdrop-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- mobile menu ---------------- */
.acv-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 11px;
  border: 1px solid var(--line-2, #DCD5C5); border-radius: 12px;
  background: var(--paper, #fff); cursor: pointer;
}
.acv-burger span {
  display: block; height: 2px; background: var(--ink-2, #18263C); border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
body[data-menu="open"] .acv-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body[data-menu="open"] .acv-burger span:nth-child(2) { opacity: 0; }
body[data-menu="open"] .acv-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.acv-mobile-menu {
  position: fixed; left: 0; right: 0; bottom: 0;
  top: var(--acv-nav-h, 64px);
  background: var(--cream, #FBF8F3); z-index: 190;
  overflow-y: auto; padding: 24px clamp(18px, 5vw, 28px) 60px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
body[data-menu="open"] .acv-mobile-menu { opacity: 1; visibility: visible; transform: translateY(0); }
body[data-menu="open"] { overflow: hidden; }

.acv-mobile-menu h4 {
  font-family: 'Fraunces', serif; font-size: 13px; text-transform: uppercase;
  letter-spacing: .09em; color: var(--ink-4, #94A0B4);
  margin: 26px 0 10px; font-weight: 600;
}
.acv-mobile-menu h4:first-child { margin-top: 0; }
.acv-mm-link {
  display: block; padding: 13px 14px; border-radius: 13px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  color: var(--ink-2, #18263C);
  background: var(--paper, #fff); border: 1px solid var(--line, #E7E2D5); margin-bottom: 8px;
}
.acv-mm-countries { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acv-mm-country {
  display: flex; align-items: center; gap: 9px; padding: 12px;
  border-radius: 13px; text-decoration: none; color: var(--ink-2, #18263C);
  background: var(--paper, #fff); border: 1px solid var(--line, #E7E2D5);
  font-size: 14px; font-weight: 600;
}

@media (max-width: 980px) {
  .acv-burger { display: flex; }
  .navdrop { display: none; }         /* the dropdown lives in the mobile menu instead */
}
@media (min-width: 981px) {
  .acv-mobile-menu { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .navdrop-panel, .acv-mobile-menu, .acv-burger span { transition-duration: .001ms !important; }
}

/* Country code chip — see visa.css for why this replaces flag emoji. */
.ccode{display:inline-grid;place-items:center;min-width:26px;height:20px;padding:0 5px;
  border-radius:6px;background:var(--brand-soft,#D5F0EF);color:var(--brand-deep,#094D4F);
  font-family:'JetBrains Mono',ui-monospace,monospace;font-size:10.5px;font-weight:600;
  letter-spacing:.04em;line-height:1;flex-shrink:0}

/* Mobile menu country rows — same flags, sized for touch. */
.acv-mm-country { position: relative; padding-right: 40px; }
.acv-mm-country .navdrop-flag { width: 26px; height: 20px; }
.acv-mm-country em {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 12px; font-weight: 600;
  color: var(--ink-4, #94A0B4); font-variant-numeric: tabular-nums;
}


/* Countries with no live roles today still appear — they carry the guide page.
   Dimmed rather than hidden, so the menu shows the real footprint of the
   product without pretending every country has inventory. */
.navdrop-item.is-empty .navdrop-name { color: var(--ink-3, #4A5568); font-weight: 500; }
.navdrop-count.is-guide {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-4, #94A0B4); background: var(--cream, #FBF8F3);
  border: 1px solid var(--line, #E7E2D5); border-radius: 5px; padding: 2px 6px;
}
.navdrop-item:hover .navdrop-count.is-guide { color: var(--brand-deep, #094D4F); border-color: var(--brand, #2A9D9F); }
.acv-mm-country.is-empty span { color: var(--ink-3, #4A5568); font-weight: 500; }
.acv-mm-country.is-empty em { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
