/* T145 — iPhone/Safari: one continuous homepage scene below the hero.
   Scope: homepage only. Keeps the live hero video untouched and places every
   lower homepage section over the same fixed resort background, matching desktop. */

@media (max-width: 920px) {
  @supports (-webkit-touch-callout: none) {
    body.nile-home-active {
      position: relative !important;
      background: #020713 !important;
    }

    /* Safari-safe fixed scene. The hero remains above it; once the hero ends,
       the same scene is visible behind every lower-home section and footer. */
    body.nile-home-active::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background:
        linear-gradient(180deg,
          rgba(2, 11, 25, .78) 0%,
          rgba(2, 11, 25, .70) 30%,
          rgba(2, 11, 25, .76) 72%,
          rgba(2, 7, 18, .84) 100%),
        #020713 url("assets/home-policy-scene-mobile.jpg") center 54% / cover no-repeat;
      transform: translateZ(0);
      -webkit-transform: translateZ(0);
      will-change: transform;
    }

    body.nile-home-active > .page-shell {
      position: relative !important;
      z-index: 1 !important;
      background: transparent !important;
    }

    #home,
    #home .home-page,
    #home .home-after-hero-content {
      background: transparent !important;
    }

    #home .home-after-hero-content {
      overflow: visible !important;
      isolation: isolate !important;
    }

    /* The fixed body scene is the only lower-page background. */
    #home .home-after-hero-media,
    #home .t124-ios-scene-layer,
    #home .t126-policy-background {
      display: none !important;
    }

    /* Remove the previous iPhone-only per-section images/solid panels. */
    #home .home-after-hero-content > .booking-policies-lux,
    #home .home-after-hero-content > .atmosphere-highlight,
    #home .home-after-hero-content > .gallery-showcase,
    #home .home-after-hero-content > .identity-section,
    #home .home-after-hero-content > .stats-strip,
    #home .home-after-hero-content > .feature-strip,
    #home .home-after-hero-content > .guest-reviews-section,
    #home .home-after-hero-content > .partner-promo {
      background-image: none !important;
      background-color: transparent !important;
      background-attachment: scroll !important;
    }

    /* Preserve the existing glass cards while letting the shared scene show through. */
    #home .booking-policies-lux .booking-policy-card,
    #home .home-after-hero-content .gallery-card,
    #home .home-after-hero-content .identity-section,
    #home .home-after-hero-content .stats-strip,
    #home .home-after-hero-content .feature-strip,
    #home .home-after-hero-content .reviews-list-card,
    #home .home-after-hero-content .review-form-card,
    #home .home-after-hero-content .review-card,
    #home .home-after-hero-content .partner-promo,
    #home .home-after-hero-content .atmosphere-highlight .section-copy {
      -webkit-backdrop-filter: blur(15px) saturate(130%) !important;
      backdrop-filter: blur(15px) saturate(130%) !important;
    }

    body.nile-home-active .site-footer-open {
      position: relative !important;
      z-index: 1 !important;
      background: transparent !important;
    }

    body.nile-home-active .site-footer-open::before {
      background-attachment: scroll !important;
      opacity: .15 !important;
    }
  }
}
