/*
Theme Name: Archimak Child
Theme URI: https://techfestsuli.com/emkanat/
Description: Archimak Child Theme – clean RTL support without breaking LTR
Author: Manus AI
Template: archimak
Version: 1.0.2   /* bumped version to note the fix */
License: GNU General Public License v2 or later
Text Domain: archimak-child
*/

/* =========================================================
   IMPORTANT RULE
   ---------------------------------------------------------
   - NO layout positioning here except clearly marked mobile burger fix
   - RTL layout stays ONLY in rtl.css
========================================================= */

/* =========================================================
   SAFETY: Ensure Polylang menu items are visible
========================================================= */
.sliding-menu li {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* =========================================================
   LANGUAGE SWITCHER – DESKTOP
   ---------------------------------------------------------
   Desktop remains EXACTLY as theme default
========================================================= */
/* (intentionally empty) */

/* =========================================================
   CLEANUP: Remove stray desktop list (from functions.php injection)
========================================================= */
@media (min-width: 1065px) {
    .nav-lang-list,
    .nav-lang-bottom {
        display: none !important;
    }
}

/* =====================================================
   iPad ONLY – hide progress bar (LTR + RTL)
   Covers iPad, iPad Air, iPad Pro
===================================================== */
@media only screen 
  and (min-width: 768px) 
  and (max-width: 1366px) {

    .progress-bar-wrap {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* =====================================================
   MOBILE & iPAD – Consistent burger position (LTR + RTL)
   Prevents jumps during resize
===================================================== */
@media only screen and (max-width: 1064px) {

    .nav-button,
    .nav-button.but-hol {
        position: fixed !important;
        top: 20px !important;           /* adjust to 15px–25px if needed */
        z-index: 1000000 !important;
        transform: none !important;
        transition: top 0.25s ease, left 0.25s ease, right 0.25s ease; /* smooth resize */
    }

    /* ENGLISH (LTR) – burger on right */
    html:not([dir="rtl"]) .nav-button,
    html:not([dir="rtl"]) .nav-button.but-hol {
        right: 20px !important;
        left: auto !important;
    }

    /* ARABIC (RTL) – burger on left (mirrored) */
    html[dir="rtl"] .nav-button,
    html[dir="rtl"] .nav-button.but-hol {
        left: 20px !important;
        right: auto !important;
    }
}

/* =========================================================
   RTL ADJUSTMENT for language switcher (from functions.php)
   ONLY direction & spacing — NO positioning
========================================================= */
html[dir="rtl"] .nav-lang-list {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .nav-lang-bottom {
    direction: rtl !important;
}

/* Completely hide progress bar everywhere – LTR + RTL */
.progress-bar-wrap {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Extra safety: hide any pseudo-elements or children */
.progress-bar-wrap::before,
.progress-bar-wrap::after,
.progress-bar-wrap * {
    display: none !important;
}

/* Mobile & tablet: vertically center burger icon with logo */
/* Adjust 'top' value as needed – try 18px–28px depending on your logo height */
@media only screen and (max-width: 1064px) {

    .nav-button,
    .nav-button.but-hol {
        top: 22px !important;           /* ← main value to change – start here */
        transition: top 0.2s ease;      /* smooth if resizing */
    }

    /* Optional: finer control if logo height differs in LTR vs RTL */
    html:not([dir="rtl"]) .nav-button,
    html:not([dir="rtl"]) .nav-button.but-hol {
        top: 22px !important;           /* LTR – test this value */
    }

    html[dir="rtl"] .nav-button,
    html[dir="rtl"] .nav-button.but-hol {
        top: 22px !important;           /* RTL – usually same, but can differ */
    }
}

/* Hide .about-img.fl-wrap on mobile & iPad (below 768px) – both LTR and RTL */
@media only screen and (max-width: 767px) {

    .wpb_wrapper .about-img.fl-wrap,
    .wpb_wrapper .about-img.fl-wrap > *,
    .wpb_wrapper .about-img.fl-wrap img,
    .wpb_wrapper .about-img.fl-wrap .wpb_single_image,
    .wpb_wrapper .about-img.fl-wrap .vc_single_image-wrapper {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Also prevent layout shift / empty space */
    .wpb_wrapper .about-img.fl-wrap {
        min-height: 0 !important;
        max-height: 0 !important;
    }
}

/* Optional: extra strict hiding for very small screens */
@media only screen and (max-width: 480px) {
    .wpb_wrapper .about-img.fl-wrap {
        display: none !important;
    }
}





/* Show hidden VC columns in LTR from 768px (undo vc_hidden-sm / vc_hidden-xs for the about image column) */
@media only screen and (min-width: 768px) {

    html:not([dir="rtl"]) .vc_hidden-sm.vc_col-sm-5,
    html:not([dir="rtl"]) .vc_hidden-xs.vc_col-sm-5 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Ensure the inner content is fully visible and not clipped */
    html:not([dir="rtl"]) .vc_hidden-sm.vc_col-sm-5 .vc_column-inner,
    html:not([dir="rtl"]) .vc_hidden-xs.vc_col-sm-5 .vc_column-inner,
    html:not([dir="rtl"]) .vc_hidden-sm.vc_col-sm-5 .about-img.fl-wrap,
    html:not([dir="rtl"]) .vc_hidden-xs.vc_col-sm-5 .about-img.fl-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        clear: both !important;
        overflow: visible !important;
    }

    /* Make sure image scales correctly */
    html:not([dir="rtl"]) .vc_hidden-sm.vc_col-sm-5 img,
    html:not([dir="rtl"]) .vc_hidden-xs.vc_col-sm-5 img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}

@media (max-width: 1064px) {
    .fixed-column-wrap.fcw_fw,
    .fixed-column-wrap_bg,
    .map-container,
    #map-single,
    .leaflet-container,
    .fwc-dec.fwc-dec_top,
    .fwc-dec.fwc-dec_right,
    .fixed-column-wrap_dec,
    .fixed-column-dec,
    .hero-scroll-down-notifer {
        display: none !important;
    }

    .map-view-wrap {
        width: 100% !important;
        max-width: 100% !important;
    }
}
