/* ==========================================================================
   Onsite Services overview — Injury Care Associates
   Scoped under .onsite. Tokens map to the site's Bootstrap custom properties;
   hex fallbacks are the live values so the page also works standalone.
   ========================================================================== */

.onsite {
  --os-primary: var(--bs-primary-hex, #0072bc);
  --os-primary-dark: #005b96;
  --os-navy: var(--bs-tertiary-hex, #1e2d3b);
  --os-light: var(--bs-light-hex, #f2f8fc);
  --os-ink: var(--bs-heading-color-hex, #212124);
  --os-body: #495356;
  --os-line: var(--bs-secondary-border-hex, #e7e7e7);
  --os-accent: #80b7e3;
  --os-pale: #dbe7f0;
  --os-warning: var(--bs-warning-hex, #ffd240);
  --os-warning-dark: #f5c51e;
  --os-radius: var(--bs-border-radius, 10px);
  --os-heading: 'Catamaran', sans-serif;
  --os-body-font: 'Nunito Sans', system-ui, sans-serif;

  font-family: var(--os-body-font);
  color: var(--os-ink);
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.onsite *, .onsite *::before, .onsite *::after { box-sizing: border-box; }
.onsite img { max-width: 100%; }
.onsite a { color: var(--os-navy); }
.onsite a:hover { color: var(--os-primary); }

.os-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.os-sec { border-bottom: 1px solid var(--os-line); }
.os-sec > .os-wrap { padding-top: 68px; padding-bottom: 68px; }
.os-sec--white { background: #fff; }
.os-sec--light { background: var(--os-light); }
.os-sec--navy { background: var(--os-navy); color: #fff; border-bottom: 0; }

/* ---------- type ---------- */
.os-kicker { font-family: var(--os-heading); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--os-primary); margin: 0 0 10px; }
.os-kicker--accent { color: var(--os-accent); }
.os-kicker--navy { color: var(--os-navy); margin-bottom: 8px; }
.os-h1 { font-family: var(--os-heading); font-weight: 800; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 18px; max-width: 15ch; text-wrap: balance; }
.os-h2 { font-family: var(--os-heading); font-weight: 800; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -.015em; margin: 0; }
.os-h2--gap { margin-bottom: 14px; max-width: 18ch; }
.os-h3 { font-family: var(--os-heading); font-weight: 800; margin: 0; }
.os-sub { font-size: 18px; line-height: 1.55; color: var(--os-body); margin: 0; }
.os-sub + .os-sub { margin-top: 14px; }
.os-sub--md { font-size: 17px; }
.os-sub--invert { color: var(--os-pale); }
.os-sub--ink { color: var(--os-ink); }
.os-head { max-width: 60ch; }
.os-head--gap { margin-bottom: 32px; }
.os-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 56px; }
.os-split--start { align-items: start; }
.os-split--center { align-items: center; }
.os-split--end { align-items: end; margin-bottom: 32px; }
.os-max46 { max-width: 46ch; }
.os-max56 { max-width: 56ch; }

/* ---------- buttons ---------- */
.os-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--os-body-font); font-weight: 700; font-size: 16px; padding: 13px 24px; border-radius: var(--os-radius); border: 2px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .18s, border-color .18s, color .18s; }
.os-btn--lg { font-size: 17px; padding: 15px 26px; }
.os-btn--primary { background: var(--os-primary); border-color: var(--os-primary); color: #fff; }
.os-btn--primary:hover { background: var(--os-primary-dark); border-color: var(--os-primary-dark); color: #fff; }
.os-btn--shadow { box-shadow: 0 6px 18px rgba(0,114,188,.35); }
.os-btn--outline-navy { background: transparent; border-color: var(--os-navy); color: var(--os-navy); }
.os-btn--outline-navy:hover { background: var(--os-navy); color: #fff; }
.os-btn--block { display: flex; width: 100%; }
.os-btn--sm { font-size: 15px; padding: 12px 20px; }
.os-btnrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- hero ---------- */
.os-hero { position: relative; background: var(--os-navy); color: #fff; overflow: hidden; }
.os-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.os-hero__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,45,59,.96) 0%, rgba(30,45,59,.85) 45%, rgba(30,45,59,.35) 100%); }
.os-hero__inner { position: relative; padding-top: 88px; padding-bottom: 96px; }
.os-hero__copy { max-width: 620px; }
.os-hero__crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--os-heading); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--os-accent); margin-bottom: 14px; }
.os-hero__lede { font-size: clamp(17px, 2vw, 20px); line-height: 1.5; color: var(--os-pale); max-width: 50ch; margin: 0 0 28px; }
.os-hero__crumb, .os-h1, .os-hero__lede, .os-hero .os-btnrow { animation: os-hero-in .7s cubic-bezier(.2,.7,.3,1) both; }
.os-h1 { animation-delay: .08s; } .os-hero__lede { animation-delay: .16s; } .os-hero .os-btnrow { animation-delay: .24s; }
@keyframes os-hero-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.os-play { display: inline-flex; align-items: center; gap: 12px; color: #fff; background: none; border: 0; font: inherit; font-weight: 700; font-size: 17px; padding: 10px 12px; cursor: pointer; }
.os-play:hover { color: var(--os-warning); }
.os-play__disc { width: 44px; height: 44px; border-radius: 50%; background: var(--os-warning); display: inline-flex; align-items: center; justify-content: center; animation: os-pulse 2.4s ease-out infinite; }
.os-play__tri { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent var(--os-navy); margin-left: 3px; }
@keyframes os-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,210,64,.6); } 70% { box-shadow: 0 0 0 12px rgba(255,210,64,0); } 100% { box-shadow: 0 0 0 0 rgba(255,210,64,0); } }

/* ---------- video modal ---------- */
.os-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(30,45,59,.92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.os-modal[hidden] { display: none; }
.os-modal__frame { position: relative; width: min(1100px, 100%); aspect-ratio: 16/9; background: #000; border-radius: var(--os-radius); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.os-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.os-modal__close { position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; border-radius: 50%; background: var(--os-warning); color: var(--os-ink); border: 0; font-size: 26px; line-height: 1; cursor: pointer; font-weight: 700; }
.os-modal__close:hover { background: var(--os-warning-dark); }
.os-modal-open { overflow: hidden; }

/* ---------- why on-site: pillars ---------- */
.os-pillars { display: flex; flex-direction: column; gap: 12px; }
.os-pillar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; border: 1px solid var(--os-line); border-radius: var(--os-radius); padding: 20px 22px; }
.os-pillar__stat { font-family: var(--os-heading); font-weight: 800; font-size: 26px; line-height: 1; color: var(--os-primary); min-width: 64px; }
.os-pillar__title { font-family: var(--os-heading); font-weight: 800; font-size: 19px; line-height: 1.2; margin-bottom: 4px; }
.os-pillar__body { font-size: 15px; line-height: 1.5; color: var(--os-body); }

/* ---------- services ---------- */
.os-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.os-card { background: #fff; border: 1px solid var(--os-line); border-radius: var(--os-radius); padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 12px; }
.os-card__when { align-self: flex-start; font-family: var(--os-heading); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--os-body); background: var(--os-light); padding: 4px 10px; border-radius: 999px; }
.os-card__title { font-size: 22px; line-height: 1.2; }
.os-card__body { font-size: 16px; line-height: 1.5; color: var(--os-body); margin: 0; }
.os-checks { margin: 6px 0 0; padding: 16px 0 0; border-top: 1px solid var(--os-line); list-style: none; display: flex; flex-direction: column; gap: 8px; }
.os-checks li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--os-ink); }
.os-checks li::before { content: "✓"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--os-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-top: 2px; }
.os-fine { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--os-body); }
.os-fine strong { color: var(--os-navy); }

