/*
Theme Name: Company
Theme URI: https://rtl-theme.com/
Author: Mostafa Kalantari Fard
Author URI: https://rtl-theme.com/author/mostafa-kf/
Description: Company exclusive WordPress theme
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: company
*/

/* Ensure mega menu button is visible on desktop */
@media screen and (min-width: 1025px) {
    #btn-megamenu {
        display: inline-block !important;
    }
}

/* Mega menu wrapper base styles */
.megamenu-wrapper {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 9999;
}

/* Global styles */
.center-absolute-horizontal {
    position: absolute;
    left: 50% !important;
    right: inherit !important;
    transform: translateX(-50%) !important;
}

@media screen and (max-width: 1024px) {
    .center-absolute-horizontal-tablet {
        position: absolute;
        left: 50% !important;
        right: inherit !important;
        transform: translateX(-50%) !important;
    }
}

@media screen and (max-width: 767px) {
    .center-absolute-horizontal-mobile {
        position: absolute;
        left: 50% !important;
        right: inherit !important;
        transform: translateX(-50%) !important;
    }
}

selector iframe,
selector video {
    object-fit: contain;
    background-color: black;
}

.back-to-top {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.back-to-top.show {
    display: block;
    opacity: 0.5;
}

.back-to-top:hover {
    opacity: 1;
}

/* Hide only before header is ready */
html:not(.header-ready) body:not(.elementor-editor-active):not(.elementor-editor-preview) .top-nav,
html:not(.header-ready) body:not(.elementor-editor-active):not(.elementor-editor-preview) .header-container {
    visibility: hidden;
    opacity: 0;
    min-height: 80px;
}

/* Show when header is ready */
html.header-ready .top-nav,
html.header-ready .header-container {
    visibility: visible;
    opacity: 1;
    transition: .3s;
}
/* /Global styles */

/* Restore the megamenu artwork lost when the WordPress page was saved offline. */
.megamenu-wrapper .megamenu-box {
    background-color: #ffffff !important;
    background-image: url('../images/megamenu-bg.png') !important;
}

.theme-dark .megamenu-wrapper .megamenu-box {
    background-color: #292929 !important;
}

.megamenu-wrapper.dpn-megamenu-live .megamenu-box{
    background-size: contain !important; 
}

/* The saved Elementor mobile dock is not part of the requested mobile layout. */
#mobile-bottom-menu,
.elementor-element-d33bab8 {
    display: none !important;
}

/* Keep the restored mobile drawer above Elementor overlays. */
#mobile-slide-menu {
    visibility: visible;
}

body.mobile-menu-open {
    overflow: hidden;
}

/* Extend the desktop header's left color panel to the centered 1300px content. */
@media screen and (min-width: 1025px) {
    .elementor-7413 .elementor-element.elementor-element-ca62f58 {
        width: calc((100vw - 1300px) / 2 + 355px) !important;
        max-width: none !important;
        --width: calc((100vw - 1300px) / 2 + 355px) !important;
    }

    html.theme-light .elementor-7413 .elementor-element.elementor-element-ca62f58 {
        background-color: #ffffff !important;
    }

    html.theme-dark .elementor-7413 .elementor-element.elementor-element-ca62f58 {
        background-color: #1c1c1c !important;
    }
}

@media screen and (max-width: 1023px) {
    .megamenu-wrapper .megamenu-box {
        background-image: none !important;
    }
}

/* About page: contain Elementor's full-bleed decorations and sliders. */
body.page-id-4715 {
    overflow-x: clip;
}

body.page-id-4715 .swiper,
body.page-id-4715 .swiper-container {
    overflow: hidden;
}
