/*
 * Modern Navigation Bar Enhancements
 * Add these styles for even more advanced effects
 */

/* Advanced Hover Effects for Desktop Navigation */
@media (min-width: 1024px) {
    /* Magnetic hover effect for nav items */
    .tm-main-navigation a {
        position: relative;
        overflow: hidden;
    }
    
    /* Ripple effect on click */
    .tm-main-navigation a::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: radial-gradient(circle, rgba(255, 102, 0, 0.3) 0%, transparent 70%);
        transform: translate(-50%, -50%);
        transition: width 0.6s ease, height 0.6s ease;
        border-radius: 50%;
        z-index: -1;
        pointer-events: none;
    }
    
    .tm-main-navigation a:active::after {
        width: 100px;
        height: 100px;
    }
    
    /* Floating animation for social icons */
    .tm-desktop-socials a {
        animation: float 3s ease-in-out infinite;
    }
    
    .tm-desktop-socials a:nth-child(1) { animation-delay: 0s; }
    .tm-desktop-socials a:nth-child(2) { animation-delay: 0.5s; }
    .tm-desktop-socials a:nth-child(3) { animation-delay: 1s; }
    .tm-desktop-socials a:nth-child(4) { animation-delay: 1.5s; }
    .tm-desktop-socials a:nth-child(5) { animation-delay: 2s; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Glowing border effect for search bar */
.tm-search-bar input[type="search"] {
    position: relative;
}

.tm-search-bar input[type="search"]:focus {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.1), 
                    0 8px 30px rgba(0, 0, 0, 0.15),
                    0 0 20px rgba(255, 102, 0, 0.3);
    }
    to {
        box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.2), 
                    0 8px 30px rgba(0, 0, 0, 0.15),
                    0 0 30px rgba(255, 102, 0, 0.5);
    }
}

/* Mobile menu entrance animation */
.tm-mobile-nav-overlay.is-open .tm-mobile-nav-menu li {
    animation: slideInFromLeft 0.5s ease forwards;
}

.tm-mobile-nav-overlay.is-open .tm-mobile-nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.tm-mobile-nav-overlay.is-open .tm-mobile-nav-menu li:nth-child(2) { animation-delay: 0.2s; }
.tm-mobile-nav-overlay.is-open .tm-mobile-nav-menu li:nth-child(3) { animation-delay: 0.3s; }
.tm-mobile-nav-overlay.is-open .tm-mobile-nav-menu li:nth-child(4) { animation-delay: 0.4s; }
.tm-mobile-nav-overlay.is-open .tm-mobile-nav-menu li:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Particle effect background for mobile nav (optional) */
.tm-mobile-nav-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255, 255, 255, 0.1), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
    pointer-events: none;
}

@keyframes sparkle {
    from { transform: translateY(0); }
    to { transform: translateY(-200px); }
}

/* Smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for mobile nav */
.tm-mobile-nav-overlay::-webkit-scrollbar {
    width: 6px;
}

.tm-mobile-nav-overlay::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.tm-mobile-nav-overlay::-webkit-scrollbar-thumb {
    background: rgba(255, 102, 0, 0.5);
    border-radius: 3px;
}

.tm-mobile-nav-overlay::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 102, 0, 0.7);
}

/* Focus styles for accessibility */
.tm-main-navigation a:focus,
.tm-header-action-btn:focus,
.tm-desktop-socials a:focus,
.tm-mobile-nav-menu a:focus,
.tm-mobile-socials a:focus {
    outline: 2px solid var(--tm-accent);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
