/* Royal Burger - Animations */

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

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes goldShimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Hero Content Animations */
.hero-content h1 {
    animation: fadeInUp 1s ease-out;
}

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

.hero-content p {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-btn {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-content::before {
    animation: float 3s ease-in-out infinite;
}

/* Menu Item Hover Effects */
.menu-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-item:hover {
    animation: none;
}

/* Cart Button Animation */
.cart-btn {
    position: relative;
    overflow: hidden;
}

.cart-btn::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;
}

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

/* Success Message Animation */
.success-message {
    animation: fadeInUp 0.3s ease-out;
}

/* Modal Animations */
.cart-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-modal[style*="flex"] {
    opacity: 1;
}

.cart-content {
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.cart-modal[style*="flex"] .cart-content {
    transform: translateY(0);
}

.verification-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.verification-modal.active {
    opacity: 1;
}

.verification-content {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.verification-modal.active .verification-content {
    transform: scale(1);
}

.options-modal-content {
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .options-modal-content {
    transform: scale(1) translateY(0);
}

/* Button Press Effects */
.add-to-cart:active,
.cart-btn:active,
.cta-btn:active,
.checkout-btn:active,
.quantity-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

/* Hover Effects for Navigation */
.nav-links a {
    position: relative;
    overflow: hidden;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Form Input Focus Animations */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Menu Category Stagger Animation */
.menu-category:nth-child(1) .menu-item {
    animation: slideInRight 0.6s ease-out;
}

.menu-category:nth-child(2) .menu-item {
    animation: slideInLeft 0.6s ease-out 0.2s both;
}

.menu-category:nth-child(3) .menu-item {
    animation: slideInRight 0.6s ease-out 0.4s both;
}

/* Scroll-triggered animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

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

/* Royal Badge Animation */
.royal-badge {
    animation: pulse 2s infinite;
}

/* Menu Item Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-count-animation {
    animation: countUp 0.3s ease-out;
}

/* Verification Status Animations */
.verification-success {
    color: #4CAF50 !important;
    animation: bounceIn 0.5s ease-out;
}

.verification-error {
    color: var(--error-red) !important;
    animation: shake 0.5s ease-in-out;
}

/* Footer Animation on Scroll */
.footer {
    opacity: 1;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.footer.visible {
    opacity: 1;
    transform: translateY(0);
}