/* =========================================================
   QE — shared global stylesheet
   Brand: oranje #F99D3E · paars #6A2C91 · donkerblauw #001E45 · achtergrond #FFFCF8
   Section layout uses inline styles (pixel-faithful to the design); this file
   holds the global resets, keyframes, component (nav/footer) chrome and the
   responsive layer that scales type / collapses grids on small screens.
   ========================================================= */

/* ---- Global reset ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #FFFCF8; }
body { font-family: 'Roboto', sans-serif; -webkit-font-smoothing: antialiased; color: #001E45; }
a { color: inherit; }
img { max-width: 100%; }

/* ---- Keyframes ---- */
@keyframes a-ken { 0% { transform: scale(1.04); } 100% { transform: scale(1.14); } }
@keyframes a-cue { 0%, 100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(7px); opacity: 1; } }
@keyframes qe-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes qeFlick {
  0%, 100% { transform: scaleY(1) scaleX(1) translateY(0); }
  25% { transform: scaleY(1.12) scaleX(.92) translateY(-1.5px); }
  50% { transform: scaleY(.93) scaleX(1.06); }
  75% { transform: scaleY(1.07) scaleX(.96) translateY(-1px); }
}
@keyframes qePulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* ---- Homepage interactive hover states ---- */
.qe-srow:hover { color: #F99D3E !important; }
.qe-srow:hover .qe-sarrow { transform: translateX(8px); color: #F99D3E; }
.qe-rcard:hover { transform: translateY(-6px); }

/* Service-page option/choice cards (e.g. onderhoud) lift on hover */
.qe-opt:hover { transform: translateY(-6px); box-shadow: 0 30px 70px rgba(0, 30, 69, .18); }

/* Form fields + contact rows (contact, nieuwe-klant, …) */
.qe-field:focus { border-color: #6A2C91 !important; outline: none; }
.qe-row:hover { background: #FFF8F0; }
.qe-submit { transition: background .2s; }
.qe-submit:hover { background: #E88A2A; }

/* Realisaties portfolio tabs + project-card image zoom on hover */
.qe-tab { cursor: pointer; font-size: 15px; font-weight: 500; padding: 14px 22px; border-radius: 12px 12px 0 0; transition: all .25s; color: #9AA1AD; border-bottom: 2px solid transparent; }
.qe-tab.active { color: #001E45; border-bottom: 2px solid #F99D3E; }
.qe-proj:hover .qe-ph, .qe-proj:hover img { transform: scale(1.05); }

/* Jobs — vacancy card highlights its border on hover */
.qe-vac:hover { border-color: #F99D3E !important; }

/* Syndicus — service card lifts + highlights on hover */
.syn-card:hover { border-color: #F99D3E !important; transform: translateY(-5px); box-shadow: 0 24px 50px rgba(0, 30, 69, .1); }

/* Mijn installatie — dashboard action tile hover */
.qe-act:hover { border-color: #F99D3E !important; transform: translateY(-3px); }

/* Portal document folders — mirror the Robaws mappenstructuur (collapsible) */
.qe-doc-folder > summary { list-style: none; }
.qe-doc-folder > summary::-webkit-details-marker { display: none; }
.qe-doc-folder > summary .qe-doc-caret { transition: transform .2s; }
.qe-doc-folder[open] > summary .qe-doc-caret { transform: rotate(90deg); }

/* Kenniscentrum — FAQ accordion */
.qe-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0; cursor: pointer; }
.qe-faq-icon { display: inline-flex; flex: none; transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.qe-faq-item.open .qe-faq-icon { transform: rotate(45deg); }
.qe-faq-a { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .4s cubic-bezier(.4, 0, .2, 1), opacity .35s; }
.qe-faq-item.open .qe-faq-a { max-height: 320px; opacity: 1; }

/* Legal pages — prose (privacybeleid, voorwaarden, cookiebeleid) */
.qe-legal h2 { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin: 48px 0 14px 0; }
.qe-legal p { font-size: 16px; line-height: 1.7; color: #3C4A5A; margin: 0 0 14px 0; }
.qe-legal li { font-size: 16px; line-height: 1.7; color: #3C4A5A; margin-bottom: 8px; }

/* 404 — floating flame */
@keyframes qe-fll { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
/* bedankt — success checkmark pop / ring / draw */
@keyframes qe-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes qe-ring { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes qe-draw { to { stroke-dashoffset: 0; } }

/* Calculator controls (premiecalculator, energiebespaar) — .on = selected */
.pc-opt { cursor: pointer; border: 2px solid #ECEEF2; background: #fff; color: #001E45; border-radius: 16px; padding: 20px; font-size: 14px; transition: all .25s; text-align: left; }
.pc-opt.on { border-color: #F99D3E; background: #FFF8F0; color: #E8642A; }
.pc-pill, .eb-pill { cursor: pointer; flex: 1; text-align: center; border: 2px solid #ECEEF2; background: #fff; color: #6B7A8D; border-radius: 12px; font-weight: 500; transition: all .25s; }
.pc-pill { padding: 14px 10px; font-size: 14px; }
.eb-pill { padding: 13px 8px; font-size: 13.5px; }
.pc-pill.on { border-color: #6A2C91; background: #F0E6F6; color: #6A2C91; }
.eb-pill.on { border-color: #F99D3E; background: #FFF8F0; color: #E8642A; }

/* Booking calendar type pills (bestaande-klant) */
.bk-type { cursor: pointer; border: 2px solid #ECEEF2; background: #fff; color: #6B7A8D; border-radius: 12px; padding: 13px 22px; font-size: 15px; font-weight: 500; transition: all .25s; }
.bk-type.on { border-color: #F99D3E; background: #FFF8F0; color: #E8642A; }

/* Range slider (energiebespaar) */
input[type=range].qe-rng { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: #ECEEF2; outline: none; }
input[type=range].qe-rng::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #F99D3E; cursor: pointer; box-shadow: 0 4px 12px rgba(249,157,62,.45); border: 3px solid #fff; }
input[type=range].qe-rng::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #F99D3E; cursor: pointer; border: 3px solid #fff; }

@media (prefers-reduced-motion: reduce) {
  #a-frame-inner { animation: none !important; }
  .qe-marq { animation: none !important; }
}

/* =========================================================
   NAV — shared chrome
   ========================================================= */
.qe-navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 252, 248, .82);
  border-bottom: 1px solid rgba(0, 30, 69, .07);
  font-family: 'Roboto', sans-serif;
}
.qe-navlink { text-decoration: none; color: #001E45; padding: 6px 0; transition: color .2s; }
.qe-navlink:hover { color: #F99D3E; }

/* Diensten mega-dropdown (hover-driven on desktop) */
.qe-dd { position: relative; }
.qe-dd-trigger { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; padding: 6px 0; }
.qe-caret { transition: transform .25s cubic-bezier(.4, 0, .2, 1); }
.qe-drop-panel {
  position: absolute; top: 34px; left: -14px; width: 290px;
  background: #fff; border-radius: 18px; padding: 8px;
  border: 1px solid #ECEEF2; box-shadow: 0 24px 60px rgba(0, 30, 69, .16);
  display: flex; flex-direction: column; gap: 2px;
  transform-origin: top left;
  transition: opacity .26s cubic-bezier(.4, 0, .2, 1), transform .26s cubic-bezier(.4, 0, .2, 1);
  opacity: 0; transform: translateY(-8px) scale(.97); pointer-events: none; z-index: 80;
}
.qe-dd:hover .qe-drop-panel, .qe-dd:focus-within .qe-drop-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.qe-dd:hover .qe-caret, .qe-dd:focus-within .qe-caret { transform: rotate(180deg); }
/* keyboard accessibility: visible focus ring on the interactive nav elements */
.qe-dd-trigger:focus-visible, .qe-lang-trigger:focus-visible, .qe-lang-row:focus-visible, .qe-navlink:focus-visible, .qe-drop-item:focus-visible { outline: 2px solid #6A2C91; outline-offset: 3px; border-radius: 6px; }
.qe-drop-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 12px; text-decoration: none; color: #001E45; transition: background .15s;
}
.qe-drop-item:hover { background: #FFF3E5; }
.qe-drop-item .t { display: block; font-weight: 700; font-size: 14px; }
.qe-drop-item .s { display: block; font-size: 12px; color: #9AA1AD; }

/* Language switcher */
.qe-lang { position: relative; }
.qe-lang-trigger {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #001E45;
}
.qe-lang-caret { transition: transform .25s cubic-bezier(.4, 0, .2, 1); }
.qe-lang:hover .qe-lang-caret, .qe-lang:focus-within .qe-lang-caret { transform: rotate(180deg); }
.qe-lang-panel {
  position: absolute; top: 32px; right: 0; width: 180px;
  background: #fff; border-radius: 14px; padding: 6px;
  border: 1px solid #ECEEF2; box-shadow: 0 20px 50px rgba(0, 30, 69, .16);
  display: flex; flex-direction: column; gap: 1px;
  transform-origin: top right;
  transition: opacity .24s cubic-bezier(.4, 0, .2, 1), transform .24s cubic-bezier(.4, 0, .2, 1);
  opacity: 0; transform: translateY(-8px) scale(.97); pointer-events: none; z-index: 95;
}
.qe-lang:hover .qe-lang-panel, .qe-lang:focus-within .qe-lang-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.qe-lang-row {
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: #001E45;
}
.qe-lang-row:hover { background: #FFF3E5; }
.qe-lang-row.active { font-weight: 700; color: #E8642A; background: #FFF3E5; }
.qe-lang-row .code { font-family: 'Roboto Mono', monospace; font-size: 11px; }

/* Nav call-to-action buttons */
.qe-cta { text-decoration: none; padding: 11px 22px; border-radius: 99px; font-weight: 500; transition: background .2s; }
.qe-cta-orange { background: #F99D3E; color: #001E45; }   /* navy text on orange — WCAG-AA */
.qe-cta-orange:hover { background: #E88A2A; }
.qe-cta-dark { background: #001E45; color: #fff; }
.qe-cta-dark:hover { background: #F99D3E; color: #001E45; }   /* turns orange on hover → navy text */

/* Burger + mobile panel */
#qe-burger { display: none; cursor: pointer; width: 42px; height: 42px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
#qe-burger span { width: 23px; height: 2px; background: #001E45; border-radius: 2px; transition: transform .25s, opacity .25s; }
#qe-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#qe-burger.open span:nth-child(2) { opacity: 0; }
#qe-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.qe-mobile-panel {
  position: fixed; top: 70px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid #ECEEF2;
  box-shadow: 0 24px 40px rgba(0, 30, 69, .12);
  padding: 16px 28px 28px 28px; display: flex; flex-direction: column;
  max-height: calc(100vh - 70px); overflow-y: auto;
  transition: opacity .3s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(.4, 0, .2, 1);
  opacity: 0; transform: translateY(-12px); pointer-events: none; z-index: 89;
}
.qe-mobile-panel.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.qe-mobile-cap { font-family: 'Roboto Mono', monospace; font-size: 11px; letter-spacing: .16em; color: #9AA1AD; }
.qe-mobile-link { text-decoration: none; color: #001E45; font-size: 17px; font-weight: 500; padding: 11px 0; border-bottom: 1px solid #F1F3F6; }
.qe-mobile-lang { cursor: pointer; font-size: 12px; font-weight: 500; color: #9AA1AD; letter-spacing: .02em; }
.qe-mobile-lang.active { font-weight: 700; color: #E8642A; }

/* =========================================================
   RESPONSIVE LAYER
   Attribute selectors + !important override the inline desktop styles on
   small screens. Mirrors the design's qe-responsive.css.
   ========================================================= */
/* Nav collapses to the burger as soon as the full link row would overflow
   (~1120px), not just at the 900px content breakpoint the design used. */
@media (max-width: 1120px) {
  #qe-nav-links { display: none !important; }
  #qe-burger { display: flex !important; }
  .qe-navbar { padding-left: 20px !important; padding-right: 20px !important; }
}

@media (max-width: 900px) {
  /* --- multi-column grids collapse to a single column --- */
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(5,1fr)"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:1.05fr 1fr"],
  [style*="grid-template-columns:1fr 1.05fr"],
  [style*="grid-template-columns:1fr 1.1fr"],
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns:1fr 1.15fr"],
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns:1.4fr 1fr"],
  [style*="grid-template-columns:1.5fr 1fr"],
  [style*="grid-template-columns:1.5fr 1fr 1fr 1.2fr"],
  [style*="grid-template-columns:1.05fr .98fr"],
  [style*="grid-template-columns:1.02fr .98fr"],
  [style*="grid-template-columns:64px 1fr 1.5fr 48px"],
  [style*="grid-template-columns:80px 1fr 1.4fr 60px"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  [style*="grid-template-columns:1fr 1fr"] { gap: 16px !important; }

  /* --- headings scale to viewport --- */
  h1 { font-size: clamp(34px, 9vw, 58px) !important; letter-spacing: -1.5px !important; }
  h2 { font-size: clamp(27px, 6.6vw, 44px) !important; letter-spacing: -1px !important; }

  /* sticky result panels shouldn't pin on mobile (class form is immune to the
     reveal engine's inline-style normalization, unlike the [style*=…] selector) */
  [style*="position:sticky"], .qe-nostick { position: static !important; }

  /* before/after comparison slider (realisatie-detail) is shorter on phones */
  #ba { height: 380px !important; }

  /* button / stat / CTA groups wrap instead of overflowing */
  [style*="display:flex"][style*="gap:14px"],
  [style*="display:flex"][style*="gap:16px"],
  [style*="display:flex"][style*="gap:20px"] { flex-wrap: wrap !important; }

  /* roomy fixed vertical paddings tighten */
  [style*="padding:90px"], [style*="padding:100px"], [style*="padding:110px"],
  [style*="padding:120px"], [style*="padding:130px"], [style*="padding:140px"] {
    padding-top: 64px !important; padding-bottom: 64px !important;
  }

  /* the flowing services list: drop the row number + arrow columns */
  .qe-srow { grid-template-columns: 1fr !important; gap: 8px !important; }
  .qe-srow .qe-snum, .qe-srow .qe-sarrow { display: none !important; }

  /* The reveal engine rewrites the inline `style` of [data-reveal] elements,
     which normalizes the string so the [style*=...] selectors above can't match
     a grid/flex container that is itself data-reveal. Collapse those by class. */
  .qe-collapse { grid-template-columns: 1fr !important; }
  .qe-stack { flex-direction: column !important; }
}

@media (max-width: 600px) {
  h1 { font-size: clamp(30px, 10.5vw, 46px) !important; }
  h2 { font-size: clamp(24px, 7.5vw, 36px) !important; }
  /* oversized hero / editorial / stat type */
  [style*="font-size:104px"], [style*="font-size:94px"], [style*="font-size:86px"],
  [style*="font-size:80px"], [style*="font-size:78px"], [style*="font-size:74px"] {
    font-size: clamp(32px, 11vw, 54px) !important;
  }
  [style*="font-size:72px"], [style*="font-size:68px"], [style*="font-size:64px"],
  [style*="font-size:62px"], [style*="font-size:60px"], [style*="font-size:58px"] {
    font-size: clamp(40px, 13vw, 58px) !important;
  }
}
