/* Nexus Metrology shared theme: header, footer, palette and type for inner pages */
:root {
  --nx-ink: #10243A; --nx-ink-2: #1B3550; --nx-steel: #56677A; --nx-rule: #D9E0E7;
  --nx-paper: #F4F6F8; --nx-signal: #F2B33D; --nx-link: #1D5FB8;
  --nx-font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --primary: #10243A; --primary-dark: #0A1828; --primary-light: rgba(16,36,58,.08);
  --accent: #1D5FB8; --accent-light: rgba(29,95,184,.08);
  --foreground: #10243A; --muted-foreground: #56677A; --muted: #F4F6F8; --border: #D9E0E7;
}
html { scroll-padding-top: 90px; }
body { font-family: var(--nx-font) !important; color: var(--nx-ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--nx-font) !important; letter-spacing: -0.02em; }
h1 { letter-spacing: -0.03em; }
:focus-visible { outline: 3px solid var(--nx-signal); outline-offset: 3px; }

header.nx-header { position: fixed; inset: 0 0 auto 0; z-index: 1000; background: var(--nx-ink); box-shadow: 0 1px 0 rgba(255,255,255,.08); font-family: var(--nx-font); padding: 0; margin: 0; border: 0; height: auto; transform: none; backdrop-filter: none; }
.nx-wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; box-sizing: border-box; }
.nx-header .nx-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nx-logo { display: flex; align-items: baseline; text-decoration: none !important; color: #fff !important; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.nx-logo span { font-weight: 400; color: rgba(255,255,255,.72); background: none; -webkit-text-fill-color: currentColor; }
.nx-logo .nx-bar { color: var(--nx-signal); margin: 0 6px 0 4px; }
.nx-nav { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.nx-nav-link { color: rgba(255,255,255,.88) !important; text-decoration: none !important; font-size: 15px; font-weight: 500; padding: 10px 13px; border-radius: 4px; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; background: none; }
.nx-nav-link:hover, .nx-nav-link.nx-current { color: #fff !important; background: rgba(255,255,255,.08); }
.nx-caret { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px,-2px); display: inline-block; }
.nx-dd { position: relative; }
.nx-dd-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 290px; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 20px 50px -12px rgba(16,36,58,.35); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; box-sizing: border-box; }
.nx-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nx-dd-menu.nx-wide { min-width: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; }
.nx-dd:hover .nx-dd-menu, .nx-dd:focus-within .nx-dd-menu { opacity: 1; visibility: visible; transform: none; }
.nx-dd-menu a { display: block; padding: 9px 12px; color: var(--nx-ink) !important; text-decoration: none !important; font-size: 15px; font-weight: 400; border-radius: 6px; line-height: 1.35; }
.nx-dd-menu a:hover { background: var(--nx-paper); }
.nx-dd-group { grid-column: 1 / -1; font-size: 13px; color: var(--nx-steel); padding: 10px 12px 4px; border-top: 1px solid var(--nx-rule); margin-top: 6px; }
.nx-dd-group:first-child { border-top: 0; margin-top: 0; padding-top: 4px; }
.nx-actions { display: flex; align-items: center; gap: 8px; margin-left: 14px; }
.nx-phone { color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: 15px; padding: 10px 12px; white-space: nowrap; }
.nx-btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; font: 600 15px/1 var(--nx-font); border-radius: 4px; text-decoration: none !important; background: var(--nx-signal); color: var(--nx-ink) !important; border: 0; white-space: nowrap; transition: background .2s; }
.nx-btn:hover { background: #FFC85C; }
button.nx-menu-btn { display: none; background: none !important; border: 0; color: #fff; padding: 10px; cursor: pointer; margin: 0; box-shadow: none; }
.nx-menu-btn span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: .2s; }
nav.nx-mobile { display: none; }

footer.nx-footer { background: var(--nx-ink); color: rgba(255,255,255,.72); padding: 80px 0 32px; font: 400 15px/1.6 var(--nx-font); margin: 0; border: 0; }
.nx-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.nx-footer .nx-logo { margin-bottom: 16px; }
.nx-footer p { color: rgba(255,255,255,.72); margin: 0; font-size: 15px; }
.nx-footer h4 { margin: 0 0 16px; font-size: 15px; color: #fff; font-weight: 600; letter-spacing: 0; }
.nx-footer ul { list-style: none; margin: 0; padding: 0; }
.nx-footer li { margin: 0 0 9px; color: rgba(255,255,255,.72); }
.nx-footer a { text-decoration: none !important; color: rgba(255,255,255,.72) !important; }
.nx-footer a:hover { color: #fff !important; }
.nx-footer-bottom { margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.nx-footer-bottom nav { display: flex; gap: 22px; }
.nx-social { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; }
.nx-social svg { width: 18px; height: 18px; }

@media (max-width: 1080px) {
  .nx-nav, .nx-phone { display: none; }
  button.nx-menu-btn { display: block; }
  .nx-actions { margin-left: auto; margin-right: 6px; }
  nav.nx-mobile { display: block; position: fixed; top: 76px; left: 0; right: 0; bottom: 0; background: var(--nx-ink); padding: 8px 28px 40px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; z-index: 999; font-family: var(--nx-font); box-sizing: border-box; }
  nav.nx-mobile.open { transform: none; }
  .nx-mobile a { display: block; color: #fff !important; text-decoration: none !important; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 18px; font-weight: 500; }
  .nx-mobile summary { list-style: none; color: #fff; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 18px; font-weight: 500; cursor: pointer; display: flex; justify-content: space-between; }
  .nx-mobile summary::-webkit-details-marker { display: none; }
  .nx-mobile summary::after { content: "+"; color: var(--nx-signal); }
  .nx-mobile details[open] summary::after { content: "–"; }
  .nx-mobile details a { padding-left: 16px; font-size: 16px; color: rgba(255,255,255,.8) !important; }
  .nx-mobile a.nx-btn { margin-top: 24px; width: 100%; border-bottom: 0; color: var(--nx-ink) !important; display: flex; justify-content: center; }
  .nx-open button.nx-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nx-open button.nx-menu-btn span:nth-child(2) { opacity: 0; }
  .nx-open button.nx-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nx-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nx-wrap { padding: 0 20px; }
  .nx-actions .nx-btn { display: none; }
  .nx-footer-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-dd-menu, nav.nx-mobile, .nx-menu-btn span { transition: none !important; }
}

/* Form controls use the site font */
button, input, select, textarea { font-family: inherit; }

/* Mobile layout fixes: stop wide grids from pushing pages sideways */
@media (max-width: 760px) {
  .compucal-grid, .content-grid, .contact-content { grid-template-columns: minmax(0, 1fr) !important; }
  .equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .equipment-grid > *, .compucal-grid > *, .content-grid > *, .contact-content > * { min-width: 0; }
  .equipment-item { overflow-wrap: anywhere; }
  .compucal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .compucal-stats > * { min-width: 0; overflow-wrap: anywhere; }
  .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; gap: 4px !important; }
  .calendar-grid > * { width: auto !important; min-width: 0; }
}
