/* Dropdown Styles for QUANTUM TOOLS - Modern 3D Main Menu */

/* Main navigation structure */
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', sans-serif;
    transform-style: preserve-3d;
}

/* Main menu items (dropdown headers) with 3D effect */
.nav-links > li {
    position: relative;
    margin: 0;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    border-radius: 8px;
    margin: 0 0 5px 0;
}

.nav-links > li:hover {
    transform: translateZ(10px);
}

.nav-links > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #00f0ff;
    font-size: 1rem;
    text-decoration: none;
    padding: 15px 20px;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(0, 96, 102, 0.05));
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border-left: 3px solid rgba(0, 240, 255, 0.5);
    box-shadow: 
        0 5px 15px -5px rgba(0, 0, 0, 0.3),
        inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.nav-links > li > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-links > li > a:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 128, 255, 0.1));
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
    border-left: 3px solid rgba(0, 240, 255, 1);
    box-shadow: 
        0 8px 20px -5px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(0, 240, 255, 0.2);
}

.nav-links > li > a:hover::before {
    opacity: 1;
}

.nav-links > li > a i {
    margin-left: 8px;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
}

.nav-links > li:hover > a i {
    transform: rotate(180deg);
}

/* Dropdown container */
.dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 240px;
    background: rgba(10, 13, 20, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
    z-index: 1000;
    padding: 8px 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeInDown 0.3s ease;
}

/* Dropdown menu items with modern 3D effect */
.dropdown-menu {
    border-radius: 12px;
    overflow: hidden;
    transform-style: preserve-3d;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.8), 
        rgba(10, 15, 22, 0.95),
        rgba(8, 12, 20, 0.9)
    );
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 240, 255, 0.15);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 240, 255, 0.1),
        0 10px 30px -5px rgba(0, 240, 255, 0.1),
        inset 0 0 20px rgba(0, 240, 255, 0.05);
    perspective: 1000px;
}

.dropdown-menu li {
    position: relative;
    margin: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 500px;
}

.dropdown-menu li:hover {
    transform: translateZ(8px) scale(1.02);
}

.dropdown-menu li a {
    display: block;
    padding: 14px 20px;
    color: #f5f7fa;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-left: 3px solid transparent;
    background: linear-gradient(to right, transparent, rgba(0, 240, 255, 0.02));
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
}

.dropdown-menu li:not(:last-child) {
    border-bottom: 1px solid rgba(0, 240, 255, 0.05);
}

.dropdown-menu li a::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    transition: left 0.7s ease;
}

.dropdown-menu li a:hover {
    color: #00f0ff;
    background: linear-gradient(to right, 
        rgba(0, 240, 255, 0.08), 
        rgba(0, 240, 255, 0.05),
        transparent
    );
    border-left: 3px solid #00f0ff;
    padding-left: 28px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
    box-shadow: 
        inset 0 0 20px rgba(0, 240, 255, 0.08),
        0 0 15px rgba(0, 240, 255, 0.1);
    transform: translateZ(5px);
}

.dropdown-menu li a:hover::before {
    left: 100%;
}

/* Show dropdown on hover in desktop */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    /* Animation for down arrow */
    .dropdown:hover > a > i {
        transform: rotate(180deg);
        transition: transform 0.3s ease;
    }
    
    /* Submenu positioning */
    .dropdown-submenu .dropdown-submenu-content {
        position: absolute;
        left: 100%;
        top: 0;
    }
}

/* Animation for dropdown */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile navigation & dropdown styles */
@media (max-width: 768px) {    /* Modern 3D Main menu header */
    .mobile-menu-header {
        padding: 20px 15px;
        background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(97, 0, 149, 0.1));
        margin-bottom: 15px;
        text-align: center;
        position: relative;
        border-bottom: 1px solid rgba(0, 240, 255, 0.2);
        box-shadow: 
            0 10px 20px -10px rgba(0, 0, 0, 0.3),
            0 1px 0 rgba(255, 255, 255, 0.05);
        transform-style: preserve-3d;
    }
    
    .mobile-menu-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.5), transparent);
    }
    
    .current-menu-title {
        color: #ffffff;
        font-size: 1.3rem;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        position: relative;
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
        transform: translateZ(5px);
    }
    
    .current-menu-title::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 2px;
        background: linear-gradient(90deg, transparent, #00f0ff, transparent);
    }
    
    /* Dropdown menu in mobile */
    .dropdown-menu {
        position: static;
        width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0 15px;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        backdrop-filter: none;
    }
    
    .dropdown.active > a > i {
        transform: rotate(180deg);
        transition: transform 0.3s ease;
    }
    
    .dropdown.active > .dropdown-menu {
        display: block;
        max-height: 2000px;
        border-left: 1px solid rgba(0, 240, 255, 0.2);
        margin: 5px 0 5px 20px;
        padding-left: 10px;
    }
    
    .dropdown-menu li a {
        padding: 8px 15px;
    }
    
    .dropdown-menu li a:hover {
        background: transparent;
        padding-left: 20px;
    }
    
    /* Mobile back button with 3D effect */
    .back-button {
        margin-bottom: 15px !important;
        transform-style: preserve-3d;
    }

    .back-button a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 0.9rem !important;
        color: #00f0ff !important;
        padding: 12px 20px !important;
        background: rgba(0, 240, 255, 0.08) !important;
        border-radius: 8px;
        border: 1px solid rgba(0, 240, 255, 0.2) !important;
        transform-style: preserve-3d;
        box-shadow: 
            0 5px 15px rgba(0, 0, 0, 0.2),
            0 0 5px rgba(0, 240, 255, 0.3);
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
        transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
        transform: translateZ(0);
        margin: 5px 15px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .back-button a:hover {
        background: rgba(0, 240, 255, 0.12) !important;
        box-shadow: 
            0 8px 20px rgba(0, 0, 0, 0.3),
            0 0 8px rgba(0, 240, 255, 0.5) !important;
        transform: translateZ(5px) !important;
        border: 1px solid rgba(0, 240, 255, 0.4) !important;
    }

    .back-button .back-arrow {
        margin-right: 10px;
        font-size: 1.2rem;
        text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
    }

    /* Mobile dropdown transition effects */
    .dropdown-menu {
        transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    }
    
    .dropdown-menu.active {
        animation: slideInRight 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
    }
    
    @keyframes slideInRight {
        0% {
            opacity: 0;
            transform: translateX(100%) perspective(1000px) rotateY(10deg);
        }
        100% {
            opacity: 1;
            transform: translateX(0) perspective(1000px) rotateY(0);
        }
    }
}
