﻿/*=============== NAVBAR ANIMATIONS & EFFECTS ===============*/

/* Smooth entrance animation للـ navbar */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media screen and (max-width: 1023px) {
    .nav__menu {
        animation: slideUpFade 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

/* Floating animation للـ navbar */
@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-3px);
    }
}

@media screen and (max-width: 1023px) {
    .nav__menu:hover {
        animation: float 3s ease-in-out infinite;
    }
}

/* Icon bounce عند hover */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(-3px) scale(1.1);
    }

    50% {
        transform: translateY(-6px) scale(1.15);
    }
}

.nav__link:hover i {
    animation: iconBounce 0.6s ease;
}





/* Scale animation للـ dropdown items */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.nav__item.dropdown .dropdown-menu {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

    .nav__item.dropdown .dropdown-menu li {
        animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

        .nav__item.dropdown .dropdown-menu li:nth-child(1) {
            animation-delay: 0.05s;
        }

        .nav__item.dropdown .dropdown-menu li:nth-child(2) {
            animation-delay: 0.1s;
        }

        .nav__item.dropdown .dropdown-menu li:nth-child(3) {
            animation-delay: 0.15s;
        }

        .nav__item.dropdown .dropdown-menu li:nth-child(4) {
            animation-delay: 0.2s;
        }

/* Smooth color transition */
.nav__link,
.nav__link i,
.nav__link span {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reduce motion للمستخدمين الذين يفضلون تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
