/* A Star Design Studio 2.4 — independent sticky columns and type-aware motion */

/* v2.3 made FAQ headings sticky by default. In 2.4 sticky is an explicit,
   separately editable option, so non-sticky sections return to normal flow. */
.asds-builder-faq-shell>.asds-builder-heading{
  position:relative;
  top:auto;
}

/* overflow:hidden creates a scrolling ancestor and prevents CSS sticky.
   overflow:clip retains visual clipping without creating that scroll container. */
.asds-builder-section.asds-has-sticky{
  overflow:clip!important;
}
@supports not (overflow:clip){
  .asds-builder-section.asds-has-sticky{overflow:visible!important}
}
.asds-sticky-parent{
  overflow:visible!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
}

/* The JS helper adds this attribute to the exact editable column selected in admin. */
.asds-builder-section [data-asds-section-sticky-target]{
  align-self:start;
  height:max-content;
}

@media(min-width:1101px){
  .asds-builder-section.asds-has-sticky:not(.asds-sticky-disabled) [data-asds-section-sticky-target]{
    position:-webkit-sticky!important;
    position:sticky!important;
    top:calc(var(--asds-section-sticky-offset,120px) + var(--asds-admin-bar-height,0px))!important;
  }
}

/* Optional tablet sticky. Desktop-only mode becomes normal flow below 1101px. */
@media(min-width:768px) and (max-width:1100px){
  .asds-builder-section.asds-sticky-device-tablet.asds-has-sticky:not(.asds-sticky-disabled) [data-asds-section-sticky-target]{
    position:-webkit-sticky!important;
    position:sticky!important;
    top:calc(var(--asds-section-sticky-offset,96px) + var(--asds-admin-bar-height,0px))!important;
  }
}

/* Always use natural document flow on phones. */
@media(max-width:767px){
  .asds-builder-section.asds-has-sticky [data-asds-section-sticky-target]{
    position:relative!important;
    top:auto!important;
    height:auto;
  }
}

/* Sticky targets by section type. The attribute is assigned at runtime so this
   remains compatible with Astra, Elementor and page-layout-manager wrappers. */
.asds-builder-section.asds-sticky-disabled [data-asds-section-sticky-target]{
  position:relative!important;
  top:auto!important;
}

/* Prevent animation performance hints from creating a permanent containing block. */
.asds-builder-section.asds-has-sticky [data-asds-section-sticky-target]{
  will-change:auto!important;
  transform-style:flat;
}
.asds-builder-section.asds-has-sticky.asds-gsap-ready [data-asds-section-sticky-target].asds-sticky-animating{
  will-change:transform,opacity!important;
}

/* Keep two-column sticky sections structurally stable. */
.asds-builder-faq-shell,
.asds-builder-image-text,
.asds-builder-hero,
.asds-builder-cta>.asds-builder-container{
  min-width:0;
}
.asds-builder-faq-shell>* ,
.asds-builder-image-text>* ,
.asds-builder-hero>* ,
.asds-builder-cta>.asds-builder-container>*{
  min-width:0;
}

/* Type-aware animation helpers. */
.asds-gsap-ready[data-asds-animation="blur-up"] [data-asds-animate-item],
.asds-gsap-ready[data-asds-animation="clip-reveal"] [data-asds-animate-item],
.asds-gsap-ready[data-asds-animation="card-rise"] [data-asds-animate-item]{
  backface-visibility:hidden;
}

/* Mobile and one-column layouts should never retain sticky spacing. */
@media(max-width:1100px){
  .asds-builder-faq-shell{align-items:stretch}
  .asds-builder-section.asds-sticky-device-desktop [data-asds-section-sticky-target]{
    position:relative!important;
    top:auto!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .asds-builder-section [data-asds-section-sticky-target]{will-change:auto!important}
}
