/* =========================================================
   TRE RANE — CONTENITORE ELEMENTOR
   ========================================================= */

.frog-animation-host {
       overflow: clip !important;
   }

html,
   body {
       width: 100%;
       max-width: 100%;
       overflow-x: clip;
   }
   

/*
 * Questa classe va assegnata al contenitore Elementor
 * sopra cui deve muoversi la rana.
 */
.frog-animation-host {
    position: relative !important;
    overflow: visible !important;
    isolation: isolate;
}

/*
 * Questa classe va assegnata al widget Shortcode.
 *
 * Il widget viene tolto dal flusso e non aggiunge
 * altezza alla pagina.
 */
.elementor-widget-shortcode.frog-animation-overlay {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    z-index: 30 !important;
    pointer-events: none !important;
}

.elementor-widget-shortcode.frog-animation-overlay
> .elementor-widget-container {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;
    pointer-events: none !important;
}


/* =========================================================
   ANIMAZIONE
   ========================================================= */

.frog-scroll-animation {
    --frog-size: clamp(120px, 12vw, 195px);

    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow: visible;
    pointer-events: none;
}

.frog-scroll-animation__stage {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow: visible;
    pointer-events: none;
}

.frog-scroll-animation__canvas {
    position: absolute;
    top: 0;
    left: 0;

    display: block;

    width: var(--frog-size);
    height: var(--frog-size);

    opacity: 0;
    visibility: hidden;

    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);

    transform-origin: center center;
    -webkit-transform-origin: center center;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    will-change: transform, opacity;

    z-index: 30;
    pointer-events: none;
}

/*
 * Il canvas appare quando i dieci frame
 * sono stati caricati.
 */
.frog-scroll-animation.is-loaded
.frog-scroll-animation__canvas {
    opacity: 1;
    visibility: visible;
}


/* =========================================================
   DIMENSIONI RANE
   ========================================================= */

/* Desktop */
   .frog-scroll-animation,
   .frog-scroll-animation--tiny,
   .frog-scroll-animation--small,
   .frog-scroll-animation--medium,
   .frog-scroll-animation--large {
       --frog-size: min(500px, 100vw);
   }
   
   /* Tablet */
   @media (max-width: 1024px) {
       .frog-scroll-animation,
       .frog-scroll-animation--tiny,
       .frog-scroll-animation--small,
       .frog-scroll-animation--medium,
       .frog-scroll-animation--large {
           --frog-size: min(425px, 90vw);
       }
   }
   
   /* Mobile: massimo 375px */
   @media (max-width: 767px) {
       .frog-scroll-animation,
       .frog-scroll-animation--tiny,
       .frog-scroll-animation--small,
       .frog-scroll-animation--medium,
       .frog-scroll-animation--large {
           --frog-size: min(375px, 90vw);
       }
   }


/* =========================================================
   RIDUZIONE MOVIMENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .frog-scroll-animation__canvas {
        opacity: 1;
        visibility: visible;
    }
}