/* ========================================
   Transparent Navbar على الصفحة الرئيسية
   ======================================== */

/* Navbar شفاف في الأعلى */
nav {
    background: rgba(79, 0, 140, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* عندما يسكرول المستخدم للأسفل */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Dark mode - شفاف في الأعلى */
.dark nav {
    background: transparent;
}

.dark nav.scrolled {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* تحسين النصوص للظهور على خلفية شفافة */
nav:not(.scrolled) .text-gray-600 {
    color: rgba(255, 255, 255, 1) !important;
    font-weight: 500;
}

nav:not(.scrolled) .text-gray-500 {
    color: rgba(255, 255, 255, 0.85) !important;
}

nav:not(.scrolled) .hover\:text-primary:hover {
    color: #84cc16 !important;
    text-shadow: 0 0 10px rgba(132, 204, 22, 0.5);
}

/* Logo في الأعلى */
nav:not(.scrolled) .text-primary {
    color: white !important;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

nav:not(.scrolled) .text-xs {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Dark mode toggle button */
nav:not(.scrolled) button {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

nav:not(.scrolled) button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

/* Material Icons في الأعلى */
nav:not(.scrolled) .material-symbols-outlined {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Smooth Animation */
nav * {
    transition: color 0.3s ease, background 0.3s ease, text-shadow 0.3s ease;
}

/* Enhanced shadow on scroll */
nav.scrolled {
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08);
}

.dark nav.scrolled {
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Logo transition */
nav .font-bold {
    transition: all 0.3s ease;
}

nav:not(.scrolled) .font-bold {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Mobile menu improvements */
@media (max-width: 768px) {
    nav:not(.scrolled) {
        background: rgba(79, 0, 140, 0.8);
        backdrop-filter: blur(10px);
    }
    
    /* Mobile menu button */
    nav #mobileMenuBtn {
        position: relative;
        z-index: 9999;
    }
    
    nav:not(.scrolled) #mobileMenuBtn {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
    }
    
    nav:not(.scrolled) #mobileMenuBtn .material-symbols-outlined {
        color: white;
        font-weight: 600;
    }
}

/* Enhance visibility with gradient */
nav:not(.scrolled)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(79, 0, 140, 0.6) 0%,
        rgba(79, 0, 140, 0.3) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: -1;
}

nav.scrolled::before {
    display: none;
}

/* Shine effect on logo */
nav:not(.scrolled) .font-bold {
    position: relative;
    overflow: hidden;
}

nav:not(.scrolled) .font-bold::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}
