/* ========================================
   فونت و تنظیمات پایه
======================================== */
body {
    font-family: 'Vazirmatn', sans-serif;
}

/* ========================================
   انیمیشن‌ها
======================================== */
@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
    }
}

.animate-fade-in-down {
    animation: fade-in-down 1s ease-out;
}

.animate-fade-in-up {
    animation: fade-in-up 1s ease-out;
}

.animate-fade-in {
    animation: fade-in 1.5s ease-out;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ========================================
   افکت‌های فرمول‌های ریاضی
======================================== */
.math-symbol {
    transition: all 0.3s ease;
    cursor: default;
    user-select: none;
}

    .math-symbol:hover {
        transform: scale(1.3) rotate(10deg);
        color: #fbbf24;
    }

/* ========================================
   افکت کارت‌ها
======================================== */
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .service-card:hover {
        transform: translateY(-10px);
    }

        .service-card:hover .service-icon {
            transform: scale(1.15) rotate(5deg);
        }

.service-icon {
    transition: transform 0.4s ease;
}

/* ========================================
   چالش ریاضی
======================================== */
.challenge-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

    .challenge-option:hover {
        transform: scale(1.03);
        border-color: #3b82f6;
        background-color: #eff6ff;
    }

    .challenge-option.correct {
        background-color: #d1fae5 !important;
        border-color: #10b981 !important;
        color: #065f46 !important;
    }

    .challenge-option.wrong {
        background-color: #fee2e2 !important;
        border-color: #ef4444 !important;
        color: #991b1b !important;
    }

/* ========================================
   FAQ Accordion
======================================== */
.faq-item summary {
    cursor: pointer;
    list-style: none;
    transition: all 0.3s ease;
}

    .faq-item summary::-webkit-details-marker {
        display: none;
    }

    .faq-item summary:hover {
        background-color: #f3f4f6;
    }

.faq-item[open] summary {
    background-color: #eff6ff;
    color: #1e40af;
}

.faq-item .faq-icon {
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}

/* ========================================
   تایم‌لاین اخبار
======================================== */
.news-timeline {
    position: relative;
}

    .news-timeline::before {
        content: '';
        position: absolute;
        right: 20px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    }

.news-item {
    position: relative;
    padding-right: 60px;
}

    .news-item::before {
        content: '';
        position: absolute;
        right: 14px;
        top: 20px;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #3b82f6;
        border: 3px solid white;
        box-shadow: 0 0 0 2px #3b82f6;
    }

/* ========================================
   اسکرول نرم
======================================== */
html {
    scroll-behavior: smooth;
}

/* ========================================
   افکت شمارنده آمار
======================================== */
.stat-number {
    display: inline-block;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-number {
    transform: scale(1.2);
}

/* ========================================
   ریسپانسیو
======================================== */
@media (max-width: 768px) {
    .news-timeline::before {
        display: none;
    }

    .news-item {
        padding-right: 0;
    }

        .news-item::before {
            display: none;
        }
}
/* انیمیشن چشمک‌زن برای بج اعلان‌های جدید */
@keyframes notificationPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.15);
    }
}

.notification-badge-pulse {
    animation: notificationPulse 1.5s ease-in-out infinite;
    transform-origin: center;
}

    .notification-badge-pulse:hover {
        animation: none;
        transform: scale(1);
    }
/* ==========================================
   استایل‌های عمومی پنل ادمین
========================================== */

body {
    font-family: 'Vazirmatn', sans-serif;
}

/* ==========================================
   سایدبار ریسپانسیو پنل ادمین
========================================== */

#admin-sidebar {
    transition: transform 0.3s ease-in-out;
}

/* در موبایل: سایدبار به صورت پیش‌فرض مخفی است (خارج از صفحه به سمت راست) */
@media (max-width: 767px) {
    #admin-sidebar {
        transform: translateX(100%);
    }
    
    #admin-sidebar.sidebar-open {
        transform: translateX(0);
    }
}

/* در دسکتاپ: سایدبار همیشه visible و در flow عادی صفحه */
@media (min-width: 768px) {
    #admin-sidebar {
        position: static !important;
        transform: none !important;
        z-index: auto !important;
    }
    
    #sidebar-overlay {
        display: none !important;
    }
}

/* جلوگیری از اسکرول body وقتی سایدبار موبایل باز است */
body.sidebar-open {
    overflow: hidden;
}