/* -------------------------------------- */
/* 1. المتغيرات والألوان الأساسية (Tech/Neon Colors) */
/* -------------------------------------- */
:root {
    /* الخلفية الأساسية - داكن جدًا */
    --dark-tech: #0F0F1A; 
    /* الأزرق الكهربائي - اللون الأساسي */
    --neon-blue: #00BFFF; 
    /* السماوي الفاتح - اللون الثانوي/التمييز (بديل اللون الأخضر) */
    --light-sky-blue: #87CEEB; 
    /* خلفية الأقسام الداخلية */
    --dark-section: #1A1A2E;
    /* خلفية البطاقات/الفوتر */
    --dark-footer: #111122;
    /* لون حقول الإدخال */
    --dark-input-tech: #25253A;
    /* ظل النص النيون الأزرق */
    --shadow-blue: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
    
    /* متغيرات الوضع النهاري (Light Mode Variables) */
    --light-background: #F8F8FF; 
    --light-text: #222831; 
    --light-section: #FFFFFF; 
    --light-card: #EEEEEE; 
    --light-input: #E9E9E9; 
    --light-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
    --light-shadow-blue: 0 0 5px var(--neon-blue), 0 0 10px rgba(0, 191, 255, 0.5);

    /* NEW: تعريف الخطوط العربية */
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;
}

/* التنسيق العام */
body {
    font-family: var(--font-body); /* تطبيق خط Tajawal للنصوص العادية */
    color: #f8f9fa; 
    transition: background-color 0.4s ease, color 0.4s ease; 
    /* منع ظهور النص قبل تحميل الخط لتجنب وميض الخط (Flash of Unstyled Text) */
    font-display: swap;
}


/* تطبيق خط Cairo على العناوين */
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-heading);
    font-weight: 900; 
}


/* تطبيق الألوان على عناصر Bootstrap (الوضع الليلي الأساسي) */
.bg-dark-tech { background-color: var(--dark-tech) !important; }
.bg-dark-section { background-color: var(--dark-section) !important; }
.section-dark-card { background-color: var(--dark-footer) !important; }
.bg-dark-footer { background-color: var(--dark-footer) !important; }
.text-neon-blue { color: var(--neon-blue) !important; }
.text-light-sky-blue { color: var(--light-sky-blue) !important; }

.bg-dark-input-tech {
    background-color: var(--dark-input-tech) !important;
    border: 1px solid var(--neon-blue) !important;
    color: #fff !important; 
}
.bg-dark-input-tech:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 191, 255, 0.25) !important;
    border-color: var(--neon-blue) !important;
}
.bg-dark-input-tech option {
    background-color: var(--dark-footer); 
}

/* تأثير الظل النيون على النصوص والأزرار */
.shadow-text-blue { text-shadow: var(--shadow-blue); }


/* -------------------------------------- */
/* 2. أنماط الشعار - تصميم نظيف وحاد (Clean and Minimal) */
/* -------------------------------------- */
.cloudsnap-logo-navbar {
    height: 45px; 
    transition: all 0.3s ease;
    vertical-align: middle; 
    filter: none; 
}

.cloudsnap-logo-footer {
    height: 60px;
    transition: all 0.3s ease;
    vertical-align: middle;
    filter: none; 
}

.custom-navbar .navbar-brand {
    position: relative; 
}

.custom-navbar .navbar-brand:after {
    content: '';
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: -5px;
    right: 0;
    background-color: var(--neon-blue);
    transition: width 0.3s ease;
}

.custom-navbar .navbar-brand:hover:after {
    width: 100%;
}

.custom-navbar.scrolled .cloudsnap-logo-navbar {
    height: 40px; 
    filter: none;
}

.navbar-brand .text-white {
    font-size: 1.6rem;
}
.footer .navbar-brand .text-white {
    font-size: 2rem;
}

/* -------------------------------------- */
/* 3. التفاعلات والحركات الإضافية (Hover Effects) */
/* -------------------------------------- */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 191, 255, 0.4);
}

.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.3); 
}

.hover-neon-blue:hover {
    color: var(--neon-blue) !important;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.5); 
}

