/* ============ Header Advanced Effects ============ */

/* تأثير الرعد (Thunder Animation) */
@keyframes thunderBolt {
    0%, 100% {
        text-shadow: 0 0 15px rgba(255, 133, 51, 0.5);
    }
    50% {
        text-shadow: 0 0 25px rgba(255, 133, 51, 0.8),
                     0 0 35px rgba(255, 133, 51, 0.5);
    }
}

.logo-link i {
    animation: thunderBolt 3s ease-in-out infinite;
}

/* تأثير التوهج على الهوفر */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 133, 51, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 133, 51, 0.6);
    }
}

.theme-toggle:hover i,
.menu-toggle:hover i {
    animation: glowPulse 0.6s ease-in-out;
}

/* تأثير النقر (Active) */
.menu-toggle:active,
.theme-toggle:active {
    transform: scale(0.95);
}

/* تحسين التركيز على لوحة المفاتيح */
.nav-link:focus-visible,
.menu-toggle:focus-visible,
.theme-toggle:focus-visible {
    outline: 2px solid rgba(255, 133, 51, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* تأثير سلس للخلفية */
.main-header {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* تحسين الأداء على الأجهزة المحمولة */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .logo-link i {
        animation: none;
    }
}

/* تأثير الظل عند التمرير على روابط التنقل */
.nav-link {
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 133, 51, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link:hover::before {
    opacity: 1;
}

/* تحسين التوازن على الشاشات الكبيرة */
@media (min-width: 1920px) {
    .logo-link {
        letter-spacing: 2px;
    }

    .nav-link {
        letter-spacing: 1px;
    }
}

/* شريط التمرير الجميل */
@media (max-width: 768px) {
    .navigation::-webkit-scrollbar {
        width: 6px;
    }

    .navigation::-webkit-scrollbar-track {
        background: rgba(255, 133, 51, 0.1);
    }

    .navigation::-webkit-scrollbar-thumb {
        background: rgba(255, 133, 51, 0.3);
        border-radius: 3px;
    }

    .navigation::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 133, 51, 0.5);
    }
}

/* تحسول سلس بين الأوضاع الليلية والنهارية */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode {
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: #f5f5f5 !important;
    background-image: radial-gradient(circle at center, #ffffff 0%, #f2f2f2 100%) !important;
    color: #333333 !important;
}

/* تأثير الحدود الممتدة */
.main-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 133, 51, 0.3) 50%, 
        transparent 100%);
    opacity: 0;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}
