/* ============================================================
 * InternationalVenues.com — Approved Mobile Hero Background
 * Source: IV_Approved_Mobile_Hero_Background_WebP_Pack (Feb 2026)
 * Mode:   <picture><img> (LCP-eligible) + CSS background fallback
 * ============================================================ */

/* ---------- Picture/img positioning (mobile only) ---------- */
.iv-mobile-hero-pattern-picture {
  display: none;            /* hidden on desktop */
}

@media (max-width: 767px) {
  .iv-mobile-hero-pattern {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    max-width: 100%;
  }

  /* The real <img> — LCP candidate. Absolutely positioned behind content. */
  .iv-mobile-hero-pattern-picture {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Soft fade-out so pattern dissolves before body content */
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 0%, #000 72%, transparent 100%);
  }
  .iv-mobile-hero-pattern-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
  }

  /* Faint whitewash so the overlay fades into the page background */
  .iv-mobile-hero-pattern::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
      rgba(248, 250, 252, 0.02) 0%,
      rgba(255, 255, 255, 0.88) 100%);
  }

  /* Hero content always above pattern + whitewash */
  .iv-mobile-hero-pattern > *:not(.iv-mobile-hero-pattern-picture) {
    position: relative;
    z-index: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iv-mobile-hero-pattern-picture,
  .iv-mobile-hero-pattern-img {
    animation: none !important;
    transition: none !important;
  }
}
