/* =============================================
   Carnitas El Canelo — Custom Styles
   Classic & Elegant Mexican Restaurant
   ============================================= */

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

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

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* Selection */
::selection {
    background: #d14428;
    color: #fdf0ec;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #3D2B1F;
}
::-webkit-scrollbar-thumb {
    background: #d14428;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e05a38;
}

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

#navbar.scrolled {
    background: rgba(61, 43, 31, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link-text {
    color: rgba(253, 250, 247, 0.9);
    transition: color 0.3s ease;
}

.nav-link-text:hover {
    color: #f8c4b4;
}

/* =============================================
   Mobile Menu
   ============================================= */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

#mobileMenu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }
#mobileMenu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.5s; }

/* Hamburger */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

/* =============================================
   Scroll Reveal
   ============================================= */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* =============================================
   Button Hover Effects
   ============================================= */
a {
    text-decoration: none;
}

/* =============================================
   Gallery Hover
   ============================================= */
.rounded-2xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.05);
}

/* =============================================
   Card Hover
   ============================================= */
.bg-white.rounded-2xl {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-white.rounded-2xl:hover {
    transform: translateY(-4px);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    #navbar {
        background: rgba(61, 43, 31, 0.95);
    }

    .floating-card {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1.5rem;
    }
}

/* =============================================
   Reduced Motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .rounded-2xl.overflow-hidden img {
        transition: none;
    }

    .rounded-2xl.overflow-hidden:hover img {
        transform: none;
    }
}

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