
/* Guide + guest stand on the right of this landscape photo; keep them in portrait tour cards */
img[src*="ChimpanzeeTracking_Kibale4R4A1932"], img[data-src*="ChimpanzeeTracking_Kibale4R4A1932"], img[srcset*="ChimpanzeeTracking_Kibale4R4A1932"] { object-fit: cover; object-position: 84% 50% !important; }
[style*="ChimpanzeeTracking_Kibale4R4A1932"] { background-position: 84% 50% !important; }
@media (max-width: 767px) {
  /* #Content adds specificity so this beats #10954's 28px margin */
  html body.page-id-367 #Content section.jk-quote.jk-full:first-of-type .jk-quote__in { margin-top: 40px !important; }
}
@media (max-width: 767px) {
  /* Safari Vehicles (367): let the title block size itself (older 70vh caps clipped it) and balance space above/below */
  html body.page-id-367 section.jk-quote.jk-full:first-of-type { max-height: none !important; min-height: 0 !important; height: auto !important; padding-bottom: 0 !important; }
  html body.page-id-367 section.jk-quote.jk-full:first-of-type .jk-quote__in { margin-top: 40px !important; padding-bottom: 44px !important; }
}
@media (max-width: 600px) {
  /* Jackal AI Concierge: full-screen sheet on phones */
  #jax-chat.open { position: fixed !important; inset: 0 !important; width: 100% !important; max-width: none !important; height: 100vh !important; height: 100dvh !important; max-height: none !important; border-radius: 0 !important; z-index: 2147483646 !important; }
  html:has(#jax-chat.open), body:has(#jax-chat.open) { overflow: hidden !important; }
  body:has(#jax-chat.open) #jax-fab { display: none !important; }
  #jax-chat .jax-hd { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px !important; }
  #jax-chat .jax-x { font-size: 28px !important; width: 44px; height: 44px; display: flex !important; align-items: center; justify-content: center; margin-right: -10px; }
  #jax-body { padding: 16px !important; overscroll-behavior: contain; }
  /* suggestion chips: undo the theme's big uppercase button style */
  #jax-chips { padding: 0 16px 12px !important; gap: 8px !important; flex-wrap: wrap !important; }
  #jax-chat .jax-chip { width: auto !important; min-height: 0 !important; height: auto !important; margin: 0 !important; padding: 8px 14px !important; border-radius: 999px !important; background: #fff !important; border: 1px solid #c29a4e !important; color: #1a1510 !important; font: 500 13px/1.3 Inter, sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; text-align: left !important; box-shadow: none !important; }
  /* input row: 16px text stops iOS zoom; compact round send button; clears the home indicator */
  #jax-inrow { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important; align-items: center !important; }
  #jax-in { font-size: 16px !important; min-height: 44px !important; padding: 11px 16px !important; line-height: 1.35 !important; }
  #jax-send { flex: 0 0 44px !important; width: 44px !important; height: 44px !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important; border-radius: 50% !important; font-size: 16px !important; letter-spacing: 0 !important; line-height: 44px !important; text-align: center !important; }
}
@media (max-width: 767px) {
  /* Safari Vehicles (367): centre the hero title block */
  body.page-id-367 .jk-quote:first-of-type .jk-quote__in { text-align: center !important; }
  body.page-id-367 .jk-quote:first-of-type .jk-eyebrow { justify-content: center !important; }
  /* mirror the eyebrow's leading rule so the centred label stays balanced
     (flex gap + the label's trailing letter-spacing already provide the space) */
  body.page-id-367 .jk-quote:first-of-type .jk-eyebrow::after { content: ""; display: block; width: 38px; height: 1px; background: currentColor; opacity: .7; margin-left: -0.2em; }
  body.page-id-367 .jk-quote:first-of-type .jk-qt { display: block !important; }
  body.page-id-367 .jk-quote:first-of-type .jk-lead::before { margin-left: auto !important; margin-right: auto !important; }
}
/* The tour hero (.jk-thero) is inserted between Day 1's photo and its heading;
   the hero already shows the tour image, so drop the stacked duplicate. */
body.single-tour .jk-itday__img:has(+ .jk-thero) { display: none !important; }
@media (max-width: 767px) {
  /* Safari Vehicles (367): beat jk-fleet-fullbleed's absolute positioning so text sits below the slideshow */
  html body.page-id-367 section.jk-quote.jk-full:first-of-type .jk-quote__in { position: relative !important; bottom: auto !important; margin-top: 28px !important; }
}
/* Uganda guide (10932): CTA photo becomes a full background, panel no longer overlaps it */
body.page-id-10932 .jk-cta { position: relative; overflow: hidden; display: flex !important; align-items: center; justify-content: center; min-height: 62vh; background: #14130f; padding: 72px 20px !important; }
body.page-id-10932 .jk-cta::before, body.page-id-10932 .jk-cta::after { display: none !important; }
body.page-id-10932 .jk-cta > img { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; object-fit: cover !important; transform: none !important; z-index: 0; filter: brightness(.5); }
body.page-id-10932 .jk-cta > p:empty { display: none; }
body.page-id-10932 .jk-cta .jk-cta__in { position: relative; z-index: 2; max-width: 640px; text-align: center; background: none !important; border: 0 !important; box-shadow: none !important; }
body.page-id-10932 .jk-cta h2 { color: #fff !important; margin-bottom: 14px; }
body.page-id-10932 .jk-cta h2 em { color: #e4c79a !important; }
body.page-id-10932 .jk-cta .jk-ctatxt { display: block; color: rgba(255,255,255,.92) !important; margin-bottom: 22px; }
body.page-id-10932 .jk-cta .jk-btn { display: inline-block; }
@media (max-width: 767px) {
  /* Safari Vehicles (367): keep "Our Safari Fleet" below the slideshow, not over it */
  body.page-id-367 .jk-quote:first-of-type { flex-direction: column !important; align-items: stretch !important; max-height: none !important; }
  body.page-id-367 .jk-quote:first-of-type .jk-quote__in { margin-top: 28px !important; }
  /* About (7): clear the fixed 133px header so the H1 is not cut off */
  body.page-id-7 .jk-abh .jk-abh__in { padding-top: 112px !important; }
  /* Africa Safari Holidays (1037): remove the empty band under the hero */
  body.page-id-1037 .section.the_content { padding-top: 0 !important; }
  body.page-id-1037 .the_content_wrapper > .jk-section:first-child { padding-top: 40px !important; }
}

/* Safari Collection (page 775) — premium full-card hover.
   Whole card scales + lifts; siblings blur/recede; active card stays crisp.
   Scoped to page 775 only; :has/:focus-visible/reduced-motion supported. */
body.page-id-775 .jk-tours .jk-card{
  transition:transform .5s cubic-bezier(.22,1,.36,1),box-shadow .5s cubic-bezier(.22,1,.36,1),filter .45s ease,opacity .45s ease;
  will-change:transform;
}
@media (hover:hover) and (pointer:fine){
  body.page-id-775 .jk-tours:has(.jk-card:hover) .jk-card:not(:hover){
    filter:blur(2.5px) saturate(.92) brightness(.98);opacity:.6;transform:scale(.984);
  }
  body.page-id-775 .jk-card:hover{
    transform:scale(1.04) translateY(-8px);z-index:6;filter:none;opacity:1;
    box-shadow:0 36px 72px -24px rgba(20,19,15,.5),0 14px 30px -18px rgba(20,19,15,.34) !important;
  }
  body.page-id-775 .jk-card:hover .jk-card__media img{transform:scale(1.03) !important;}
}
/* Keyboard focus — equivalent effect for :focus-visible */
body.page-id-775 .jk-tours:has(.jk-card:has(:focus-visible)) .jk-card:not(:has(:focus-visible)){
  filter:blur(2.5px) saturate(.92);opacity:.6;transform:scale(.984);
}
body.page-id-775 .jk-card:has(:focus-visible){
  transform:scale(1.04) translateY(-8px);z-index:6;filter:none;opacity:1;
  box-shadow:0 36px 72px -24px rgba(20,19,15,.5),0 14px 30px -18px rgba(20,19,15,.34) !important;
}
body.page-id-775 .jk-card:has(:focus-visible) .jk-card__media img{transform:scale(1.03) !important;}
/* Respect reduced-motion: disable transform/blur, keep a soft shadow cue */
@media (prefers-reduced-motion:reduce){
  body.page-id-775 .jk-tours .jk-card,
  body.page-id-775 .jk-card:hover,
  body.page-id-775 .jk-card:has(:focus-visible),
  body.page-id-775 .jk-tours:has(.jk-card:hover) .jk-card:not(:hover),
  body.page-id-775 .jk-tours:has(.jk-card:has(:focus-visible)) .jk-card:not(:has(:focus-visible)){
    transform:none !important;filter:none !important;opacity:1 !important;transition:box-shadow .3s ease !important;
  }
  body.page-id-775 .jk-card:hover,
  body.page-id-775 .jk-card:has(:focus-visible){box-shadow:0 20px 44px -18px rgba(20,19,15,.42) !important;}
}

/* CTA card ("Ready to experience… / Plan this journey") contrast fix.
   Betheme's global #Content heading, paragraph and link colors were overriding
   the card's own intended colors, so on the dark card the heading rendered
   dark-green (invisible), the paragraph rendered dark-grey (invisible on
   itinerary/safari templates), and the gold button text rendered theme-gold on
   its gold background (low contrast). The `a`/`p` type qualifiers lift
   specificity above Betheme's `#Content a` / `#Content p` rules. Applies on all
   viewports (desktop + mobile). */
#Content .jk-inline-cta .jk-cta__t {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
#Content .jk-inline-cta p.jk-cta__p {
  color: rgba(255, 255, 255, 0.85) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;
}
#Content .jk-inline-cta a.jk-cta__btn--gold {
  color: #1A1510 !important;
  -webkit-text-fill-color: #1A1510 !important;
}
#Content .jk-inline-cta a.jk-cta__btn--wa {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
/* Mobile UX fixes. */
@media (max-width: 767px) {
  /* 1) Cookie banner: the floating WhatsApp/fox button (#jax-fab, z-index max)
     was rendering on top of the consent banner and covering the DECLINE /
     ACCEPT ALL buttons. While the banner is present, drop the FAB below the
     banner (banner z-index = 99999) so those buttons are fully clickable.
     The banner is removed from the DOM on dismiss, so :has() stops matching
     and the FAB returns to its normal max z-index automatically. */
  body:has(#jk-consent) #jax-fab {
    z-index: 99998 !important;
  }

  /* 2) Hero CTAs ("Plan Your Journey" / "Explore Safaris"): larger, more
     legible text and comfortable tap targets, with tighter spacing so both
     fit the mobile viewport cleanly. */
  html body .jk-hero__cta {
    gap: 12px !important;
  }
  html body .jk-hero__cta a.jk-btn {
    font-size: 14px !important;
    padding: 15px 20px !important;
    min-height: 54px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }
}
/* Mobile: force a solid (opaque) header at the very top.
   On full-bleed pages Betheme's "transparent header" lets the hero image show
   through the phone/email bar and logo, hurting legibility. Below the mobile
   breakpoint, paint the whole header opaque cream so the hero starts cleanly
   below it. Desktop (>=768px) keeps the transparent-over-hero look.

   EXCEPTION: the HOME page uses a white logo + white contact text designed to
   sit over its dark hero, so a solid cream header would hide them. Exclude
   .home so the homepage keeps its intended transparent light-skin header. */
@media (max-width: 767px) {
  /* double id = high specificity, beats the theme's transparent-header rule */
  html body:not(.home) #Header_wrapper#Header_wrapper {
    background-color: #faf9f7 !important;
    background-image: none !important;
  }
  html body:not(.home) #Header_wrapper #Header,
  html body:not(.home) #Header_wrapper #Action_bar,
  html body:not(.home) #Header_wrapper #Top_bar,
  html body:not(.home) #Header_wrapper .mfn-header-tmpl,
  html body:not(.home) #Header_wrapper .mfn-header-tmpl-inner {
    background-color: #faf9f7 !important;
    background-image: none !important;
  }
}
/* Mobile fix for the custom About hero (.jk-abh "Born from a deep love…").
   On phones its flex row never stacked, so the text column was crushed to
   ~127px on the right with a large empty image area on the left. Below
   Betheme's mobile breakpoint, stack it: full-width text over the background,
   then the full-width team photo. Desktop (>=768px) keeps the side-by-side. */
@media (max-width: 767px) {
  .jk-abh.jk-full {
    flex-direction: column !important;
    align-items: stretch !important;
    min-height: 0 !important;
  }
  .jk-abh .jk-abh__ov {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  .jk-abh .jk-abh__in {
    order: 1;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 30px 33px !important;
    position: relative;
    z-index: 2;
  }
  .jk-abh .jk-abh__im {
    order: 2;
    width: 100% !important;
    height: auto !important;
    position: relative;
    z-index: 2;
  }
  .jk-abh .jk-abh__im img {
    width: 100% !important;
    height: auto !important;
    display: block;
  }
}
/* Mobile margin fix: the custom article header (title + byline + avatar) sits
   outside Betheme's .section_wrapper, so on phones it lost the 33px side gutter
   that body text and images have, and ran flush to the screen edge.
   Give it the same 33px inset below Betheme's mobile breakpoint. Desktop is
   unaffected (the header already aligns there). */
@media (max-width: 767px) {
  body.single-post .jk-arthead {
    box-sizing: border-box !important;
    padding-left: 33px !important;
    padding-right: 33px !important;
  }
}
/* JACKAL — Homepage hero, elevated.
   Brand fonts (Cormorant Garamond + Jost), commanding headline, gold italic
   accent on "Beyond Expectations", brighter gold eyebrow, soft scrim +
   text-shadows for legibility, and restored/rescaled CTA buttons. */

/* Eyebrow: Uganda · Rwanda · Kenya · Tanzania */
#jkHero .jk-kicker{
  font-family: 'Jost', sans-serif !important;
  color: #EBCF94 !important;
  font-size: 13px !important;
  letter-spacing: .34em !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 12px rgba(0,0,0,.6) !important;
}
#jkHero .jk-kicker a{ color: #EBCF94 !important; }
#jkHero .jk-kicker a:hover{ color: #FAF7F2 !important; }
#jkHero .jk-kicker s{ text-decoration: none !important; color: #C29A4E !important; margin: 0 .55em !important; }

/* Headline */
#jkHero h1{
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: clamp(46px, 6vw, 88px) !important;
  font-weight: 600 !important;
  line-height: 1.03 !important;
  letter-spacing: .004em !important;
  color: #FFFFFF !important;
  text-shadow: 0 3px 34px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.45) !important;
  margin-bottom: .28em !important;
}
#jkHero h1 em{
  display: block !important;
  font-style: italic !important;
  font-weight: 500 !important;
  color: #EBCF94 !important;
  text-shadow: 0 3px 30px rgba(0,0,0,.55) !important;
  margin-top: .02em !important;
}

