/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */
.reset{
    all:initial;
}
.header-image{
    height:100%;
}
.map-button, #ask-evaluation{
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: clip;
    border-radius: 1000px;
    &:hover{
        box-shadow: 0 0px 3px rgba(0, 0, 0, 0.45);
    }
    .elementor-button-icon {
        transition: all 250ms ease-in-out;
        left:0;
        position: absolute;
        top:0;
        width:35px;
        height:100%;
        aspect-ratio: 1;
        width: auto;
        translate:-15%;
        svg {
            height: 100%;
            width: 100%;
        }
    }

    .elementor-button{
        &:before{
            content:'';
            user-select: none;
            pointer-events: none;
            background-color:rgba(255,255,255,0.2);
            inset: 0;
            z-index: 1;
            width:100%;
            height: 100%;
            position: absolute;
            transform: translateX(-100%) scale(0);
            transition: all 300ms ease-in-out;
            border-radius: 1000px;

        }
        &:hover{
            &::before{
                background-color: black;;
                user-select: none;
                pointer-events: none;
                transform: translateX(0%) scale(2);
                border-radius: 0;
            }
        }
    }



    a {
        width: 100%;
        transform-origin: center;
        transition: all 250ms ease-in-out;
        overflow: clip;
        display: block;
    }
    .elementor-button-text{
        transition: 250ms;

    }
    &:hover{
        .elementor-button-icon {
            left: 45%;
        }
        .elementor-button-text{
            opacity: 0;
        }
    }
}
/*
.map-button, #ask-evaluation{
    position: relative;
   .elementor-button-wrapper{
    position: relative;
   }
       border-radius: 1000px;
    overflow: clip;
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.25);
    .elementor-button{
        display:block;
        padding-left:60px!important;
        padding-right: 40px;
        font-weight: 600;
         overflow:clip!important;
         &:before{
        content:'';
        user-select: none;
        pointer-events: none;
        background-color:rgba(255,255,255,0.2);
        inset: 0;
        z-index: 1;
        width:100%;
        height: 100%;
        position: absolute;
        transform: translateX(-100%) scale(0);
        transition: all 300ms ease-in-out;
        border-radius: 1000px;

    }
    border-radius: 100px 100px 100px 100px;
    cursor: pointer;

    }
    .elementor-button-icon {
        position: absolute;
        bottom: 0;
        left: 0;
        top: 0;
        svg{
            width:80px;
            height:80px;
        }

    }
    .elementor-button-text{
    }
    .elementor-button-text, .elementor-button-icon{
        transition:all 400ms ease;
        will-change: transform;
        transform: translateX(0%) translatey(0%);

        opacity: 1;
    }
    .elementor-button-icon{
        transform: translateX(0%) translatey(0%);
    }
    &:hover{
        &::before{
            user-select: none;
            pointer-events: none;
            transform: translateX(0%) scale(2);
            border-radius: 0;
        }
        .elementor-button-text{
            opacity: 0;
        }
        .elementor-button-icon{
            left:50%;
            transform: translateX(-50%) translateY(0%) scale(0.8);
        }
    }
}
*/
body {
    &.home {
        .elementor-location-header {
            

            .header-home {

                
                background-color: transparent!important;
                nav:not(.elementor-menu-toggle.elementor-active + .elementor-nav-menu__container){
                    .elementor-item {
                        color: white!important;
                        &::after {
                            background-color: white!important;
                        }
                    }
                }
            }
            .logo{
                filter: saturate(0) contrast(0) brightness(15);
                transition: 250ms ease-in-out;
            }
            &.custom-sticky {
                .logo{
                    filter: none;
                }
                .header-home {
                    background-color: white!important;

                     nav:not(.elementor-menu-toggle.elementor-active + .elementor-nav-menu__container){
                    .elementor-item {
                        color: black!important;
                        &::after {
                            background-color: black!important;
                        }
                    }
                }
                    .elementor-button{
                        background-color: var(--e-global-color-accent)!important;
                        color:white!important;
                        svg{
                            fill:white;
                        }
                        &:hover{
                            background-color:black!important;
                        }
                    }
                }
                }
        }
    }

    &:not(.home) {
        .elementor-location-header {
            .elementor-nav-menu__container {
                height: auto;
            }

            .header-home {
                z-index: 9;

                &, .logo img {
                    transition: all 200ms ease-in-out;
                }

            .elementor-button{
                background-color: var(--e-global-color-accent);
                color:white;
                svg{
                    fill:white;
                }
                &:hover{
                    background-color: black;
                }
            }
            &.custom-sticky {
                .header-home {
                    background-color: #f5f5f5!important;

                    .elementor-item {
                        color: black;
                    }
                    
                }

                .logo img {
                    width: 100px;
                }
            }
        }
    }
}
}
@keyframes scrolldown {
    from{
        scale:1.4;
        filter: blur(20px);
    }
    to{
        scale:1;
        filter:blur(0px);
    }
}

.home-image{
    overflow: clip;
    &>img{
        scale:1.4;
        filter: blur(20px);
        animation: scrolldown 1s 200ms forwards;
    }
}


::-webkit-scrollbar-track{
    background-color:transparent!important;
}




