/* IBS Tour Page Enhancer v1.0.17 — responsive safeguards for pages containing an IBS Gallery.
   Desktop geometry is intentionally untouched. */
body.ibs-tpe-has-gallery .entry-content,
body.ibs-tpe-has-gallery .elementor,
body.ibs-tpe-has-gallery .elementor-section,
body.ibs-tpe-has-gallery .elementor-column,
body.ibs-tpe-has-gallery .elementor-widget-wrap{min-width:0}

@media (max-width:1024px){
  /* Fallback for Astra/default-template pages: keep the designed Elementor H1 and suppress the duplicate theme title. */
  body.ibs-tpe-has-gallery .entry-header .entry-title{display:none!important}

  body.ibs-tpe-has-gallery .elementor-widget-text-editor,
  body.ibs-tpe-has-gallery .elementor-widget-icon-list,
  body.ibs-tpe-has-gallery .elementor-widget-heading{overflow-wrap:anywhere;word-break:normal}

  /* Keep hand-built CTA buttons inside the viewport without changing their desktop appearance. */
  body.ibs-tpe-has-gallery .elementor-widget-text-editor a[style*="background: #FFA500"],
  body.ibs-tpe-has-gallery .elementor-widget-text-editor a[style*="background:#FFA500"]{
    max-width:100%!important;
    white-space:normal!important;
    line-height:1.3!important;
    text-align:center!important;
  }

  /* Astra footer already stacks; reduce large inline desktop font sizes so the stacked version remains readable. */
  body.ibs-tpe-has-gallery footer .ast-builder-html-element span[style*="font-size"]{
    font-size:clamp(20px,3.2vw,28px)!important;
    line-height:1.25!important;
  }
}

@media (max-width:767px){
  /* Three-column temple-name blocks become a readable two-column list on phones. */
  body.ibs-tpe-has-gallery .elementor-widget-text-editor [style*="grid-template-columns:1fr 1fr 1fr"],
  body.ibs-tpe-has-gallery .elementor-widget-text-editor [style*="grid-template-columns: 1fr 1fr 1fr"]{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    column-gap:10px!important;
    row-gap:8px!important;
  }
  body.ibs-tpe-has-gallery .elementor-widget-text-editor [style*="grid-template-columns:1fr 1fr 1fr"] > *,
  body.ibs-tpe-has-gallery .elementor-widget-text-editor [style*="grid-template-columns: 1fr 1fr 1fr"] > *{
    min-width:0!important;
    text-align:left!important;
    overflow-wrap:anywhere!important;
  }

  body.ibs-tpe-has-gallery footer .ast-builder-html-element p{text-align:center!important}
  body.ibs-tpe-has-gallery footer .ast-builder-html-element span[style*="font-size"]{
    font-size:clamp(18px,5.6vw,23px)!important;
  }
}

