/* 
   Web Digital Solution - Modern Mobile Menu Stylesheet
   Author: Web Digital Solution
   Version: 1.0
*/

/* ===== MODERN MOBILE MENU STYLES ===== */

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

.modern-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 1001;
    cursor: pointer;
    margin-left: 20px;
}

.modern-mobile-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    box-shadow: var(--glow-effect);
}

/* Modern mobile menu container */
.modern-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    background: rgba(15, 15, 25, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 80px 0 30px;
    border-left: 1px solid rgba(78, 87, 212, 0.2);
    visibility: visible;
}

.modern-mobile-menu.active {
    right: 0;
}

/* Menu toggle animation */
.modern-mobile-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
    background-color: var(--accent-color);
}

.modern-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.modern-mobile-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
    background-color: var(--accent-color);
}

/* Modern mobile navigation */
.modern-mobile-nav {
    margin-bottom: 30px;
}

.modern-mobile-nav-list {
    list-style: none;
    padding: 0 30px;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.modern-mobile-nav-item {
    margin-bottom: 18px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: calc(0.05s * var(--item-index, 0));
    width: 100%;
}

.modern-mobile-menu.active .modern-mobile-nav-item {
    opacity: 1 !important;
    transform: translateX(0) !important;
    display: block !important;
}

.modern-mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 0;
    color: var(--white);
    font-weight: 500;
    font-size: 18px;
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
}

.modern-mobile-nav-link:before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.modern-mobile-nav-link:hover,
.modern-mobile-nav-link.active {
    color: var(--accent-color);
    transform: translateX(10px);
}

.modern-mobile-nav-link:hover:before,
.modern-mobile-nav-link.active:before {
    width: 20px;
}

.modern-mobile-nav-link i {
    margin-right: 10px;
    font-size: 16px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* Modern mobile dropdown */
.modern-mobile-dropdown {
    margin-bottom: 18px;
    width: 100%;
}

.modern-mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 0;
}

.modern-mobile-dropdown-toggle i {
    transition: transform 0.3s ease;
    font-size: 14px;
}

.modern-mobile-dropdown.active .modern-mobile-dropdown-toggle i {
    transform: rotate(180deg);
}

.modern-mobile-dropdown-menu {
    list-style: none;
    padding: 0 0 0 30px;
    margin: 10px 0 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
}

.modern-mobile-dropdown.active .modern-mobile-dropdown-menu {
    max-height: 500px;
    opacity: 1;
}

.modern-mobile-dropdown-menu li {
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: calc(0.05s * var(--item-index, 0));
    width: 100%;
}

.modern-mobile-dropdown.active .modern-mobile-dropdown-menu li {
    opacity: 1 !important;
    transform: translateY(0) !important;
    display: block !important;
}

.modern-mobile-dropdown-menu li a {
    color: var(--text-light);
    font-weight: 400;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 10px 0;
    transition: all 0.3s ease;
    width: 100%;
}

.modern-mobile-dropdown-menu li a i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.modern-mobile-dropdown-menu li a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

/* Modern mobile CTA */
.modern-mobile-cta {
    text-align: center;
    margin: 20px 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: 0.3s;
}

.modern-mobile-menu.active .modern-mobile-cta {
    opacity: 1;
    transform: translateY(0);
}

.modern-mobile-cta-btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--primary-color);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--glow-effect);
    transition: all 0.3s ease;
    width: 100%;
}

.modern-mobile-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(78, 87, 212, 0.4);
}

/* Modern mobile social links */
.modern-mobile-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: auto;
    padding: 20px 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: 0.4s;
}

.modern-mobile-menu.active .modern-mobile-social {
    opacity: 1;
    transform: translateY(0);
}

.modern-mobile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-mobile-social-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--glow-effect);
}

/* Overlay when menu is active */
.modern-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modern-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Media queries */
@media (max-width: 991.98px) {
    .modern-mobile-toggle {
        display: flex;
    }
    
    /* Ensure mobile menu is visible on mobile devices */
    .modern-mobile-menu.active {
        right: 0;
        display: flex !important;
        visibility: visible !important;
    }
    
    .modern-mobile-nav {
        display: flex !important;
        width: 100%;
    }
    
    .modern-mobile-nav-list {
        display: flex !important;
        flex-direction: column;
        width: 100%;
    }
    
    .modern-mobile-nav-item {
        display: block !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    
    .modern-mobile-dropdown.active .modern-mobile-dropdown-menu {
        max-height: 500px;
        opacity: 1;
        display: flex !important;
        flex-direction: column;
    }
    
    /* Fix for dropdown menu visibility */
    .modern-mobile-dropdown-menu {
        display: none;
    }
    
    .modern-mobile-dropdown.active .modern-mobile-dropdown-menu {
        display: flex !important;
        flex-direction: column;
    }
}

/* Animation for menu items */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}