/*
Theme Name: Axleo Child
Theme URI: https://7-axes.com
Description: Child theme for Axleo.
Author: Antigravity
Author URI: https://7-axes.com
Template: axleo
Version: 1.0.0
Text Domain: axleo
*/

/* ============================================================
   Hero Banner – Mobile Layout Fix
   Goal: background image (man) stays on the LEFT half,
         text content stays on the RIGHT half.
   The banner uses background-image on .home2-banner-area,
   and a single text column (col-xxl-6 / col-lg-7) that
   expands to 100% width on mobile by default.
   ============================================================ */

/* --- Tablet + Mobile (max 991px) --- */
@media (max-width: 991px) {

    /* Fix background: shift container to the left so image appears on the left side */
    .home2-banner-area {
        background-position: left center !important;
        background-size: cover !important;
        position: relative !important;
        min-height: 500px !important;
        margin-left: -200px !important;
        padding-left: 200px !important;
    }

    /* 
       The text column (first and only visible child).
       We push it to the right 50% of the screen.
    */
    .home2-banner-area .row.flexed {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        min-height: inherit !important;
    }

    /* Keep text column at 50% width, aligned to the right side */
    .home2-banner-area .row.flexed > .col-xxl-6,
    .home2-banner-area .row.flexed > .col-xl-7,
    .home2-banner-area .row.flexed > [class*="col-lg-7"],
    .home2-banner-area .row.flexed > div.d-flex {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        margin-left: auto !important;
        margin-right: 0 !important;
    }

    /* Remove padding that pushes content into background area */
    .home2-banner-area .banner-content-wrap h1 {
        font-size: 30px !important;
        margin-bottom: 20px !important;
    }

    .home2-banner-area .banner-content-wrap {
        padding-top: 0 !important;
    }

    /* Push button down to near the feet of the man */
    .home2-banner-area .banner-btn {
        margin-top: 120px !important;
    }
}

/* --- Small Mobile (max 480px) --- */
@media (max-width: 480px) {
    .home2-banner-area {
        min-height: 420px !important;
        margin-left: -200px !important;
        padding-left: 200px !important;
    }

    .home2-banner-area .row.flexed > .col-xxl-6,
    .home2-banner-area .row.flexed > .col-xl-7,
    .home2-banner-area .row.flexed > [class*="col-lg-7"],
    .home2-banner-area .row.flexed > div.d-flex {
        width: 55% !important;
        flex: 0 0 55% !important;
        max-width: 55% !important;
    }

    .home2-banner-area .banner-content-wrap h1 {
        font-size: 22px !important;
    }
}

/* --- About Section – Mobile Horizontal Margins --- */
@media (max-width: 991px) {
    .home2-about-section {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .home2-about-section .section-title h2 {
        font-size: 28px !important;
    }
}

/* --- Home1 About Section – Paragraph Padding --- */
.home1-about-section .about-content p {
    padding-left: 25px !important;
    padding-right: 25px !important;
}

/* --- Elementor Section Padding Fix --- */
.elementor-4100 .elementor-element.elementor-element-3a38bad {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.elementor-74 .elementor-element.elementor-element-df0038e {
    padding-right: 16px !important;
}

/* ============================================================
   Sidebar Mobile Menu – Arabic Text Direction Fix (Mobile Only)
   The theme puts each letter in a separate <span> for animation.
   In RTL pages this reverses the character order.
   Fix: force flex-direction: row-reverse on .menu-text
   ============================================================ */

@media (max-width: 991px) {

    /* Arabic menu items: reverse the flex order so letters appear RTL */
    .sidebar-area .sidebar-menu-wrap .main-menu > li > a .menu-text {
        direction: rtl !important;
    }

    /* English / Latin menu items (lang switcher): keep LTR */
    .sidebar-area .sidebar-menu-wrap .main-menu > li.wpml-ls-item > a .menu-text,
    .sidebar-area .sidebar-menu-wrap .main-menu > li.lang-item > a .menu-text,
    .sidebar-area .sidebar-menu-wrap .main-menu > li[class*="lang"] > a .menu-text {
        direction: ltr !important;
    }

}



/* ============================================================
   Sidebar Button – Mobile Touch Fix
   Problem: 36px button too small for finger; SVG may intercept
   touch events on real devices.
   Fix: enlarge touch target + pass touch through SVG to parent.
   ============================================================ */

@media (max-width: 991px) {
    .sidebar-btn {
        min-width: 48px !important;
        min-height: 48px !important;
        position: relative !important;
        z-index: 9999 !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    /* Make SVG pass touch events to parent div */
    .sidebar-btn svg,
    .sidebar-btn svg * {
        pointer-events: none !important;
    }

    /* Ensure sidebar-menu-close is also easy to tap */
    .sidebar-menu-close {
        min-width: 48px !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        z-index: 9999 !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .sidebar-menu-close svg,
    .sidebar-menu-close svg * {
        pointer-events: none !important;
    }
}

/* Force Sidebar display on active (works for LTR and RTL) */
.sidebar-area.active,
body.rtl .sidebar-area.active,
[dir="rtl"] .sidebar-area.active,
html[dir="rtl"] .sidebar-area.active,
body.rtl div.sidebar-area.active,
html body.rtl .sidebar-area.active {
    transform: translateY(0) !important;
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    z-index: 999999 !important;
}



