/* ARABIDS 1.2.146 | Calm desktop scrolling + readable mobile story captions.
   Preserve the original phone artwork, app content, image sequence and mobile branding. */

/* Desktop: the browser does the pinning natively. No transform driven by each
   scroll event, so the title/device cannot chase the wheel, vibrate or lag. */
@media (min-width:992px) {
  html body:is(.home,[data-page="home"]) :is(#page,.site-content,.main-page-wrap,.arabids-elementor-source) {
    overflow-x:clip !important;
    overflow-y:visible !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section {
    position:relative !important;
    height:350dvh !important;
    min-height:2100px !important;
    overflow:visible !important;
    padding:0 !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section > .container-flex {
    position:sticky !important;
    top:calc(var(--arabids-preview-header,100px) + 18px) !important;
    left:auto !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    will-change:auto !important;
    margin:0 auto !important;
    transition:none !important;
    contain:none !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section > .container-flex > h2.title {
    margin-bottom:clamp(26px,3.2vh,38px) !important;
    text-align:center !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section > .container-flex > .flex.desktop {
    height:var(--arabids-preview-stage) !important;
    max-height:var(--arabids-preview-stage) !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section .flex.desktop > .how-it-works-swiper-2 {
    width:calc(var(--arabids-preview-stage) * 295 / 604) !important;
    height:var(--arabids-preview-stage) !important;
    max-height:var(--arabids-preview-stage) !important;
    flex:0 0 auto !important;
    transform:none !important;
    transition:none !important;
  }
}

/* Mobile: all four descriptions must stay visible BELOW their gold titles
   while the unchanged phone/heading keep their places in a sticky stage. */
@media (max-width:991px) and (orientation:portrait) {
  html body:is(.home,[data-page="home"]) section.how_it_works_section.arabids-preview-title-docked > .mobile {
    overflow:visible !important;
    justify-content:flex-start !important;
    padding:clamp(8px,1.3svh,12px) 14px 10px !important;
    height:calc(100svh - var(--arabids-mobile-header-bottom,80px)) !important;
    min-height:0 !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section.arabids-preview-title-docked > .mobile > h2.title {
    margin:0 auto clamp(15px,2.6svh,24px) !important;
    line-height:1.35 !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section.arabids-preview-title-docked > .mobile > .how-it-works-swiper-2-mobile {
    width:min(72vw,282px,calc(var(--arabids-mobile-phone-height,calc(100svh - var(--arabids-mobile-header-bottom,80px) - 260px)) * 295 / 604)) !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    aspect-ratio:295 / 604 !important;
    flex:0 0 auto !important;
    margin:0 auto !important;
    transform:none !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section.arabids-preview-title-docked > .mobile > .how-it-works-swiper-mobile {
    display:block !important;
    box-sizing:border-box !important;
    width:100% !important;
    max-width:520px !important;
    height:var(--arabids-mobile-caption-height,132px) !important;
    min-height:var(--arabids-mobile-caption-height,132px) !important;
    max-height:none !important;
    flex:0 0 auto !important;
    margin:clamp(8px,1.3svh,12px) auto 0 !important;
    overflow:hidden !important;
    align-self:center !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section .how-it-works-swiper-mobile > .swiper-wrapper {
    height:100% !important;
    min-height:0 !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section .how-it-works-swiper-mobile .swiper-slide {
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:flex-start !important;
    height:100% !important;
    min-height:0 !important;
    overflow:visible !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section .how-it-works-swiper-mobile .how-it-works-slide-content {
    box-sizing:border-box !important;
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    flex:0 0 auto !important;
    margin:0 auto !important;
    padding:5px 9px !important;
    gap:6px !important;
    overflow:visible !important;
    text-align:center !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section .how-it-works-swiper-mobile .how-it-works-title {
    height:auto !important;
    max-height:none !important;
    margin:0 !important;
    font-size:clamp(19px,4.8vw,22px) !important;
    line-height:1.38 !important;
    white-space:normal !important;
    text-align:center !important;
  }
  html body:is(.home,[data-page="home"]) section.how_it_works_section .how-it-works-swiper-mobile .how-it-works-subtitle {
    display:block !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    font-size:clamp(13px,3.6vw,15px) !important;
    line-height:1.58 !important;
    white-space:normal !important;
    overflow:visible !important;
    overflow-wrap:anywhere !important;
    -webkit-line-clamp:unset !important;
    text-overflow:clip !important;
    text-align:center !important;
  }
}
