/* =========================================================
   GOCYBEX — shared responsive & interactivity layer
   Loaded on every page AFTER the page's own inline <style>,
   so these rules patch/extend rather than fight existing CSS.
   ========================================================= */

/* --- Global safety net: never allow horizontal scroll/jitter --- */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img, svg, video, canvas { max-width: 100%; height: auto; }

/* --- Fluid typography: scales continuously between breakpoints
   instead of jumping only at fixed widths. Falls back gracefully
   if a page already sets an explicit font-size (specificity below). --- */
h1 { font-size: clamp(22px, 4.2vw, 34px); }
h2 { font-size: clamp(19px, 3vw, 26px); }
h3 { font-size: clamp(15px, 2vw, 18px); }

/* --- Touch-friendly tap targets (WCAG-ish minimum ~44px) --- */
nav ul li a,
.btn,
.mobile-toggle,
.search-btn,
.foot-social a {
  min-height: 40px;
}
nav ul li a { display: flex; align-items: center; }

/* --- Active nav link indicator (set via assets/main.js) --- */
nav ul li a.current {
  color: var(--green, #4a9637);
  font-weight: 800;
}
nav ul li a.current::after {
  content: "";
}

/* --- Keyboard focus visibility (accessibility + feels interactive) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--green, #4a9637);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Sticky header: subtle compress + shadow once scrolled
   (class toggled by assets/main.js) --- */
header { transition: box-shadow .25s ease, height .25s ease; }
header.is-scrolled { box-shadow: 0 6px 18px rgba(16,43,91,0.12); }

/* --- Mobile nav overlay polish (backdrop + smoother open/close) --- */
@media (max-width: 1000px) {
  nav ul {
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  nav.nav-open ul {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  nav ul li a { min-height: 48px; }
  body.nav-locked { overflow: hidden; }
}

/* --- Extra-small phones (iPhone SE / older Android, ~360px and below) --- */
@media (max-width: 380px) {
  .container { padding: 0 14px !important; }
  .btn { padding: 9px 12px !important; font-size: 12px !important; }
  .nav-right .btn span,
  .nav-right .btn { white-space: normal !important; text-align: center; }
}

/* --- Tablet portrait fine-tuning (770–1024px): avoid cramped 2-col grids --- */
@media (min-width: 640px) and (max-width: 900px) {
  .trust-grid, .pillars-grid, .ind-grid, .ins-cards, .eco-grid {
    gap: 16px !important;
  }
}

/* --- Large desktop / wide monitors: prevent content stretching too thin --- */
@media (min-width: 1600px) {
  .container { max-width: 1500px; }
}

/* --- Print styles (nice-to-have, near-zero cost) --- */
@media print {
  header, footer, .mobile-toggle, .search-wrap, .btn { display: none !important; }
}

/* =========================================================
   Pre-footer utility links bar (Careers / News / Press / Announcements)
   Same background as footer, sits directly above it.
   ========================================================= */
.pre-footer-links { background: #08183a; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.pre-footer-inner { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; }
.pre-footer-inner a { color: #C7D2DE; font-size: 12.5px; font-weight: 700; letter-spacing: 0.3px; transition: color .2s ease; }
.pre-footer-inner a:hover { color: #fff; }
@media (max-width: 640px) {
  .pre-footer-inner { gap: 18px 28px; }
}

/* =========================================================
   Logo marquee (Clients / Partners) — infinite auto-scroll
   Drop real logos into assets/clients/ or assets/partners/
   using the same filenames (client-1.png ... client-8.png,
   partner-1.png ... partner-8.png) to replace placeholders.
   Add more <img> tags in the HTML if you have more than 8.
   ========================================================= */
.logo-marquee-section { padding: 34px 0 40px; background: #fff; }
.logo-marquee-section.tinted { background: var(--light-bg, #f7f9fb); }
.logo-marquee-section .sec-head { margin-bottom: 18px; }

.marquee-wrap {
  overflow: hidden;
  width: 100%;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}
.marquee-track.reverse { animation-direction: reverse; }

.marquee-track img {
  height: 56px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.7;
  filter: grayscale(15%);
  transition: opacity .25s ease, transform .25s ease, filter .25s ease;
  flex-shrink: 0;
}
.marquee-track img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-2px) scale(1.05);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-wrap:hover .marquee-track { animation-play-state: paused; }

@media (max-width: 640px) {
  .marquee-track { gap: 32px; }
  .marquee-track img { height: 42px; max-width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee-wrap { overflow-x: auto; }
}

/* --- Reduced motion: respect user OS preference --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto !important; }
}