/* Subtitle */
#jkHero .jk-hero__sub{
  font-family: 'Jost', sans-serif !important;
  color: rgba(255,252,247,.95) !important;
  font-size: clamp(16px, 1.35vw, 19px) !important;
  font-weight: 300 !important;
  letter-spacing: .012em !important;
  line-height: 1.85 !important;
  text-shadow: 0 1px 14px rgba(0,0,0,.55) !important;
}

/* Soft centre scrim for legibility. The hero content (.jk-hero__in) must sit
   ABOVE the theme overlay (.jk-hero__ov, z-index:4) so the CTA buttons stay
   clickable; the overlay is decorative, so it ignores pointer events. */
#jkHero .jk-hero__in{ position: relative !important; z-index: 5 !important; }
#jkHero .jk-hero__ov{ pointer-events: none !important; }
#jkHero::after{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(ellipse 68% 62% at 50% 47%, rgba(8,6,4,.44), rgba(8,6,4,0) 72%) !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

/* CTA buttons — sized to complement the larger hero, with the wipe-fill and
   letter-spacing hover effects restored (older snippets had killed them with
   transition:none and shrunk the text). */
html body .jk-hero__cta .jk-btn{
  box-sizing: border-box !important;
  transition: letter-spacing .5s cubic-bezier(.22,1,.36,1),
              color .5s cubic-bezier(.22,1,.36,1),
              border-color .5s cubic-bezier(.22,1,.36,1),
              box-shadow .5s cubic-bezier(.22,1,.36,1) !important;
  font-size: .8rem !important;
  letter-spacing: .2em !important;
  padding: 1rem 2.7rem !important;
  min-height: 62px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  width: auto !important;
  max-width: none !important;
}
html body .jk-hero__cta .jk-btn::before{
  transition: transform .62s cubic-bezier(.22,1,.36,1) !important;
}
html body .jk-hero__cta .jk-btn:hover{ letter-spacing: .25em !important; }
html body .jk-hero__cta .jk-btn--solid:hover{ box-shadow: 0 20px 50px -20px rgba(0,0,0,.75) !important; }