/* -------------------------------------- */
/* 4. تخصيص الأزرار (Neon Buttons) */
/* -------------------------------------- */
.btn-neon-blue {
    background-color: var(--neon-blue);
    border-color: var(--neon-blue);
    color: var(--dark-tech);
    font-weight: bold;
    box-shadow: 0 0 10px var(--neon-blue);
    transition: all 0.3s ease;
}
.btn-neon-blue:hover {
    background-color: #00a0e0;
    border-color: #00a0e0;
    box-shadow: 0 0 20px var(--neon-blue);
    color: var(--dark-tech);
}
.btn-light-sky-blue {
    background-color: var(--light-sky-blue);
    border-color: var(--light-sky-blue);
    color: var(--dark-tech);
    font-weight: bold;
    box-shadow: 0 0 10px var(--light-sky-blue);
    transition: all 0.3s ease;
}
.btn-light-sky-blue:hover { 
    background-color: #6fb0cf;
    border-color: #6fb0cf;
    box-shadow: 0 0 20px var(--light-sky-blue);
    color: var(--dark-tech);
}

.btn-outline-light-sky-blue {
    color: var(--light-sky-blue);
    border-color: var(--light-sky-blue);
    transition: all 0.2s ease;
}
.btn-outline-light-sky-blue:hover {
    background-color: var(--light-sky-blue);
    color: var(--dark-tech);
}

/* -------------------------------------- */
/* 5. الـ Navbar وتأثير التمرير */
/* -------------------------------------- */
.custom-navbar {
    background-color: rgba(15, 15, 26, 0.85); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.custom-navbar.scrolled {
    background-color: rgba(15, 15, 26, 0.95) !important; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); 
}
.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
    color: var(--light-sky-blue) !important;
    text-shadow: none; 
}

/* -------------------------------------- */
/* 6. قسم البطل (Hero Section) */
/* -------------------------------------- */
.hero-section-tech {
    background: 
        linear-gradient(rgba(15, 15, 26, 0.95), rgba(15, 15, 26, 0.95)), 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%2300bfff' fill-opacity='0.1'%3E%3Cpath fill-rule='evenodd' d='M0 0h4v4H0V0zm4 4h4v4H4V4z'/%3E%3C/g%3E%3C/svg%3E");
    background-color: var(--dark-tech);
    min-height: 90vh;
    padding-top: 150px;
    position: relative;
    border-bottom: 5px solid var(--neon-blue);
    background-size: 60px 60px;
}

