/* ===== إعدادات عامة ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

/* ===== شريط التمرير المخصص ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8DC8F0, #A0DAA0);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7CB9E8, #90D090);
}

/* ===== الكانفاس ===== */
#floatingCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== أنيميشن الظهور ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes floatSlower {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

.animation-delay-200 {
    animation-delay: 200ms;
    opacity: 0;
}

.animation-delay-400 {
    animation-delay: 400ms;
    opacity: 0;
}

.animation-delay-600 {
    animation-delay: 600ms;
    opacity: 0;
}

.animate-float-slow {
    animation: floatSlow 4s ease-in-out infinite;
}

.animate-float-slower {
    animation: floatSlower 5s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ===== تأثيرات البطاقات ===== */
.course-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

/* ===== استايل للجوال ===== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* ===== تأثير التحميل للصور ===== */
img {
    -webkit-user-drag: none;
    user-select: none;
}

/* ===== تأثير الزجاج للـ navbar ===== */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

/* ===== تحسين الوضوح للكتابة فوق الخلفية ===== */
section {
    position: relative;
}

/* ===== تأثيرات إضافية للروابط ===== */
a {
    transition: all 0.3s ease;
}

/* ===== تحسين أداء الأنيميشن ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}