/* Navbar Base Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999 !important;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1rem;
}

.nav-link:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.15);
}

/* Desktop Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle i {
    transition: transform 0.2s ease;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 280px;
    max-width: 320px;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dropdown-section {
    display: flex;
    flex-direction: column;
}

.dropdown-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #374151;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    transform: translateX(4px);
}

.dropdown-item i {
    width: 16px;
    color: #6b7280;
    transition: color 0.2s ease;
}

.dropdown-item:hover i {
    color: #6366f1;
}

.dropdown-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* Mega Menu Styles */
.mega-menu {
    min-width: 640px;
    max-width: 800px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
}

.dropdown.active .mega-menu {
    transform: translateX(-50%) translateY(0);
}

.mega-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.mega-section {
    display: flex;
    flex-direction: column;
}

.dropdown-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.dropdown-group-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #6366f1;
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.hamburger-line {
    width: 1.5rem;
    height: 2px;
    background: #374151;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

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

.mobile-menu-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    font-size: 1rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* Mobile Dropdown Styles */
.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 300px;
}

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

.mobile-dropdown-item {
    display: block;
    color: #6b7280;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    margin: 0.25rem;
}

.mobile-dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

/* Mobile Mega Menu Styles */
.mobile-mega-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.mobile-dropdown.active .mobile-mega-content {
    max-height: 1200px; /* Increased for all tools */
}

.mobile-section {
    margin-bottom: 1.5rem;
    padding: 0.5rem;
}

.mobile-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.375rem;
    border-left: 3px solid #6366f1;
}/* Utility Styles */
html {
    scroll-padding-top: 4rem;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown.active .dropdown-item {
    animation: slideInDown 0.3s ease forwards;
}

.dropdown.active .dropdown-item:nth-child(1) {
    animation-delay: 0.1s;
}

.dropdown.active .dropdown-item:nth-child(2) {
    animation-delay: 0.15s;
}

.dropdown.active .dropdown-item:nth-child(3) {
    animation-delay: 0.2s;
}

.dropdown.active .dropdown-item:nth-child(4) {
    animation-delay: 0.25s;
}

.dropdown.active .dropdown-item:nth-child(5) {
    animation-delay: 0.3s;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .desktop-nav {
        display: block !important;
    }

    .mobile-menu-btn-container,
    .mobile-menu {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-menu-btn-container {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .dropdown-menu {
        min-width: 320px;
        max-width: 90vw;
    }

    .dropdown-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .mega-menu {
        min-width: 90vw;
        max-width: 95vw;
    }

    .mega-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand span {
        font-size: 1.125rem;
    }

    .mobile-menu-content {
        padding: 1rem;
    }

    .mega-content {
        padding: 1rem;
        gap: 1rem;
    }
}
