/* استدعاء خط Cairo مباشرة من جوجل */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* ==========================================
   المتغيرات الأساسية (هوية زاوية)
   ========================================== */
:root {
    --primary-dark: #111111;
    --secondary-dark: #1a1a1a;
    --zawya-red: #cc0000;
    --zawya-red-hover: #990000;
    --text-light: #ffffff;
}

body {
    /* إجبار المتصفح على استخدام خط كايرو باستخدام important! */
    font-family: 'Cairo', sans-serif !important;
    background-color: var(--primary-dark);
    color: var(--text-light);
    overflow-x: hidden;
}
/* ==========================================
   المتغيرات الأساسية (هوية زاوية)
   ========================================== */
:root {
    --primary-dark: #111111;       /* أسود عميق */
    --secondary-dark: #1a1a1a;     /* أسود فاتح */
    --zawya-red: #cc0000;          /* الأحمر الخاص بزاوية */
    --zawya-red-hover: #990000;
    --text-light: #ffffff;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    overflow-x: hidden; /* لمنع ظهور شريط التمرير الأفقي */
}

a { text-decoration: none; transition: all 0.3s ease; }
.text-red { color: var(--zawya-red) !important; }

/* ==========================================
   القائمة العلوية (Navbar) - ستايل رواد
   ========================================== */
.custom-navbar {
    background-color: var(--zawya-red) !important;
    padding: 0 !important;
    border-bottom: none;
}
.custom-navbar .container {
    max-width: 100%;
    padding: 0;
}
.custom-navbar .navbar-nav {
    width: 100%;
}
.custom-navbar .nav-item {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    flex-grow: 1;
    text-align: center;
}
.custom-navbar .nav-link {
    color: #ffffff !important;
    font-weight: 700;
    padding: 20px 10px !important;
    font-size: 1.1rem;
    transition: 0.3s;
}
.custom-navbar .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* تظليل الزر النشط ديناميكياً (هذا هو التعديل الجديد) */
.custom-navbar .nav-link.active {
    background-color: #333333 !important;
}

/* زر اللغة الإنجليزية/العربية */
.nav-lang-item {
    border-left: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    background-color: #aa0000; 
}
}

/* ==========================================
   قسم البانر (الاستوديو والخلفية المتحركة)
   ========================================== */
.hero-container {
    position: relative;
    padding-top: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden; /* مهم جداً لحركة الخلفية */
    z-index: 1;
    min-height: 100vh;
}

/* طبقة الخلفية المتحركة */
.hero-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* مسار الصورة بالنسبة لملف الاستايل */
    background: url('../img/zawyabg.jpg') repeat-x center center;
    background-size: auto 100%;
    animation: panBackground 60s linear infinite;
    z-index: -1;
    opacity: 0.9;
}

@keyframes panBackground {
    0% { background-position: 0 0; }
    100% { background-position: -3000px 0; }
}

/* ==========================================
   معرض الصور الشريطي العلوي
   ========================================== */
.top-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    margin-bottom: 50px;
}
.top-gallery img {
    width: 280px;
    height: 160px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    transition: transform 0.4s ease;
}
.top-gallery img:hover {
    transform: scale(1.05);
    border-color: var(--zawya-red);
    cursor: pointer;
}

/* ==========================================
   الصور الفاصلة (القصة المائلة)
   ========================================== */
.shape-divider-white {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: -2px;
    position: relative;
    z-index: 2;
}
.shape-divider-dark {
    width: 100%;
    height: auto;
    display: block;
    margin-top: -2px;
    background-color: #ffffff;
}

/* ==========================================
   القسم الأبيض (من نحن والشعار)
   ========================================== */
.white-content-section {
    background-color: #ffffff;
    position: relative;
    padding-bottom: 80px;
    z-index: 3;
}
.z-logo-center {
    width: 180px;
    margin-top: -100px;
    position: relative;
    z-index: 4;
    margin-bottom: 20px;
    display: block; /* إضافة لضمان التوسيط */
    margin-left: auto; /* إضافة لضمان التوسيط */
    margin-right: auto; /* إضافة لضمان التوسيط */
}
.grey-content-box {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 45px;
    max-width: 900px;
    margin: 20px auto 0;
    border: 1px solid #eaeaea;
}
.grey-content-box p {
    font-size: 1.15rem;
    line-height: 2;
    color: #444;
    font-weight: 600;
    margin: 0;
}

