/*
Theme Name: JoyJozi Theme Update v0.8.5
Theme URI: https://joyjozi.co.za/
Description: Elementor-safe JoyJozi child theme repair and site hardening. Keeps Elementor editable and fixes known homepage, Instagram, mobile footer, staging URL and responsive typography issues.
Author: JoyJozi
Template: joyjozi-theme
Version: 0.8.5
Text Domain: joyjozi-v085
*/

/* Keep the disliked legacy beige out of the homepage even before the one-time
   database migration has been run. The migration can still remove it at source. */
#joy-home-v40{
  --jj-beige:#eef3f1!important;
}

/* Small repeated ticket/scallop transitions. */
#joy-home-v40 .jj-recognition:after,
#joy-home-v40 .jj-review-spotlight:before{
  height:44px!important;
  bottom:-1px!important;
  background-size:88px 44px!important;
}

#joy-home-v40 .jj-play{position:relative}
#joy-home-v40 .jj-play:before{
  content:"";
  position:absolute;
  z-index:3;
  left:-2%;
  right:-2%;
  top:-1px;
  height:44px;
  pointer-events:none;
  background:radial-gradient(ellipse at 50% 100%,transparent 0 49%,var(--jj-purple,#bea0b3) 51%) 0 0/88px 44px repeat-x;
  transform:translateY(-43px);
}

/* Homepage food image: always fill the media panel without distortion. */
#joy-home-v40 .jj-food-image,
#joy-home-v40 .jj-food-image picture{
  display:block;
  width:100%;
  height:100%;
}
#joy-home-v40 .jj-food-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

/* Homepage scripted adults line. */
#joy-home-v40 .jj-hero-tagline .jj-home-adults{
  display:block;
  width:max-content;
  max-width:100%;
  margin-top:.04em;
  padding-right:.06em;
  color:var(--jj-pink,#ed7685);
  font-family:"Allison","Brush Script MT",cursive;
  font-size:2.35em;
  font-weight:400;
  line-height:.74;
  overflow:visible;
}

/* Contact: keep script copy below the bold line. */
.jj-contact-help-fixed{
  overflow:visible!important;
}
.jj-contact-help-fixed .jj-contact-help-main,
.jj-contact-help-fixed .jj-contact-help-script{
  display:block;
}
.jj-contact-help-fixed .jj-contact-help-script{
  width:fit-content;
  max-width:100%;
  margin-top:.06em;
  padding:0 .08em .12em 0;
  color:#ed7685;
  font-family:"Allison","Brush Script MT",cursive;
  font-size:1.18em;
  font-weight:400;
  line-height:.8;
  overflow:visible;
}

/* Parties: script accents sit below bold headings and never clip. */
#jj-party-page .jjp-title,
#jj-party-page .jjp-hero h1{
  overflow:visible!important;
}
#jj-party-page .jjp-title em,
#jj-party-page .jjp-hero h1 em,
#jj-party-page #jjp-faq-title .jjp-faq-script-line{
  display:block!important;
  width:fit-content!important;
  max-width:100%!important;
  margin:.07em 0 .08em .02em!important;
  padding:0 .08em .12em 0!important;
  line-height:.82!important;
  white-space:normal!important;
  overflow:visible!important;
}
@media(min-width:561px){
  #jj-party-page #jjp-faq-title .jjp-faq-script-line{
    white-space:nowrap!important;
  }
}

/* Parties gallery: fill the orange cheesecake card more confidently. */
#jj-party-page .jjp-gallery-card:nth-child(2){overflow:hidden!important}
#jj-party-page .jjp-gallery-card:nth-child(2) img{
  transform:scale(1.30)!important;
  transform-origin:50% 50%!important;
}
#jj-party-page .jjp-gallery-card:nth-child(2):hover img{
  transform:scale(1.36)!important;
}