body:not(.elementor-editor-preview):not(.elementor-editor-active){
    .reveal-text *:is(h1,h2,h3,h4,h5,h6,p){
        visibility: hidden;
    }

    .line {
        position: relative;
        overflow: hidden;
        display:block;
    }



    .reveal-image {
        overflow: hidden;          /* necessario per il clip reveal */
        display: inline-block;     /* o block a seconda del layout */
        clip-path: inset(0 0 100% 0);
        will-change: clip-path opacity;
        transition: clip-path 800ms ease-in-out;
           
        --delay:0;
        transition-delay: var(--delay,0);
        animation-delay: var(--delay,0);

    }

    .reveal-image img {
        opacity: 0;
        filter: blur(16px);
        will-change: transform, filter;
       /* width: 100%; */
        display: block;
           
        --delay:0;
        transition-delay: var(--delay,0);
        animation-delay: var(--delay,0);
    }





}




.custom-coverflow-slider-container img{
    width:100%;
}


.circle-icon-button{
    
    .elementor-button-content-wrapper{
        align-items: center;
    }
    .elementor-button-icon {
        background: black;
        border-radius: 100px;
        padding: 5px;
    }
}

 
.elementor-button-content-wrapper{
    align-items: center;
    .elementor-button-icon  svg{
        height: 1.4rem!important;
        width: 1.4rem!important;
        object-fit: contain;
    }
}

.elementor-button.red-icon{
    .elementor-button-icon  svg{
        color: var(--e-global-color-accent);
        fill:var(--e-global-color-accent);
    }
}


body:not(.elementor-editor-preview):not(.elementor-editor-active) {
    .fadeup {
        transform: translateY(50px);
        opacity: 0;
        transition-property: transform, opacity;
        transition-duration: 1s;
        transition-timing-function: linear;
       
        transition-delay: var(--delay,0);
        animation-delay: var(--delay,0);
    }
    .fadein{
        
        opacity: 0;
        transition-property: opacity;
        transition-duration: 1s;
        transition-timing-function: linear;
        
        transition-delay: var(--delay,0);
        animation-delay: var(--delay,0);
    }
    .mask-from-left {
    overflow: hidden; /* importante per contenere il clip-path */
    }
} 


body:not(.elementor-editor-preview):not(.elementor-editor-active) {
    .fadeup.in-view {
        transform: none;
        opacity: 1;
    }
    .fadein.in-view{
         opacity: 1;
    }
  

}  

.delay-100{ --delay:100ms; }
.delay-200{ --delay:200ms; }
.delay-300{ --delay:300ms; }
.delay-400{ --delay:400ms; }
.delay-500{ --delay:500ms; }
.delay-600{ --delay:600ms; }
.delay-700{ --delay:700ms; }
.delay-800{ --delay:800ms; }
.delay-900{ --delay:900ms; }
.delay-1000{ --delay:1000ms; }
.delay-1100{ --delay:1100ms; }
.delay-1200{ --delay:1200ms; }
.delay-1300{ --delay:1300ms; }


.elementor-widget-image a {
    display: contents;
}


.serbosco-toggle-switch {

    /* il label fa solo da wrapper */
    .jet-checkboxes-list__item {
        display: block;
        width: 100%;
        cursor: pointer;
        user-select: none;
    }

    /* nascondo il checkbox nativo */
    .jet-checkboxes-list__input {
        display: none;
    }

    /* bottone: contenitore pill con spazio a sinistra per il toggle */
    .jet-checkboxes-list__button {
        position: relative;
        display: block;
        padding: 0 0 0 68px; /* left = spazio per switch */
        border:none;
    }

    /* nessun decoratore di Jet */
    .jet-checkboxes-list__decorator {
        display: none;
    }

    /* testo */
    .jet-checkboxes-list__label {
        font-size: 16px;
        font-weight: 500;
        color: #111111;
    }

    /* TRACK del toggle (a sinistra) */
    .jet-checkboxes-list__button::before {
        content: '';
        position: absolute;
        left: 18px;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 24px;
        background: #e5e5e5;
        border-radius: 999px;
        transition: background-color .25s ease;
    }

    /* KNOB del toggle */
    .jet-checkboxes-list__button::after {
        content: '';
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        background: #ffffff;
        border-radius: 50%;
        box-shadow: 0 1px 4px rgba(0,0,0,.25);
        transition: transform .25s ease;
    }

    /* STATO ON: cambio colore track + sposto knob a destra */
    .jet-checkboxes-list__input:checked + .jet-checkboxes-list__button::before {
        background: #111111;
    }

    .jet-checkboxes-list__input:checked + .jet-checkboxes-list__button::after {
        transform: translate(22px, -50%);
    }
}


/** MEGA MENU **/
.mega-menu {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.6s cubic-bezier(.77,0,.18,1);
    background: #f5c84b; /* giallo */
}

.mega-menu.is-open {
    clip-path: inset(0 0 0 0);
}

.site-header {
    transition: background-color 0.4s ease;
}

.site-header.menu-open {
    background-color: #f5c84b;
}

.scroll-arrow {
    position: absolute;
    background: #000!important;
    top:50%;
    transform:translateY(-50%);
    color: #fff!important;
    width: 40px!important;
    height: 40px!important;
    aspect-ratio: 1;
    border-radius: 999px!important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border:none;
    z-index: 10;
    padding:0!important;
}

.scroll-arrow.left { left: 8px; }
.scroll-arrow.right { right: 8px; }

.top-bar-wrapper{
    transition:all 200ms ease-in-out;
}

.elementor-location-header:has(.top-bar-wrapper){
    background:white;
}

body:has(.e-off-canvas[aria-hidden="false"]){
    .top-bar-wrapper{
        opacity: 0;
        user-select: none;
        pointer-events: none;

    }
    .elementor-location-header:has(.top-bar-wrapper){
        background:transparent!important;
    }
}

body:has(.e-off-canvas.animated-reverse-wrapper){
    .top-bar-wrapper{
    transition:all 200ms 0.7s ease-in-out;
    }
}