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


/* =========================================
   HOMEPAGE POSITIONING REFERENCE
   ========================================= */

#home-logo {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#home-logo:hover {
    opacity: 0.95;
}

.sp-home {
    position: relative;
    overflow-x: hidden;
}


/* =========================================
   DESKTOP MENU — DEFAULT
   ========================================= */

#home-menu {
    position: absolute;
    left: 50%;
    top: calc(50% + 90px);
    width: 100%;
    z-index: 10;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateX(-50%) translateY(10px);

    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        visibility 0s linear 0.28s;
}


/* =========================================
   CAPTION — DEFAULT + POSITION
   ========================================= */

#image-alt {
    position: absolute !important;

    right: 30px;
    bottom: 30px;

    left: auto !important;
    top: auto !important;

    z-index: 20;

    width: auto;
    max-width: calc(100% - 60px);

    margin: 0 !important;
    transform: none !important;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.22s ease,
        visibility 0s linear 0.22s;
}


/* =========================================
   HOMEPAGE HOVER → CAPTION APPEARS
   ========================================= */

.sp-home:hover #image-alt {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}


/* =========================================
   LOGO HOVER → MENU
   ========================================= */

.sp-home:has(#home-logo:hover) #home-menu,
.sp-home:has(#home-menu:hover) #home-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateX(-50%) translateY(0);

    transition-delay: 0s;
}


/* =========================================
   LOGO / MENU ACTIVE → CAPTION FADES OUT
   ========================================= */

.sp-home:has(#home-logo:hover) #image-alt,
.sp-home:has(#home-menu:hover) #image-alt {
    opacity: 0;
    visibility: hidden;
}


/* =========================================
   INVISIBLE HOVER BRIDGE
   ========================================= */

#home-menu::before {
    content: "";
    position: absolute;

    left: 0;
    right: 0;

    top: -90px;
    height: 90px;
}


/* =========================================
   MOBILE MENU — DEFAULT
   ========================================= */

#home-menu-mobile {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(10px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0s linear 0.25s;
}


/* =========================================
   MOBILE MENU — OPEN
   ========================================= */

.sp-home.mobile-menu-open #home-menu-mobile {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);

    transition-delay: 0s;
}


/* =========================================
   MOBILE MENU OPEN → CAPTION HIDDEN
   ========================================= */

.sp-home.mobile-menu-open #image-alt {
    opacity: 0;
    visibility: hidden;
}


/* =========================================
   MOBILE CAPTION POSITION
   ========================================= */

@media (max-width: 767px) {

    #image-alt {
        right: 20px;
        bottom: 24px;

        left: 20px !important;

        width: auto;
        max-width: none;

        text-align: right;
    }
}


/* =========================================
   PREVENT HORIZONTAL PAGE SCROLL
   ========================================= */

html,
body {
    overflow-x: hidden;
}