/* Navigation Styles - TiTweetAPP Technology Website */

/* Fixed Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95);
    /* backdrop-filter removed for performance */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(26, 26, 46, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-gray);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    transition: left 0.3s ease;
    z-index: -1;
    opacity: 0.1;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover {
    color: var(--text-light);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--secondary-blue);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.nav-link.active::before {
    left: 0;
    opacity: 0.2;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

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

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

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

/* Smooth Scrolling Enhancement */
html {
    scroll-behavior: smooth;
}

/* Section offset for fixed navigation */
section {
    scroll-margin-top: 80px;
}

/* Navigation Animation */
@keyframes navSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remove heavy nav slide-in animation */
/* .navbar { animation: navSlideIn 0.6s ease-out; } */

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
        padding: 2rem 0;
        gap: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
        margin: 0 2rem;
    }
    
    .nav-link:hover {
        background: rgba(0, 212, 255, 0.1);
        border-radius: 10px;
    }
    
    .nav-link.active {
        background: rgba(0, 212, 255, 0.2);
    }
}

/* Navigation Glow Effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-secondary);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Navigation Scroll Progress Indicator */
.nav-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--gradient-secondary);
    width: 0;
    transition: width 0.3s ease;
    z-index: 1001;
}

/* Smooth Scroll Enhancement for Sections */
section {
    scroll-margin-top: 100px;
}

/* Navigation Logo Animation */
.nav-logo h2 {
    transition: var(--transition);
}

.nav-logo h2:hover {
    transform: scale(1.05);
}

/* Navigation Menu Item Stagger Animation */
/* Remove menu item stagger animation for performance */
/* .nav-menu li { opacity: 0; transform: translateY(20px); animation: navItemFadeIn 0.5s ease forwards; } */
/* .nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu li:nth-child(2) { animation-delay: 0.2s; }
.nav-menu li:nth-child(3) { animation-delay: 0.3s; }
.nav-menu li:nth-child(4) { animation-delay: 0.4s; } */

@keyframes navItemFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Animation */
@media (max-width: 768px) {
    .nav-menu li {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .nav-menu.active li {
        opacity: 0;
        transform: translateX(-20px);
        animation: mobileNavItemSlideIn 0.3s ease forwards;
    }
    
    .nav-menu.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { animation-delay: 0.15s; }
    .nav-menu.active li:nth-child(3) { animation-delay: 0.2s; }
    .nav-menu.active li:nth-child(4) { animation-delay: 0.25s; }
}

@keyframes mobileNavItemSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navigation Background Animation */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.navbar.scrolled::before {
    opacity: 0.95;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link.active {
        border-color: var(--secondary-blue);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .navbar,
    .hamburger .bar {
        transition: none;
    }
    
    .navbar {
        animation: none;
    }
    
    .nav-menu li {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}