/* ==========================================================================
   JIM CORBETT - SECTION-EDGE FLORA/WILDLIFE + CARD-PERCHED BIRDS/BUTTERFLIES
   Ground trees, bushes & mammals anchor visibly along <section> edges
   (like stump-monstera behind .cta-nb-banner), while perched birds, monkeys
   and butterflies rest naturally atop card/banner frames.
   ========================================================================== */

html,
body {
  overflow-x: clip;
}

.jg-decorated-section {
  position: relative;
  overflow-x: clip;
}

.jg-decorated-section > .container,
.jg-decorated-section > .container-fluid {
  position: relative;
  z-index: 2;
}

.jg-rel {
  position: relative;
}

.jg-layer-front {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   1. HERO: ANIMATED PALM GIF (#1 ONCE), SUNRAY & BOOKING CARD ACCENTS
   ========================================================================== */
.jg-hero-fx {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.jg-hero-sunray {
  position: absolute;
  top: -10px;
  left: 4%;
  width: min(320px, 34vw);
  height: auto;
  opacity: 0.34;
  transform-origin: top left;
}

.jg-hero-palm-picture {
  position: absolute;
  top: 0;
  left: -6px;
  width: min(480px, 50vw);
  display: block;
  pointer-events: none;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, 1) 52%, rgba(0, 0, 0, 0) 96%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 1) 52%, rgba(0, 0, 0, 0) 96%);
}

.jg-hero-palm-picture img {
  width: 100%;
  height: auto;
  display: block;
}

.jg-hero-card-grass {
  position: absolute;
  bottom: -14px;
  left: -46px;
  width: 165px;
  height: auto;
  z-index: 2;
  pointer-events: none;
  display: none;
  opacity: 0.5;
}

.jg-card-butterfly {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 62px;
  height: auto;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.28));
}

@media (min-width: 992px) {
  .jg-hero-card-grass {
    display: block;
  }
}

/* ==========================================================================
   2. FAQ DARK CARD: FULL-HEIGHT ANIMATED PALM FRAME GIF (#2 ONCE)
   ========================================================================== */
.faq-visual-card {
  position: relative;
  overflow: hidden;
}

.faq-visual-card > :not(.jg-fx-backdrop) {
  position: relative;
  z-index: 2;
}

.jg-fx-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.jg-faq-palm-picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse at 50% 60%, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.94) 70%, rgba(0, 0, 0, 0) 98%);
  mask-image: radial-gradient(ellipse at 50% 60%, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.94) 70%, rgba(0, 0, 0, 0) 98%);
}

.jg-faq-palm-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ==========================================================================
   3. SECTION-ANCHORED GROUND FLORA & LARGE WILDLIFE (OPEN MARGINS + CARD EDGE)
   Anchored directly to <section> at generous scale so they shine cleanly
   in outer margins and behind .cta-nb-banner / cards without getting buried.
   ========================================================================== */
.jg-sec-prop {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  height: auto;
  display: none;
  filter: drop-shadow(0 8px 16px rgba(14, 36, 23, 0.16));
}

.jg-card-perch {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  height: auto;
  display: none;
  filter: drop-shadow(0 8px 14px rgba(14, 36, 23, 0.2));
}

@media (min-width: 1200px) {
  .jg-sec-prop,
  .jg-card-perch {
    display: block;
  }
}

.jg-sec-prop.is-top-left     { top: 0; left: 0; transform-origin: top left; }
.jg-sec-prop.is-top-right    { top: -34px; right: -6px; transform-origin: top right; }
.jg-sec-prop.is-bottom-left  { bottom: 0; left: 0; transform-origin: bottom left; }
.jg-sec-prop.is-bottom-right { bottom: 0; right: 0; transform-origin: bottom right; }
.jg-sec-prop.is-flipped      { transform: scaleX(-1); }

/* User-calibrated desktop scale & section offsets */
.jg-sec-prop.w-stump  { width: 800px; }
.jg-sec-prop.w-bush   { width: clamp(210px, 18vw, 290px); }
.jg-sec-prop.w-mammal { width: clamp(200px, 24vw, 297px); }
.jg-sec-prop.w-grass  { width: clamp(150px, 13vw, 210px); }
.jg-sec-prop.w-vine   { width: 500px; }

/* Specific curated placements matching live DevTools layout */
.jg-sec-prop.is-croc-stage {
  display: block;
  width: min(92vw, 680px);
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

#detailedContent {
  padding-bottom: clamp(92px, 24vw, 190px) !important;
}

@media (min-width: 1200px) {
  .jg-sec-prop.is-croc-stage {
    width: min(1200px, 92vw);
  }
  #detailedContent {
    padding-bottom: 300px !important;
  }
}

#aboutUs {
  position: relative;
  z-index: 1;
}

#whyChooseUs {
  position: relative;
  z-index: 2;
}

