/* ========================================
   Modern Side Slide Menu for Mobile
   ======================================== */

/* Hide default slicknav on mobile */
/* Show custom mobile menu on mobile and tablet */
@media only screen and (max-width: 991px) {
    .slicknav_menu {
        display: none !important;
    }

    /* Show custom mobile menu */
    .custom-mobile-menu {
        display: block !important;
    }
}

/* Custom Mobile Menu Styles */
.custom-mobile-menu {
    display: none;
    position: relative;
    z-index: 9999;
    width: 100%;
    height: 100%;
}

/* Hamburger Button */
.mobile-menu-toggle {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: #3A3288;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    transition: none;
}

@media only screen and (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle:hover {
    background: #3A3288;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.mobile-menu-toggle:active {
    background: #3A3288;
}

/* Hamburger Icon Lines */
.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation when menu is open - Simple X without rotation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay Backg/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.mobile-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Side Menu Container */
.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background: #0b1c3c;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow-y: auto;
    transition: right 0.8s ease-in-out;
    padding: 80px 0 30px;
}

.mobile-menu-sidebar.active {
    right: 0 !important;
}

/* Menu Header */
.mobile-menu-header {
    padding: 0 25px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    text-align: center;
}

.mobile-menu-logo {
    max-width: 160px;
    height: auto;
}

/* Menu Navigation */
.mobile-menu-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-nav>li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-nav>li:last-child {
    border-bottom: none;
}

.mobile-menu-nav a {
    display: block;
    padding: 15px 25px;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding-left: 30px;
}

.mobile-menu-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #ffffff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-menu-nav a:hover::before {
    transform: scaleY(1);
}

/* Submenu Styles */
.mobile-menu-nav .has-submenu {
    position: relative;
}

.mobile-menu-nav .submenu-toggle {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
    z-index: 10;
}

/* Empty triangle dropdown icon */
.mobile-menu-nav .submenu-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #ffffff;
    transition: all 0.3s ease;
}

/* Flip the triangle 180 degrees when active */
.mobile-menu-nav .submenu-toggle.active::after {
    transform: rotate(180deg);
}

.mobile-menu-nav .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.mobile-menu-nav .sub-menu.active {
    max-height: 2000px;
    padding: 10px 0;
}

.mobile-menu-nav .sub-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-nav .sub-menu li:last-child {
    border-bottom: none;
}

.mobile-menu-nav .sub-menu a {
    padding: 12px 25px 12px 45px;
    font-size: 15px;
    font-weight: 400;
    color: #d1d5db;
}

.mobile-menu-nav .sub-menu a:hover {
    padding-left: 50px;
    color: #ffffff;
}

/* Nested Submenu (3rd level) - FIBC Bag items */
.mobile-menu-nav .sub-menu .sub-menu {
    background: rgba(0, 0, 0, 0.3);
    margin-left: 0;
}

.mobile-menu-nav .sub-menu .sub-menu.active {
    padding: 8px 0;
}

.mobile-menu-nav .sub-menu .sub-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-nav .sub-menu .sub-menu a {
    padding-left: 60px;
    font-size: 14px;
    color: #d1d5db;
    position: relative;
}

.mobile-menu-nav .sub-menu .sub-menu a::before {
    content: '•';
    position: absolute;
    left: 45px;
    color: #ffffff;
    font-size: 18px;
}

.mobile-menu-nav .sub-menu .sub-menu a:hover {
    padding-left: 65px;
    color: #ffffff;
}

/* Menu Footer */
.mobile-menu-footer {
    padding: 20px 25px;
    margin-top: 30px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.mobile-menu-footer p {
    margin: 0;
    color: #d1d5db;
    font-size: 13px;
}

/* Scrollbar Styling */
.mobile-menu-sidebar::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.mobile-menu-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.mobile-menu-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Blur the main header logo when menu is open */
body.mobile-menu-open .header .logo,
body.mobile-menu-open .header .img-logo {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

/* Animation for menu items */
.mobile-menu-sidebar.active .mobile-menu-nav>li {
    animation: slideInRight 0.4s ease forwards;
    opacity: 0;
}

.mobile-menu-sidebar.active .mobile-menu-nav>li:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-menu-sidebar.active .mobile-menu-nav>li:nth-child(2) {
    animation-delay: 0.15s;
}

.mobile-menu-sidebar.active .mobile-menu-nav>li:nth-child(3) {
    animation-delay: 0.2s;
}

.mobile-menu-sidebar.active .mobile-menu-nav>li:nth-child(4) {
    animation-delay: 0.25s;
}

.mobile-menu-sidebar.active .mobile-menu-nav>li:nth-child(5) {
    animation-delay: 0.3s;
}

.mobile-menu-sidebar.active .mobile-menu-nav>li:nth-child(6) {
    animation-delay: 0.35s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive adjustments */
@media only screen and (max-width: 480px) {
    .mobile-menu-sidebar {
        width: 90%;
    }

    .mobile-menu-toggle {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .mobile-menu-toggle span {
        width: 22px;
    }
}

/* Desktop - hide mobile menu completely */
@media only screen and (min-width: 992px) {

    .custom-mobile-menu,
    .mobile-menu-toggle,
    .mobile-menu-overlay,
    .mobile-menu-sidebar {
        display: none !important;
    }
}