/* ============================================================================
   DVS responsive layer — mobile-first overrides for the inline-styled SPA.
   NOTE: the dc-runtime (React) re-serializes inline styles WITH spaces and
   normalises 0 -> 0px, e.g. "display: grid; grid-template-columns: repeat(4,
   minmax(0px, 1fr))". All [style*=...] selectors below match that live format.
   Breakpoints: 640 (mobile) · 768 · 900 (nav) · 1024.
   ========================================================================== */

/* --- global: no horizontal scroll, fluid media -------------------------- */
/* overflow-x: clip (not hidden) — hidden makes html/body a scroll container and
   breaks position:sticky (the "One platform. Three pillars." story panel). clip
   still prevents horizontal scroll but keeps sticky working. */
html, body { overflow-x: clip; max-width: 100%; }

/* hide the floating "60-second tour" launcher on mobile (declutters the
   bottom, which already has the voice mic + Ask DVS chat) */
@media (max-width: 768px) { .dvs-tour-launch, .dvs-tour-card { display: none !important; } }

/* hide the decorative hero globe on mobile — it overlaps the hero content */
@media (max-width: 900px) { main canvas { display: none !important; } }

/* About timeline: on mobile the centred rail, dots and connectors run through
   the stacked cards — drop them for a clean vertical list. */
@media (max-width: 768px) {
  main [style*="left: 50%"][style*="top: 0px"][style*="bottom: 0px"],
  main [style*="top: 34px"] { display: none !important; }
}
img, video, canvas, image-slot, svg, iframe { max-width: 100%; }
img, video { height: auto; }

