/* 
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 */

/* =====================================================
   BEFORE / AFTER HERO
===================================================== */

.before-after-hero {
    width: 100%;
    overflow: hidden;
}


/* =====================================================
   STAGE
===================================================== */

.comparison-stage {
    --slider-position: 0%;
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}


/* =====================================================
   BEFORE IMAGE
===================================================== */

.comparison-stage .before-image {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1;
    pointer-events: none !important;
}


.comparison-stage .before-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
}


/* =====================================================
   AFTER IMAGE
===================================================== */

.comparison-stage .after-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2;
    pointer-events: none !important;
    clip-path: inset(
        0
        calc(100% - var(--slider-position))
        0
        0
    );

    opacity: 1;
    filter: blur(0);
    transition:
        opacity .32s ease,
        filter .32s ease;
}

.comparison-stage .after-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
}


/* =====================================================
   TEMPLATE CHANGE ANIMATION
===================================================== */

.comparison-stage .after-image.is-changing {
    opacity: 0.08;
    filter: blur(3px);
    transition-duration: .18s;
}


/* =====================================================
   VERTIKALNA LINIJA
===================================================== */

.comparison-stage::after {
    content: "";
    position: absolute;
    top: 0;
    left: var(--slider-position);
    width: 1px;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}


/* =====================================================
   SVG STRELICE / HANDLE
===================================================== */

.comparison-stage::before {
    content: "";
    position: absolute;
    top: 50%;
    left: var(--slider-position);
    width: 120px;
    height: 70px;
    background-image: url('/wp-content/uploads/2026/09/strelice.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform: translate(
        calc(-50% - 0px),
        -48%
    );
    z-index: 11;

    pointer-events: none;
}


/* =====================================================
   AUTO INTRO ANIMACIJA
===================================================== */

.comparison-stage.slider-intro .after-image {
    transition:
        clip-path 2.2s cubic-bezier(.65, 0, .35, 1),
        opacity .32s ease,
        filter .32s ease;
}

.comparison-stage.slider-intro::after,
.comparison-stage.slider-intro::before {
    transition:
        left 2.2s cubic-bezier(.65, 0, .35, 1);
}


/* =====================================================
   DRAG STATE
===================================================== */

.comparison-stage.is-dragging {
    cursor: grabbing;
}


/* =====================================================
   ELEMENTOR HTML WIDGET WRAPPER
===================================================== */

.comparison-stage .template-switcher-widget {
    position: absolute !important;
    right: 24px !important;
    bottom: 24px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}


.comparison-stage
.template-switcher-widget
.elementor-widget-container {
    position: relative;
    width: auto;
    overflow: visible !important;
    pointer-events: auto !important;
}

/* =====================================================
   TEMPLATE SWITCHER
===================================================== */

.template-switcher {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 64px;
    z-index: 101;
    pointer-events: auto !important;
    touch-action: manipulation;
}


/* =====================================================
   THUMB BUTTONS
===================================================== */

.template-toggle,
.template-option {
    position: relative;
    display: block;
    width: 64px;
    height: 64px;
    padding: 0;
    margin: 0;
    border: 2px solid rgba(255,255,255,.9);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,.18);
    pointer-events: auto !important;
    appearance: none;
    -webkit-appearance: none;
}


.template-toggle img,
.template-option img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}


.template-toggle:hover, .template-toggle:focus, .template-switcher [type=button]:hover { background: #fff }

/* =====================================================
   OPCIJE IZNAD GLAVNOG THUMBA
===================================================== */

.template-options {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility .25s ease;
    pointer-events: none;
    z-index: 102;
}

.template-switcher.is-open .template-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}


/* =====================================================
   HOVER
===================================================== */

@media (hover: hover) and (pointer: fine) {

    .template-toggle,
    .template-option {
        transition:
            transform .2s ease,
            box-shadow .2s ease;
    }


    .template-toggle:hover,
    .template-option:hover {
        transform: scale(1.05);

        box-shadow:
            0 6px 20px rgba(0,0,0,.22);
    }

}


/* =====================================================
   MOBILE
===================================================== */
@media (max-width: 767px) {

    /* Slider i dalje dozvoljava vertikalni scroll stranice */
    .comparison-stage {
        touch-action: pan-y;
    }


    /* SVG handle malo manji na telefonu */
    .comparison-stage::before {
        width: 80px;
        height: 54px;
    }

    /* PICKER ostaje unutar donjeg desnog ugla */
    .comparison-stage .template-switcher-widget {
        position: absolute !important;
        right: 10px !important;
        bottom: 10px !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        z-index: 1000 !important;
        pointer-events: auto !important;
    }

    .template-switcher {
        position: relative;
        width: 48px;
        height: 48px;
        display: block;
        z-index: 1001;
    }

    /* GLAVNI THUMB */

    .template-toggle,
    .template-option {
        width: 48px;
        height: 48px;
        border-radius: 6px;
        border-width: 1px;
    }


    /*
     * NA MOBILNOM OPCIJE NE IDU GORE,
     * NEGO HORIZONTALNO ULEVO
     */

    .template-options {
        position: absolute;
        right: calc(100% + 8px);
        bottom: 0;
        display: flex;
        flex-direction: row;
        gap: 8px;
        width: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateX(10px);
        pointer-events: none;
        z-index: 1002;
        transition:
            opacity .25s ease,
            transform .25s ease,
            visibility .25s ease;
    }

    .template-switcher.is-open .template-options {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
    }
}

/* =====================================================
   MOBILE - VEĆA VISINA SLIDERA
===================================================== */

@media (max-width: 767px) {
    .comparison-stage {
        height: 300px !important;
    }

    /* BEFORE wrapper */
    .comparison-stage .before-image {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* BEFORE slika */
    .comparison-stage .before-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    /* AFTER wrapper */
    .comparison-stage .after-image {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* AFTER slika */
    .comparison-stage .after-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
    }
}

/* =====================================================
   REDUCED MOTION
===================================================== */

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

    .comparison-stage.slider-intro .after-image,
    .comparison-stage.slider-intro::after,
    .comparison-stage.slider-intro::before,
    .comparison-stage .after-image {
        transition-duration: 0.01ms;
    }

}