/* -------------------------------------- */
/* 7. أنماط بطاقات المشاريع والخدمات */
/* -------------------------------------- */
.tech-card {
    background-color: var(--dark-section);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.tech-card:hover {
    box-shadow: 0 0 25px rgba(0, 191, 255, 0.3);
    border-color: var(--neon-blue) !important;
}

.border-neon-blue {
    border: 1px solid var(--neon-blue) !important;
}

.border-light-sky-blue {
    border: 1px solid var(--light-sky-blue) !important;
}
.active-tech-card {
    border-color: var(--light-sky-blue) !important;
    box-shadow: 0 0 25px rgba(135, 206, 235, 0.3);
}

/* -------------------------------------- */
/* 8. أنماط قسم لماذا نحن (Why Us) */
/* -------------------------------------- */
.why-us-card {
    background-color: var(--dark-tech);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.why-us-card:hover {
    background-color: var(--dark-section);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
    transform: scale(1.05);
}

/* -------------------------------------- */
/* 9. أنماط تفاصيل نظام الحضور (Attendance Details) */
/* -------------------------------------- */
.feature-detail-card {
    background-color: var(--dark-section);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-detail-card:hover {
    background-color: var(--dark-footer);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
}

/* -------------------------------------- */
/* 10. أنماط الأسئلة الشائعة (FAQ) */
/* -------------------------------------- */
.tech-accordion .accordion-item {
    background-color: var(--dark-section);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.tech-accordion .accordion-button {
    background-color: var(--dark-section);
    color: var(--light-sky-blue);
    font-weight: bold;
    border: none;
    box-shadow: none !important;
    transition: all 0.3s ease;
}
.tech-accordion .accordion-button:not(.collapsed) {
    background-color: var(--dark-footer);
    color: var(--neon-blue);
}

.tech-accordion .accordion-body {
    background-color: var(--dark-footer);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8f9fa;
}


/* -------------------------------------- */
/* 11. أنماط آراء العملاء (Testimonials) */
/* -------------------------------------- */
.testimonial-card {
    background-color: var(--dark-section);
    border: 1px solid var(--light-sky-blue);
    box-shadow: 0 0 15px rgba(135, 206, 235, 0.2);
    transition: all 0.3s ease;
}

.testimonial-card .avatar {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border: 3px solid var(--neon-blue);
}

/* -------------------------------------- */
/* 12. أنماط حاسبة التكلفة (Estimator) */
/* -------------------------------------- */
.estimator-card {
    background-color: var(--dark-section);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 191, 255, 0.4);
}

/* للزر المحدد في الـ Radio Check */
.btn-check:checked + .btn-outline-light-sky-blue {
    background-color: var(--neon-blue);
    border-color: var(--neon-blue);
    color: var(--dark-tech);
    box-shadow: 0 0 10px var(--neon-blue);
}

/* أنماط الـ Switch (الميزات الإضافية) */
.custom-switch-tech .form-check-input {
    background-color: var(--dark-input-tech);
    border-color: var(--light-sky-blue);
}
.custom-switch-tech .form-check-input:checked {
    background-color: var(--neon-blue);
    border-color: var(--neon-blue);
}
.custom-switch-tech .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 191, 255, 0.3);
}

/* -------------------------------------- */
/* 13. أنماط قسم فريقنا (Our Team) */
/* -------------------------------------- */
.team-card {
    background-color: var(--dark-section);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding-bottom: 25px !important; 
}
.team-card:hover {
    background-color: var(--dark-footer);
    box-shadow: 0 0 20px rgba(135, 206, 235, 0.3);
}

.team-avatar {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}
.team-avatar i {
    opacity: 0.8;
}

.team-card .social-links a {
    font-size: 1.25rem;
    transition: color 0.2s ease;
}
/* CTA نهائي مختلف الخلفية */
.section-dark-card .cta-tech-bg {
    box-shadow: 0 0 40px rgba(0, 191, 255, 0.4); 
    border: 1px solid var(--neon-blue); 
}

/* ====================================== */
/* 14. أنماط الوضع النهاري (LIGHT MODE) */
/* ====================================== */
body.light-mode {
    font-family: var(--font-body);
    background-color: var(--light-background) !important;
    color: var(--light-text) !important;
}

/* الألوان الأساسية */
.light-mode .text-white,
.light-mode h1, .light-mode h2, .light-mode h3, .light-mode h4, .light-mode h5, .light-mode h6 {
    color: var(--light-text) !important;
    font-family: var(--font-heading) !important; /* التأكد من تطبيق Cairo على العناوين */
}
.light-mode .text-white-50 {
    color: #6c757d !important; /* نص رمادي داكن */
}
.light-mode .shadow-text-blue {
    text-shadow: var(--light-shadow-blue); /* ظل أزرق خفيف */
}
.light-mode .btn-outline-light {
    border-color: var(--light-text) !important;
    color: var(--light-text) !important;
}
.light-mode .btn-outline-light:hover {
    background-color: var(--light-text);
    color: var(--light-background) !important;
}
/* إخفاء الألوان الداكنة من Bootstrap */
.light-mode .bg-dark-tech,
.light-mode .bg-dark-section,
.light-mode .section-dark-card,
.light-mode .bg-dark-footer {
    background-color: var(--light-background) !important;
}

/* الـ Navbar في الوضع الفاتح */
.light-mode .custom-navbar {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.light-mode .custom-navbar.scrolled {
    background-color: #FFFFFF !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.light-mode .custom-navbar .navbar-brand .text-white {
    color: var(--light-text) !important;
}
.light-mode .custom-navbar .nav-link {
    color: var(--light-text) !important;
}
.light-mode .custom-navbar .nav-link:hover,
.light-mode .custom-navbar .nav-link.active {
    color: var(--neon-blue) !important; 
}
.light-mode .btn-close-white {
    filter: invert(1); 
}


/* البطاقات والعناصر */
.light-mode .tech-card,
.light-mode .why-us-card,
.light-mode .feature-detail-card,
.light-mode .testimonial-card,
.light-mode .team-card {
    background-color: var(--light-card) !important;
    box-shadow: var(--light-shadow);
    border: 1px solid #CCCCCC !important;
}
.light-mode .tech-card:hover,
.light-mode .why-us-card:hover,
.light-mode .feature-detail-card:hover,
.light-mode .testimonial-card:hover,
.light-mode .team-card:hover {
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.4); 
}

/* حقول الإدخال والأزرار (Form Controls) */
.light-mode .bg-dark-input-tech {
    background-color: var(--light-input) !important;
    border: 1px solid #CCCCCC !important;
    color: var(--light-text) !important;
}

/* قسم حاسبة التكلفة */
.light-mode .estimator-card {
    background-color: var(--light-section);
    border: 1px solid var(--neon-blue);
    box-shadow: var(--light-shadow-blue);
}
.light-mode .estimator-card .form-select,
.light-mode .estimator-card input {
     background-color: var(--light-card) !important;
}
/* الـ Accordion في الوضع الفاتح */
.light-mode .tech-accordion .accordion-item {
    background-color: var(--light-card);
    border: 1px solid #CCCCCC;
}
.light-mode .tech-accordion .accordion-button {
    background-color: var(--light-card);
    color: var(--light-text);
}
.light-mode .tech-accordion .accordion-button:not(.collapsed) {
    background-color: var(--light-section);
    color: var(--neon-blue);
}
.light-mode .tech-accordion .accordion-body {
    background-color: var(--light-section);
    color: var(--light-text);
}

/* CTA في الوضع الفاتح */
.light-mode .cta-tech-bg {
    background-color: var(--light-card) !important;
    border: 1px solid var(--neon-blue);
}

/* ====================================== */
/* 15. تحسينات التجاوب (MEDIA QUERIES) */
/* ====================================== */

/* -------------------------------------- */
/* شاشات الجوال الصغيرة (أقل من 576px) */
/* -------------------------------------- */
@media (max-width: 576px) {
    /* 1. ضبط العناوين الرئيسية */
    .hero-section-tech h1 {
        font-size: 2.5rem !important; /* تصغير عنوان البطل */
    }
    .display-5 {
        font-size: 1.75rem !important; /* تصغير العناوين الفرعية */
    }
    .display-6 {
        font-size: 1.5rem !important;
    }
    .lead {
        font-size: 1rem !important; /* تصغير نص المقدمة */
        width: 95% !important; /* استخدام عرض أكبر في الجوال */
    }

    /* 2. ضبط الأقسام والـ Navbar */
    .hero-section-tech {
        min-height: 80vh; /* تقليل ارتفاع قسم البطل */
        padding-top: 100px; 
    }
    .custom-navbar .navbar-brand .text-white {
        font-size: 1.4rem; /* تصغير نص الشعار */
    }

    /* 3. زر تبديل الوضع (Dark/Light Mode) */
    .mode-toggle-btn {
        margin-right: 0 !important; 
        margin-left: 0 !important;
        margin-bottom: 10px;
        width: 100%; /* جعله يأخذ عرض كامل */
    }
    .navbar-collapse .btn:not(.mode-toggle-btn) {
        width: 100%;
    }

    /* 4. قسم الإحصائيات (Counter Section) */
    .counter {
        font-size: 2.5rem !important; 
    }
    
    /* 5. قسم التقييمات - عرض عمودي */
    #testimonials .col-md-4 {
        margin-bottom: 20px;
    }
    
    /* 6. حاسبة التكلفة - تقليل المسافات */
    .estimator-card {
        padding: 20px !important;
    }
    .estimator-card h4 {
        font-size: 1.2rem;
    }
}

