/* تعريف الخط المحلي */
@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tajawal';
    src: url('../fonts/Tajawal-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-dark: #005C6E; 
    --primary-light: #1ED2D8; 
    --bg-color: #f8fbfb;
    --text-dark: #333333;
    --text-light: #333333;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 92, 110, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Tajawal', sans-serif; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { direction: rtl; background-color: var(--bg-color); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
body.modal-open { overflow: hidden; }

/* إعدادات الشعار - مكبر ومضبوط */

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; color: var(--primary-dark); font-size: 2.2rem; margin-bottom: 50px; position: relative; font-weight: 800; }
.section-title::after { content: ''; width: 80px; height: 4px; background-color: var(--primary-light); position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); border-radius: 2px; }

header { background-color: var(--white); box-shadow: var(--shadow); position: fixed; width: 100%; top: 0; z-index: 1000; transition: 0.3s; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 700; font-size: 1.1rem; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--primary-light); }

.nav-dropdown { position: relative; }
.nav-dropdown:hover .dropdown-content { display: block; }
.coming-soon-badge { background: #e74c3c; color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; }
.disabled-link { pointer-events: none; opacity: 0.6; }

.menu-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: var(--primary-dark); }

/* الأزرار (Buttons) - تم تحسين المسافات والشكل */
.btn-solid { background: linear-gradient(45deg, var(--primary-dark), var(--primary-light)); color: var(--white); padding: 14px 30px; border-radius: 8px; font-weight: 700; font-size: 1.1rem; text-decoration: none; border: none; cursor: pointer; transition: 0.3s; display: inline-flex; justify-content: center; align-items: center; gap: 8px; box-shadow: 0 4px 15px rgba(30, 210, 216, 0.2); }
.btn-solid:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 92, 110, 0.3); color: white; }
.btn-outline { background: transparent; color: var(--primary-dark); padding: 12px 30px; border-radius: 8px; font-weight: 700; font-size: 1.1rem; border: 2px solid var(--primary-dark); cursor: pointer; transition: 0.3s; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; }
.btn-outline:hover { background: var(--primary-dark); color: var(--white); }


.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.card { background: var(--white); padding: 40px 30px; border-radius: 20px; box-shadow: var(--shadow); text-align: center; transition: 0.3s; border-bottom: 4px solid transparent; }
.card:hover { transform: translateY(-10px); border-bottom-color: var(--primary-light); }
.card-icon { font-size: 3rem; color: var(--primary-light); margin-bottom: 20px; }
.card h3 { color: var(--primary-dark); font-size: 1.5rem; margin-bottom: 15px; }
.about-text { text-align: center; max-width: 800px; margin: 0 auto; color: var(--text-light); font-size: 1.1rem; line-height: 2; }

/* بطاقات الأسعار */
.pricing-card { background: var(--white); padding: 40px 25px; border-radius: 20px; box-shadow: var(--shadow); text-align: center; position: relative; transition: 0.3s; border: 1px solid #eee; display: flex; flex-direction: column; height: 100%; }
.pricing-card.popular { border-color: var(--primary-light); transform: scale(1.05); z-index: 1; box-shadow: 0 15px 40px rgba(30, 210, 216, 0.15); border-top: 5px solid var(--primary-light); }
.pricing-card:hover { transform: translateY(-10px); }
.pricing-card.popular:hover { transform: scale(1.05) translateY(-10px); }
.popular-badge { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); background: var(--primary-light); color: var(--white); padding: 8px 20px; border-radius: 20px; font-weight: bold; font-size: 0.9rem; }
.pricing-card h3 { color: var(--primary-dark); font-size: 1.5rem; margin-bottom: 20px; }
.pricing-card .price { margin-bottom: 30px; display: flex; flex-direction: column; align-items: center; }
.pricing-card .new-price span { font-size: 2.2rem; font-weight: 800; color: var(--primary-dark); }
.pricing-card ul { list-style: none; text-align: right; margin-bottom: 30px; flex-grow: 1; }
.pricing-card ul li { margin-bottom: 15px; color: var(--text-dark); font-size: 1rem; display: flex; align-items: center; }
.pricing-card ul li i { color: var(--primary-light); margin-left: 10px; font-size: 1.2rem; }

