/* Custom styles for Finley's Produce */

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #fbbf24, #be185d);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #fcd34d, #db2777);
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(7, 7, 16, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #be185d);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Mobile menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-nav-link {
    animation: slideIn 0.3s ease forwards;
}

#mobile-menu.active .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.active .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.active .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.active .mobile-nav-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu toggle animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gold shimmer effect for accent text */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-gold-shimmer {
    background: linear-gradient(90deg, #fbbf24, #fcd34d, #fbbf24, #d97706, #fbbf24);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* Subtle glow for cards on hover */
.group:hover .group-hover\:from-amber-400\/30 {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.15);
}

.group:hover .group-hover\:from-plum-400\/30 {
    box-shadow: 0 0 30px rgba(190, 24, 93, 0.15);
}

/* Image hover effect */
.group:hover img {
    filter: brightness(1.05);
}

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

/* Fix for Google Maps filter on light mode */
@media (prefers-color-scheme: light) {
    iframe[title="Finley's Produce location map"] {
        filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(1.1);
    }
}
