/* Nitro Nutrition — Custom Styles */

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

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(30, 58, 138, 0.08);
    backdrop-filter: blur(10px);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #1e3a8a;
}

/* Nav links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #22c55e;
    transition: width 0.3s ease;
}

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

#navbar.scrolled .nav-link {
    color: #1e3a8a;
}

#navbar.scrolled .nav-link:hover {
    color: #16a34a;
}

/* Mobile menu */
.mobile-link {
    position: relative;
    display: block;
    padding: 8px 0;
}

/* Product cards */
.product-card {
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-4px);
}

/* Scroll reveal animations — progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Fallback: ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Ensure default state is visible for progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f4ff;
}

::-webkit-scrollbar-thumb {
    background: #4c6ef5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* Selection color */
::selection {
    background-color: #bbf7d0;
    color: #0f1f4a;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Button ripple effect on hover */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a[href]::after {
        content: ' (' attr(href) ')';
    }
}
