/* Custom styles for Jack's restaurant website */

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

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

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

::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 5px;
}

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

/* Selection color */
::selection {
    background: #ffd6c8;
    color: #7c2d12;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #ff6b4a;
    outline-offset: 2px;
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Fade in animation for scroll reveal */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image hover zoom effect */
img {
    transition: transform 0.3s ease;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
button, a {
    transition: all 0.3s ease;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    border-color: #ff6b4a;
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

/* Back to top button visibility */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* Gallery grid adjustments */
@media (max-width: 768px) {
    .grid-cols-2 > :nth-child(3),
    .grid-cols-2 > :nth-child(4) {
        grid-column: span 1;
    }
}

/* Ensure proper contrast on all backgrounds */
.bg-charcoal-900 * {
    color: inherit;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
