/* Sticky Test Navigation Styles */
.sticky-test-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transform: translateY(-100%);
    transition: transform 0.25s ease-out;
    padding: 8px 0;
}

.sticky-test-nav.visible {
    transform: translateY(0);
}

.sticky-test-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.sticky-test-nav .test-nav {
    margin: 0;
}

.sticky-test-nav .nav {
    justify-content: flex-start;
    gap: 2px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    width: fit-content;
}

.sticky-test-nav .nav::-webkit-scrollbar {
    display: none; /* WebKit */
}

.sticky-test-nav .nav-link {
    padding: 5px 10px;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 5px;
    transition: all 0.15s ease;
    flex-shrink: 0;
    border-width: 1px;
}

.sticky-test-nav .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.sticky-test-nav .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .sticky-test-nav {
        padding: 6px 0;
    }

    .sticky-test-nav .container {
        padding: 0 8px;
    }

    .sticky-test-nav .nav {
        gap: 2px;
        padding: 4px 6px;
    }

    .sticky-test-nav .nav-link {
        padding: 4px 8px;
        font-size: 0.8125rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .sticky-test-nav .nav-link {
        padding: 4px 7px;
        font-size: 0.75rem;
    }
}

/* Hide on scroll down, show on scroll up enhancement */
.sticky-test-nav.hide-on-scroll {
    transform: translateY(-100%);
}

.sticky-test-nav.hide-on-scroll.visible {
    transform: translateY(0);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    .sticky-test-nav .nav {
        background: rgba(255, 255, 255, 0.98);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sticky-test-nav .nav {
        background: white;
        border: 2px solid black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sticky-test-nav {
        transition: none;
    }

    .sticky-test-nav .nav-link {
        transition: none;
    }
}

/* Original navigation marker for intersection observer */
.test-nav[data-sticky-source] {
    position: relative;
}

/* Ensure content doesn't jump when sticky nav appears */
body {
    scroll-padding-top: 60px;
}