/* التبديل الشهري والسنوي */
.billing-toggle { display: flex; justify-content: center; align-items: center; margin-bottom: 40px; gap: 15px; }
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--text-light); transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-dark); }
input:checked + .slider:before { transform: translateX(26px); }

/* قسم خطوات التصميم الجديد */
.steps-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; text-align: center; }
.step-box { background: var(--white); padding: 30px 20px; border-radius: 15px; box-shadow: var(--shadow); position: relative; }
.step-number { width: 50px; height: 50px; background: var(--primary-light); color: var(--white); font-size: 1.5rem; font-weight: bold; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 20px; box-shadow: 0 5px 15px rgba(30, 210, 216, 0.4); }
.step-box h3 { color: var(--primary-dark); margin-bottom: 10px; font-size: 1.3rem; }
.step-box p { color: var(--text-light); font-size: 0.95rem; }

/* قسم الأسئلة الشائعة (FAQ) */
.faq-wrapper { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); margin-bottom: 15px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); overflow: hidden; }
.faq-question { width: 100%; text-align: right; background: none; border: none; padding: 20px; font-size: 1.1rem; font-weight: bold; color: var(--primary-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
.faq-question:hover { color: var(--primary-light); }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; background: #fafafa; }
.faq-item.active .faq-answer { padding: 20px; max-height: 500px; border-top: 1px solid #eee; }
.faq-answer p { color: var(--text-light); margin-bottom: 10px; }
.faq-answer ul { list-style: inside; color: var(--text-light); margin-right: 15px; }

/* الفوتر */
footer { background-color: #0b1c21; color: var(--white); padding: 60px 0 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-text-logo { font-size: 1.8rem; font-weight: 800; color: var(--white); }
.footer-links h3, .footer-contact h3 { font-size: 1.2rem; margin-bottom: 20px; position: relative; display: inline-block; padding-bottom: 5px; color: var(--white); font-weight: bold; }
.footer-links h3::after, .footer-contact h3::after { content: ''; position: absolute; bottom: 0; right: 0; width: 30px; height: 2px; background: var(--primary-light); }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a, .footer-contact a { color: #a9b7b9; text-decoration: none; transition: 0.3s; display: block; margin-bottom: 15px; }
.footer-links ul li a:hover, .footer-contact a:hover { color: var(--primary-light); transform: translateX(-5px); }
.footer-contact a i { margin-left: 10px; color: var(--primary-light); font-size: 1.2rem; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: #a9b7b9; font-size: 0.9rem; }

/* النوافذ المنبثقة (Modals) */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; transition: 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; backdrop-filter: blur(5px); }
.modal-content { background: var(--white); width: 90%; max-width: 500px; padding: 30px; border-radius: 15px; position: relative; transform: translateY(-20px); transition: 0.3s ease; max-height: 90vh; overflow-y: auto; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 15px; left: 20px; font-size: 1.5rem; color: var(--text-light); cursor: pointer; transition: 0.2s; }
.close-modal:hover { color: #e74c3c; }
.modal-content h3 { color: var(--primary-dark); font-size: 1.5rem; margin-bottom: 20px; border-bottom: 2px solid var(--bg-color); padding-bottom: 10px; text-align: center; }

/* تأثيرات الظهور (Reveal) */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* متجاوب مع الهواتف */
@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 80px; left: 0; width: 100%; background-color: var(--white); box-shadow: var(--shadow); padding: 20px; text-align: center; }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .hero-title { font-size: 2.2rem; }
    .section-title { font-size: 1.8rem; }
    .pricing-card.popular { transform: scale(1); box-shadow: var(--shadow); }
    .pricing-card.popular:hover { transform: translateY(-10px); }
}
/* تنسيقات الخصم للإصدار المباشر */
.original-price.has-discount { font-size: 1.2rem; color: var(--text-light); text-decoration: line-through; }
.discounted-price { font-size: 2.2rem; font-weight: 800; color: var(--primary-light); }
.discount-badge { position: absolute; top: 15px; right: -10px; background-color: #e74c3c; color: white; padding: 5px 15px; font-weight: bold; border-radius: 5px; font-size: 0.9rem; z-index: 2; box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3); }
.discount-badge::before { content: ''; position: absolute; bottom: -8px; right: 0; border-width: 8px 10px 0 0; border-style: solid; border-color: #c0392b transparent transparent transparent; }

/* قسم الإحصائيات */
.stat-box { background: var(--white); padding: 30px; border-radius: 15px; box-shadow: var(--shadow); text-align: center; border-bottom: 3px solid var(--primary-light); transition: 0.3s; }
.stat-box:hover { transform: translateY(-5px); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }

/* تنسيقات قسم الهيرو (البانر) */
.hero-banner { 
    padding: 160px 0 80px 0; 
    background: linear-gradient(135deg, #f0f9fa 0%, #ffffff 100%); 
}

.hero-grid { 
    display: grid; 
    grid-template-columns: 1.2fr 0.8fr; 
    align-items: center; 
    gap: 50px; 
}

.hero-title { 
    font-size: 3.2rem; 
    font-weight: 900; 
    color: var(--primary-dark); 
    line-height: 1.2; 
    margin-bottom: 25px; 
}

.hero-title span { 
    color: var(--primary-light); 
}

.hero-desc { 
    font-size: 1.2rem; 
    color: var(--text-muted); 
    margin-bottom: 35px; 
}

.hero-img-3d { 
    width: 100%; 
    height: auto; 
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1)); 
    animation: float 6s ease-in-out infinite; 
}

/* حركة الصورة (الطفو) */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* التجاوب لشاشات الجوال */
@media (max-width: 992px) {
    .hero-grid { 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    
    .hero-title { 
        font-size: 2.4rem; 
    }
    
    .hero-image-content { 
        order: -1; /* لجعل الصورة تظهر فوق النص في الجوال */ 
    }
}
/* =========================================
   القائمة المنسدلة (التعديل النهائي للمحاذاة والمسافات)
   ========================================= */
.mega-menu-alt {
    width: 780px; 
    padding: 30px; 
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 92, 110, 0.12);
    border: 1px solid #eef2f5;
    background: var(--white);
    position: absolute;
    top: 100%;
    z-index: 1000;
    
    /* 🔥 التعديل هنا: سحبها من اليمين لداخل الشاشة 🔥 */
    right: -550px; 
    left: auto;
    transform: translateY(20px); 
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-dropdown:hover .mega-menu-alt {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mega-grid-alt {
    display: grid;
    grid-template-columns: 1fr 1fr 1.1fr; /* ثلاث أعمدة موزونة */
    gap: 30px; 
}

/* تنسيق العناوين (خدمات الويب، الاستضافة) */
.mega-heading {
    font-size: 0.95rem;
    color: #a0aec0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f4f8;
    font-weight: 800;
    text-align: right;
}

/* إرجاع الأيقونات بجانب النص (وليس فوقه) */
.mega-item {
    display: flex;
    flex-direction: row; /* الأيقونة بجانب النص مباشرة */
    align-items: center; /* توسيط رأسي */
    justify-content: flex-start;
    text-align: right; /* محاذاة النص لليمين */
    padding: 12px 0; 
    gap: 15px; /* مسافة ممتازة بين الأيقونة والنص */
    text-decoration: none;
}

.mega-item:hover {
    transform: translateX(-5px);
}

/* ضبط حجم الأيقونة عشان ما تنضغط */
.mega-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0; /* يمنع الأيقونة من التصغير */
    background: var(--bg-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--primary-light);
    transition: 0.3s;
}

.mega-item:hover .mega-icon {
    background: var(--primary-light);
    color: var(--white);
}

.vip-item .mega-icon { background: #fff9e6; color: #f59e0b; }
.vip-item:hover .mega-icon { background: #f59e0b; color: var(--white); }

.mega-text h4 {
    font-size: 1.05rem;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.mega-text p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

/* تنسيق البانر الأزرق الفاتح */
.mega-promo-alt {
    background: #f4f9fa;
    border-radius: 12px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #e1f0f2;
    text-align: right;
}

.promo-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
    align-self: flex-start;
}

.mega-promo-alt h3 {
    color: var(--primary-dark);
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.mega-promo-alt p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.btn-promo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}
/* =========================================
   الرسمة البرمجية المتحركة للبانر (Hero Animation)
   ========================================= */
.tech-animation-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    position: relative;
}

.floating-tech-svg {
    filter: drop-shadow(0 15px 35px rgba(30, 210, 216, 0.2));
}

/* حركة النبض للدائرة الكبيرة (السيرفر المركزي) */
.pulse {
    animation: pulse-animation 4s infinite ease-in-out;
}

@keyframes pulse-animation {
    0% { transform: scale(0.95); opacity: 0.1; transform-origin: center; }
    50% { transform: scale(1.15); opacity: 0.25; transform-origin: center; }
    100% { transform: scale(0.95); opacity: 0.1; transform-origin: center; }
}

/* حركة الخطوط المتدفقة (نقل البيانات) */
.data-line {
    stroke-dasharray: 15;
    animation: dash 2s linear infinite;
}

@keyframes dash {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
}

/* حركة الأيقونات البرمجية العائمة */
.floating-icons text {
    animation: float-icons 6s infinite ease-in-out;
}

.floating-icons text:nth-child(1) { animation-delay: 0s; }
.floating-icons text:nth-child(2) { animation-delay: 1.5s; }
.floating-icons text:nth-child(3) { animation-delay: 3s; }
.floating-icons text:nth-child(4) { animation-delay: 4.5s; }

@keyframes float-icons {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* التجاوب مع الجوال للرسمة */
@media (max-width: 992px) {
    .tech-animation-container { max-width: 350px; margin-top: 30px; }
}
/* =========================================
   تعديل احترافي لتجاوب الجوال ومنع قص القائمة
   ========================================= */
@media (max-width: 992px) {
    
    /* 1. جعل القائمة الرئيسية قابلة للتمرير إذا كانت طويلة جداً */
    .nav-links {
        max-height: calc(100vh - 80px); 
        overflow-y: auto; 
        padding-bottom: 60px; 
    }

    /* 2. ضبط القائمة المنسدلة (الأسعار) لتظهر بشكل طولي مريح */
    .mega-menu-alt {
        width: 100% !important;
        position: static !important; /* تحويلها لنظام طولي يتبع العناصر */
        right: 0 !important; /* إلغاء الـ -550px وكل الإزاحات الجانبية */
        left: 0 !important;
        transform: none !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: none !important;
        background: #f1f8f9 !important; /* لون خلفية خفيف لتمييزها عن الروابط الأساسية */
        padding: 20px !important;
    }

    /* إظهارها عند الضغط */
    .nav-dropdown.active .mega-menu-alt {
        display: block !important;
    }

    /* ترتيب العناصر تحت بعض */
    .mega-grid-alt {
        grid-template-columns: 1fr !important; 
        gap: 15px !important;
    }

    /* إخفاء البانر الإعلاني (نوصي بها للمشاريع) في الجوال لتوفير المساحة */
    .mega-promo-alt {
        display: none !important;
    }

    /* ضبط المسافات بين الأيقونة والنص في الجوال */
    .mega-item {
        padding: 10px 0 !important;
        border-bottom: 1px solid #e2eef0 !important;
    }
}