/* -------------------------------------- */
/* شاشات الأجهزة اللوحية (من 577px إلى 992px) */
/* -------------------------------------- */
@media (min-width: 577px) and (max-width: 991.98px) {
    .hero-section-tech h1 {
        font-size: 3.5rem !important;
    }
    .display-5 {
        font-size: 2.5rem !important;
    }
    /* في وضع الشاشة الأفقية للتابلت، نجعل الـ Navbar يظهر بشكل أفضل */
    .custom-navbar .navbar-nav {
        margin-left: auto;
    }
}


/* تنسيق زر WhatsApp العائم */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366; /* لون واتساب الأخضر */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-decoration: none; /* إزالة خطوط الروابط */
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}


/* استجابة الأجهزة (Media Queries) - التحديث */
@media (max-width: 768px) {
    /* ... (التنسيقات السابقة للأجهزة الصغيرة) ... */
    
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* تنسيق مؤشر التقدم (Progress Bar) */
#progressBar {
    position: fixed;
    top: 0; 
    left: 0;
    width: 0%;
    height: 4px; /* سمك الشريط */
    background-color: #ffc107; /* لون مميز (أصفر) */
    z-index: 1001; /* لضمان ظهوره فوق الـ Header */
    transition: width 0.1s; 
}
/* ... (باقي تنسيقات CSS) ... */

