/* ===== ANIMATIONS & TRANSITIONS ===== */

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
    }
}

/* Navigation Animations */
.navbar {
    animation: slideInFromTop 0.8s ease-out;
}

/* Smart Navigation Animations */
.navbar.nav-hidden {
    animation: navSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.navbar.nav-compact {
    animation: navCompact 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.navbar.nav-scrolled {
    animation: navScrolled 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes navSlideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0.8;
    }
}

@keyframes navCompact {
    from {
        padding: 1rem 2rem;
        background: rgba(26, 26, 26, 0.95);
    }
    to {
        padding: 0.5rem 2rem;
        background: rgba(26, 26, 26, 0.98);
    }
}

@keyframes navScrolled {
    from {
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(10px);
    }
    to {
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(15px);
    }
}

/* Enhanced Hamburger Animation */
.hamburger {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger.active {
    transform: rotate(90deg);
}

.hamburger .bar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: #d4af37;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: #d4af37;
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

/* Hero Section Animations */
.hero-content {
    animation: fadeInUp 1.2s ease-out 0.3s both;
}

.hero-title {
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.7s both;
}

.cta-button {
    animation: fadeInUp 1s ease-out 0.9s both;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Section Animations */
.section-header {
    animation: fadeInUp 0.8s ease-out both;
}

.section-title {
    position: relative;
}

.section-title::after {
    animation: scaleIn 0.6s ease-out 0.3s both;
    transform-origin: center;
}

/* Menu Item Animations */
.menu-item {
    animation: fadeInUp 0.6s ease-out both;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.2s; }
.menu-item:nth-child(3) { animation-delay: 0.3s; }
.menu-item:nth-child(4) { animation-delay: 0.4s; }
.menu-item:nth-child(5) { animation-delay: 0.5s; }
.menu-item:nth-child(6) { animation-delay: 0.6s; }

.menu-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.menu-item-image {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover .menu-item-image {
    transform: scale(1.1);
}

.menu-item-name {
    transition: color 0.3s ease;
}

.menu-item:hover .menu-item-name {
    color: #d4af37;
}

.menu-item-price {
    transition: all 0.3s ease;
}

.menu-item:hover .menu-item-price {
    transform: scale(1.1);
    text-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

/* Featured Badge Animation */
.featured-badge {
    animation: glow 2s ease-in-out infinite;
}

/* Dietary Tags Animation */
.dietary-tag {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.menu-item:hover .dietary-tag {
    transform: translateY(-2px);
}

/* Search and Filter Animations */
.search-container {
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.filter-container {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.search-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    transform: scale(1.02);
}

.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    transform: translateY(-2px);
}

.filter-btn.active {
    animation: pulse 0.4s ease-in-out;
}

/* Modal Animations */
.modal {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-image {
    transition: transform 0.3s ease;
}

.modal:hover .modal-image {
    transform: scale(1.02);
}

.close-button {
    transition: all 0.3s ease;
}

.close-button:hover {
    transform: rotate(90deg) scale(1.1);
}

/* Footer Animations */
.footer-content {
    animation: fadeInUp 0.8s ease-out both;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

/* Loading Animations */
.loading {
    animation: fadeIn 0.3s ease-out;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Scroll Animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Hover Effects for Interactive Elements */
.interactive-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Text Animation Effects */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #d4af37;
    transform: translateX(-100%);
    animation: textReveal 1s ease-out forwards;
}

@keyframes textReveal {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Stagger Animation for Menu Items */
.stagger-animation .menu-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animation .menu-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation .menu-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation .menu-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation .menu-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation .menu-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation .menu-item:nth-child(6) { animation-delay: 0.6s; }

/* Parallax Effect for Hero Background */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Smooth Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #8b7355);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Mobile Menu Animation */
.mobile-menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-menu {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu.active {
    transform: translateX(0);
}

.nav-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.nav-menu.active .nav-item {
    opacity: 1;
    transform: translateX(0);
}

.nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
.nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.2s; }
.nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.3s; }
.nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.4s; }
.nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.5s; }
.nav-menu.active .nav-item:nth-child(6) { transition-delay: 0.6s; }

/* Accessibility - Respect user preferences */
@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;
    }
    
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Performance Optimization */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}