/* HIVE Legal — mobiele aanpassingen (injecteert bovenop inline styles).
   NB: de runtime schrijft styles met spatie na de dubbele punt (position: absolute),
   dus alle selectors dekken beide schrijfwijzen. */
@media (max-width: 900px) {
  /* alle meerkolomsgrids stapelen */
  section[style*="grid-template-columns"],
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    grid-auto-flow: row !important;
  }
  /* achtergrond-splits (halve vlakken) verbergen */
  div[style*="position:absolute"][style*="grid-template-columns"],
  div[style*="position: absolute"][style*="grid-template-columns"] { display: none !important; }
  div[style*="position:absolute"][style*="width:50%"],
  div[style*="position: absolute"][style*="width: 50%"] { display: none !important; }
  /* brede paddings terugbrengen */
  [style*="56px"] { padding-left: 20px !important; padding-right: 20px !important; }
  [style*="64px"] { padding-left: 20px !important; padding-right: 20px !important; }
  section { padding-top: 36px !important; padding-bottom: 36px !important; }
  /* uitgelijnde halve kolommen loslaten */
  [style*="justify-self:end"], [style*="justify-self: end"],
  [style*="justify-self:center"], [style*="justify-self: center"],
  [style*="justify-self:start"], [style*="justify-self: start"] { justify-self: stretch !important; }
  [style*="max-width:680px"], [style*="max-width: 680px"],
  [style*="max-width:624px"], [style*="max-width: 624px"],
  [style*="max-width:740px"], [style*="max-width: 740px"],
  [style*="max-width:760px"], [style*="max-width: 760px"],
  [style*="max-width:820px"], [style*="max-width: 820px"] { max-width: none !important; padding-left: 0 !important; }
  /* ruime gaps verkleinen */
  [style*="gap:80px"], [style*="gap:72px"], [style*="gap:64px"],
  [style*="gap: 80px"], [style*="gap: 72px"], [style*="gap: 64px"] { gap: 28px !important; }

  /* uitgevulde tekst geeft gaten op smalle schermen → links uitlijnen */
  [style*="text-align:justify"], [style*="text-align: justify"] { text-align: left !important; }

  /* ===== header/nav: op mobiel niet zwevend maar gewoon bovenaan, alles zichtbaar ===== */
  header[style*="position:sticky"], header[style*="position: sticky"],
  header[style*="position:fixed"], header[style*="position: fixed"] {
    position: relative !important;
    top: auto !important; left: auto !important; right: auto !important;
    margin: 10px 10px 0 !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 10px 0 !important;
    padding: 12px 16px !important;
    border-radius: 24px !important;
  }
  header nav {
    gap: 8px 18px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: 100%;
  }
  header nav a { font-size: 14.5px !important; white-space: nowrap; }
  /* spacer onder de fixed header is dan overbodig */
  div[style*="height:94px"], div[style*="height: 94px"] { display: none !important; }

  /* fotohalven krijgen een vaste bandhoogte */
  div[style*="min-height:560px"], div[style*="min-height:520px"], div[style*="min-height:600px"],
  div[style*="min-height:640px"], div[style*="min-height:760px"], div[style*="min-height:460px"],
  div[style*="min-height: 560px"], div[style*="min-height: 520px"], div[style*="min-height: 600px"],
  div[style*="min-height: 640px"], div[style*="min-height: 760px"], div[style*="min-height: 460px"] { min-height: 320px !important; }
  /* stippellijn van flight path weg */
  div[style*="border-top:2px dashed"], div[style*="border-top: 2px dashed"] { display: none !important; }
  /* grote koppen temperen */
  h1, h2 { overflow-wrap: break-word; }
  /* footer kolommen stapelen met ruimte */
  footer div[style*="grid-template-columns"] { gap: 32px !important; }
  blockquote { margin: 24px 0 0 !important; }
  /* quote 'Ieder bouwt…' past op één regel per zin */
  blockquote:has(span[style*="nowrap"]) { font-size: 4.8vw !important; }
  /* swirl-fotopanelen compacter */
  div[style*="padding:48px"][style*="overflow:hidden"],
  div[style*="padding: 48px"][style*="overflow: hidden"] { padding: 32px 20px !important; }
  img[style*="max-width:440px"], img[style*="max-width:480px"], img[style*="max-width:520px"],
  img[style*="max-width: 440px"], img[style*="max-width: 480px"], img[style*="max-width: 520px"],
  img[style*="max-width:380px"], img[style*="max-width: 380px"] { max-width: 100% !important; height: auto !important; }
  /* ===== HIVE vs-blok: geel vlak weg, volgorde HIVE → ✓-lijst → tabs → ✗-lijst ===== */
  div[style*="calc(50% + 4px)"] { display: none !important; }
  section:has(div[style*="calc(50% + 4px)"]) > div { display: flex !important; flex-direction: column !important; }
  section:has(div[style*="calc(50% + 4px)"]) div[style*="align-items:end"],
  section:has(div[style*="calc(50% + 4px)"]) div[style*="align-items: end"] { display: contents !important; }
  section:has(div[style*="calc(50% + 4px)"]) div[style*="gap:0 64px"],
  section:has(div[style*="calc(50% + 4px)"]) div[style*="gap: 0 64px"] { display: contents !important; }
  section:has(div[style*="calc(50% + 4px)"]) h2 { order: -2; margin: 0 0 20px !important; }
  section:has(div[style*="calc(50% + 4px)"]) div[style*="z-index:1"],
  section:has(div[style*="calc(50% + 4px)"]) div[style*="z-index: 1"] { order: -1; margin-bottom: 28px; background: #FDFDCF; border-radius: 16px; padding: 6px 18px; }

  /* ===== laten we kennismaken: creme achtergrond + foto als band boven de tekst ===== */
  section:has(img[src*="kennismaken_photo"]) { background: #FDFDEE !important; }
  div:has(> img[src*="kennismaken_photo"]) { min-height: 380px !important; }
  img[src*="kennismaken_photo"] {
    position: absolute !important; inset: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; object-position: center 20% !important;
  }

  /* ===== who we work for: lucht tussen foto en tekst na stapeling ===== */
  div[style*="min-height:460px"] + div, div[style*="min-height: 460px"] + div { padding-top: 40px !important; }

  /* ===== flight path: bijtje + swirl tussen de '5' en 'Welkom, HIVER!' ===== */
  div[style*="grid-template-columns:repeat(5,1fr)"] > div:last-of-type,
  div[style*="grid-template-columns: repeat(5,1fr)"] > div:last-of-type { padding-top: 24px; }
  div[style*="grid-template-columns:repeat(5,1fr)"] > div:last-of-type h3,
  div[style*="grid-template-columns: repeat(5,1fr)"] > div:last-of-type h3 { margin-top: 68px !important; }
  svg[style*="top:-46px"], svg[style*="top: -46px"] { top: auto !important; bottom: 168px !important; right: 26% !important; }
  div[style*="top:-133px"], div[style*="top: -133px"] { top: auto !important; bottom: 148px !important; left: auto !important; right: 42% !important; }

  /* checkrijen compacter */
  div[style*="min-height:86px"], div[style*="min-height: 86px"] { min-height: 0 !important; }

  /* ===== collectief: tekst (vlieguren) eerst, daarna oranje fotoblok ===== */
  section:has(> div > img[src*="collectief_vier_lachend"]) > div:first-child { order: 2; }

  /* ===== check-rijen (vinkje + tekst) blijven naast elkaar ===== */
  div[style*="grid-template-columns:30px 1fr"], div[style*="grid-template-columns: 30px 1fr"] { grid-template-columns: 30px 1fr !important; }
  /* ===== groot wit gat boven The HIVE DNA weg ===== */
  div[style*="height:72px"], div[style*="height: 72px"] { display: none !important; }
  div[style*="padding:24px 56px 100px"], div[style*="padding: 24px 56px 100px"] { padding-bottom: 32px !important; }
  div[style*="padding:60px 56px 100px"], div[style*="padding: 60px 56px 100px"] { padding-top: 24px !important; padding-bottom: 36px !important; }
  /* grote inline paddings overal temperen */
  div[style*="padding:88px"], div[style*="padding: 88px"] { padding-top: 36px !important; padding-bottom: 36px !important; }
  div[style*="padding:70px 56px 110px"], div[style*="padding: 70px 56px 110px"] { padding-top: 32px !important; padding-bottom: 48px !important; }

  /* quote-blokken: minder verticale ruimte */
  div[style*="padding:100px 56px"], div[style*="padding: 100px 56px"] { padding-top: 36px !important; padding-bottom: 36px !important; }

  /* who we work for: minder ruimte onder de tekst */
  div[style*="56px 80px"] { padding-bottom: 24px !important; }

  /* ===== our expertise: rechterkolom-offset weg na stapeling ===== */
  div:has(> div > details) { gap: 0 !important; }
  div[style*="padding-top:calc(clamp(28px"], div[style*="padding-top: calc(clamp(28px"] { padding-top: 0 !important; }

  /* how hive adds value: kop dicht op de kaarten */
  section[style*="130px 56px 8px"] { padding-bottom: 0 !important; }
  section:has(.exp-grid) { padding-top: 12px !important; }

  /* ===== services: how hive adds value ===== */
  .exp-grid { grid-template-columns: 1fr !important; gap: 20px !important; overflow: visible !important; }
  .exp-grid > div { width: 100% !important; }
  .exp-grid label { min-height: 0 !important; width: 100% !important; box-sizing: border-box !important; padding: 18px 20px !important; margin: 0 0 12px !important; transform: none !important; }
  .exp-grid label small { white-space: normal !important; }
  .exp-panel { padding: 24px 20px 28px !important; width: 100% !important; box-sizing: border-box !important; }

  /* ===== freedom-blok: paars fotopaneel als band onder de tekst ===== */
  section:has(img[src*="freedom_balkon"]) > div[style*="position:absolute"],
  section:has(img[src*="freedom_balkon"]) > div[style*="position: absolute"] {
    display: grid !important; position: static !important; inset: auto !important;
    grid-template-columns: 1fr !important; margin-top: 40px;
  }
  section:has(img[src*="freedom_balkon"]) { padding-top: 80px !important; }
  section:has(img[src*="freedom_balkon"]) > div[style*="position:absolute"] > div:first-child,
  section:has(img[src*="freedom_balkon"]) > div[style*="position: absolute"] > div:first-child { display: none !important; }

  /* vaste fotoformaten (bv. how we work, freedom) schalen mee */
  img[style*="width: 480px"], img[style*="width:480px"],
  img[style*="width: 470px"], img[style*="width:470px"] { width: 100% !important; height: auto !important; }
}
@media (max-width: 560px) {
  header nav a { font-size: 13px !important; }
  [style*="56px"], [style*="64px"] { padding-left: 16px !important; padding-right: 16px !important; }
}