.jg-sec-prop.is-langur {
  width: 402px;
  bottom: -50px;
}

.jg-sec-prop.is-faq-bush {
  width: 800px;
  bottom: -14px;
  left: -74px;
}

/* Perched creatures resting cleanly onto top borders of cards/banners */
.jg-perch-kingfisher { top: -112px; right: 20px; width: 132px; }
.jg-perch-hornbill   { top: -115px; right: -6px; width: 132px; }
.jg-perch-btrfly-l   { top: -22px;  left: -14px; width: 66px; }
.jg-perch-btrfly-r   { top: -18px;  right: 14px; width: 64px; }

/* ==========================================================================
   4. FOOTER: SEAMLESS FOREST BACKGROUND ACROSS CONTACT, MAIN & COPYRIGHT BAR
   Must beat .site-footer.footer-forest .footer-top / .footer-bottom (0,3,0)
   ========================================================================== */
footer.site-footer.footer-forest .footer-top {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.22);
}

footer.site-footer.footer-forest .footer-bottom {
  background: transparent;
  border-top: 2px solid var(--brand-green);
}

.site-footer.footer-forest > .jg-footer-fx {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

.jg-footer-bush-r {
  position: absolute;
  bottom: -4px;
  right: 0;
  width: min(260px, 32vw);
  height: auto;
  opacity: 0.4;
}

.jg-footer-bush-l {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: min(220px, 28vw);
  height: auto;
  opacity: 0.34;
}

.jg-footer-firefly {
  position: absolute;
  width: 28px;
  height: 28px;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   5. CTA PAW EMBLEM USING PROVIDED paw.svg MASK
   ========================================================================== */
:is(
  .btn-header-book,
  .hero-btn-book,
  .btn-form-submit,
  .btn-cta-book,
  .faq-btn-ask,
  .why-btn-book,
  .about-btn-book,
  .popup-submit,
  .btn-drawer-book
):not(:has(.fa-paw))::after {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-left: 7px;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask: url('../images/jungle/paw.svg') no-repeat center / contain;
  mask: url('../images/jungle/paw.svg') no-repeat center / contain;
  opacity: 0.9;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

:is(
  .btn-header-book,
  .hero-btn-book,
  .btn-form-submit,
  .btn-cta-book,
  .faq-btn-ask,
  .why-btn-book,
  .about-btn-book,
  .popup-submit,
  .btn-drawer-book
):hover::after {
  transform: rotate(-12deg) scale(1.12);
}

/* ==========================================================================
   6. SUBTLE COMPOSITOR ANIMATIONS & SCROLL-DRIVEN REVEALS
   ========================================================================== */
@keyframes jgRayBreathe {
  0%, 100% { opacity: 0.26; transform: translate3d(0, 0, 0); }
  50%      { opacity: 0.44; transform: translate3d(10px, 0, 0); }
}

@keyframes jgButterflyHover {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); }
  50%      { transform: translate3d(2px, -5px, 0) rotate(3deg); }
}

@keyframes jgFireflyNight {
  0%, 100% { opacity: 0.05; transform: translate3d(0, 0, 0) scale(0.75); }
  45%      { opacity: 0.85; transform: translate3d(10px, -16px, 0) scale(1.1); }
}

@keyframes jgSectionFadeUp {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  .jg-hero-sunray { animation: jgRayBreathe 10s ease-in-out infinite; }

  .jg-card-butterfly,
  .jg-perch-btrfly-l,
  .jg-perch-btrfly-r {
    animation: jgButterflyHover 4.8s ease-in-out infinite;
  }

  .jg-footer-firefly {
    animation: jgFireflyNight var(--jg-ff-dur, 6s) ease-in-out var(--jg-ff-delay, 0s) infinite;
  }

  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .jg-section-reveal {
      animation: jgSectionFadeUp linear backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 22%;
    }
  }

  @supports not ((animation-timeline: view()) and (animation-range: entry)) {
    html.jg-io-ready .jg-section-reveal:not(.is-jg-visible) {
      opacity: 0;
      transform: translate3d(0, 20px, 0);
      transition: opacity 0.58s cubic-bezier(0.22, 1, 0.36, 1), transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
    }
    html.jg-io-ready .jg-section-reveal.is-jg-visible {
      opacity: 1;
      transform: translate3d(0, 0, 0);
      transition: opacity 0.58s cubic-bezier(0.22, 1, 0.36, 1), transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .jg-footer-firefly {
    display: none !important;
  }

  .jg-section-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 767.98px) {
  .jg-hero-palm-picture {
    width: 240px;
    opacity: 0.55;
  }

  .jg-card-butterfly {
    width: 46px;
    top: 10px;
    right: 14px;
  }

  .jg-faq-palm-picture {
    height: 100%;
    opacity: 0.35;
  }

  .jg-footer-bush-r,
  .jg-footer-bush-l {
    width: 140px;
    bottom: -4px;
  }
}
