/* Custom Animations */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9333ea, #3b82f6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #7c3aed, #2563eb);
}

/* RTL Specific Adjustments */
[dir="rtl"] .space-x-8 > * + * {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-reverse > * + * {
    --tw-space-x-reverse: 1;
}

/* Form Focus Effects */
input:focus, textarea:focus, select:focus {
    transform: translateY(-1px);
}

/* Card Hover Effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Loading Animation for Images */
img {
    transition: opacity 0.3s;
}

img[loading] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 400px;
}

/* Gradient Text Animation */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-gradient-to-r {
    background-size: 200% auto;
    animation: gradient 8s ease infinite;
}

/* Button Ripple Effect */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after {
    width: 300px;
    height: 300px;
}

/* Navigation Blur Effect */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Portfolio Overlay Gradient */
.group:hover .absolute {
    backdrop-filter: blur(2px);
}