/* Parties venue: lighter panel with high-contrast facility tags. */
#jj-party-page .jjp-venue{
  background:linear-gradient(135deg,#eef8f7 0%,#d5efec 44%,#bfe7e4 100%)!important;
  color:var(--jj-main,#517772)!important;
}
#jj-party-page .jjp-venue-copy .jjp-eyebrow,
#jj-party-page .jjp-venue-copy .jjp-title,
#jj-party-page .jjp-venue-copy p{
  color:var(--jj-main,#517772)!important;
}
#jj-party-page .jjp-venue-copy .jjp-title em{
  color:var(--jj-pink,#ed7685)!important;
}
#jj-party-page .jjp-venue-photo:after{
  background:linear-gradient(90deg,transparent 58%,rgba(191,231,228,.98) 100%)!important;
}
#jj-party-page .jjp-venue .jjp-facilities{
  gap:10px!important;
}
#jj-party-page .jjp-venue .jjp-facilities span{
  padding:9px 13px!important;
  border:1.5px solid var(--jj-main,#517772)!important;
  border-radius:999px!important;
  background:var(--jj-main,#517772)!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:700!important;
  letter-spacing:.015em!important;
  line-height:1.15!important;
  box-shadow:0 3px 0 rgba(81,119,114,.14)!important;
}

/* Mobile footer hardening: prevent overflow without flattening every Elementor
   widget to 100% width (the older rule could itself damage the layout). */
@media(max-width:767px){
  html,body{
    max-width:100%;
    overflow-x:hidden;
  }

  .elementor-location-footer,
  .elementor-location-footer .elementor,
  .elementor-location-footer .e-con,
  .elementor-location-footer .e-con-inner,
  .elementor-location-footer .elementor-container,
  .elementor-location-footer .elementor-row,
  footer.site-footer,
  footer.site-footer .container,
  footer.site-footer .row{
    max-width:100%!important;
    min-width:0!important;
  }

  .elementor-location-footer .elementor-column,
  footer.site-footer [class*="col-"]{
    min-width:0!important;
    max-width:100%!important;
  }

  .elementor-location-footer .elementor-widget,
  .elementor-location-footer .elementor-widget-container{
    min-width:0!important;
    max-width:100%!important;
  }

  .elementor-location-footer img,
  footer.site-footer img{
    max-width:min(240px,82vw)!important;
    height:auto!important;
  }

  .elementor-location-footer ul,
  .elementor-location-footer nav ul,
  footer.site-footer ul{
    max-width:100%!important;
    margin-left:0!important;
    padding-left:0!important;
  }

  .elementor-location-footer a,
  footer.site-footer a{
    overflow-wrap:anywhere;
    word-break:normal;
  }

  #joy-home-v40 .jj-recognition:after,
  #joy-home-v40 .jj-review-spotlight:before{
    height:32px!important;
    background-size:64px 32px!important;
  }

  #joy-home-v40 .jj-play:before{
    height:32px;
    background-size:64px 32px;
    transform:translateY(-31px);
  }

  /* On small screens, script accents always sit safely beneath the bold line. */
  #joy-home-v40 h1 em,
  #joy-home-v40 h2 em,
  #joy-home-v40 h3 em{
    display:block!important;
    width:fit-content!important;
    max-width:100%!important;
    margin:.06em 0 .08em!important;
    padding:0 .08em .12em 0!important;
    line-height:.82!important;
    white-space:normal!important;
    overflow:visible!important;
  }

  #joy-home-v40 .jj-hero-tagline .jj-home-adults{
    font-size:2.55em;
  }

  #jj-party-page .jjp-venue-photo:after{
    background:linear-gradient(0deg,rgba(191,231,228,.98) 0%,rgba(191,231,228,.62) 16%,transparent 42%)!important;
  }

  #jj-party-page .jjp-venue .jjp-facilities{
    gap:7px!important;
  }
  #jj-party-page .jjp-venue .jjp-facilities span{
    padding:8px 11px!important;
    font-size:10px!important;
  }

  #jj-party-page .jjp-gallery-card:nth-child(2) img,
  #jj-party-page .jjp-gallery-card:nth-child(2):hover img{
    transform:scale(1.24)!important;
  }

  .jj-contact-help-fixed .jj-contact-help-script{
    font-size:1.12em;
  }
}
