/* =====================================================================
   OSVI v2 — shared design system (homepage + blog listing).
   Header, Services mega menu, mobile drawer, footer and the sticky
   emergency CTA live in include/partials/*.tpl and are copied into pages by
   tools/build-pages.mjs. Other pages still use style.css and are untouched.
   ===================================================================== */
/* The size-matched fallback @font-faces (Plus Jakarta Sans Fallback, Instrument Serif
   Fallback) live in v2-footer.css, which every page loads. */
:root {
  --v2-magenta: #8C3688;
  --v2-magenta-hover: #6E2A6B;
  --v2-plum: #2B1029;
  --v2-ink: #1F1420;
  --v2-ink-2: #5E5262;
  --v2-muted: #6B5E6D;
  --v2-tint: #FBF4FA;
  --v2-tint-2: #F6EEF5;
  --v2-line: #EFE6EE;
  --v2-line-2: #E2D3DF;
  --v2-on-dark: #D6C4D4;
  --v2-accent-dark: #E58BDE;
  --v2-red: #D7263D;
  --v2-wa: #1F7A47;
  --v2-wa-icon: #25D366;
  --v2-green: #1F9D55;
  --v2-font: 'Plus Jakarta Sans', 'Plus Jakarta Sans Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --v2-serif: 'Instrument Serif', 'Instrument Serif Fallback', Georgia, 'Times New Roman', serif;
  --v2-pad: clamp(16px, 4vw, 48px);
  --v2-shadow: 0 22px 44px rgba(43, 16, 41, .12);
  --v2-sos-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:has(> body.v2) { scroll-behavior: smooth; }
/* the shared parts carry their own type, so they look the same on the older pages too */
.v2-topbar, .v2-header, .v2-drawer, .v2-sos { font-family: var(--v2-font); line-height: 1.5; color: var(--v2-ink); -webkit-font-smoothing: antialiased; }
.v2-header, .v2-drawer { font-size: 16px; }
body.v2 {
  margin: 0; background: #fff; color: var(--v2-ink); font-family: var(--v2-font);
  font-size: 16px; line-height: 1.5; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* base element styles carry zero specificity (:where) so component classes always win */
:where(.v2) img { max-width: 100%; }
:where(.v2) a { color: var(--v2-magenta); text-decoration: none; }
:where(.v2 a:hover) { color: var(--v2-magenta-hover); }
:where(.v2) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.v2) :where(h1, h2, h3) { margin: 0; font-weight: 800; letter-spacing: -0.04em; color: inherit; }
.v2 :focus-visible { outline: 3px solid var(--v2-magenta); outline-offset: 3px; border-radius: 6px; }
.v2 .v2-on-dark :focus-visible, .v2-footer :focus-visible { outline-color: #F3C6EF; }
.v2-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.v2-serif { font-family: var(--v2-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.v2-wrap { max-width: 1280px; margin: 0 auto; }
/* clip decorative overflow (tilted marquee, floating chips) so the page never scrolls sideways */
.v2 main { overflow-x: hidden; overflow-x: clip; }
.v2-section { padding-left: var(--v2-pad); padding-right: var(--v2-pad); }

.v2-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--v2-plum); color: #fff !important; padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.v2-skip:focus { top: 12px; }

/* eyebrow pill above section headings */
.v2-eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--v2-magenta); background: var(--v2-tint-2); padding: 6px 12px; border-radius: 999px; }
.v2-eyebrow--light { background: #fff; }
.v2-eyebrow--dark { color: #F3C6EF; background: rgba(255,255,255,.08); }

/* buttons */
.v2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15px; border: 1.5px solid transparent; cursor: pointer; text-align: center; line-height: 1.2; }
.v2-btn--primary { background: var(--v2-magenta); color: #fff !important; box-shadow: 0 10px 24px rgba(140,54,136,.28); }
.v2-btn--primary:hover { background: var(--v2-magenta-hover); }
.v2-btn--outline { background: #fff; color: var(--v2-ink) !important; border-color: var(--v2-line-2); }
.v2-btn--outline:hover { border-color: var(--v2-magenta); }
.v2-btn--white { background: #fff; color: var(--v2-magenta) !important; }
.v2-btn--wa { background: var(--v2-wa); color: #fff !important; }
.v2-btn--wa:hover { background: #18633a; }
.v2-btn--ghost-light { border-color: rgba(255,255,255,.4); color: #fff !important; background: transparent; }
.v2-btn--lg { min-height: 56px; padding: 0 26px; font-size: 16px; }
.v2-btn .fa-whatsapp { font-size: 22px; line-height: 1; }
.v2-btn--outline .fa-whatsapp, .v2-btn--white .fa-whatsapp { color: var(--v2-wa-icon); }
.v2-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.v2-dot--green { background: #3DD68C; }

.v2-lift { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.v2-lift:hover { transform: translateY(-4px); box-shadow: var(--v2-shadow); border-color: #E2C7DF; }

/* ---------------- top bar ---------------- */
.v2-topbar { background: var(--v2-plum); color: #F6EEF5; font-size: 13px; padding: 9px 16px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; text-align: center; }
.v2-topbar__new { background: var(--v2-magenta); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; }
.v2 .v2-topbar__link { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.v2 .v2-topbar__link:hover { color: #F3C6EF; }
@media (max-width: 599px) { .v2-topbar__long { display: none; } }

/* ---------------- header ---------------- */
/* sticky: stays at the top while scrolling (the UniLiv bar above it scrolls away) */
.v2-header { background: #fff; border-bottom: 1px solid #F1E5EF; position: -webkit-sticky; position: sticky; top: 0; z-index: 80; transition: box-shadow .2s ease; }
.v2-header.is-stuck { box-shadow: 0 10px 30px rgba(43,16,41,.08); }
/* in-page links (#book, #enquiry ...) land below the sticky header */
.v2 main [id] { scroll-margin-top: 100px; }
.v2-header__inner { max-width: 1360px; margin: 0 auto; padding: 14px clamp(16px, 3vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.v2 .v2-brand { display: flex; align-items: center; gap: 10px; color: var(--v2-ink); flex: none; }
/* OSVI logo (emblem + name + "Trusted Critical Care Specialist"), 729x160 file */
.v2 .v2-brand__logo { display: block; height: 52px; width: auto; max-width: none; }
.v2-brand__name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }

.v2-nav { display: none; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.v2 .v2-nav__link { color: var(--v2-ink); padding: 10px 11px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.v2 .v2-nav__link:hover, .v2-nav__services[aria-expanded="true"] { color: var(--v2-magenta); background: var(--v2-tint-2); }
.v2 .v2-nav__link[aria-current="page"], .v2 .v2-nav__link[data-active] { color: var(--v2-magenta); background: var(--v2-tint-2); }
.v2-nav__services svg { transition: transform .2s ease; }
.v2-nav__services[aria-expanded="true"] svg { transform: rotate(180deg); }
.v2-header__cta { display: none; min-height: 46px; font-size: 14px; padding: 0 20px; flex: none; }

.v2-burger { width: 48px; height: 48px; border-radius: 14px; border: 1.5px solid var(--v2-line-2); background: #fff; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; flex: none; }
.v2-burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--v2-ink); }

@media (min-width: 768px) { .v2-header__cta { display: inline-flex; } }
@media (min-width: 1280px) {
  .v2-nav { display: flex; }
  .v2-burger { display: none; }
}
@media (min-width: 1280px) and (max-width: 1379px) {
  .v2 .v2-nav__link { padding: 10px 8px; }
  .v2-header__inner { gap: 12px; }
}
@media (max-width: 767px) { .v2 .v2-brand__logo { height: 44px; } }
@media (max-width: 380px) { .v2 .v2-brand__logo { height: 38px; } }

/* ---------------- mega menu ---------------- */
.v2-mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid #F1E5EF; box-shadow: 0 30px 60px rgba(43,16,41,.16); padding: 32px var(--v2-pad) 28px; max-height: calc(100vh - 120px); overflow-y: auto; }
.v2-mega[hidden] { display: none; }
.v2-mega__grid { max-width: 1264px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
.v2-mega__col { display: flex; flex-direction: column; gap: 22px; }
.v2-mega__col--hi { background: var(--v2-tint); border-radius: 18px; padding: 18px; }
.v2-mega__group { display: flex; flex-direction: column; gap: 9px; }
.v2 .v2-mega__title { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--v2-magenta); }
.v2 .v2-mega__group a { color: #3A2B3C; font-size: 14px; line-height: 1.3; padding: 2px 0; }
.v2 .v2-mega__group a:hover { color: var(--v2-magenta); }
.v2 .v2-mega__group a.v2-mega__more { font-weight: 700; color: var(--v2-magenta); }
.v2 .v2-mega__group a.v2-mega__title { color: var(--v2-magenta); font-size: 12px; }

/* ---------------- mobile drawer ---------------- */
.v2-drawer { position: fixed; inset: 0; z-index: 120; background: rgba(43,16,41,.45); }
.v2-drawer[hidden] { display: none; }
.v2-drawer__panel { position: absolute; inset: 0; background: #fff; overflow-y: auto; padding: 16px var(--v2-pad) 32px; display: flex; flex-direction: column; }
.v2-drawer__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--v2-line); }
.v2-drawer__close { width: 48px; height: 48px; border-radius: 14px; border: 1.5px solid var(--v2-line-2); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.v2-drawer__nav { display: flex; flex-direction: column; padding: 8px 0 20px; }
.v2 .v2-drawer__link { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; padding: 0 4px; font-size: 18px; font-weight: 700; color: var(--v2-ink); border: 0; border-bottom: 1px solid var(--v2-line); background: transparent; text-align: left; cursor: pointer; }
.v2 .v2-drawer__link[aria-current="page"], .v2 .v2-drawer__link[data-active] { color: var(--v2-magenta); }
.v2-drawer__acc[aria-expanded="true"] svg { transform: rotate(180deg); }
.v2-drawer__services { padding: 8px 4px 16px; display: grid; gap: 18px; border-bottom: 1px solid var(--v2-line); }
.v2-drawer__services[hidden] { display: none; }
.v2-drawer__services .v2-mega__group a { min-height: 40px; display: flex; align-items: center; font-size: 15px; }
.v2-drawer__cta { margin-top: auto; width: 100%; min-height: 54px; }
body.v2-lock { overflow: hidden; }

/* footer: see v2-footer.css (shared with every page) */

/* ---------------- sticky emergency CTA ---------------- */
.v2-sos { position: fixed; z-index: 60; display: flex; align-items: center; background: #fff; box-shadow: 0 24px 60px rgba(43,16,41,.28); }
.v2-sos__label { display: flex; align-items: center; gap: 10px; }
.v2-sos__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--v2-red); flex: none; position: relative; }
/* pulse = a fading ring scaled with transform/opacity (no repaint per frame); paused while the bar is tucked away */
.v2-sos__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--v2-red); animation: v2-sos 1.8s ease-out infinite; }
.v2-sos.is-tucked .v2-sos__dot::after { animation-play-state: paused; }
.v2-sos__text { display: flex; flex-direction: column; line-height: 1.15; }
.v2-sos__text strong { font-size: 14px; font-weight: 800; color: var(--v2-ink); }
.v2-sos__text span { font-size: 12px; font-weight: 600; color: var(--v2-ink-2); }
.v2-sos__btns { display: flex; gap: 10px; }
.v2 .v2-sos__call { height: 52px; padding: 0 22px; border-radius: 999px; background: var(--v2-red); color: #fff; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.v2 .v2-sos__call:hover { background: #B81F33; color: #fff; }
.v2 .v2-sos__wa { height: 52px; min-width: 52px; border-radius: 999px; background: var(--v2-wa); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 15px; }
.v2 .v2-sos__wa:hover { background: #18633a; color: #fff; }
.v2-sos__wa .fa-whatsapp { font-size: 24px; line-height: 1; }
@keyframes v2-sos { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(3); opacity: 0; } }

/* phones: full-width bar at the bottom */
@media (max-width: 767px) {
  :root { --v2-sos-h: calc(118px + env(safe-area-inset-bottom)); }
  .v2-sos { left: 0; right: 0; bottom: 0; flex-direction: column; align-items: stretch; gap: 10px; border-radius: 20px 20px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #F0E2EE; }
  .v2-sos__label { justify-content: center; }
  .v2-sos__text { flex-direction: row; gap: 6px; align-items: baseline; }
  .v2-sos__text span { font-size: 13px; }
  .v2-sos__btns > a { flex: 1 1 0; }
  .v2-sos__long { display: none; }
}
/* tablets and desktop: pill docked bottom-right */
@media (min-width: 768px) {
  /* room under the footer so the docked pill never covers its last row */
  :root { --v2-sos-h: 100px; }
  .v2-sos { right: 24px; bottom: 24px; gap: 10px; border: 1px solid #F0E2EE; border-radius: 999px; padding: 8px 8px 8px 20px; }
  .v2-sos__label { margin-right: 4px; }
  .v2-sos__short { display: none; }
  .v2 .v2-sos__wa { width: 52px; padding: 0; }
  .v2-sos.is-tucked { transform: translateY(20px); }
}
/* tucked away (v2-site.js) while the page's own call / WhatsApp buttons are on screen,
   before the visitor scrolls, and on phones while typing in a form; slides in afterwards */
.v2-sos { transition: opacity .25s ease, transform .25s ease, visibility .25s; }
.v2-sos.is-tucked { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 767px) { .v2-sos.is-tucked { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .v2-sos__dot::after { animation: none; }
  .v2-sos, .v2-header { transition: none; }
  .v2-lift, .v2-lift:hover { transition: none; transform: none; }
}

/* ---------------- services marquee ("Our services" strip, homepage + UniLiv page; markup: include/partials/services-strip.tpl) ---------------- */
.hv2-marquee { position: relative; background: var(--v2-magenta); color: #fff; overflow: hidden; padding: 18px 0; transform: rotate(-1.2deg); margin: 0 -20px; box-shadow: 0 10px 30px rgba(140,54,136,.25); }
.hv2-marquee__track { display: flex; width: max-content; animation: hv2-marq 55s linear infinite; }
/* fixed label at the left so it is clear what the scrolling names are; the names slide in behind it */
.hv2-marquee__label { position: absolute; left: 0; top: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 0 84px 0 calc(var(--v2-pad) + 20px); background: linear-gradient(90deg, var(--v2-plum) calc(100% - 84px), rgba(43,16,41,.85) calc(100% - 50px), rgba(140,54,136,0)); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.hv2-marquee__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E58BDE; }
@media (max-width: 599px) { .hv2-marquee__label { font-size: 11px; padding: 0 56px 0 28px; background: linear-gradient(90deg, var(--v2-plum) calc(100% - 56px), rgba(140,54,136,0)); } .hv2-marquee__group { font-size: 19px; } }
.hv2-marquee__group { display: flex; flex: none; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; margin: 0; padding: 0; list-style: none; }
.hv2-marquee__group li { padding: 0 22px; position: relative; }
.hv2-marquee__group li::after { content: "✦"; color: #E8B4E4; position: absolute; right: -8px; }
@keyframes hv2-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .hv2-marquee__track { animation: none; } }
