/* =========================================
    1. الإعدادات العامة ومنع المشاكل الجانبية
   ========================================= */
:root {
    --bg-color: #041f2d;
    --glass-bg: rgba(255, 255, 255, 0.01);
    --glass-blur: blur(25px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-shadow: 
        inset 0px 4px 10px rgba(255, 255, 255, 0.2), 
        0px 20px 40px rgba(0, 0, 0, 0.3);
}

html, body {
    max-width: 100% !important;
    overflow-x: hidden !important; /* حل نهائي للمسافة البيضاء في الجانب */
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Tajawal', sans-serif;
    scroll-behavior: smooth !important;
}

/* حل مشكلة ظهور الانحناء: الخلفية خلف السكشن يجب أن تكون بيضاء */
.projects-page { 
    background-color: #ffffff !important; 
    color: white; 
    margin: 0; 
}

/* =========================================
    2. المنيو (الناف بار) - نسخة الويب
   ========================================= */
.navbar {
    position: absolute !important; 
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: row !important;
    direction: rtl !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 15px 115px 25px 0 !important;
    gap: 100px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    box-sizing: border-box !important;
}

.navbar .logo {
    display: flex !important;
    padding-left: 115px !important;
}

.navbar .logo img {
    height: 80px !important;
    width: auto !important;
}

.nav-links {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 25px !important;
}

.nav-links li a {
    text-decoration: none !important;
    color: #333 !important;
    font-size: 1.8rem !important;
    font-weight: 300 !important;
    white-space: nowrap !important;
}

.nav-links li a.active {
    border: 2px solid #333 !important;
    padding: 8px 15px !important;
    border-radius: 30px !important;
}

/* =========================================
    3. سكشن العنوان (الهيدر المنحني)
   ========================================= */
.projects-header-section {
    width: 100% !important;
    background-color: var(--bg-color) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* الانحناء العلوي المطلوب */
    border-top-left-radius: 60px !important;
    border-top-right-radius: 60px !important;
border-top: 1px solid #ffffff !important;

    /* المسافة تحت المنيو */
    margin-top: 120px !important; 
    padding: 100px 0 50px !important;
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
}

.main-title-box { 
    position: relative; 
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.text-title { 
    font-size: 5.5rem; 
    font-weight: 900; 
    position: relative; 
    z-index: 5; 
    margin: 0;
    color: white;
}

.title-star-shape { 
    position: absolute; 
    top: 50%; 
    left: 90%; 
    transform: translate(-50%, -50%); 
    width: 280px; 
    opacity: 0.6; 
    z-index: 1; 
    pointer-events: none;
}

/* =========================================
    4. سكشن المشاريع (الكبسولة والشبكة)
   ========================================= */
.projects-section { 
    padding: 20px 0 60px; 
    text-align: center; 
    background-color: var(--bg-color) !important; /* ضمان استمرار اللون الغامق */
    margin-top: -1px; /* منع الفجوات */
}

.category-capsule-inset { 
    width: 85%; 
    max-width: 1000px; 
    margin: 0 auto 50px; 
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
    padding: 18px; 
    border-radius: 100px; 
}

.category-text { 
    font-size: 2rem; 
    font-weight: 700; 
    margin: 0;
    color: white;
}

.projects-grid-container { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
    background-color: var(--bg-color) !important;
}

.deep-inset-card { 
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
    aspect-ratio: 1.2 / 1; 
    border-radius: 35px; 
    padding: 0 !important; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden; 
    position: relative;
}

.deep-inset-card:hover {
    transform: translateY(-8px);
    box-shadow: 0px 25px 50px rgba(0, 0, 0, 0.5) !important;
}

.inner-frame { width: 100%; height: 100%; }
.inner-frame img, .inner-frame video, .inner-frame iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; 
    display: block;
}

/* =========================================
    5. الفوتر (إصلاح كامل)
   ========================================= */


/* =========================================
    6. التوافق (Responsive) - الموبايل والتابلت
   ========================================= */
@media (max-width: 1100px) {
    .projects-grid-container { grid-template-columns: repeat(2, 1fr); }
    .text-title { font-size: 4rem; }
    .navbar { padding: 15px 50px 25px 0 !important; gap: 50px !important; }
}

@media (max-width: 768px) {
    /* المنيو في الموبايل */
    .navbar {
        padding: 10px 15px !important;
        gap: 5px !important;
        justify-content: space-between !important;
    }
    .navbar .logo { padding: 0 !important; margin: 0 !important; }
    .navbar .logo img { height: 45px !important; }
    .nav-links { gap: 10px !important; }
    .nav-links li a { font-size: 0.9rem !important; }

    /* الهيدر في الموبايل */
    .projects-header-section {
        margin-top: 80px !important;
        border-top-left-radius: 40px !important;
        border-top-right-radius: 40px !important;
        padding: 60px 10px !important;
    }
    .text-title { font-size: 2.8rem !important; }
    .projects-grid-container { grid-template-columns: 1fr; gap: 20px; }
    .category-text { font-size: 1.4rem !important; }
    .title-star-shape { width: 160px; left: 85%; }
}
/* =====================================
   MOBILE NAVBAR – EXACT LIKE FIRST CODE
   Logo فوق / Menu تحته / صف واحد
   ===================================== */
@media (max-width: 768px) {

    .navbar {
        flex-direction: column !important;
        align-items: center !important;
        padding: 15px 10px !important;
        gap: 15px !important; /* مسافة بين اللوجو والمنيو */
    }

    /* اللوجو */
    .navbar .logo {
        margin: 0 !important;
        padding: 0 !important;
    }

    .navbar .logo img {
        height: 60px !important;
        width: auto !important;
		    transform: translateX(0px) !important; 
        
        /* التأكد من عدم وجود عوائق */
        position: relative !important;
        z-index: 999 !important;
    }

    /* المنيو */
    .nav-links {
        width: 100% !important;              /* عرض الشاشة بالكامل */
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;                /* نفس الجاب بتاع أول كود */
        padding: 0 !important;
        margin: 0 !important;
        flex-wrap: nowrap !important;
    }

    .nav-links li a {
        font-size: 0.8rem !important;
        white-space: nowrap !important;
    }

    .nav-links li a.active {
        padding: 6px 12px !important;
        border-radius: 25px !important;
    }
}
@media (max-width: 768px) {
    .rights-footer {
        text-align: center;
        padding: 20px;
    }
}
.text-content{
font-size: 1.9rem;
}
/* الانحناء يظهر فقط على الموبايل */
@media (max-width: 768px) {

    /* المنيو طبيعي، يتحرك مع السكول */
    .navbar {
        position: relative !important; /* بدل fixed خليها relative */
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        z-index: 999 !important; /* يكفي ليبقى فوق المحتوى */
        background: #ffffff !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 15px 10px !important;
        gap: 15px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .navbar .logo img {
        height: 60px !important;
        width: auto !important;
    }

    .nav-links {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 5px !important;
        flex-wrap: nowrap !important;
    }

    /* الهيدر المنحني تحت المنيو */
    .projects-header-section {
        margin-top: 0 !important; /* المنيو يتحرك مع المحتوى، لا نحتاج مساحة */
        border-top-left-radius: 50px !important;
        border-top-right-radius: 50px !important;
        background-color: var(--bg-color) !important;
        position: relative !important;
        z-index: 1 !important;
        overflow: visible !important;
        padding: 60px 10px 50px !important;
    }

    /* الانحناء يظهر فوق الهيدر */
    .projects-header-section::before {
        content: "";
        position: absolute;
        top: -50px; /* الانحناء فوق الهيدر مباشرة */
        left: 0;
        width: 100%;
        height: 50px;
        background-color: #ffffff; /* لون الانحناء */
        border-top-left-radius: 50px;
        border-top-right-radius: 50px;
        z-index: 0; /* خلف الهيدر والمحتوى */
    }
}

/* 1. حل مشكلة العرض الزائد في Index (منع السكرول الجانبي) */
html, body {
    width: 100% !important;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
}

/* 2. توحيد الـ Navbar (بدون تدمير باقي الصفحة) */
@media (max-width: 768px) {
    /* استهداف الحاوية فقط */
    header.navbar, nav.navbar, .navbar { 
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        background: #fff !important;
        padding: 15px 0 !important;
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        margin: 0 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    }

    /* ضبط اللوجو - إلغاء أي مارجن علوي */
    .navbar .logo {
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    .navbar .logo img {
        height: 55px !important; /* حجم موحد */
        width: auto !important;
    }

    /* الروابط في صف واحد كما في الصورة */
    .nav-links {
        display: flex !important;
        flex-direction: row !important; /* إجبار الصف الواحد */
        flex-wrap: nowrap !important; /* منع النزول لسطر جديد */
        justify-content: center !important;
        gap: 2px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .nav-links li a {
        font-size: 0.85rem !important;
        color: #333 !important;
        text-decoration: none !important;
        padding: 5px 10px !important;
    }

    /* الكبسولة النشطة (زي الصورة بالظبط) */
    .nav-links li a.active {
        border: 1.5px solid #000 !important;
        border-radius: 50px !important;
        font-weight: bold !important;
        padding: 6px 15px !important;
    }

    /* 3. حل مشكلة المسافة البيضاء فوق اللوجو في Contact وغيرها */
    .projects-header-section, 
    .contact-header-section, 
    .first-section { 
        margin-top: 0 !important; /* إلغاء أي فجوة */
        border-top-left-radius: 50px !important;
        border-top-right-radius: 50px !important;
        background-color: #041f2d !important;
    }
}
@media (max-width: 768px) {
    /* 1. توحيد السكاشن الأولى في كل الصفحات */
    .projects-header-section, 
    .contact-header-section, 
    .hero-section, 
    main section:first-of-type,
    #first-section {
        margin-top: 0 !important; /* إلغاء أي فجوة علوية */
        padding-top: 60px !important; /* مسافة داخلية موحدة من الأعلى */
        padding-bottom: 50px !important;
        background-color: #041f2d !important; /* اللون الكحلي الموحد */
        border-top-left-radius: 50px !important; /* درجة الانحناء */
        border-top-right-radius: 50px !important;
        position: relative !important;
        z-index: 1 !important;
        width: 100% !important;
        border-top: none !important; /* إلغاء أي خطوط قديمة */
    }

    /* 2. ضمان أن الخلفية وراء الانحناءة بيضاء دائماً */
    body, html {
        background-color: #ffffff !important;
    }

    /* 3. إلغاء أي تأثيرات "قبل" (::before) قديمة كانت مسببة مشاكل */
    .projects-header-section::before, 
    .contact-header-section::before,
    .hero-section::before {
        content: none !important;
        display: none !important;
    }
}
@media (max-width: 768px) {
    /* استهداف الحاوية فقط */
    header.navbar, nav.navbar, .navbar { 
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        background: #fff !important;
        padding: 15px 0 !important;
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        margin: 0 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    }

    /* ضبط اللوجو - إلغاء أي مارجن علوي */
    .navbar .logo {
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    .navbar .logo img {
        height: 55px !important; /* حجم موحد */
        width: auto !important;
    }

    /* الروابط في صف واحد كما في الصورة */
    .nav-links {
        display: flex !important;
        flex-direction: row !important; /* إجبار الصف الواحد */
        flex-wrap: nowrap !important; /* منع النزول لسطر جديد */
        justify-content: center !important;
        gap: 10px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .nav-links li a {
        font-size: 0.85rem !important;
        color: #333 !important;
        text-decoration: none !important;
        padding: 0px 0px !important;
    }

    /* الكبسولة النشطة (زي الصورة بالظبط) */
    .nav-links li a.active {
        border: 1.5px solid #000 !important;
        border-radius: 50px !important;
        font-weight: bold !important;
        padding: 6px 15px !important;
    }

    /* 3. حل مشكلة المسافة البيضاء فوق اللوجو في Contact وغيرها */
    .projects-header-section, 
    .contact-header-section, 
    .first-section { 
        margin-top: 0 !important; /* إلغاء أي فجوة */
        border-top-left-radius: 50px !important;
        border-top-right-radius: 50px !important;
        background-color: #041f2d !important;
    }
}
/* تنسيق إطار الكارت الداخلي */
.inner-frame {
    position: relative;
    width: 100%;
    height: 250px; /* أو الطول اللي يريحك */
    overflow: hidden;
    border-radius: 12px;
}

/* جعل الفيديو أو الصورة تملأ الكارت بالكامل */
.inner-frame img, 
.inner-frame .video-card, 
.inner-frame iframe {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ده أهم سطر عشان يملأ المساحة بدون تشويه */
    border: none;
}

/* منع أي تفاعل مع الفيديو أو اليوتيوب وهو جوه الكارت عشان يفتح الـ Modal بس */
.inner-frame .video-card {
    pointer-events: none; 
}

/* الطبقة الشفافة فوق الكارت لضمان الضغط في أي مكان يفتح المودال */
.video-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: zoom-in;
}