/* ARABIDS v1.2.141 — App Preview / Inside the App only.
   Mobile: comfortable gap under the heading; desktop: complete phone at a
   stable, viewport-aware size with the original four scroll-driven slides.
   No other homepage sections or inner pages are changed. */

/* Portrait phones and compact tablets, Arabic + English. Title lives in the
   normal-flow container; phone and its slide text live in the sticky stage. */
@media (max-width:991px) and (orientation:portrait) {
  html body:is(.home,[data-page="home"])
  .how_it_works_section .container-flex > h2.title {
    position:relative !important;
    margin-top:0 !important;
    margin-bottom:clamp(27px,6vw,37px) !important;
    padding-bottom:0 !important;
    line-height:1.45 !important;
    z-index:4 !important;
  }
  html body:is(.home,[data-page="home"])
  .how_it_works_section > .mobile {
    /* Do not alter stage height or phone aspect ratio from v1.2.140. */
    padding-top:clamp(16px,4.5vw,24px) !important;
    gap:clamp(11px,1.9svh,18px) !important;
  }
}

/* Desktop: keep the whole phone visible without making the four slides
   smaller on every wheel tick. The JS wheel handler already pins a sequence
   at the section anchor, so an additional CSS sticky viewport is unnecessary.
   Older rules had conflicting 370svh section and 600px phone heights. */
@media (min-width:992px) {
  html body:is(.home,[data-page="home"]) .how_it_works_section {
    --arabids-preview-stage:clamp(250px,calc(100dvh - var(--arabids-preview-header,85px) - 130px),580px);
    box-sizing:border-box !important;
    display:block !important;
    position:relative !important;
    height:auto !important;
    min-height:0 !important;
    padding:clamp(21px,3.2vh,37px) 0 clamp(22px,3.4vh,43px) !important;
    overflow:visible !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .container-flex {
    position:relative !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:flex-start !important;
    width:min(1140px,calc(100% - 48px)) !important;
    max-width:1140px !important;
    height:auto !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 auto !important;
    overflow:visible !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .container-flex > h2.title {
    display:block !important;
    flex:0 0 auto !important;
    position:relative !important;
    margin:0 auto clamp(13px,2.2vh,23px) !important;
    padding:0 !important;
    text-align:center !important;
    line-height:1.3 !important;
    z-index:3 !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .container-flex > .flex.desktop {
    display:flex !important;
    flex-flow:row nowrap !important;
    align-items:center !important;
    justify-content:center !important;
    gap:clamp(20px,3.2vw,52px) !important;
    position:relative !important;
    width:min(1040px,100%) !important;
    max-width:100% !important;
    height:var(--arabids-preview-stage) !important;
    max-height:var(--arabids-preview-stage) !important;
    min-height:0 !important;
    margin:0 auto !important;
    padding:0 !important;
    overflow:visible !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .flex.desktop > .how-it-works-swiper {
    box-sizing:border-box !important;
    position:relative !important;
    flex:1 1 0 !important;
    min-width:0 !important;
    max-width:600px !important;
    height:var(--arabids-preview-stage) !important;
    max-height:var(--arabids-preview-stage) !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .flex.desktop > .how-it-works-swiper-2 {
    box-sizing:border-box !important;
    position:relative !important;
    flex:0 0 auto !important;
    width:calc(var(--arabids-preview-stage) * 0.4884106) !important;
    min-width:0 !important;
    max-width:min(285px,31vw) !important;
    height:var(--arabids-preview-stage) !important;
    min-height:0 !important;
    max-height:var(--arabids-preview-stage) !important;
    aspect-ratio:295 / 604 !important;
    align-self:center !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
    transform:none !important;
    opacity:1 !important;
    visibility:visible !important;
    transition:none !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .flex.desktop > .how-it-works-swiper-2 > .swiper-wrapper,
  html body:is(.home,[data-page="home"]) .how_it_works_section .flex.desktop > .how-it-works-swiper-2 .swiper-slide,
  html body:is(.home,[data-page="home"]) .how_it_works_section .flex.desktop > .how-it-works-swiper-2 .how-it-works-mockup {
    box-sizing:border-box !important;
    height:100% !important;
    max-height:100% !important;
    min-height:0 !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .flex.desktop > .how-it-works-swiper-2 .how-it-works-mockup > img.bg {
    display:block !important;
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:center !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .flex.desktop .arabids-phone-photo-feed {
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
}
/* Very short desktop windows still show the device, without it colliding
   with the next section. The four frames remain active as before. */
@media (min-width:992px) and (max-height:610px) {
  html body:is(.home,[data-page="home"]) .how_it_works_section {
    --arabids-preview-stage:clamp(220px,calc(100dvh - var(--arabids-preview-header,85px) - 115px),395px);
    padding:12px 0 18px !important;
  }
  html body:is(.home,[data-page="home"]) .how_it_works_section .container-flex > h2.title {
    margin-bottom:9px !important;
    font-size:clamp(24px,2.5vw,32px) !important;
  }
}