/* استجابة الأجهزة (Media Queries) - التحديث */
@media (max-width: 768px) {
    /* ... (التنسيقات السابقة للأجهزة الصغيرة) ... */
    
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
/* تنسيق زر الواتساب العائم */
.whatsapp-float-btn {
    position: fixed;
    bottom: 30px; /* مسافة من الأسفل */
    left: 30px; /* مسافة من اليسار (لأن الاتجاه RTL) */
    z-index: 1000;
    width: 60px;
    height: 60px;
    background-color: #25D366; /* لون واتساب الأخضر */
    color: white;
    border-radius: 50%; /* لجعل الزر دائريًا بالكامل */
    text-align: center;
    line-height: 60px; /* لجعل الأيقونة في المنتصف تمامًا */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* ظل أنيق */
    font-size: 28px; /* حجم أيقونة الواتساب */
    transition: all 0.3s ease;
}

/* تأثير عند التمرير بالماوس */
.whatsapp-float-btn:hover {
    background-color: #128C7E; /* لون أغمق عند التمرير */
    transform: scale(1.1); /* تكبير طفيف عند التمرير */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* 9. تنسيق زر العودة للأعلى الديناميكي */
.scroll-to-top-hidden {
    opacity: 0;
    visibility: hidden; /* إخفاء فعلي لضمان عدم ظهوره قبل التمرير */
    pointer-events: none; /* يضمن عدم حظر النقر على العناصر تحته */
    transition: all 0.3s ease-in-out;
}

.scroll-to-top-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* جعله قابلاً للنقر */
    transform: translateY(0);
}

/* تنسيق نظام التقييم */
.rating-stars .star-icon {
    cursor: pointer;
    transition: color 0.2s;
    margin-inline: 2px;
}

.rating-stars .star-icon:hover {
    color: #ffc107; /* يضيء قليلاً عند التمرير */
}



/* 18. تنسيق مؤشر التنقل النقطي العائم */
.dot-navigation {
    position: fixed;
    top: 50%;
    left: 30px; /* يظهر على اليسار في وضع RTL */
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.dot-nav-item {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 10px 0;
    background-color: #ffffff4d; /* لون رمادي فاتح شفاف */
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.dot-nav-item:hover {
    background-color: #00ffff80; /* لون نيوني فاتح عند التمرير */
}

/* الكلاس النشط: يتم تلوينه بالنيون الأزرق */
.dot-nav-item.active {
    background-color: #00ffff; /* النيون الأزرق */
    border-color: #00ffff;
    transform: scale(1.2); /* تكبير بسيط للدلالة على النشاط */
}

/* قبل التعديل: */
/*
            <circle class="progress-ring-circle"
                stroke="currentColor" 
                stroke-width="4"
                fill="transparent"
                r="26"
                cx="30"
                cy="30"/>
*/

/* بعد التعديل: */
.progress-ring-circle {
    stroke: var(--color-border-subtle); /* الخلفية الرمادية للحلقة */
    transition: stroke-dashoffset 0.3s ease-out;
    stroke-linecap: round;
}