/* v1.0.13 — CTA visibility, related-tour image consistency, and mobile story order. */
.ibs-tpe-early-cta{width:100%;max-width:1140px;margin:10px auto 14px;padding:0 10px;text-align:center;box-sizing:border-box}
.ibs-tpe-early-cta-button{display:block;width:100%;box-sizing:border-box;padding:13px 18px;border-radius:8px;background:#FFA500;color:#fff!important;text-decoration:none!important;font-weight:800;line-height:1.25;letter-spacing:.01em;box-shadow:0 2px 7px rgba(0,0,0,.15)}
.ibs-tpe-early-cta-button:hover,.ibs-tpe-early-cta-button:focus{filter:brightness(.96);color:#fff!important}
.ibs-tpe-sticky-cta{position:fixed;right:20px;bottom:18px;z-index:99990;opacity:0;visibility:hidden;transform:translateY(18px);transition:opacity .22s ease,transform .22s ease,visibility .22s ease;pointer-events:none}
.ibs-tpe-sticky-cta.is-visible{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}
.ibs-tpe-sticky-cta a{display:block;padding:11px 18px;border-radius:24px;background:#FFA500;color:#fff!important;text-decoration:none!important;font-size:14px;font-weight:800;line-height:1.15;box-shadow:0 4px 18px rgba(0,0,0,.24)}

/* Keep the four related-tour card images visually equal even when source dimensions differ. */
body.page-id-17800 .elementor-element-99b2a4b>.elementor-container>.elementor-column>.elementor-widget-wrap>.elementor-widget-image .elementor-widget-container{width:100%;overflow:hidden}
body.page-id-17800 .elementor-element-99b2a4b>.elementor-container>.elementor-column>.elementor-widget-wrap>.elementor-widget-image img{display:block!important;width:100%!important;height:auto!important;aspect-ratio:4/3!important;object-fit:cover!important;object-position:center!important}

@media (max-width:767px){
  .ibs-tpe-early-cta{margin:8px auto 12px;padding:0 4px}
  .ibs-tpe-early-cta-button{padding:12px 10px;font-size:14px}
  .ibs-tpe-sticky-cta{left:0;right:0;bottom:0;padding:7px 8px calc(7px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);box-shadow:0 -2px 12px rgba(0,0,0,.14);text-align:center}
  .ibs-tpe-sticky-cta a{border-radius:7px;padding:11px 12px;font-size:14px}
  body.ibs-tpe-mobile-reordered{padding-bottom:56px}
  body.ibs-tpe-mobile-reordered .ibs-tpe-mobile-cost-wrap,body.ibs-tpe-mobile-reordered .ibs-tpe-mobile-why-wrap{width:100%;margin:0;padding:0}
  body.ibs-tpe-mobile-reordered .ibs-tpe-mobile-cost-wrap>.elementor-container,body.ibs-tpe-mobile-reordered .ibs-tpe-mobile-why-wrap>.elementor-container{display:block!important;width:100%!important;max-width:100%!important}
  body.ibs-tpe-mobile-reordered .ibs-tpe-mobile-cost-wrap .elementor-element-e1b82c0,body.ibs-tpe-mobile-reordered .ibs-tpe-mobile-why-wrap .elementor-element-f3bfaf7{width:100%!important;max-width:100%!important}
}

/* v1.0.16 — CTA geometry and tablet/mobile content-order support. */
.ibs-tpe-early-cta-section{width:100%;margin:0!important;padding:0!important}
.ibs-tpe-early-cta-section>.elementor-container{display:block!important;width:100%;margin-left:auto!important;margin-right:auto!important}
.ibs-tpe-early-cta-section .ibs-tpe-early-cta{width:100%!important;max-width:none!important;margin:18px 0 17px!important;padding:0 10px!important;box-sizing:border-box!important}

/* Quick Facts: the four compact cards must begin at the same top line as Call Us. */
body.page-id-17800 .elementor-element-f84ab20>.elementor-container{align-items:stretch!important}
body.page-id-17800 .elementor-element-f84ab20>.elementor-container>.elementor-element-229b14a>.elementor-widget-wrap,
body.page-id-17800 .elementor-element-f84ab20>.elementor-container>.elementor-element-cd4c68b>.elementor-widget-wrap,
body.page-id-17800 .elementor-element-f84ab20>.elementor-container>.elementor-element-ebc6860>.elementor-widget-wrap,
body.page-id-17800 .elementor-element-f84ab20>.elementor-container>.elementor-element-5a495c5>.elementor-widget-wrap{align-content:flex-start!important;align-items:flex-start!important}

@media(max-width:1024px){
  body.ibs-tpe-compact-reordered .ibs-tpe-tourstart-wrap,
  body.ibs-tpe-compact-reordered .ibs-tpe-cost-wrap,
  body.ibs-tpe-compact-reordered .ibs-tpe-why-wrap{width:100%;margin:0;padding:0}
  body.ibs-tpe-compact-reordered .ibs-tpe-tourstart-wrap>.elementor-container,
  body.ibs-tpe-compact-reordered .ibs-tpe-cost-wrap>.elementor-container,
  body.ibs-tpe-compact-reordered .ibs-tpe-why-wrap>.elementor-container{display:block!important;width:100%!important;max-width:1140px;margin-left:auto!important;margin-right:auto!important}
  body.ibs-tpe-compact-reordered .elementor-element-5af2b08,
  body.ibs-tpe-compact-reordered .elementor-element-e1b82c0,
  body.ibs-tpe-compact-reordered .elementor-element-f3bfaf7,
  body.ibs-tpe-compact-reordered .elementor-element-4518762,
  body.ibs-tpe-compact-reordered .elementor-element-5f4a952{width:100%!important;max-width:100%!important;flex:0 0 100%!important}
  body.ibs-tpe-compact-reordered .ibs-tpe-tourstart-wrap,
  body.ibs-tpe-compact-reordered .ibs-tpe-cost-wrap,
  body.ibs-tpe-compact-reordered .ibs-tpe-why-wrap{margin-top:0!important;margin-bottom:0!important}
}

@media(max-width:767px){
  .ibs-tpe-early-cta-section .ibs-tpe-early-cta{margin:14px 0 14px!important;padding:0 10px!important}
}

/* v1.0.17 — reusable corrected tour-information template refinements. */

/* The CTA under “Your Dates, Your Pilgrimage” fills the exact content column. */
body.ibs-tpe-has-gallery .elementor-element-5b7d351 .elementor-widget-container>p,
body.ibs-tpe-has-gallery .elementor-element-5b7d351 .elementor-widget-container>p>span,
body.ibs-tpe-has-gallery .elementor-element-5b7d351 .elementor-widget-container>p>span>strong{
  display:block!important;width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important;
}
body.ibs-tpe-has-gallery .elementor-element-5b7d351 a[href]{
  display:block!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important;text-align:center!important;
}

/* Quick Facts: make the four information cards true equal-height peers of the Call Us block on desktop. */
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container{align-items:stretch!important}
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-229b14a,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-cd4c68b,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-ebc6860,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-5a495c5{align-self:stretch!important}
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-229b14a>.elementor-widget-wrap,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-cd4c68b>.elementor-widget-wrap,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-ebc6860>.elementor-widget-wrap,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-5a495c5>.elementor-widget-wrap{height:100%!important;align-content:stretch!important;align-items:stretch!important}
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-229b14a .elementor-widget-icon-box,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-cd4c68b .elementor-widget-icon-box,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-ebc6860 .elementor-widget-icon-box,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-5a495c5 .elementor-widget-icon-box{height:100%!important;width:100%!important;display:flex!important}
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-229b14a .elementor-widget-container,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-cd4c68b .elementor-widget-container,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-ebc6860 .elementor-widget-container,
body.ibs-tpe-has-gallery .elementor-element-f84ab20>.elementor-container>.elementor-element-5a495c5 .elementor-widget-container{width:100%!important;height:100%!important;display:flex!important}
body.ibs-tpe-has-gallery .elementor-element-f84ab20 .elementor-widget-icon-box .elementor-icon-box-wrapper{width:100%!important;min-height:100%!important;display:flex!important;flex-direction:column!important;justify-content:center!important;padding-bottom:18px!important}
.ibs-tpe-quickfact-note{margin:10px 12px 0!important;padding-top:9px!important;border-top:1px solid rgba(139,195,74,.35)!important;color:#555!important;font-size:13px!important;line-height:1.35!important;font-weight:600!important;text-align:center!important}

/* Lower temple-tour description uses full justification. */
body.ibs-tpe-has-gallery .ibs-tpe-temple-description .elementor-widget-container,
body.ibs-tpe-has-gallery .ibs-tpe-temple-description p{text-align:justify!important;text-justify:inter-word!important}

/* Mid-page decision CTA: appears at the end of the temple-photo/description column before Temple eServices when columns stack. */
.ibs-tpe-mid-cta{width:100%;box-sizing:border-box;margin:18px 0 16px;padding:0;text-align:center}
.ibs-tpe-mid-cta a{display:block;width:100%;box-sizing:border-box;padding:13px 16px;border-radius:8px;background:#FFA500;color:#fff!important;text-decoration:none!important;font-weight:800;line-height:1.25;box-shadow:0 2px 7px rgba(0,0,0,.15)}
.ibs-tpe-mid-cta a:hover,.ibs-tpe-mid-cta a:focus{filter:brightness(.96);color:#fff!important}

/* Related-tour image frames are template rules, not Page-17800-only rules. */
body.ibs-tpe-has-gallery .elementor-element-99b2a4b>.elementor-container>.elementor-column>.elementor-widget-wrap>.elementor-widget-image .elementor-widget-container{width:100%;overflow:hidden}
body.ibs-tpe-has-gallery .elementor-element-99b2a4b>.elementor-container>.elementor-column>.elementor-widget-wrap>.elementor-widget-image img{display:block!important;width:100%!important;height:auto!important;aspect-ratio:4/3!important;object-fit:cover!important;object-position:center!important}

/* The lower IBS-controlled temple carousel belongs to the same visual system as the upper gallery. */
body.ibs-tpe-has-gallery .elementor-element-d718890 .ibs-tpe-gallery{margin:0 0 14px!important}
body.ibs-tpe-has-gallery .elementor-element-d718890 .ibs-tpe-gallery>.ibs-tpe-dots{bottom:11px!important}

@media(max-width:1024px){
  .ibs-tpe-mid-cta{margin:16px 0 18px!important}
  body.ibs-tpe-has-gallery .elementor-element-f84ab20 .elementor-widget-icon-box .elementor-icon-box-wrapper{min-height:150px!important;padding-bottom:14px!important}
}
@media(max-width:767px){
  .ibs-tpe-mid-cta{margin:14px 0 16px!important}
  .ibs-tpe-mid-cta a{padding:12px 10px;font-size:14px}
  .ibs-tpe-quickfact-note{font-size:12px!important;margin-top:8px!important;padding-top:7px!important}
}


/* v1.0.18 — balance the temple/eServices row and reuse the fix on cloned tour pages. */
body.ibs-tpe-has-gallery .ibs-tpe-upper-book-tour{
  width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
}
body.ibs-tpe-has-gallery .ibs-tpe-upper-book-tour .elementor-widget-container{
  width:100%!important;
}
body.ibs-tpe-has-gallery .ibs-tpe-upper-book-tour .elementor-heading-title{
  width:100%!important;
  box-sizing:border-box!important;
}
body.ibs-tpe-has-gallery .ibs-tpe-more-tours-box{
  margin-top:0!important;
  margin-bottom:0!important;
  border:1px solid #d8e5c8!important;
  border-left:4px solid #86bd3f!important;
  background:#fffdf5!important;
  box-shadow:0 2px 8px rgba(0,0,0,.08)!important;
}
body.ibs-tpe-has-gallery .ibs-tpe-more-tours-box>.elementor-widget-container{
  padding:14px 15px 13px!important;
  text-align:justify!important;
  text-justify:inter-word!important;
  color:#222!important;
  line-height:1.55!important;
}
body.ibs-tpe-has-gallery .ibs-tpe-more-tours-content p{
  margin:0 0 10px!important;
}
body.ibs-tpe-has-gallery .ibs-tpe-more-tours-content ul{
  margin:7px 0 11px 20px!important;
  padding:0!important;
}
body.ibs-tpe-has-gallery .ibs-tpe-more-tours-content li{
  margin:0 0 6px!important;
}
body.ibs-tpe-has-gallery .ibs-tpe-more-tours-content li::marker{
  color:#8BC34A;
}
body.ibs-tpe-has-gallery .ibs-tpe-more-tours-last{
  margin-bottom:0!important;
}
@media(max-width:1024px){
  body.ibs-tpe-has-gallery .ibs-tpe-upper-book-tour{
    margin-top:12px!important;
  }
  body.ibs-tpe-has-gallery .ibs-tpe-more-tours-box>.elementor-widget-container{
    padding:13px 14px!important;
  }
}

/* v1.0.18 template-safe lower gallery: the lower five-photo block is now a native Elementor Image Carousel.
   Keep it responsive and prevent a3 Lazy Load/optimizer styling from collapsing non-active slides. */
body.ibs-tpe-has-gallery .elementor-element-eded283.elementor-widget-image-carousel{overflow:hidden!important;margin-bottom:14px!important}
body.ibs-tpe-has-gallery .elementor-element-eded283 .swiper,
body.ibs-tpe-has-gallery .elementor-element-eded283 .swiper-container{width:100%!important;max-width:100%!important;overflow:hidden!important}
body.ibs-tpe-has-gallery .elementor-element-eded283 .swiper-slide{height:auto!important}
body.ibs-tpe-has-gallery .elementor-element-eded283 .swiper-slide img{display:block!important;width:100%!important;height:auto!important;aspect-ratio:4/3!important;object-fit:cover!important}