/* --- mobile hamburger + drawer (styled always, shown < 900px) ---------- */
.dvs-hamburger { display: none; margin-left: auto; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; flex: 0 0 auto; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.dvs-hamburger span { display: block; width: 24px; height: 2px; border-radius: 2px; background: #fff; transition: background .2s; }
.dvs-hamburger.dark span { background: #03485c; }
.dvs-mobmenu { position: fixed; inset: 0; z-index: 2000; background: rgba(2,26,33,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .22s; }
.dvs-mobmenu.open { opacity: 1; pointer-events: auto; }
.dvs-mobmenu-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(82vw, 330px); background: linear-gradient(160deg, #03485c, #022a37); padding: 76px 26px 40px; display: flex; flex-direction: column; overflow-y: auto; transform: translateX(100%); transition: transform .26s cubic-bezier(.2,0,0,1); box-shadow: -24px 0 60px rgba(0,0,0,.35); }
.dvs-mobmenu.open .dvs-mobmenu-panel { transform: translateX(0); }
.dvs-mobmenu-close { position: absolute; top: 20px; right: 18px; width: 46px; height: 46px; background: none; border: 0; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.dvs-mobmenu nav { display: flex; flex-direction: column; }
.dvs-mobmenu nav a { color: #fff; font-family: var(--font-display, sans-serif); font-weight: 500; font-size: 19px; text-decoration: none; padding: 15px 4px; min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.dvs-mobmenu nav a:active { color: #d0dd27; }
.dvs-mobmenu-cta { margin-top: 26px; background: #d0dd27; color: #03485c; text-align: center; font-family: var(--font-display, sans-serif); font-weight: 600; font-size: 16px; padding: 16px; border-radius: 8px; text-decoration: none; min-height: 48px; display: flex; align-items: center; justify-content: center; }

/* ============================ <= 1024px ================================ */
@media (max-width: 1024px) {
  main [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================ <= 900px (nav) =========================== */
@media (max-width: 900px) {
  header [data-navshell] nav,
  header [data-navshell] [data-navdiv],
  header [data-navshell] [data-cta] { display: none !important; }
  .dvs-hamburger { display: inline-flex; }
  header [data-navshell] { gap: 14px !important; padding-left: 20px !important; padding-right: 20px !important; }
  main [style*="grid-template-columns: repeat(3"] { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================ <= 768px ================================= */
@media (max-width: 768px) {
  main section[style*="padding: 120px"],
  main section[style*="padding: 112px"],
  main section[style*="padding: 128px"],
  main section[style*="padding: 104px"] { padding-top: 64px !important; padding-bottom: 64px !important; }
  main [style*="padding: 0px 32px"] { padding-left: 20px !important; padding-right: 20px !important; }
  /* two-column content blocks stack */
  main [style*="grid-template-columns: 1.5fr"],
  main [style*="grid-template-columns: 1.55fr"],
  main [style*="grid-template-columns: 1.25fr"],
  main [style*="grid-template-columns: 1.1fr"],
  main [style*="grid-template-columns: minmax(0px, 1.1fr)"] { grid-template-columns: 1fr !important; }
}

/* ============================ <= 640px (mobile) ======================== */
@media (max-width: 640px) {
  /* single column everywhere in the page body */
  main [style*="display: grid"] { grid-template-columns: 1fr !important; }

  /* fluid heading scale for fixed-px sizes (clamp() ones already scale) */
  main [style*="font-size: 58px"] { font-size: 33px !important; }
  main [style*="font-size: 48px"] { font-size: 30px !important; }
  main [style*="font-size: 46px"] { font-size: 29px !important; }
  main [style*="font-size: 44px"] { font-size: 28px !important; }
  main [style*="font-size: 42px"] { font-size: 27px !important; }
  main [style*="font-size: 40px"] { font-size: 26px !important; }
  main [style*="font-size: 38px"] { font-size: 25px !important; }
  main [style*="font-size: 36px"] { font-size: 24px !important; }

  /* tighter section padding */
  main section[style*="padding: 120px"],
  main section[style*="padding: 112px"],
  main section[style*="padding: 128px"],
  main section[style*="padding: 104px"] { padding-top: 48px !important; padding-bottom: 48px !important; }

  /* hero stat row (3 stats): clean flush-left stack — the desktop left-dividers
     would otherwise cascade into an ugly indent when collapsed to 1 col */
  main [style*="max-width: 1280px"][style*="repeat(4, minmax(0px, 1fr))"] > div {
    border-left: 0 !important; padding: 14px 0 !important; border-top: 1px solid rgba(166, 205, 203, .16) !important;
  }
  main [style*="max-width: 1280px"][style*="repeat(4, minmax(0px, 1fr))"] > div:first-child { border-top: 0 !important; padding-top: 2px !important; }
  main [style*="max-width: 1280px"][style*="repeat(4, minmax(0px, 1fr))"] > div [style*="font-size: 44px"] { font-size: 30px !important; }

  /* comfortable touch targets */
  main a[style*="inline-flex"], main button, .dvs-mobmenu nav a { min-height: 44px; }

  /* let wide flex rows breathe instead of overflowing */
  main [style*="gap: 56px"],
  main [style*="gap: 48px"],
  main [style*="gap: 40px"] { gap: 24px !important; }
}

/* ---- side-by-side FLEX rows ("Choose your journey" + "Three Partner
   Journeys") stack on mobile. Both use display:flex; align-items:stretch;
   gap:20px with flex:1 1 0 cards. --------------------------------------- */
@media (max-width: 768px) {
  main [style*="display: flex"][style*="align-items: stretch"][style*="gap: 20px"] {
    flex-direction: column !important; min-height: 0 !important; gap: 16px !important;
  }
  /* cards are flex:1 1 0 — in a column that collapses them to the kicker only;
     force natural height so the full content shows, and tighten padding */
  main [style*="align-items: stretch"][style*="gap: 20px"] > div { flex: 0 0 auto !important; padding: 30px 24px !important; }
}

/* ============================ FOOTER (outside <main>) =================== */
@media (max-width: 900px) {
  footer [style*="grid-template-columns: 1.4fr"] { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 640px) {
  footer [style*="grid-template-columns: 1.4fr"] { grid-template-columns: 1fr !important; }
  footer [style*="padding: 80px"] { padding-top: 52px !important; padding-bottom: 32px !important; }
  footer [style*="padding: 0px 32px"] { padding-left: 20px !important; padding-right: 20px !important; }
  footer [style*="gap: 48px"] { gap: 30px !important; }
  /* bottom bar (copyright + affiliations) wraps instead of overflowing */
  footer [style*="display: flex"] { flex-wrap: wrap !important; }
  footer [style*="font-size: 40px"], footer [style*="font-size: 44px"], footer [style*="font-size: 58px"] { font-size: 30px !important; }
}

/* ============ insights: category tabs + active states ================= */
main [data-catchip]{ -webkit-tap-highlight-color:transparent; }
main [data-catchip][data-cat-active="true"]{ background:#00807a !important; color:#ffffff !important; border-color:#00807a !important; box-shadow:0 6px 18px rgba(0,128,122,.22); }
main [data-catchip]:hover{ border-color:#00807a; }
main [data-catchip][data-cat-active="true"]:hover{ color:#ffffff; }
main [data-chip-active="true"]{ background:#03485c !important; color:#ffffff !important; border-color:#03485c !important; }
@media (max-width:640px){
  main [data-cat-tabs]{ gap:8px !important; }
  main [data-catchip]{ padding:10px 16px !important; font-size:14px !important; }
}

/* ============ footer social icons (rendered via CSS mask so they tint) === */
.dvs-soc{ width:19px; height:19px; display:block; background-color:currentColor;
  -webkit-mask-position:center; mask-position:center; -webkit-mask-size:contain; mask-size:contain;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; }
.dvs-soc-li{ -webkit-mask-image:url('img/social/linkedin.svg'); mask-image:url('img/social/linkedin.svg'); }
.dvs-soc-ig{ -webkit-mask-image:url('img/social/instagram.svg'); mask-image:url('img/social/instagram.svg'); }
.dvs-soc-yt{ -webkit-mask-image:url('img/social/youtube.svg'); mask-image:url('img/social/youtube.svg'); }
