/* FinPal Navigation Component Styles */
/* This CSS file contains all styles for the modular navigation component */

/* Navigation - Professional glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.65);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.03), 0 8px 32px rgba(0, 0, 0, 0.35);
    isolation: isolate;
}

/* Navbar glassmorphic background using pseudo-element */
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    z-index: -1;
    pointer-events: none;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.4))
            drop-shadow(0 0 4px rgba(168, 85, 247, 0.2));
    text-decoration: none;
    transition: filter 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.5))
            drop-shadow(0 0 6px rgba(168, 85, 247, 0.3));
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple-500), var(--purple-600));
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0.75rem;
    min-width: 280px;
    z-index: 1001;
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05),
                0 16px 48px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(0, 0, 0, 0.1);
    isolation: isolate;
}

/* Dropdown glassmorphic background using pseudo-element */
/* This prevents backdrop-filter conflicts with parent navbar */
.dropdown-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown:hover .dropdown-menu {
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown:hover .dropdown-menu::before {
    opacity: 1;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease, opacity 0.1s ease;
    margin-bottom: 0.5rem;
    opacity: 0;
}

.nav-dropdown:hover .dropdown-item {
    opacity: 1;
    transition: all 0.3s ease, opacity 0.15s ease;
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item:hover {
    background: rgba(168, 85, 247, 0.1);
    transform: translateX(4px);
}

.dropdown-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.dropdown-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

.dropdown-item:hover .dropdown-title {
    color: var(--purple-400);
}

.dropdown-item:hover .dropdown-desc {
    color: var(--text-secondary);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-primary);
}

/* Button Styles (needed for Sign In button) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-glass {
    background: rgba(168, 85, 247, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(168, 85, 247, 0.2);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.1) inset,
                0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-glass:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.12) inset,
                0 4px 16px rgba(168, 85, 247, 0.15),
                0 0 24px rgba(168, 85, 247, 0.1);
}

.btn-glass:active {
    background: rgba(168, 85, 247, 0.15);
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        isolation: isolate;
    }

    /* Mobile menu blur using pseudo-element */
    .nav-links::before {
        content: '';
        position: absolute;
        inset: 0;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: -1;
        pointer-events: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Mobile dropdown blur - override desktop opacity */
    .dropdown-menu::before {
        opacity: 1 !important;
    }
}
