/* ═══════════════════════════════════════════════════════════════════════
   components.css — Novus Labs Website
   Navbar, utility bar, megamenus, buttons, footer
   ═══════════════════════════════════════════════════════════════════════ */

/* ── NAVBAR ── */



.nav-inner{margin:0 auto;padding:10px 1.5rem 0;height:72px;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.nav-logo{flex-shrink:0;height:32px}
.nav-logo img{height:100%;width:auto;}
.nav-links{display:flex;align-items:center;gap:.25rem;list-style:none;flex:1;justify-content:flex-start}
.nav-links li{position:relative}
.nav-links > li > a{font-family:'Inter',sans-serif;font-size:1.075rem;font-weight:600;color:rgba(255,255,255,.88);padding:.5rem .8rem;border-radius:5px;display:flex;align-items:center;gap:.3rem;white-space:nowrap;position:relative}
.nav-links > li > a::after{content:'';position:absolute;left:0;right:0;bottom:-10px;height:4px;background:var(--red);opacity:0;transition:opacity .18s ease;pointer-events:none}
.nav-links > li:hover > a::after,
.nav-links > li.menu-open > a::after{opacity:1}
.arrow{font-size:.6rem;opacity:.6;transition:transform var(--transition)}
.nav-links li:hover .arrow{transform:rotate(180deg)}
.dropdown{position:absolute;top:calc(100% + 8px);left:0;background:#fff;border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);min-width:220px;opacity:0;visibility:hidden;transform:translateY(-8px);transition:opacity var(--transition),transform var(--transition),visibility var(--transition);border-top:3px solid var(--red);overflow:hidden}
.nav-links li:not(.has-megamenu):hover .dropdown{opacity:1;visibility:visible;transform:translateY(0)}
.dropdown a{color:var(--gray-800)!important;background:transparent!important;border-radius:0!important;padding:.65rem 1.1rem!important;font-size:.84rem!important;border-bottom:1px solid var(--gray-100)}
.dropdown a:hover{color:var(--navy)!important;background:var(--gray-50)!important}
.dropdown a:last-child{border-bottom:none}
.nav-ctas{display:flex;align-items:center;gap:.6rem;flex-shrink:0}
.btn{display:inline-flex;align-items:center;gap:.4rem;padding:.6rem 1.25rem;border-radius:var(--radius);font-size:.875rem;font-weight:600;cursor:pointer;transition:all var(--transition);border:2px solid transparent;white-space:nowrap}
.btn-primary{background:var(--red);color:#fff;border-color:var(--red)}
.btn-primary:hover{background:var(--red-dark);border-color:var(--red-dark)}
.btn-outline-navy{background:transparent;color:#333333;border-color:#cccccc;font-size:.8rem;padding:.5rem 1rem}
.btn-outline-navy:hover{background:var(--gray-50);color:#000}
.hamburger{display:none;flex-direction:column;gap:5px;cursor:pointer;padding:.5rem;background:none;border:none}
.hamburger span{display:block;width:22px;height:2px;background:#333;border-radius:2px;transition:all .3s}

/* ── MOBILE NAV ── */
.mobile-nav{display:none;position:fixed;inset:0;background:#1C1C1C;z-index:999;flex-direction:column;padding:5rem 2rem 2rem;gap:.25rem;overflow-y:auto}
.mobile-nav.open{display:flex}
.mobile-nav a{color:rgba(255,255,255,.85);font-size:1.1rem;font-weight:600;padding:.85rem 0;border-bottom:1px solid rgba(255,255,255,.07);transition:color var(--transition),padding-left var(--transition)}
.mobile-nav a:hover{color:#fff;padding-left:.5rem}
.mobile-nav-ctas{display:flex;flex-direction:column;gap:.75rem;margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,.1)}
.close-btn{position:absolute;top:1.25rem;right:1.5rem;background:none;border:none;color:rgba(255,255,255,.7);font-size:1.8rem;cursor:pointer;line-height:1}

/* ═══════════════════════════════════════════════════════════════════════
   SITE HEADER, MEGAMENUS, UTILITY BAR
   ═══════════════════════════════════════════════════════════════════════ */

/* ── SITE HEADER: fixed at top, sticky on scroll ─────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  overflow: visible;
}

/* ── MEGAMENU ─────────────────────────────────────────────────────── */
.has-megamenu { position: static !important; }

.megamenu {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: #f2f2f2;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index: 999;
}
.megamenu.open {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.megamenu-inner {
  max-width:1440px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.mega-col {
  padding: 0 1rem 0 0;
  border-right: 1px solid rgba(0,0,0,.1);
  margin-right: 1rem;
}
.mega-col:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.mega-col-header {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--red);
}
/* When a column header is wrapped in an anchor (e.g. Specialized Facilities
   links to its landing page), reset default link styling so the title and
   subtitle keep their defined colors, and add a subtle hover affordance. */
a.mega-col-header { color: inherit; text-decoration: none; transition: opacity var(--transition); }
a.mega-col-header:hover { opacity: .75; }
.mega-icon { display: none; }
.mega-col-title { font-family:'Inter',sans-serif; font-size:1.05rem; font-weight:700; color:#000; letter-spacing:.04em; text-transform:uppercase; line-height:1.3; margin-bottom:.2rem; white-space:nowrap; }
.mega-col-sub { font-family:'Inter',sans-serif; font-size:.82rem; color:rgba(0,0,0,.5); font-weight:400; }
.mega-links { list-style:none; margin:0; padding:0; }
.mega-links li { margin-bottom:.05rem; }
.mega-links a { font-family:'Inter',sans-serif; font-size:.95rem; color:#000; padding:.32rem 0; display:flex; align-items:center; gap:.5rem; transition:color var(--transition); text-decoration:none; line-height:1.4; }
.mega-links a:hover { color:#000; text-decoration:underline; text-underline-offset:3px; }
.mega-badge { font-size:.65rem; font-weight:700; background:rgba(170,31,46,.2); color:#e8909a; border:1px solid rgba(170,31,46,.35); border-radius:10px; padding:.1rem .45rem; letter-spacing:.03em; white-space:nowrap; }
.mega-col-last { display:flex; flex-direction:column; }
.mega-cta { margin-top:auto; padding-top:1.25rem; }
.mega-cta-btn { display:inline-block; background:var(--red); color:#fff; font-size:.8rem; font-weight:700; padding:.55rem 1rem; border-radius:var(--radius); transition:background var(--transition); text-decoration:none; }
.mega-cta-btn:hover { background:var(--red-dark); }
.megamenu-footer { background:#e5e5e5; border-top:1px solid rgba(0,0,0,.1); padding:.9rem 2rem; display:flex; align-items:center; justify-content:space-between; }
.megamenu-all { font-family:'Inter',sans-serif; font-size:.9rem; font-weight:700; color:var(--red); text-decoration:none; transition:color var(--transition); }
.megamenu-all:hover { color:var(--red-dark); }
.megamenu-accred { font-size:.72rem; color:rgba(0,0,0,.5); letter-spacing:.03em; }
.has-megamenu .megamenu { border-radius:0; }
.has-megamenu .arrow { transition:transform .22s ease; }
.has-megamenu .arrow.open { transform:rotate(180deg); }

/* ── NAV UTILITY GROUP (right-aligned items in the single-row navbar) ── */
.nav-utility {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}
.util-link {
  font-family: 'Inter', sans-serif;
  font-size: 1.075rem;
  font-weight: 600;
  color: rgba(255,255,255,.88) !important;
  padding: .5rem .8rem;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.util-search-btn {
  background: transparent;
  border: none;
  padding: .5rem .8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.util-link::after,
.util-search-btn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 4px;
  background: var(--red);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.util-link:hover::after,
.util-search-btn:hover::after { opacity: 1; }
.util-search-btn svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255,255,255,.88);
  stroke-width: 2;
  fill: none;
}
.util-search-btn:hover svg { stroke: #fff; }
.util-cta-btn {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff !important;
  font-size: .875rem;
  font-weight: 700;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: .02em;
  transition: background var(--transition);
  white-space: nowrap;
}
.util-cta-btn:hover {
  background: var(--red-dark);
  color: #fff !important;
}


/* ── NAV: transparent over the hero, solid black on hover/scroll ────── */
#navbar {
  background: transparent;
  border-bottom: 2px solid rgba(255,255,255,.25);
  transition: background var(--transition);
}
#site-header:hover #navbar,
#navbar.scrolled {
  background: var(--navy);
}


/* Nav top-level links: always white on dark video bg */
.nav-links > li > a { color: rgba(255,255,255,.88) !important; }
#navbar.solid .nav-links > li > a { color: rgba(255,255,255,.88) !important; }

/* Hamburger white on dark bg */
.hamburger span { background: rgba(255,255,255,.9) !important; }

/* Outline btn ghost style */
.btn-outline-navy { background: rgba(255,255,255,.1) !important; color: rgba(255,255,255,.9) !important; border-color: rgba(255,255,255,.35) !important; }
.btn-outline-navy:hover { background: rgba(255,255,255,.2) !important; color: #fff !important; }

/* Dropdown hover only for non-megamenu items */
.nav-links li:not(.has-megamenu):hover .dropdown { opacity:1; visibility:visible; transform:translateY(0); }


/* ── Megamenu triangle indicator (replaced by nav-link underline) ────── */
.megamenu::before,
.industries-megamenu::before,
.resources-megamenu::before { display: none; }

/* ── INDUSTRIES MEGAMENU ──────────────────────────────────────────────── */
.industries-megamenu {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: #f2f2f2;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index: 999;
}
.industries-megamenu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: var(--ind-triangle-left, 300px);
  width: 0; height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 16px solid #f2f2f2;
  transition: left .15s ease;
}
.industries-megamenu.open {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.ind-mega-inner {
  max-width:1440px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.ind-mega-col {
  padding: 0 1.25rem;
  border-right: 1px solid rgba(0,0,0,.1);
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background var(--transition);
  border-radius: 8px;
}
.ind-mega-col:last-child { border-right: none; }
.ind-mega-col:hover { background: rgba(0,0,0,.05); }
.ind-mega-icon-wrap {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ind-mega-icon-wrap svg {
  width: 48px; height: 48px;
  stroke: var(--red);
  stroke-width: 1.25;
  fill: none;
  transition: stroke var(--transition);
}
.ind-mega-col:hover .ind-mega-icon-wrap svg { stroke: var(--red-dark); }
.ind-mega-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #000;
  margin-bottom: .6rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ind-mega-desc {
  font-size: .875rem;
  color: rgba(0,0,0,.6);
  line-height: 1.6;
}
.ind-mega-footer {
  background: #e5e5e5;
  border-top: 1px solid rgba(0,0,0,.1);
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── RESOURCES MEGAMENU ──────────────────────────────────────────────── */
.resources-megamenu {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: #f2f2f2;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  z-index: 999;
}
.resources-megamenu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: var(--res-triangle-left, 400px);
  width: 0; height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 16px solid #f2f2f2;
  transition: left .15s ease;
}
.resources-megamenu.open {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE NAVIGATION (hamburger + slide-out drawer)
   Activates at <=768px. Above that, the drawer + hamburger stay hidden
   and the standard desktop nav-links + nav-utility take over.
   ════════════════════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-hamburger {
  display: none;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.92);
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 5px;
  transition: background var(--transition);
}
.nav-hamburger:hover { background: rgba(255, 255, 255, 0.08); }
.nav-hamburger svg { width: 28px; height: 28px; stroke-width: 2.25; display: block; }

/* Drawer container — fixed-position overlay, hidden by default */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1500;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden; /* clip the translateX(100%) panel from extending body width */
}
.mobile-drawer.open { visibility: visible; pointer-events: auto; }

/* Backdrop — dimmed click-to-close layer */
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-drawer.open .mobile-drawer-backdrop { opacity: 1; }

/* Drawer panel — slides in from right, full-viewport width on phones */
.mobile-drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: none;
  background: #f2f2f2;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
}
.mobile-drawer.open .mobile-drawer-panel { transform: translateX(0); }

.mobile-drawer-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--navy);
  padding: 0.625rem;
  cursor: pointer;
  border-radius: 5px;
  margin-bottom: 0.5rem;
}
.mobile-drawer-close:hover { background: rgba(0, 0, 0, 0.06); }
.mobile-drawer-close svg { width: 24px; height: 24px; display: block; }

/* Top-level nav list inside drawer */
.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.mobile-nav-item { border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.mobile-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.mobile-nav-item > a,
.mobile-nav-row > a,
.mobile-nav-row > .mobile-nav-label {
  flex: 1;
  display: block;
  padding: 0.95rem 0.25rem;
  color: var(--navy);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  min-height: 44px;
}
.mobile-nav-item > a:hover,
.mobile-nav-row > a:hover { color: var(--red); }

/* Accordion toggle button (the chevron) */
.mobile-sub-toggle {
  background: transparent;
  border: none;
  color: var(--navy);
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-sub-toggle:hover { background: rgba(0, 0, 0, 0.06); }
.mobile-sub-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.22s ease;
}
.mobile-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Sub-menu list (collapsed by default, expanded via .expanded on parent) */
.mobile-sub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.mobile-has-sub.expanded > .mobile-sub-list {
  max-height: 3000px;
  padding: 0 0 0.5rem 0.5rem;
}
/* Leaf links (no further nesting) */
.mobile-sub-list li > a {
  display: block;
  padding: 0.6rem 0.75rem;
  color: var(--gray-700, #444);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 2px solid var(--red);
  margin-bottom: 0.2rem;
}
.mobile-sub-list li > a:hover { color: var(--red); background: rgba(170, 31, 46, 0.04); }

/* Nested accordion (e.g. Engineering Services > Design & Development > items)
   Style the second-level category headers as compact section titles. */
.mobile-sub-list .mobile-has-sub {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.mobile-sub-list .mobile-has-sub:last-child { border-bottom: none; }
.mobile-sub-list .mobile-has-sub > .mobile-nav-row > .mobile-nav-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 0.25rem;
}
/* Divider + utility section */
.mobile-divider {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 0.5rem 0 0.75rem;
}
.mobile-utility-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.mobile-utility-list li a {
  display: block;
  padding: 0.75rem 0.25rem;
  color: var(--navy);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  min-height: 44px;
}
.mobile-utility-list li a:hover { color: var(--red); }

.mobile-util-cta {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  margin-top: 0.5rem;
}
.mobile-util-cta:hover { background: var(--red-dark, #8b1825); }

/* Body scroll lock when drawer is open */
body.mobile-drawer-open {
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════════════
   MOBILE LAYOUT (≤768px)
   Activates mobile nav (hamburger + drawer) and stacks all multi-column
   grids to 1-col so content fits within the device viewport. The site's
   1440px desktop layout is preserved above this breakpoint.
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* --- Nav swap: hide desktop nav, show hamburger --- */
  .nav-links,
  .nav-utility { display: none !important; }
  .nav-hamburger { display: inline-flex; }

  /* Logo: keep the 32px visible mark but extend the tap target to 44px (WCAG) */
  .nav-logo { height: auto; min-height: 44px; display: flex; align-items: center; }
  .nav-logo img { height: 32px; }

  /* --- Homepage section grids: stack to 1-col --- */
  .services-grid,
  .industries-grid,
  .cases-grid,
  .accred-grid,
  .facility-grid,
  .facility-photos,
  .facility-features,
  .resources-inner,
  .stats-inner { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .facility-photos { grid-template-rows: auto !important; }

  /* --- Sub-page section grids: stack to 1-col --- */
  .overview-grid,
  .expertise-grid,
  .engagement-grid,
  .document-grid,
  .monitoring-photos,
  .ecosystem-grid,
  .es-master-links { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  /* Tighter spacing between stacked icon-card grids on mobile (e.g. the
     "What We Evaluate" / Technology Coverage style sections). */
  .expertise-grid,
  .ecosystem-grid,
  .engagement-grid { gap: .85rem !important; }

  /* --- Footer: stack to 1-col --- */
  .footer-main {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 2.5rem 1.25rem 1.5rem !important;
  }

  /* --- Mini-logos "Also Trusted By": 4-col is too tight, drop to 3-col --- */
  .mini-logos { grid-template-columns: repeat(3, 1fr) !important; }

  /* --- Hero: replace the desktop min-height: calc(82vh - 60px) with a
       safer mobile sizing. svh (small-viewport height) excludes browser
       chrome so content doesn't get clipped when the address bar is
       visible. Fallback to vh for browsers without svh support
       (Chrome <108 / Safari <15.4). --- */
  #hero {
    min-height: calc(100vh - 60px) !important;
    min-height: calc(100svh - 60px) !important;
  }

  /* Desktop centers the slide content (justify-content:center on .hero-slide);
     on mobile the content-heavy Matter slide can exceed the viewport, so keep it
     TOP-anchored here — centering would clip the logo/headline under the fixed
     navbar. The padding below provides the ~7rem gap under the navbar. */
  .hero-slide { justify-content: flex-start !important; }

  /* --- Hero / sub-page hero: reduce massive top padding (14.5rem desktop →
       tighter mobile) and add bottom room for the carousel dots --- */
  .hero-content { padding: 7rem 1.25rem 4rem !important; }
  /* Compact the content-heavy Matter hero slide so it clears the carousel
     dots on short mobile viewports (logo + long subtext + two CTAs).
     Harmless for the lighter single-CTA slides. */
  .hero-logo { margin-bottom: .85rem !important; }
  .hero-headline { margin-bottom: .85rem !important; }
  .hero-sub { font-size: .98rem !important; line-height: 1.5 !important; margin-bottom: 1.1rem !important; }
  .hero-ctas { gap: .6rem !important; }
  .subpage-hero-content { padding: 7rem 1.25rem 3rem !important; }

  /* --- Hero carousel dots: were positioned bottom:80px / right:2rem (offset
       overlay for desktop), which overlapped the CTAs at mobile widths.
       Center horizontally at the bottom of the hero. --- */
  .hero-dots {
    bottom: 1.25rem !important;
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* --- Section/container horizontal padding: trim 2rem desktop → 1.25rem
       on phones. Uses padding-left/padding-right specifically so sections
       that set their own vertical padding via the shorthand (e.g.
       .clients-inner { padding: 4rem 0 }) keep their top/bottom spacing. --- */
  .container {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  /* --- CTA band: stack to vertical on phones; the desktop flex-row with
       headline-on-left + buttons-on-right squeezes the buttons offscreen --- */
  #cta-band { padding: 3rem 1.25rem !important; }
  .cta-content {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0 !important;
    gap: 1.5rem !important;
  }

  /* --- Partner cards (used on Partners, Gov Con, Custom Test Tools): the
       desktop flex-row has a fixed 180px logo column + 2.5rem gap + 2.5rem
       padding (~300px minimum before the body text), pushing content off
       the right edge on a phone. Stack vertically with reduced padding. --- */
  .partner-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1.25rem !important;
    padding: 1.5rem !important;
  }
  .partner-logo {
    width: auto !important;
    max-width: 100%;
  }

  /* --- Homepage client-logos grid (.logos-row-3 / .logos-row-4): the
       desktop 3-/4-col grid + .logo-cell's 2rem 2.5rem padding +
       140px image max-width require ~220px per cell, overflowing the
       viewport. Drop to 2-col with tighter cell padding/img sizing. --- */
  .logos-row-3,
  .logos-row-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .logo-cell { padding: 1rem 0.5rem !important; }
  /* Tighter caps on both axes than desktop (140 x 36) — wider logos like
     Sony / Meta / Microsoft hit the 100px width cap, narrower icon logos
     hit the 24px height cap, so all logos land in a similar visual size. */
  .logo-cell img { max-width: 100px !important; max-height: 24px !important; }

  /* --- Buttons: drop white-space: nowrap so long CTA labels (e.g.
       "Explore the Mechanical Touch Simulator") wrap to multiple lines
       instead of pushing the button past its container. Cap at 100%
       container width as a hard belt. --- */
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-cta-primary,
  .btn-cta-ghost,
  .btn-hero-primary,
  .btn-hero-ghost {
    white-space: normal !important;
    max-width: 100% !important;
  }
}

/* ════════════════════════════════════════════════════════════════════
   COOKIE CONSENT BANNER (injected by js/consent.js)
   Hidden by default; .is-visible shows it. Hard-gate for GA4.
   ════════════════════════════════════════════════════════════════════ */
.cookie-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: 760px;
  margin: 0 auto;
  background: var(--navy);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  padding: 1.1rem 1.25rem;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem .75rem;
}
.cookie-consent.is-visible { display: flex; }
.cookie-consent-text {
  margin: 0;
  flex: 1 1 320px;
  font-size: .9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .9);
}
.cookie-consent-text a { color: #fff; text-decoration: underline; }
.cookie-consent-actions { display: flex; gap: .6rem; flex-shrink: 0; }
.cookie-consent-btn {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  padding: .55rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.cookie-consent-accept { background: var(--red); color: #fff; }
.cookie-consent-accept:hover { background: var(--red-dark); }
.cookie-consent-decline { background: transparent; color: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .3); }
.cookie-consent-decline:hover { border-color: #fff; color: #fff; }
@media (max-width: 768px) {
  .cookie-consent { left: .5rem; right: .5rem; bottom: .5rem; padding: 1rem; }
  .cookie-consent-actions { width: 100%; }
  .cookie-consent-btn { flex: 1; }
}
