/*
Theme Name: Aimo Child
Theme URI: http://demo.casethemes.net/aimo
Description: Child theme for Aimo WordPress theme. Automatically sets Home-03 as default front page.
Author: Case-Themes
Author URI: https://casethemes.net/
Template: aimo
Version: 1.0.0
Requires PHP: 7.4
License: ThemeForest
License URI: https://themeforest.net/licenses
Text Domain: aimo-child
*/

/*
 * Child theme styles can be added here.
 * Parent theme styles are automatically enqueued via functions.php
 */

/* Hero section with right side content layout */
.aimo-hero-with-right-side {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.aimo-hero-slider {
    flex: 1;
    min-width: 300px;
}

.aimo-hero-right-side {
    flex: 0 0 auto;
    width: 100%;
    max-width: 350px;
}

@media (min-width: 768px) {
    .aimo-hero-with-right-side {
        flex-direction: row;
    }

    .aimo-hero-slider {
        flex: 1 1 60%;
    }

    .aimo-hero-right-side {
        flex: 0 0 30%;
        max-width: 400px;
    }
}

@media (min-width: 992px) {
    .aimo-hero-right-side {
        max-width: 450px;
    }
}

/* Sticky Header Styles - Make main header sticky on scroll */
#pxl-header-elementor .pxl-header-elementor-main {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background-color, box-shadow;
}
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: linear-gradient(90deg, #0a0e27 0%, #1a1a2e 50%, #0a0e27 100%) !important;
    background-color: #0a0e27 !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
    animation: aimoSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 0 !important;
    /*padding-bottom: 15px !important;*/
    border-bottom: none !important;
}

/* Ensure header content maintains original styling when sticky */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .elementor-section {
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
}

/* Remove all borders from sticky header */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active * {
    border-bottom: none !important;
}

/* Remove border from logo element when sticky */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .pxl-logo-home-3 > div::before {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    display: none !important;
}

/* Maintain purple accents and curved design elements */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active * {
    transition: all 0.3s ease;
}

/* Ensure navigation links and buttons remain visible */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active a,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .elementor-widget-text-editor,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .elementor-heading-title {
    color: inherit !important;
}

/* Make menu links white in sticky header */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .pxl-menu-primary > li > a,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .pxl-menu-primary > li > a span,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .pxl-menu-primary > li > a .pxl-menu-item-text,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .pxl-menu-primary > li > a .char,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .menu-item > a,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .menu-item > a span,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .elementor-nav-menu > li > a,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .elementor-nav-menu > li > a span {
    color: #ffffff !important;
}

/* Animation for sticky header */
@keyframes aimoSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* If header has transparent background, adjust sticky background */
#pxl-header-elementor .px-header--transparent.aimo-sticky-active {
    background: linear-gradient(90deg, #0a0e27 0%, #1a1a2e 50%, #0a0e27 100%) !important;
    background-color: #0a0e27 !important;
    position: fixed !important;
    opacity: 1 !important;
}

/* Maintain curved section separators and design elements */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active::before,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active::after {
    content: '';
    position: absolute;
    height: 100%;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(138, 43, 226, 0.5), transparent);
    top: 0;
}

/* Purple glow effect on sticky header */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(138, 43, 226, 0.2) !important;
}

/* Add padding to body when header is sticky to prevent content from sticking */
body.aimo-header-sticky-active {
    padding-top: 0;
}

body.aimo-header-sticky-active #pxl-main,
body.aimo-header-sticky-active #pxl-wapper {
    padding-top: 0;
}

/* Add margin-top to first section after header when sticky */
/*#pxl-header-elementor.aimo-sticky-active ~ *,*/
/*body.aimo-header-sticky-active .elementor-section:first-of-type {*/
/*    margin-top: 0;*/
/*}*/

/* Ensure header container maintains proper width */
#pxl-header-elementor.aimo-sticky-active {
    position: relative;
}

/* Mobile sticky header */
@media (max-width: 1199px) {
    #pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active {
        position: fixed !important;
        z-index: 9999 !important;
        width: 100% !important;
    }
    
    /* Make mobile header sticky from the top - always visible */
    #pxl-header-elementor #pxl-header-mobile {
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
        width: 100% !important;
        background-color: inherit !important;
    }
    
    /* Ensure mobile header stays sticky when scrolling with smooth transition */
    #pxl-header-elementor #pxl-header-mobile.pxl-header-mobile-fixed {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
    }
    
    /* Ensure mobile header container is positioned correctly */
    #pxl-header-elementor {
        position: relative;
    }
}

/* Smooth transition for header elements */
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .elementor-section,
#pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active .elementor-container {
    transition: all 0.3s ease;
}

/* Background color for specific logo column widget-wrap (non-sticky, excluding home page) */
body:not(.home) #pxl-header-elementor .pxl-header-elementor-main:not(.aimo-sticky-active) .elementor-column.elementor-col-50.elementor-inner-column.elementor-element.elementor-element-f7089d6.pxl-logo-home-3.pxl-column-none.pxl-column-overflow-hidden-no .elementor-widget-wrap.elementor-element-populated {
    background-color: #00000052 !important;
}

