/* =====================================================================
   RESPONSIVE FIXES — loaded last. Fixes layout on phones, tablets, laptops.
   ===================================================================== */

/* ---------- HERO ---------- */
section.hero .hero-in{padding-top:calc(var(--hdr,80px) + 28px)}
@media(max-width:1100px){section.hero .hero-in{padding-top:calc(var(--hdr,68px) + 28px)}}
@media(max-width:1399px){
  section.hero{display:flex;flex-direction:column}
  section.hero .hero-in{flex:1 0 auto}
  section.hero .hero-stats{margin-top:auto;padding:0 32px}
}
@media(max-width:900px){section.hero{min-height:0}}
@media(max-width:600px){
  section.hero .hero-stats{padding:0 20px}
  section.hero .hero-stats .st{min-width:0}
  section.hero .hero-stats .st>div{min-width:0}
  section.hero .hero-stats .st{gap:10px;padding:16px 6px}
  section.hero .hero-stats span{font-size:9px;letter-spacing:.05em}
}

/* ---------- HEADER ---------- */
html body header.site-header#site-header .header-tools{margin-left:auto!important}

/* ---------- PROCESS CARDS ---------- */
@media(max-width:900px){
  .process-page .process-cards[data-process-cards="three"]>.process-ref-card:nth-child(n){grid-column:1!important;grid-row:auto!important}
  .process-page .process-card-copy p{font-size:13px!important;max-width:none!important}
}
@media(max-width:600px){
  .process-page .process-ref-card{grid-template-columns:1fr!important;height:auto!important}
  .process-page .process-card-image{order:-1;min-height:190px!important}
  .process-page .process-card-copy{padding:22px 20px 64px!important}
  .process-page .process-card-copy p{font-size:14px!important}
  .process-page .process-card-copy a{font-size:12px!important;left:20px!important}
}

/* ---------- SERVICE CARDS (5 cards) ---------- */
.what-deliver-cards{grid-template-columns:repeat(5,minmax(0,1fr))}
.deliver-card-body{min-height:150px}
@media(max-width:1299px){
  .what-deliver-cards{grid-template-columns:repeat(6,minmax(0,1fr))}
  .deliver-card{grid-column:span 2}
  .deliver-card:nth-child(n+4){grid-column:span 3}
}
@media(max-width:1100px){
  .what-deliver-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .deliver-card,.deliver-card:nth-child(n+4){grid-column:auto}
  .deliver-card:last-child{grid-column:1/-1}
  .deliver-card-body{min-height:0}
}
@media(max-width:700px){
  .what-deliver-cards{grid-template-columns:1fr}
  .deliver-card:last-child{grid-column:auto}
}

/* ---------- WHAT WE DELIVER heading on tablet ---------- */
@media(min-width:701px) and (max-width:1100px){
  .what-deliver-copy h2{font-size:clamp(38px,6vw,52px)}
  .what-deliver-heading{height:350px}
  .what-deliver-side-note{left:0;right:auto;top:236px}
  .what-deliver-tech-card{top:150px;right:0}
  .what-deliver-lead{max-width:440px}
  .what-deliver-lead br{display:none}
}

/* ---------- ENQUIRY POPUP ---------- */
body.enquiry-open header.site-header#site-header{z-index:1!important}
@media(max-width:700px){
  .enquiry-visual{height:230px;min-height:230px}
  .enquiry-brand,.enquiry-brand img{width:70px;height:44px}
  .enquiry-form input,.enquiry-form textarea,
  .quote-reference-form input,.quote-reference-form textarea{font-size:16px!important}
  .enquiry-form label{font-size:11px}
  .enquiry-visual-copy p{font-size:11px}
}

/* ---------- ENQUIRY POPUP: always-reachable close button (phones, small/short screens) ---------- */
body.enquiry-open{overflow:hidden}
@media(max-width:900px),(max-height:700px){
  .enquiry-overlay{
    overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
    align-items:flex-start;
    -webkit-backdrop-filter:none;backdrop-filter:none;   /* lets the close button stay fixed to the screen */
  }
  .enquiry-modal{margin:auto;max-height:none!important;overflow:hidden!important}
  .enquiry-modal,.enquiry-overlay.is-open .enquiry-modal{transform:none!important;transition:none!important}
  .enquiry-close{
    position:fixed;z-index:10;top:calc(env(safe-area-inset-top,0px) + 12px);right:calc(env(safe-area-inset-right,0px) + 12px);
    width:44px;height:44px;font-size:28px;line-height:42px;text-align:center;
    background:#102b3d;color:#fff;border:2px solid rgba(255,255,255,.7);box-shadow:0 4px 14px rgba(0,0,0,.45);
  }
}
