/* Navigation hover effects */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #5b13ec;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Active navigation link styles */
.nav-link.active {
    color: #5b13ec;
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #5b13ec;
    border-radius: 2px;
}

/* Mobile navigation styles */
#global-nav {
    position: fixed;
    z-index: 1000;
}

/* Menu toggle button - iOS 26 Pill Style */
.menu-toggle {
    position: fixed;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 1002;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    color: #000000;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.2) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.menu-toggle:hover {
    transform: translateY(-50%) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.08);
}

.menu-toggle:active {
    transform: translateY(-50%) scale(0.98);
}

/* Mobile navigation panel - iOS 26 Liquid Glass */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: 
        -8px 0 32px rgba(0, 0, 0, 0.12),
        inset 1px 0 0 rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px 0 0 32px;
}

.mobile-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0) 100%);
    border-radius: 32px 0 0 0;
    pointer-events: none;
}

.mobile-nav.open {
    transform: translateX(0);
}

/* Close button - positioned independently */
.close-nav {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.close-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
}

.close-nav:active {
    transform: scale(0.95) rotate(90deg);
}

/* Navigation links - Pill Shaped */
.nav-links {
    padding: 1.5rem;
    padding-top: 4rem;
    overflow-y: auto;
    flex: 1;
}

.nav-links a {
    display: block;
    padding: 0.9rem 1.3rem;
    margin-bottom: 0.6rem;
    color: #fff;
    text-decoration: none;
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    font-size: 1.05rem;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s;
}

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(-4px) scale(1.02);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-links a:active {
    transform: translateX(-2px) scale(0.98);
}

/* Overlay - Enhanced */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Scrollbar styling for glass effect */
.nav-links::-webkit-scrollbar {
    width: 6px;
}

.nav-links::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.nav-links::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.nav-links::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hide on desktop */
@media (min-width: 769px) {
    .menu-toggle,
    .mobile-nav,
    .nav-overlay {
        display: none !important;
    }
}

/* Show on mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .mobile-nav {
        width: 300px;
    }

}