/* Fix container width for specific element - responsive */
.elementor-6643 .elementor-element.elementor-element-c288617 > .elementor-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* Apply fixed width only on desktop/large screens */
@media (min-width: 1220px) {
    .elementor-6643 .elementor-element.elementor-element-c288617 > .elementor-container {
        width: 1220px !important;
        max-width: 1220px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Tablet view - allow full width */
@media (max-width: 1219px) {
    .elementor-6643 .elementor-element.elementor-element-c288617 > .elementor-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Mobile view - full width with padding */
@media (max-width: 767px) {
    .elementor-6643 .elementor-element.elementor-element-c288617 > .elementor-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

.elementor-6643 .elementor-element.elementor-element-c410fff {
    transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
    margin-top: -50px;
    margin-bottom: -58px;
    padding: 90px 15px 150px 15px!important;
}
@media (max-width: 1600px) {
    .pxl-header-home3 .pxl-menu-home3 > div {
        margin: 0px 0px 0px 235px !important;
    }
}
/* .elementor-section.elementor-section-boxed > .elementor-container{
	max-width: 100%!important;
} */
/*.elementor-6643 .elementor-element.elementor-element-c288617 > .elementor-container{*/
/*    width : 1220px;*/
/*}*/

.elementor-6643 .elementor-element.elementor-element-df97eee > .elementor-container{
    width : 1220px;
}
.elementor-8834 .elementor-element.elementor-element-a0c4825 .pxl-logo img{
    height: 44px!important;
}

.single-portfolio .entry-excerpt ul,
.single-portfolio .portfolio-excerpt ul,
.entry-content ul {
    list-style-type: disc !important;
    margin-left: 25px !important;
}

@media (max-width: 1440px) {
    .elementor-6645 .elementor-element.elementor-element-c43b183 .pxl-logo img {
        height: 44px;
    }
}
@media (max-width: 1440px) {
    .elementor-6645 .elementor-element.elementor-element-0c826ef.elementor-column > .elementor-widget-wrap {
        justify-content: center;
    }
}
@media (max-width: 1440px) {
    .elementor-6645 .elementor-element.elementor-element-c43b183 {
        max-width: unset;
        width: unset;
    }

    body:not(.rtl) .elementor-6643 .elementor-element.elementor-element-60e3615 {
        right: -20% !important;
    }

    .elementor-6645 .elementor-element.elementor-element-6723155 .pxl-nav-menu .pxl-menu-primary > li {
        float: none;
        margin: 0px 0px 0px 15px !important;
    }
}
    @media (max-width: 768px) {
        .elementor-6643 .elementor-element.elementor-element-df97eee > .elementor-container {
            width: 100%;
        }

        .elementor-section[data-id="05df8ec"] .elementor-container {
            margin-left: unset !important;
        }

        .elementor-section[data-id="049f746"] .elementor-container {
            margin-left: unset !important;
        }

    }
    /*.elementor-section.elementor-section-boxed > .elementor-container {*/
    /*    max-width: 1330px;*/
    /*}*/

    /*.elementor-section.elementor-section-boxed > .elementor-container {*/
    /*    max-width: 1140px;*/
    /*}*/
@media (max-width: 1400px) {
    .pxl-header-home3 .pxl-menu-home3 > div {
        margin: 0px 0px 0px 215px!important;
    }
}

/* ============================================================================
 * MOBILE SCROLL GAP FIX
 * ============================================================================
 * Fixes the gap that appears when scrolling on mobile devices
 * Common issue with iOS Safari and mobile browsers with dynamic viewport
 */

/* Fix for mobile viewport height changes and scroll gaps */
@media (max-width: 768px) {
    /* Prevent overscroll bounce on iOS Safari */
    html {
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
        /* Prevent gap on scroll */
        position: relative;
        height: auto;
        min-height: 100%;
    }
    
    body {
        /* Prevent gap when address bar shows/hides */
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none;
        /* Use dynamic viewport height for mobile */
        min-height: 100dvh;
        min-height: 100vh;
        position: relative;
    }
    
    /* Prevent gap when address bar shows/hides */
    #pxl-wapper {
        min-height: 100%;
        position: relative;
        /* Prevent layout shift */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    /* Fix sticky header on mobile - prevent gap */
    #pxl-header-elementor .pxl-header-elementor-main.aimo-sticky-active {
        /* Prevent layout shift */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* Prevent body from creating gap when header is sticky */
    body.aimo-header-sticky-active {
        padding-top: 0 !important;
        overflow-x: hidden;
        /* Prevent scroll gap */
        position: relative;
    }
    
    /* Ensure main content doesn't shift or create gaps */
    #pxl-main {
        position: relative;
        min-height: 100%;
        /* Prevent gap */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    /* Fix for Elementor sections - prevent gaps */
    .elementor-section {
        position: relative;
        /* Prevent layout shift */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    /* Prevent gap in Elementor containers */
    .elementor-container {
        position: relative;
    }
}

/* Additional fix for iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        body {
            /* Use actual viewport height, not including browser UI */
            min-height: -webkit-fill-available;
        }
        
        #pxl-wapper {
            min-height: -webkit-fill-available;
        }
        
        /* Fix for iOS Safari address bar */
        html {
            height: -webkit-fill-available;
        }
    }
}