/*------------------------------*/
/* SCROLL REVEAL                */
/*------------------------------*/
/* elements are marked by custom_js/scroll_reveal.js with data-sr="<animation>" and get the class "sr-visible"
   when they enter the viewport; after the animation the script removes data-sr, so the element gets back exactly
   its own styles (Webflow transitions, filters, hover effects etc.)
   independent from the Webflow files (webflow.css / webflow.js)
   the animations use the individual "translate" / "scale" properties (not "transform"), so they never overwrite
   a transform set by Webflow (ex: .left_image_info_container { transform: translate(0, -100%) }) */

/* smooth scrolling for anchor links (ex: #proiect_galerie_section) */
html
{
    scroll-behavior: smooth;
}

/* the hidden elements moved to the right (fade-right) must not make the page wider than the screen:
   on mobile a wider page also makes the fixed fullscreen layers wider (ex: Fancybox gallery not centered,
   its buttons and right arrow cut off); "clip" doesn't create a scroll container (position: sticky keeps working) */
body
{
    overflow-x: clip;
}

/* common hidden state */
[data-sr]
{
    opacity: 0;

    transition-property: opacity, translate, scale, filter, clip-path;
    transition-duration: var(--sr-duration, 900ms);
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--sr-delay, 0ms);

    will-change: opacity, translate;
}

/* animations - start state */

/* only opacity (the common hidden state) */
[data-sr="fade-in"]
{
}

[data-sr="fade-up"]
{
    translate: 0 40px;
}

[data-sr="fade-down"]
{
    translate: 0 -40px;
}

[data-sr="fade-left"]
{
    translate: -60px 0;
}

[data-sr="fade-right"]
{
    translate: 60px 0;
}

[data-sr="zoom-in"]
{
    scale: 0.92;
}

[data-sr="pop"]
{
    scale: 0.8;
}

[data-sr="blur-up"]
{
    translate: 0 30px;
    filter: blur(10px);
}

/* image / background reveal: the element is "uncovered" from the center to the edges */
[data-sr="clip-reveal"]
{
    opacity: 1;
    clip-path: inset(15% 10% 15% 10% round 24px);
    scale: 1.04;
}

/* animations - end state (element in viewport) */
[data-sr].sr-visible
{
    opacity: 1;
    translate: 0 0;
    scale: 1;
}

[data-sr="blur-up"].sr-visible
{
    filter: blur(0);
}

[data-sr="clip-reveal"].sr-visible
{
    clip-path: inset(0 0 0 0 round 0);
}

/* buttons: subtle lift on hover (after the reveal, when data-sr is removed) */
.sr-hover-lift
{
    transition: translate 250ms ease, background-color 250ms ease, color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.sr-hover-lift:not([data-sr]):hover
{
    translate: 0 -3px;
}

/* mobile: the elements one under the other slide up instead of from the sides (no horizontal movement) */
@media screen and (max-width: 767px)
{
    [data-sr="fade-left"],
    [data-sr="fade-right"]
    {
        translate: 0 40px;
    }
}

/* users that prefer reduced motion: no animations (scroll_reveal.js doesn't mark the elements either) */
@media (prefers-reduced-motion: reduce)
{
    html
    {
        scroll-behavior: auto;
    }

    [data-sr]
    {
        opacity: 1 !important;
        translate: none !important;
        scale: none !important;
        filter: none !important;
        clip-path: none !important;
        transition: none !important;
    }

    .sr-hover-lift:hover
    {
        translate: none;
    }
}

/*------------------------------*/
