/**
 * Custom Menu Overlay Styles
 * Reduces menu width to 2/3 on desktop and shows site background on remaining 1/3
 */

/* Desktop styles - Menu overlay modifications */
@media only screen and (min-width: 992px) {
    
    /* Target the OKThemes popup wrapper for post 1858 - High specificity */
    body .okthemes-popup-wrapper[data-popup-id="1858"],
    body .okthemes-popup-wrapper.menu-overlay-1858,
    .okthemes-popup-wrapper[data-popup-id="1858"].okthemes-popup-wrapper,
    .okthemes-popup-wrapper.menu-overlay-1858.okthemes-popup-wrapper {
        width: 66.666% !important; /* 2/3 of screen width */
        height: 100vh !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        z-index: 999999 !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }
    
    /* Target the specific popup container for post 1858 */
    #post-1858 {
        width: 100% !important;
        height: 100vh !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 999999 !important;
        overflow: hidden;
    }
    
    /* Reduce background overlay opacity to show site behind */
    #post-1858::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3) !important; /* Reduced opacity */
        z-index: -1;
    }
    
    /* Ensure the main container takes full height */
    #post-1858 .elementor-section-wrap > .elementor-section {
        min-height: 100vh !important;
    }
    
    /* Style the main content container */
    #post-1858 .elementor-container {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    /* Adjust the navigation container positioning */
    #post-1858 .main-navigation-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding-left: 5%;
    }
    
    /* Style the vertical menu in popup */
    #post-1858 .popup-content .main-menu.vertical,
    #post-1858 .main-menu.vertical {
        max-height: none !important;
        overflow: visible !important;
        width: 100%;
    }
    
    /* Ensure menu items are properly spaced */
    #post-1858 .main-menu.vertical ul li {
        margin-bottom: 1.5rem;
    }
    
    /* Style menu links */
    #post-1858 .main-menu.vertical ul li a {
        font-size: 3rem !important;
        line-height: 1.2;
        font-weight: 100;
        color: #ffffff;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    /* Hover effects */
    #post-1858 .main-menu.vertical ul li a:hover {
        transform: translateX(20px);
        opacity: 0.8;
    }
    
    /* Close button positioning */
    #post-1858 .popup-close-button,
    #post-1858 .elementor-widget-okthemes-popup-trigger-widget {
        position: absolute;
        top: 30px;
        right: 30px;
        z-index: 10;
    }
    
    /* Modify the popup overlay to only cover the menu area - High specificity */
    body .okthemes-popup-wrapper[data-popup-id="1858"] .popup-overly,
    body .okthemes-popup-wrapper.menu-overlay-1858 .popup-overly,
    .okthemes-popup-wrapper[data-popup-id="1858"].okthemes-popup-wrapper .popup-overly,
    .okthemes-popup-wrapper.menu-overlay-1858.okthemes-popup-wrapper .popup-overly {
        width: 100% !important;
        background: rgba(0, 0, 0, 0.3) !important; /* Reduced opacity */
    }
    
    /* Background overlay for the entire screen */
    body.popup-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 66.666%; /* Start where menu ends */
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.1) !important; /* Very light overlay on visible site */
        z-index: 999998;
        pointer-events: none;
    }
    
    /* Ensure body doesn't scroll when popup is open */
    body.popup-open {
        overflow: hidden;
    }
    
    /* Animation for menu appearance - High specificity */
    body .okthemes-popup-wrapper[data-popup-id="1858"]:not(.show),
    body .okthemes-popup-wrapper.menu-overlay-1858:not(.show),
    .okthemes-popup-wrapper[data-popup-id="1858"].okthemes-popup-wrapper:not(.show),
    .okthemes-popup-wrapper.menu-overlay-1858.okthemes-popup-wrapper:not(.show) {
        transform: translateX(-100%) !important;
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    }
    
    body .okthemes-popup-wrapper[data-popup-id="1858"].show,
    body .okthemes-popup-wrapper.menu-overlay-1858.show,
    .okthemes-popup-wrapper[data-popup-id="1858"].okthemes-popup-wrapper.show,
    .okthemes-popup-wrapper.menu-overlay-1858.okthemes-popup-wrapper.show {
        transform: translateX(0) !important;
    }
}

/* Tablet styles - Keep full width */
@media only screen and (min-width: 768px) and (max-width: 991px) {
    #post-1858 {
        width: 100% !important;
    }
}

/* Mobile styles - Keep full width */
@media only screen and (max-width: 767px) {
    #post-1858 {
        width: 100% !important;
    }
    
    /* Adjust font sizes for mobile */
    #post-1858 .main-menu.vertical ul li a {
        font-size: 2rem !important;
    }
}

/* Additional styles for smooth transitions */
.popup-overlay {
    transition: all 0.3s ease;
}

/* Ensure the menu image is properly positioned */
#post-1858 .elementor-widget-image {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    max-width: 300px;
    opacity: 0.8;
}

/* Footer information positioning */
#post-1858 .elementor-section:last-child {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
}

/* Custom scrollbar for menu if needed */
#post-1858 .main-menu.vertical::-webkit-scrollbar {
    width: 4px;
}

#post-1858 .main-menu.vertical::-webkit-scrollbar-track {
    background: transparent;
}

#post-1858 .main-menu.vertical::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

#post-1858 .main-menu.vertical::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}


button.sub-menu-toggle {
    top:13px;
}