/* ==========================================================
   UMA MARINE — Stylesheet (optimized)
   Order: tokens → base → components → breakpoints → a11y
   ========================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;

  --ink: #0b2345;
  --ink-2: #143b70;
  --text: #102746;
  --muted: #52647b;
  --heading: #0d2a50;
  --navy: #0c2b50;
  --blue: #15559c;
  --link: #1457a6;
  --accent: #ffbd3e;
  --accent-hover: #f4a900;
  --accent-soft: #ffcb63;
  --paper: #f4f8fc;
  --line: #e0e8f1;

  /*
   * Compatibility aliases: the existing Astro page still uses these older
   * token names in catalogue, credential, hover, and fallback styles.
   */
  --ink2: var(--ink-2);
  --panel: #ffffff;
  --lime: var(--accent);
  --cyan: var(--blue);
  --white: var(--text);

  --max: 1320px;
  --gutter: clamp(18px, 4vw, 56px);
  --gap: clamp(12px, 2vw, 28px);
  --nav-h: 76px;
}

/* ---------- 2. Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  min-width: 320px;
  background: #fff;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
img, video, iframe, svg { max-width: 100%; }
img { display: block; }
button, input, select, textarea { max-width: 100%; font: inherit; }

p, li, h1, h2, h3, h4, strong, small { overflow-wrap: break-word; }
a { overflow-wrap: anywhere; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

h2 {
  color: var(--heading);
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.wrap {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.kicker { color: var(--link); letter-spacing: 0.13em; font-size: 0.7rem; }
.section-intro { color: #4c607a; }
.section-top { margin-bottom: 27px; }
.text-link { color: var(--link); }

/* ---------- 3. Header & navigation ---------- */
header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e4ebf4;
  box-shadow: 0 3px 14px rgba(12, 39, 72, 0.035);
  backdrop-filter: blur(14px);
}

.nav {
  height: var(--nav-h);
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  gap: clamp(8px, 1.5vw, 22px);
  min-width: 0;
}

/*
 * The legacy page sets header/nav height with !important in a later
 * responsive layer. Keep this one targeted override so --nav-h is effective.
 */
header .nav {
  height: var(--nav-h) !important;
  min-height: var(--nav-h) !important;
}

.brand { min-width: 0; }
.brand-logo-frame { border-color: var(--line); box-shadow: none; }
.brand-name { color: #0c2b54; letter-spacing: 0.08em; font-size: 0.95rem; }
.brand-name small { color: #4d6078; letter-spacing: 0.12em; }

.nav-links {
  gap: clamp(8px, 1.2vw, 18px);
  font-size: clamp(0.7rem, 0.9vw, 0.81rem);
  font-weight: 650;
  color: #132b4b;
}
.nav-links a:hover,
.nav-services-trigger span { color: var(--link); }

.nav-submenu {
  background: #fff;
  border: 1px solid #dce6f2;
  box-shadow: 0 18px 42px rgba(12, 39, 72, 0.15);
  color: var(--text);
}
.nav-submenu a { border-top-color: #edf1f6; }
.menu-toggle { color: var(--ink); border-color: #d7e2ef; }

/* ---------- 4. Buttons ---------- */
.btn,
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffb92f;
  border-radius: 7px;
  background: var(--accent);
  color: #101e31;
  padding: 13px 19px;
  font-size: 0.79rem;
  text-align: center;
  white-space: normal;
  box-shadow: none;
}
.btn.primary { background: var(--accent); color: var(--text); border-color: var(--accent); }
.btn:not(.primary) {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border-color: #17395f;
}
.btn:not(.primary):hover { background: #eaf2fb; }
.nav-cta { padding: clamp(8px, 1vw, 11px) clamp(10px, 1.2vw, 16px); font-size: clamp(0.65rem, 0.95vw, 0.8rem); white-space: nowrap; }

.btn:hover,
.nav-cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--ink);
}

/* ---------- 5. Hero ---------- */
.hero {
  min-height: 0 !important;
  background: #fff;
  border-bottom: 1px solid #e4ebf4;
}

.hero-image-background {
  position: relative;
  /*
   * A legacy Astro rule fixes this hero to 294px with !important.
   * These are the minimum compatibility overrides needed to restore
   * fluid height; breakpoint values below remain the source of truth.
   */
  height: auto !important;
  min-height: clamp(390px, 32vw, 485px) !important;
  max-height: none !important;
  background: #e7f0f9;
}

.hero-background-image {
  background-position: center 55%;
  transform: none;
}

.hero-background-shade {
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.91) 30%,
      rgba(255, 255, 255, 0.67) 43%,
      rgba(255, 255, 255, 0.08) 68%,
      rgba(4, 21, 41, 0.04) 100%),
    linear-gradient(0deg, rgba(7, 32, 62, 0.12), transparent 35%);
}