/* ---------- case studies (tabbed spotlight) ---------- */
.os-cs__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 32px; margin-bottom: 28px; }
.os-tabs { display: flex; flex: none; gap: 6px; background: var(--os-light); border: 1px solid var(--os-line); border-radius: 999px; padding: 5px; }
.os-tab { font: inherit; font-family: var(--os-heading); font-weight: 800; font-size: 15px; cursor: pointer; white-space: nowrap; border: 0; border-radius: 999px; padding: 9px 18px; background: transparent; color: var(--os-navy); }
.os-tab[aria-selected="true"] { background: var(--os-navy); color: #fff; }
.os-cs__panel[hidden] { display: none; }
.os-cs__panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); background: #fff; border: 1px solid var(--os-line); border-radius: 16px; overflow: hidden; }
.os-cs__media { position: relative; min-height: 420px; }
.os-cs__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.os-cs__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,45,59,0) 40%, rgba(30,45,59,.95)); }
.os-cs__tag { position: absolute; z-index: 1; top: 22px; left: 22px; font-family: var(--os-heading); font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--os-navy); background: var(--os-warning); padding: 6px 12px; border-radius: 6px; }
.os-cs__caption { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 28px 30px; color: #fff; }
.os-cs__client { font-family: var(--os-heading); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--os-accent); margin-bottom: 8px; }
.os-cs__title { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; text-wrap: balance; }
.os-cs__content { display: grid; grid-template-rows: auto 1fr auto; }
.os-cs__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--os-line); }
.os-cs__stat { padding: 20px 18px; border-right: 1px solid var(--os-line); min-width: 0; }
.os-cs__stat:last-child { border-right: 0; }
.os-cs__stat b { display: block; font-family: var(--os-heading); font-weight: 800; font-size: 20px; line-height: 1; color: var(--os-primary); white-space: nowrap; }
.os-cs__stat span { display: block; font-size: 13px; color: var(--os-body); margin-top: 5px; line-height: 1.35; }
.os-cs__body { padding: 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.os-cs__body p { font-size: 16px; line-height: 1.55; color: var(--os-body); margin: 0; }
.os-cs__foot { padding: 0 30px 28px; }

/* ---------- full service list (navy) ---------- */
.os-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 24px; }
.os-list li { display: flex; gap: 10px; font-size: 16px; line-height: 1.45; color: var(--os-light); }
.os-list li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--os-accent); margin-top: 9px; }
.os-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; display: block; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.os-sec--navy .os-sub--invert { margin-bottom: 24px; }