/* ==========================================
   قسم الخدمات والبطاقات
   ========================================== */
.dark-services-section {
    background: url('../img/texture-dark.png') repeat;
    background-color: var(--primary-dark);
    padding: 80px 0;
    position: relative;
}
.service-card {
    background-color: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 30px;
    transition: transform 0.3s, border-color 0.3s;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--zawya-red);
    box-shadow: 0 10px 30px rgba(204, 0, 0, 0.15);
}
.btn-red {
    background-color: var(--zawya-red);
    color: #ffffff;
    font-weight: bold;
    border-radius: 5px;
    border: 1px solid var(--zawya-red);
    transition: 0.3s;
}
.btn-red:hover {
    background-color: var(--zawya-red-hover);
    color: #fff;
}

/* ==========================================
   القائمة العلوية (Navbar) - تنسيق الجوال (Responsive)
   ========================================== */

/* 1. تنسيق زر القائمة في الجوال */
.custom-navbar .navbar-toggler {
    border: none;
    padding: 10px;
    z-index: 1000;
}
.custom-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.7)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 2. تنسيق عناصر القائمة نفسها في الجوال */
@media (max-width: 991px) {
    .custom-navbar .navbar-collapse {
        background-color: var(--zawya-red); /* نفس لون القائمة الرئيسي */
        position: absolute;
        top: 100%; /* تفتح للأسفل تماماً */
        left: 0;
        width: 100%;
        z-index: 999;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .custom-navbar .navbar-nav {
        /* أهم سطر: تحويل القائمة لعمود في الجوال */
        flex-direction: column !important; 
        padding: 10px 0;
    }

    .custom-navbar .nav-item {
        width: 100%;
        border-left: none; /* إزالة الحدود الأفقية */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* إضافة حدود عمودية خفيفة */
    }

    .custom-navbar .nav-link {
        padding: 15px 20px !important;
        text-align: center; /* توسيط النصوص */
    }
}

/* 3. تنسيق عناصر القائمة في الكمبيوتر (يبقى كما هو) */
@media (min-width: 992px) {
    .custom-navbar .navbar-nav {
        flex-direction: row !important;
    }
    .custom-navbar .nav-item {
        flex-grow: 1;
        border-left: 1px solid rgba(255, 255, 255, 0.3);
    }
    .custom-navbar .nav-lang-item {
        border-left: none !important;
        border-right: 1px solid rgba(255, 255, 255, 0.3);
    }
}
    .custom-navbar .nav-item {
        border-left: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .custom-navbar .nav-link {
        padding: 15px !important;
    }
    .navbar-toggler {
        background-color: #fff;
    }
    
    /* إخفاء معرض الصور لضيق المساحة */
    .top-gallery { display: none; }
    
    /* تعديل مسافات الشعار والبطاقات */
    .z-logo-center { margin-top: -50px; width: 130px; }
    .grey-content-box { padding: 25px; }
    .hero-container { min-height: 60vh; padding-top: 100px; }
}
/* تصميم بطاقة معرض الأعمال */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 30px;
    cursor: pointer;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(204, 0, 0, 0.85); /* لون زاوية الأحمر بشفافية */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s all ease-in-out;
    transform: translateY(20px);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-info h5 { color: #fff; font-weight: 700; margin-bottom: 5px; }
.portfolio-info p { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

/* أيقونة الفيديو أو الصورة في المنتصف */
.play-icon {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 10px;
}
/* تنسيق شعار شريط التنقل العلوي */
.nav-logo-custom {
    height: 60px; /* يمكنك التحكم في الحجم من هنا */
    width: auto;
    padding: 5px;
    z-index: 999;
    position: relative;
}

/* التأكد من أن حاوية القائمة لا تغطي الشعار */
.custom-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}