/* RF Nutrition — Custom Styles */

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

/* Selection color */
::selection {
    background-color: #f0ad2e;
    color: #102a43;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #486581;
}

/* Navbar transitions */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08);
}

#navbar.scrolled .font-display {
    color: #102a43;
}

#navbar.scrolled a:not([class*="bg-"]) {
    color: #243b53;
}

/* Mobile menu transitions */
#mobileMenu.open {
    transform: translateX(0);
}

#mobileMenu.closed {
    transform: translateX(-100%);
}

/* Hamburger animation */
#menuBtn.active #bar1 {
    transform: translateY(6px) rotate(45deg);
}

#menuBtn.active #bar2 {
    opacity: 0;
}

#menuBtn.active #bar3 {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile link transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .group img {
        transition: none;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f0ad2e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image aspect ratio fallbacks */
.aspect-\[4\/5\] {
    aspect-ratio: 4/5;
}

.aspect-\[4\/3\] {
    aspect-ratio: 4/3;
}

.aspect-\[3\/4\] {
    aspect-ratio: 3/4;
}

.aspect-\[3\/2\] {
    aspect-ratio: 3/2;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}
