/* =========================================
   1. حركات الخلفية واللوحات (Background & Panels)
   ========================================= */

/* حركة ظهور الصورة الخلفية بتلاشي ناعم */
@keyframes bgFadeIn {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

.bg-layer {
    animation: bgFadeIn 1.5s ease-out forwards;
}

/* حركة تحديث محتوى اللوحة الحية عند تغيير الساعة */
@keyframes revealContent {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
        filter: blur(5px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
        filter: blur(0);
    }
}

/* هذا الكلاس راح نضيفه بالـ JS كل ما تتغير الساعة */
.content-refresh {
    animation: revealContent 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* =========================================
   2. حركات الساعة المعمارية (Architectural Clock)
   ========================================= */

/* دوران بطيء جداً للدوائر الزخرفية (طابع هندسي) */
@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.clock-decor-ring {
    animation: slowRotate 60s linear infinite;
}

.clock-decor-compass {
    animation: slowRotate 120s linear infinite reverse;
}

/* نبض العقرب الثواني (Rolex Style) */
.sec-hand {
    transition: transform 0.2s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

/* =========================================
   3. العدادات الدائرية (Progress Circles)
   ========================================= */

/* دخول العداد الدائري الصغير */
@keyframes circlePop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.live-progress-circle, .progress-circle {
    animation: circlePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* =========================================
   4. النوافذ المنبثقة (Premium Modals)
   ========================================= */

@keyframes modalBackdrop {
    from { background: rgba(0,0,0,0); backdrop-filter: blur(0); }
    to { background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); }
}

@keyframes modalEntry {
    0% { opacity: 0; transform: scale(0.9) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal.show {
    display: flex !important;
    animation: modalBackdrop 0.4s ease forwards;
}

.modal.show .modal-content {
    animation: modalEntry 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* =========================================
   5. تفاصيل المشاريع (Staggered List)
   ========================================= */

/* حركة ظهور أيقونات الخدمات واحدة تلو الأخرى */
@keyframes listSlide {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.services-list li, .space-tags span {
    animation: listSlide 0.5s ease-out forwards;
    opacity: 0;
}

/* تأخير متدرج للخدمات */
.services-list li:nth-child(1) { animation-delay: 0.1s; }
.services-list li:nth-child(2) { animation-delay: 0.2s; }
.services-list li:nth-child(3) { animation-delay: 0.3s; }
.services-list li:nth-child(4) { animation-delay: 0.4s; }
.services-list li:nth-child(5) { animation-delay: 0.5s; }

/* تأخير متدرج للمساحات */
.space-tags span:nth-child(1) { animation-delay: 0.4s; }
.space-tags span:nth-child(2) { animation-delay: 0.5s; }
.space-tags span:nth-child(3) { animation-delay: 0.6s; }
.space-tags span:nth-child(4) { animation-delay: 0.7s; }