/* ========================================
   Mi Casa Mexican Restaurant — Custom Styles
   ======================================== */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #76a356;
    color: #fefdfb;
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(35, 56, 22, 0.08);
}

/* ========================================
   Hero Animations
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 1s;
}

/* ========================================
   Menu Cards
   ======================================== */
.menu-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* ========================================
   Gallery Items
   ======================================== */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 34, 14, 0);
    transition: background 0.3s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(26, 34, 14, 0.15);
}

/* ========================================
   Scroll Reveal (progressive enhancement)
   Only active when JS runs and user prefers motion
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s 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; }
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-nav-link {
    position: relative;
}

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

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

/* ========================================
   Focus Styles (Accessibility)
   ======================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #558532;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Smooth image loading
   ======================================== */
img {
    background-color: #e3eddc;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #76a356;
}

/* ========================================
   Tablet & Desktop Tweaks
   ======================================== */
@media (min-width: 768px) {
    .menu-card:hover {
        transform: translateY(-6px);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar, .gallery-item, .animate-float, .animate-float-delayed {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
