/*
 * base typography, links, selection, focus, scrollbar.
 * Fonts: Inter for text, Space Grotesk for headings (loaded by the mu-plugin in place of Poppins).
 * Inline font-family:'Poppins' from page builders (Ultimate buttons etc.) is neutralised so it inherits.
 */
body.wt-site {
  font-family: var(--wt-font-body) !important;
  color: var(--wt-text);
  background-color: var(--wt-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01"; /* Inter: single-storey a, straight 1 */
}
body.wt-site :is(button, input, select, textarea, blockquote, .ubtn, a.action_button, #menu > ul > li > a, #overlay-menu ul li a, .hbspt-form) {
  font-family: var(--wt-font-body) !important;
}
/* plugin widgets that hard-code their own faces (service boxes, counters) */
body.wt-site :is(.svc_title, .svc_info, .stats-number, .counter_suffix, .counter_prefix, .ult-responsive.timer, .et-tabs, .et-tab-title, .et-tab-sub-title) {
  font-family: var(--wt-font-body) !important;
}
body.wt-site :is(.svc_title, .stats-number) {
  font-family: var(--wt-font-display) !important;
}
/* JPS Ajax Post Layout grids (e.g. /es/noticias/) print per-instance CSS such as
   `html body .jps_bete_custom_css3185.bt368-nav-ptt[id^="jps_bete_"] .bt-font-heading-1 { font-family: Raleway !important }`
   (0,4,2). The :not(#…) adds one id so the design faces win; same faces as the English /newsroom/ grid. */
html body.wt-site [id^="jps_bete_"] [class*="bt-font-"]:not(#wt-jps-faces) {
  font-family: var(--wt-font-body) !important;
}
body.wt-site [style*="Poppins"] {
  font-family: inherit !important;
}

/* Every text element uses the design faces, whatever page content or plugins declare (one page ships
   `* { font-family: Poppins !important }`; widgets hard-code Raleway/Montserrat). Icon fonts are excluded by class.
   Specificity is kept low (one :not) so the heading rule below, which restores the display face, outranks it. */
:where(body.wt-site) *:not(i, [class*="icon"], [class*="fa-"], .fa, [class^="Defaults"], [class*=" Defaults"], [class*="vc_li"], .ab-icon) {
  font-family: var(--wt-font-body) !important;
}
body.wt-site :is(h1, h2, h3, h4, h5, h6, .svc_title, .stats-number) :not(i, [class*="icon"], [class*="fa-"], .fa, [class^="Defaults"], [class*=" Defaults"]) {
  font-family: var(--wt-font-display) !important;
}

/* Headings
   Specificity rule for site-wide defaults: `:where(body.wt-site) h2` is (0,0,1). It beats Betheme's bare `h2 {}`
   defaults (same specificity, loaded later) but loses to ANY class or inline style, so page-specific colours and
   sizes (white headings on coloured bands, .heading_fz, etc.) keep working. Only the typeface is forced. */
body.wt-site :is(h1, h2, h3, h4, h5, h6, .text-logo #logo, #Subheader .title, .aio-icon-title) {
  font-family: var(--wt-font-display) !important;
  text-wrap: balance;
}
:where(body.wt-site) :is(h1, h2, h3, h4, h5, h6) {
  font-weight: 600;
  color: var(--wt-ink);
}
:where(body.wt-site) h1 {
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
:where(body.wt-site) h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--wt-ink-2);
}
:where(body.wt-site) h3 {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
:where(body.wt-site) h4 {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.3;
}
:where(body.wt-site) :is(h5, h6) {
  line-height: 1.35;
}
/* Arabic (/ar/, html lang="ar" dir="rtl"; glyphs from Noto Sans Arabic, see 00-tokens.css): the Latin heading scale's
   negative tracking pulls joined Arabic letters apart (Safari/Firefox apply letter-spacing to cursive script), and its
   1.08-1.25 line-heights let wrapped lines' ascenders, descenders and vowel marks touch. (0,3,1) also covers the
   legacy heading classes mapped below. */
body.wt-site:lang(ar) :is(h1, h2, h3, h4, h5, h6, .banner_title, .heading_fz, .heading_fz1) {
  letter-spacing: normal;
  line-height: 1.35;
}
/* Space Grotesk is wide at 700+; cap bold inside headings at semibold */
:where(body.wt-site) :is(h1, h2, h3, h4, h5, h6) :is(strong, b) {
  font-weight: 600;
}

/* Body copy */
body.wt-site :where(#Content) :where(p, li) {
  line-height: 1.7;
  text-wrap: pretty;
}
body.wt-site :where(#Content p strong, #Content li strong) {
  font-weight: 600; /* colour inherits: bold text also sits on blue bands */
}

/* Legacy type overrides -> the site scale.
   The defaults above are deliberately (0,0,1) so page classes can recolour/resize headings. A few legacy sources
   instead restyle whole page families off-scale (bold 700 headings, 16px/400 body), so these pages read differently
   from the homepage. Each source is mapped back here, by name, rather than raising the defaults' specificity:
   - WPBakery per-page Custom CSS (<style data-type="vc_custom-css">) on the solutions/kiosk/QMS landing pages:
     .banner_title (h1), .heading_fz (h2), .heading_fz1 (smaller h2), .pare_fz (body copy)
   - theme ctemp.css (custom-page-template.php: /customer-experience/, /patient-experience/ series):
     .entry-content h2/h3/p/li, header.entry-header .entry-title. Scoped to that template's body class: Betheme
     wraps every page in .entry-content, and other pages' card copy must keep its own size.
   - Ultimate Addons info boxes/banners printing style="font-weight:bold|700" on their h3 titles */
body.wt-site .banner_title {
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
body.wt-site .heading_fz {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
body.wt-site .heading_fz1 {
  font-weight: 600;
  letter-spacing: -0.01em;
}
body.wt-site :is(.pare_fz, .pare_fz p, .pare_fz li),
body.wt-site.page-template-custom-page-template .entry-content :is(p, li) {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.7;
}
body.wt-site.page-template-custom-page-template .page_inner_content .entry-content :is(ol, ul) li a {
  font-size: inherit;
  font-weight: inherit;
}
body.wt-site.page-template-custom-page-template .entry-content :is(h2, h3, h4),
body.wt-site.page-template-custom-page-template header.entry-header .entry-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}
body.wt-site :is(h1, h2, h3, h4, h5, h6):is([style*="font-weight:bold" i], [style*="font-weight: bold" i], [style*="font-weight:700"], [style*="font-weight: 700"], [style*="font-weight:800"], [style*="font-weight: 800"]) {
  font-weight: 600 !important;
}

/* Default link colour: Betheme's dynamic CSS prints `a { color: #2275ac }` from Theme Options. Same specificity,
   printed later, so this wins while anything more specific (buttons, menus, cards) still does. */
:where(body.wt-site) a {
  color: var(--wt-blue);
}

/* Links in running text */
body.wt-site :where(#Content p a, #Content li a, .column_attr a) {
  color: var(--wt-blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--wt-fast) var(--wt-ease);
}
body.wt-site :where(#Content p a, #Content li a, .column_attr a):hover {
  color: var(--wt-blue-700);
}

body.wt-site ::selection {
  background: rgb(0 107 232 / 0.16);
  color: inherit;
}

/* Focus: visible for keyboard only */
body.wt-site :where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--wt-blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Breadcrumbs */
body.wt-site .fbc-page .fbc-items :is(a, li, span) {
  font-size: 14px;
  color: var(--wt-muted);
}
body.wt-site .fbc-page .fbc-items a:hover {
  color: var(--wt-blue);
}

/* Back to top: flat circle, bordered */
body.wt-site #back_to_top {
  border-radius: 50% !important;
  background: #fff !important;
  border: 1px solid var(--wt-line) !important;
  box-shadow: none !important;
  color: var(--wt-ink) !important;
  transition: border-color var(--wt-fast) var(--wt-ease), color var(--wt-fast) var(--wt-ease);
}
body.wt-site #back_to_top:hover {
  border-color: var(--wt-blue) !important;
  color: var(--wt-blue) !important;
}
body.wt-site #back_to_top i {
  color: inherit !important;
}

