/* ===============================
   Animations & Transitions
   =============================== */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    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 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);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Bounce Animation */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.9s both;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.scale-in {
    animation: scaleIn 0.5s ease-out;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* Loading Spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-background);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
    margin: 2rem auto;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 2rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-image {
    height: 200px;
    width: 100%;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Smooth Transitions */
.smooth-transition {
    transition: all 0.3s ease;
}

/* Card Flip */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Image Gallery Animations */
.gallery-item {
    overflow: hidden;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    font-size: 3rem;
    color: var(--color-accent);
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-icon {
    transform: scale(1);
}

/* Menu Item Animations */
.menu-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

.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;
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Navbar Scroll Effect */
.navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInDown 0.3s ease-out;
}

/* Form Input Focus */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    animation: pulse 0.3s ease-out;
}

/* Success Message */
.success-message {
    animation: scaleIn 0.5s ease-out, pulse 1s ease-out 0.5s;
}

/* Error Shake */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.error-shake {
    animation: shake 0.5s ease-out;
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.animate {
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.6s;
}

.stagger-item:nth-child(7) {
    animation-delay: 0.7s;
}

.stagger-item:nth-child(8) {
    animation-delay: 0.8s;
}

/* Text Highlight Animation */
@keyframes highlightFade {
    0% {
        background-color: var(--color-primary);
    }

    100% {
        background-color: transparent;
    }
}

.text-highlight {
    animation: highlightFade 2s ease-out;
}

/* Progress Bar Animation */
@keyframes progress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.progress-bar {
    animation: progress 2s ease-out;
}

/* ===============================
   Enhanced Hover Effects & Transitions
   =============================== */

/* Smooth card hover effect */
.menu-card,
.testimonial-card,
.info-card,
.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-card:hover,
.testimonial-card:hover,
.info-card:hover,
.team-card:hover {
    transform: translateY(-8px);
}

/* Button ripple effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Image zoom on hover */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.1) rotate(2deg);
}

.menu-card-img {
    overflow: hidden;
}

.menu-card-img img {
    transition: transform 0.5s ease;
}

.menu-card:hover .menu-card-img img {
    transform: scale(1.05);
}

/* Shine effect on images */
@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.7s;
}

.shine-effect:hover::after {
    animation: shine 0.7s;
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* Text gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(270deg, var(--color-primary), var(--color-primary-dark), var(--color-primary));
    background-size: 600% 600%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

/* Floating animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Subtle parallax effect */
.parallax {
    transition: transform 0.3s ease-out;
}

/* Badge pulse */
.menu-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* Price highlight */
.price {
    transition: color 0.3s ease, transform 0.3s ease;
}

.menu-card:hover .price {
    color: var(--color-primary);
    transform: scale(1.1);
}

/* Form input focus effects */
input:focus,
textarea:focus,
select:focus {
    transform: scale(1.02);
}

/* Stagger animation delays for grids */
.menu-grid>*:nth-child(1) {
    animation-delay: 0.1s;
}

.menu-grid>*:nth-child(2) {
    animation-delay: 0.2s;
}

.menu-grid>*:nth-child(3) {
    animation-delay: 0.3s;
}

.menu-grid>*:nth-child(4) {
    animation-delay: 0.4s;
}

.menu-grid>*:nth-child(5) {
    animation-delay: 0.5s;
}

.menu-grid>*:nth-child(6) {
    animation-delay: 0.6s;
}

.gallery-grid>*:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery-grid>*:nth-child(2) {
    animation-delay: 0.15s;
}

.gallery-grid>*:nth-child(3) {
    animation-delay: 0.2s;
}

.gallery-grid>*:nth-child(4) {
    animation-delay: 0.25s;
}

.gallery-grid>*:nth-child(5) {
    animation-delay: 0.3s;
}

.gallery-grid>*:nth-child(6) {
    animation-delay: 0.35s;
}

/* Testimonial card reveal */
.testimonial-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.testimonial-card:nth-child(1) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.4s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.6s;
}