/* JACKAL — Header: no shift, CTA always visible, nav centered.

   1) Reserve the scrollbar gutter so the header never shifts sideways
      between a tall page (scrollbar) and a short one. */
html { scrollbar-gutter: stable; overflow-y: scroll; }

/* 2) Desktop (>=992px): centre the header container (it was pinned left,
      leaving the nav clustered left with a gap before the CTA), give the
      row room, and tighten ONLY the top-level nav's inter-item padding
      (keeping the elegant letter-spacing; dropdown submenus untouched) so
      logo + menu + "Let's Plan" CTA always fit.
      High-specificity selectors beat the site's older header snippets. */
@media (min-width: 992px) {
  html body #Top_bar .container {
    max-width: min(1520px, 96vw) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  html body #Top_bar #menu > ul.menu > li.menu-item > a {
    letter-spacing: .10em !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
  }
}

/* 3) >=1400px (where there is clearance from the logo and CTA): centre the
      nav on the header, so it sits exactly between logo and CTA rather than
      clustered left. Below 1400px the nav stays in normal flow. */
@media (min-width: 1400px) {
  html body #Top_bar { position: relative; }
  html body #Top_bar .menu_wrapper {
    position: absolute !important;
    left: 50% !important;
    top: 0 !important;
    transform: translateX(-50%) !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
  }
}