/* Scrollbar (the root scroller is <html>; gated on the body class) */
html:has(> body.wt-site) {
  scrollbar-width: thin;
  scrollbar-color: rgb(59 70 90 / 0.35) transparent;
}
html:has(> body.wt-site)::-webkit-scrollbar,
body.wt-site ::-webkit-scrollbar {
  width: 10px !important;
  height: 8px !important;
  background: transparent !important;
}
html:has(> body.wt-site)::-webkit-scrollbar-track,
body.wt-site ::-webkit-scrollbar-track {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html:has(> body.wt-site)::-webkit-scrollbar-thumb,
body.wt-site ::-webkit-scrollbar-thumb {
  background: rgb(59 70 90 / 0.35) !important;
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
}
html:has(> body.wt-site)::-webkit-scrollbar-button,
body.wt-site ::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Every real link shows the hand pointer, including on its child spans/images (legacy CSS and plugins set
   cursor:auto/default on some wrappers) */
body.wt-site a[href],
body.wt-site a[href] * {
  cursor: pointer;
}

/* Orange accent text that sits on a blue/dark band (marked by js/components/on-dark.js): white, readable */
body.wt-site #Wrapper .wt-on-dark-text {
  color: #fff !important;
}

/* Betheme offsets blockquote with position:relative; top:15px — it then overlaps whatever follows (e.g. the QMS "Download Brochure" button) */
body.wt-site blockquote {
  top: 0 !important;
  margin-top: 15px;
}