/* ---------- plans ---------- */
.os-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.os-plan { background: #fff; border: 1px solid var(--os-line); border-radius: 12px; padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 12px; }
.os-plan__name { font-family: var(--os-heading); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--os-body); }
.os-plan__price { display: flex; align-items: baseline; gap: 6px; }
.os-plan__price b { font-family: var(--os-heading); font-weight: 800; font-size: 44px; line-height: 1; color: var(--os-navy); }
.os-plan__price span { font-size: 16px; color: var(--os-body); }
.os-plan__tag { font-size: 16px; line-height: 1.5; color: var(--os-body); }
.os-plan .os-checks { margin: 4px 0 8px; padding-top: 14px; }
.os-plans__cta { margin-top: 24px; }

/* ---------- final CTA (yellow) ---------- */
.os-cta { background: var(--os-warning); overflow: hidden; }
.os-cta__inner { padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: center; justify-content: space-between; }
.os-cta__copy { flex: 1 1 380px; min-width: 0; }
.os-cta__copy .os-h2 { color: var(--os-navy); margin-bottom: 12px; max-width: 22ch; }
.os-cta__actions { flex: 0 1 300px; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }

@media (prefers-reduced-motion: reduce) { .onsite *, .onsite *::before, .onsite *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   ICA additions — appended 2026-09-18 for the MODX build of resource 51.
   Nothing above this line is modified: the design export ships verbatim
   (BUILD-RECIPE "ship the design CSS in full"). Everything below is either a
   live-theme collision the design could not know about, or a consequence of
   swapping the design's own video modal for the site's GLightbox.
   ========================================================================== */

/* 1. Heading colour — the one collision that would break the page.
   The design colours a section and lets headings inherit. The ICA theme sets
   h1/h2/h3 colour DIRECTLY (#212124), and a direct element rule beats an
   inherited value, so every heading in a dark section would render near-black
   on navy. Verified on the live theme 2026-09-18: a p inside a
   colour:#fff container inherited white, while h1/h2/h3 all computed
   rgb(33,33,36). The design's own .os-h1/.os-h2/.os-h3 declare no colour at
   all, so these restatements are what make them visible. Scoped to .onsite
   and two classes deep, which beats the theme without !important. */
.onsite .os-h1 { color: #fff; }
.onsite .os-sec--navy .os-h2,
.onsite .os-sec--navy .os-h3 { color: #fff; }
.onsite .os-sec--white .os-h2,
.onsite .os-sec--light .os-h2 { color: var(--os-ink); }
.onsite .os-card__title { color: var(--os-ink); }
.onsite .os-cs__caption .os-cs__title { color: #fff; }

/* 2. Case-study tabs fail open.
   Same family as the SAL and .tpt-js traps: if the script never runs, content
   gated on a JS-applied state must stay visible rather than vanish. onsite.js
   adds .os-js to the page root; until it does, a [hidden] panel still shows
   and the two panels stack. With JS working this rule never applies, so there
   is no flash of both panels. */
.onsite:not(.os-js) .os-cs__panel[hidden] { display: grid; }
.onsite:not(.os-js) .os-cs__panel + .os-cs__panel { margin-top: 24px; }

/* 3. GLightbox video slide sizing.
   The design's own modal is not shipped; the play link carries the site's
   .glightbox class instead. GLightbox ignores data-width/data-height for a
   video slide (the instance's videosWidth wins), so the size has to come from
   CSS. Selectors and !important match assets/css/protocols.css, which proved
   them on this install 2026-09-17.
   Scoping note, same as protocols.css: .glightbox-container is a body child
   OUTSIDE main.onsite, so the page's --os-* tokens do not reach it. The two
   values needed are redeclared here from the same theme variables the page
   reads, with the same fallbacks, so the modal tracks the theme. */
.glightbox-container {
  --ons-navy: var(--bs-tertiary-hex, #1e2d3b);
  --ons-radius: var(--bs-border-radius, 10px);
}
.glightbox-container .goverlay {
  background: rgba(30, 45, 59, .94) !important;
  background: color-mix(in srgb, var(--ons-navy) 94%, transparent) !important;
  backdrop-filter: blur(4px);
}
.glightbox-container .gslide-media {
  border-radius: var(--ons-radius) !important;
  overflow: hidden !important;
  background: #000 !important;
}
.glightbox-container .gprev,
.glightbox-container .gnext { display: none !important; }
@media (min-width: 768px) {
  .glightbox-container .gslide-media { width: 80vw !important; max-width: 80vw !important; max-height: 80vh !important; }
  .glightbox-container .gslide-media .gvideo-wrapper { width: 100% !important; max-width: 100% !important; }
}

/* 4. The play control is an <a> now, not a <button>.
   The design styled .os-play as a button (background:none;border:0). As a link
   it needs the decoration reset and the same focus affordance. */
.onsite a.os-play { text-decoration: none; }
.onsite a.os-play:focus-visible { outline: 3px solid var(--os-warning); outline-offset: 3px; border-radius: 6px; }

/* 5. Richtext TV regions.
   form-content and bottom-content are richtext TVs: they emit their own <p>
   elements, so the design's .os-sub cannot sit on the paragraph itself. It
   goes on the wrapper instead — font-size, line-height and colour are
   inherited properties, so they reach the paragraphs on their own and only
   the margins need restating. Same pattern as .dtp-freetext in protocols.css. */
.onsite .os-freetext p { margin: 0 0 14px; }
.onsite .os-freetext p:last-child { margin-bottom: 0; }

/* 6. :replaceBrackets emits <b>, not <strong>.
   Verified on the live page: top-disclaimer's "{Disclaimer: ...}" renders as
   <b>. The design styles .os-fine strong, which would therefore never match,
   leaving the 911 sentence unemphasised — so the same treatment is given to
   <b>. The house { } convention stays intact for whoever edits the TV. */
.onsite .os-fine b,
.onsite .os-fine strong { color: var(--os-navy); font-weight: 800; }