.hero-image-background .hero-grid {
  width: min(var(--max), calc(100% - var(--gutter) * 2)) !important;
  min-height: inherit;
  padding: clamp(40px, 5vw, 64px) 0 clamp(36px, 4vw, 56px) !important;
}

.hero-image-background .hero-text { max-width: 650px; }

.hero-image-background .eyebrow,
.eyebrow {
  color: var(--text);
  letter-spacing: 0.13em;
  font-size: 0.7rem;
}
.eyebrow:before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 3px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--accent);
}

.hero-image-background .hero-text h1 {
  max-width: 10.5ch;
  margin: 17px 0 16px;
  color: #0b2c55;
  font-size: clamp(2.2rem, 4.1vw, 4.55rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 820;
  text-shadow: none;
  text-wrap: balance;
}
.hero-image-background .hero-text h1 span,
.hero-image-background .hero-text h1 em {
  display: inline;
  color: var(--blue);
  font-style: normal;
  font-family: inherit;
  font-weight: 820;
  white-space: normal;
}

.hero-image-background .hero-copy {
  max-width: 465px;
  color: #203b5b;
  font-size: clamp(0.9rem, 0.6vw + 0.6rem, 1.02rem);
  line-height: 1.6;
  text-shadow: none;
}

.hero-image-background .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 23px;
}
.hero-image-background .hero-actions .btn { flex: 1 1 160px; min-width: 0; }
.hero-image-background .hero-note { color: #37506c; }

.hero-ring,
.visual-frame,
.visual-label,
.visual-bottom,
.vessel-hud-badge { display: none; }

/* ---------- 6. Proof strip & ticker ---------- */
.proof-strip {
  background: #f1f6fb;
  border-bottom: 1px solid #e1eaf4;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: var(--gap);
  padding: 20px 0;
}
.proof {
  border-right: 1px solid #d7e2ef;
  padding-inline: 24px;
}
.proof:first-child { padding-left: 0; }
.proof strong { color: #0c3973; letter-spacing: 0.04em; }
.proof span { color: #536781; }

.ticker {
  background: #fff;
  border-bottom: 1px solid #e5edf5;
}
.ticker-item { color: #49617c; }
.ticker-item:after { color: #f0ad23; }

/* ---------- 7. Sections ---------- */
section.content-section { padding: clamp(54px, 6vw, 76px) 0; }

.review-bar {
  background: #f7faff;
  color: #49617c;
  border-bottom: 1px solid #e0e8f2;
  font-size: 0.62rem;
}

/* ---------- 8. Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(14, 42, 76, 0.055);
}

.service-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e7eef6;
}
.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.02);
}
.service-image:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 25, 49, 0), rgba(5, 25, 49, 0.22));
}
.service-number { color: #fff; }

.service-body { padding: clamp(14px, 1.6vw, 22px); }
.service-category { color: var(--link); letter-spacing: 0.1em; }
.service-body h3 { color: #0d2a50; font-size: clamp(0.95rem, 0.6vw + 0.8rem, 1.12rem); }
.service-body p { color: #50627a; }
.service-tags li { color: #435a75; }
.service-tags li:before { color: #e9a719; }

/* ---------- 9. About ---------- */
.about-section {
  background: #f2f7fc;
  border-block: 1px solid #e3ebf4;
}

.about-grid,
.bwms-grid,
.enquiry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

.about-photo,
.bwms-image {
  position: relative;
  min-height: clamp(260px, 36vw, 460px);
  border-radius: 11px;
  overflow: hidden;
  background: #dce7f2;
}
.about-photo:after {
  border-radius: 11px;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.14);
}
.about-photo img,
.bwms-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-badge { background: var(--accent); color: var(--text); }
.about-copy > p { color: #4a5f79; }
.about-point { border-top-color: #d3dfec; }
.about-point strong { color: var(--text); }
.about-point span { color: #5a6d83; }

/* ---------- 10. Principles ---------- */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.principle-grid:before {
  background: linear-gradient(90deg, transparent, #c7d9ec 12%, #c7d9ec 88%, transparent);
}
.principle {
  position: relative;
  min-width: 0;
  height: 100%;
  border: 1px solid #dce7f1;
  border-top-color: #8bb4e4;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(14, 42, 76, 0.045);
}
.principle:before { color: rgba(20, 87, 166, 0.06); }
.principle:after { background: var(--accent); box-shadow: none; }
.principle-number { color: var(--link); }
.principle-number:before { background: var(--accent); box-shadow: none; }
.principle h3 { color: var(--heading); }
.principle p { color: var(--muted); }

/* ---------- 11. BWMS ---------- */
.bwms-section {
  background: linear-gradient(130deg, #0d315b, #0a2345 70%);
  color: #fff;
}
.bwms-section h2 { color: #fff; }
.bwms-section .kicker { color: var(--accent-soft); }
.bwms-image { border: 1px solid rgba(255, 255, 255, 0.2); }
.bwms-copy p { color: #d5e2f0; }
.process-list li {
  border-bottom-color: rgba(255, 255, 255, 0.15);
  color: #e6edf5;
}
.process-list b { color: var(--accent-soft); }

/* ---------- 12. Locations & network map ---------- */
.locations-section { background: #f5f8fc; color: var(--text); }
.locations-section h2,
.locations-section h3 { color: var(--heading); }

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: clamp(10px, 1.5vw, 20px);
}
.location-card {
  min-width: 0;
  height: 100%;
  border: 1px solid #dfe8f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(14, 42, 76, 0.035);
}
.location-card .region { color: var(--link); }
.location-card h3 { color: var(--heading); }
.location-card p { color: var(--muted); }

.network-stage {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: #092541;
  border: 1px solid #c7d9ec;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(14, 42, 76, 0.08);
}
.network-head { background: #0d315b; color: #fff; }
.network-map-shell {
  min-width: 0;
  background: radial-gradient(circle at 66% 42%, #164a78, #0b2a4a 58%, #071b30);
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.network-map { height: clamp(260px, 40vw, 480px); }
.network-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: #dbe7f2;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.port-area { border-top: 1px solid #dce6f1; }
.port-chip {
  border: 1px solid #d8e3ef;
  border-radius: 4px;
  color: #304c6d;
  overflow-wrap: anywhere;
}
.port-chip:hover {
  background: #eaf2fb;
  border-color: #9bbbe1;
}

/* ---------- 13. Credentials ---------- */
.credentials-section {
  background: var(--navy);
  border-color: rgba(255, 255, 255, 0.12);
}
.credentials-section .kicker { color: var(--accent-soft); }
.credentials-section h2 { color: #fff; }
.credentials-intro,
.credential-ownership-note { color: #d1dfed; }
.credential-group h3 { color: #e8f0f8; }
.credential-group h3:before { background: var(--accent); box-shadow: none; }

.credential-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: var(--gap);
}
.credential-logo-tile {
  border-radius: 8px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.16);
}
.credential-chip {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.credential-note {
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.06);
  color: #d1dfed;
}
.credential-source { color: #a9d0ff; }

/* ---------- 14. Enquiry ---------- */
.enquiry-section { background: var(--paper); color: var(--text); }
.enquiry-copy h2 { color: var(--heading); }
.enquiry-copy > p { color: var(--muted); }

.contact-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: var(--gap);
}
.contact-tile {
  border: 1px solid #d5e0ec;
  border-radius: 7px;
  background: #fff;
}
.contact-tile span { color: #5b6e83; }
.contact-tile a,
.contact-tile strong { color: #16385f; }

.enquiry-panel {
  min-width: 0;
  padding: clamp(18px, 3vw, 36px);
  background: var(--navy);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(14, 42, 76, 0.12);
}
.enquiry-option {
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 7px;
}
.enquiry-option:hover {
  border-color: var(--accent);
  background: rgba(255, 189, 62, 0.08);
}
.enquiry-option > span { color: var(--accent); }

/* ---------- 15. Reference band ---------- */
.reference-support { height: auto; min-height: 0; }
.reference-support-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding-block: clamp(24px, 4vw, 48px);
}
.reference-support-inner > * { min-width: 0; }
.reference-quick-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 16. Film ---------- */
.film-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.film-card { min-width: 0; padding: clamp(8px, 1vw, 16px); }
.film-frame { width: 100%; aspect-ratio: 16 / 9; }
.film-frame iframe { display: block; width: 100%; height: 100%; }
.film-caption { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 17. Footer ---------- */
footer {
  padding-block: clamp(24px, 4vw, 56px);
  background: #08203b;
  color: #c4d4e6;
  border-top: 0;
}
.footer-brand { color: #fff; }
.footer-top,
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.15); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 22px);
}
.footer-links a { overflow-wrap: anywhere; }

/* ==========================================================
   BREAKPOINTS (desktop = default; cascade top → bottom)
   ========================================================== */

/* Tablet / small laptop: ≤1100px */
@media (max-width: 1100px) {
  .brand-regions { display: none; }
  .nav-links { gap: clamp(7px, 1vw, 12px); }

  .hero-image-background { min-height: 420px !important; }
  .hero-background-shade {
    background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.96),
      rgba(255, 255, 255, 0.86) 42%,
      rgba(255, 255, 255, 0.34) 72%,
      rgba(255, 255, 255, 0.1));
  }

  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid,
  .bwms-grid,
  .enquiry-grid { gap: 30px; }
}

/* Small tablet / large phone: ≤900px */
@media (max-width: 900px) {
  .nav-cta { display: none; }
  .reference-support-inner,
  .about-grid,
  .bwms-grid,
  .enquiry-grid { grid-template-columns: minmax(0, 1fr); }
  .about-photo,
  .bwms-image { min-height: clamp(260px, 42vw, 380px); }
}

/* Phone: ≤760px */
@media (max-width: 760px) {
  :root {
    --nav-h: 70px;
    --gutter: 18px;
  }

  .nav-links {
    background: #fff;
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - var(--nav-h)) !important;
    max-height: calc(100dvh - var(--nav-h)) !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-links a { color: var(--text); }

  .hero-image-background { min-height: 500px !important; }
  .hero-image-background .hero-grid { padding: 54px 0 40px !important; }
  .hero-background-image { background-size: cover; background-position: 65% center; }
  .hero-background-shade {
    background:
      linear-gradient(90deg,
        rgba(255, 255, 255, 0.95),
        rgba(255, 255, 255, 0.86) 50%,
        rgba(255, 255, 255, 0.42)),
      linear-gradient(0deg, rgba(255, 255, 255, 0.06), transparent);
  }
  .hero-image-background .hero-text h1 {
    font-size: clamp(2.7rem, 9.2vw, 4rem);
    max-width: 11ch;
  }
  .hero-image-background .hero-copy { font-size: 0.96rem; max-width: 34ch; }

  .proof-grid { gap: 18px; }
  .proof { padding: 0 12px; }
  .proof:first-child { padding-left: 0; }

  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .service-body { padding: 0 15px 18px; }
  .service-category { margin: 16px 15px 0; }
  .service-body h3 { font-size: 1rem; }
  .service-tags { margin: 14px 0 17px; }
  .service-tags li { font-size: 0.7rem; }

  .about-photo { min-height: 320px; order: 0; }
  .about-copy { order: 0; }
  .about-grid,
  .bwms-grid,
  .enquiry-grid { grid-template-columns: minmax(0, 1fr); }

  .credential-logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .network-map { height: 300px; }
}

/* Small phone: ≤480px */
@media (max-width: 480px) {
  .hero-image-background { min-height: 490px !important; }
  .hero-image-background .hero-grid { padding: 45px 0 34px !important; }
  .hero-image-background .hero-text h1 {
    font-size: clamp(2.55rem, 11vw, 3.45rem);
    max-width: 10ch;
  }
  .hero-image-background .hero-actions .btn { flex: 1 1 45%; }

  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .service-image { aspect-ratio: 1.9; }
  .service-tags { grid-template-columns: 1fr 1fr; }

  .location-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enquiry-panel { padding: 22px; }
  .network-foot .network-note { margin-left: 0; width: 100%; }
}

/* Very small phone: ≤360px */
@media (max-width: 360px) {
  .brand { gap: 5px; }
  .brand-logo-frame { width: 34px; height: 34px; flex-basis: 34px; }
  .brand-name { font-size: 9px; }
  .proof { border-right: 0; padding-inline: 0; }
  .contact-tiles { grid-template-columns: minmax(0, 1fr); }
}

/* Landscape phone */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-image-background { min-height: 360px !important; }
  .hero-image-background .hero-grid { padding-block: 28px; }
}

/* Hover effects only on devices with a real pointer */
@media (hover: hover) and (pointer: fine) {
  .service-card:hover {
    border-color: #a9c5e8;
    box-shadow: 0 12px 28px rgba(14, 42, 76, 0.12);
    transform: translateY(-3px);
  }
  .service-card:hover .service-image img { transform: scale(1.035); }
  .principle:hover { transform: translateY(-2px); }
  .btn:hover,
  .nav-cta:hover { transform: translateY(-1px); }
}

/* Touch devices: prevent sticky hover, including the legacy image zoom. */
@media (hover: none), (pointer: coarse) {
  .service-card:hover,
  .principle:hover,
  .btn:hover,
  .nav-cta:hover { transform: none; }
  .service-card:hover .service-image img { transform: none; }
}

/* ==========================================================
   ACCESSIBILITY
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* ---------- Services grid override ----------
   Reference (1536px) shows six equal cards in one row. Legacy inline rules scope
   the grid as #services … .services-grid with !important (specificity 1,4,0);
   this selector matches that specificity and loads later, so it wins.
   Desktop: 6 columns · tablet: 3 · phone: 2 · small phone: 1. */
#services .services-grid[data-layout="services"].services-grid[data-layout="services"] {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
@media (max-width: 1100px) {
  #services .services-grid[data-layout="services"].services-grid[data-layout="services"] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}
@media (max-width: 760px) {
  #services .services-grid[data-layout="services"].services-grid[data-layout="services"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}
@media (max-width: 480px) {
  #services .services-grid[data-layout="services"].services-grid[data-layout="services"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }
}

/* ---------- Tablet nav fit (901–1100px) ----------
   Brand, six links, search and the header enquiry CTA do not fit on one row
   in this band (measured overflow ~130px at 1024px). Hide the header CTA here;
   the same enquiry action remains in the hero and the enquiry section. */
@media (min-width: 901px) and (max-width: 1100px) {
  header .nav .nav-cta {
    display: none !important;
  }
  header .nav .nav-links {
    gap: 9px !important;
  }
}
