/*
Theme Name: Enfaz Pro
Author: Nour El Din
Description: Industrial Theme - Final Master Version (Right Menu Alignment)
Version: 8.0
*/

/* ========================================= */
/* 1. إعدادات عامة (Global Reset) */
/* ========================================= */
:root {
    --primary: #ffc107;       /* الأصفر */
    --dark: #111111;          /* الأسود */
    --light: #ffffff;         /* أبيض */
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
    background-color: #fff;
    color: #333;
}

/* قاعدة عامة: إلغاء الخط تحت الروابط */
a { text-decoration: none !important; transition: all 0.3s ease; }

/* ========================================= */
/* 2. الهيدر (Header System) */
/* ========================================= */
.top-bar {
    font-size: 0.85rem;
    font-weight: 700;
}

.navbar {
    background: rgba(17, 17, 17, 0.98) !important;
    border-bottom: 3px solid var(--primary);
    padding: 0 !important;
    min-height: 80px;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 900;
    margin-left: 20px !important; /* مسافة صغيرة بين اللوجو والقائمة */
    color: var(--primary) !important;
    display: flex;
    align-items: center;
}

/* ========================================= */
/* 3. القائمة (تجميعها يمين بجوار اللوجو) */
/* ========================================= */
.navbar-nav {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 15px;                      /* مسافة بين كل رابط والتاني */
    
    /* الحركة السحرية للمحاذاة */
    margin-right: 0 !important;     /* إلغاء المسافة اليمين عشان تلزق في اللوجو */
    margin-left: auto !important;   /* زق زرار الخدمة لأقصى اليسار */
    
    list-style: none !important;
    padding: 0 !important;
}

/* تنسيق الروابط (إجبار اللون الأبيض) */
.navbar-nav li a {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    padding: 10px 10px !important;
    position: relative;
    display: block;
}

/* الخط الأصفر عند الوقوف بالماوس */
.navbar-nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transition: width 0.3s;
}

.navbar-nav li a:hover,
.navbar-nav .current-menu-item > a {
    color: var(--primary) !important;
}

.navbar-nav li a:hover::after,
.navbar-nav .current-menu-item > a::after {
    width: 100%;
}

/* زر "اطلب الخدمة" (في أقصى اليسار) */
.header-btn {
    margin-right: 20px !important;
    font-weight: bold !important;
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
}
.header-btn:hover {
    background-color: var(--primary) !important;
    color: #000 !important;
}

/* ========================================= */
/* 4. السلايدر (Hero Section) */
/* ========================================= */
.hero-section {
    position: relative;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.6));
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; }
.hero-title { font-weight: 900; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }

/* ========================================= */
/* 5. الفوتر (Footer Styling) */
/* ========================================= */
.main-footer {
    background-color: #0b0b0b;
    color: #ccc;
}

/* منع اللون الأزرق في الفوتر */
.main-footer a,
.footer-links a,
.footer-links li a {
    color: #b0b0b0 !important; /* رمادي فاتح */
    text-decoration: none !important;
    transition: 0.3s;
}

.main-footer a:hover,
.footer-links a:hover,
.footer-links li a:hover {
    color: var(--primary) !important;
    padding-right: 5px;
}

/* أيقونات السوشيال */
.social-btn {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff !important;
    transition: 0.3s;
}
.social-btn:hover {
    background: var(--primary);
    transform: translateY(-5px);
}
.social-btn:hover i { color: #000 !important; }

/* ========================================= */
/* 6. أزرار الاتصال العائمة (يمين الشاشة) */
/* ========================================= */
.sticky-contact-bar {
    position: fixed !important;
    bottom: 30px;
    right: 30px !important;
    left: auto !important;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-float-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff !important;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s;
}
.contact-float-btn:hover { transform: scale(1.1); color: #fff !important; }

.float-whatsapp { background-color: #25d366 !important; }
.float-phone { background-color: #0d6efd !important; animation: pulse-blue 2s infinite; }

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

/* ========================================= */
/* 7. الموبايل (Responsive Fixes) */
/* ========================================= */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #111;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 20px;
        border-top: 1px solid #333;
    }
    .navbar-nav {
        flex-direction: column !important;
        gap: 0;
        margin-right: auto !important; /* إعادة التوسيط في الموبايل */
        text-align: center;
        width: 100%;
    }
    .navbar-nav li a {
        padding: 15px 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        display: block;
        width: 100%;
    }
    .navbar-nav li a::after { display: none; }
    
    .header-btn {
        margin: 20px auto !important;
        display: block;
        width: 80%;
        text-align: center;
    }
}
/* ========================================= */
/* 8. معرض الصور الاحترافي (Portfolio Grid) */
/* ========================================= */

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    height: 350px; /* ارتفاع موحد للصور */
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* التراكب (Overlay) - يظهر عند اللمس */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.2));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end; /* النص يكون تحت */
    padding: 30px;
}

/* تأثيرات الحركة (Hover Effects) */
.project-item:hover img {
    transform: scale(1.1); /* زوم للصورة */
}

.project-item:hover .project-overlay {
    opacity: 1; /* إظهار الخلفية السوداء */
}

.project-info {
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.project-item:hover .project-info {
    transform: translateY(0);
}
/* ========================================= */
/* 🚀 إصلاح حركة كروت الخدمات والمدونة 🚀 */
/* ========================================= */

.service-card {
    background: #fff;
    border-radius: 15px;      /* تدوير الحواف */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* حركة ناعمة جداً */
    height: 100%;
    border-bottom: 5px solid transparent; /* الخط الأصفر مخفي مؤقتاً */
    position: relative;
    display: flex;
    flex-direction: column;
}

/* عند وقوف الماوس (Hover) */
.service-card:hover {
    transform: translateY(-15px) !important; /* يرفع الكارت لفوق بقوة */
    border-bottom-color: #ffc107 !important; /* يظهر الخط الأصفر */
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important; /* ظل قوي */
}

/* تنسيق الصور جوه الكارت عشان تاخد الشكل */
.service-card img {
    transition: transform 0.5s ease;
}

.service-card:hover img {
    transform: scale(1.05); /* تكبير بسيط للصورة */
}
/* ========================================= */
/* 📱 إصلاحات الأزرار للموبايل (Mobile Fixes) 📱 */
/* ========================================= */

@media (max-width: 768px) {
    
    /* 1. إصلاح أزرار الهيدر (اتصل بنا + خدماتنا) */
    .hero-content .d-flex {
        flex-direction: column !important; /* ترتيب عمودي بدل أفقي */
        gap: 15px !important;              /* مسافة بين الزرين */
        align-items: center;
    }

    .hero-content .btn {
        width: 80% !important;        /* الزر ياخد 80% من عرض الشاشة */
        padding: 12px 0 !important;   /* تقليل الحشو الداخلي */
        font-size: 1.1rem !important; /* حجم خط مناسب */
        margin: 0 !important;         /* إلغاء أي هوامش جانبية */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* 2. تصغير أزرار الاتصال العائمة شوية عشان متغطيش المحتوى */
    .contact-float-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 22px !important;
    }
    
    .sticky-contact-bar {
        bottom: 15px !important;
        right: 15px !important;
        gap: 10px !important;
    }

    /* 3. تصغير العنوان الرئيسي شوية */
    .hero-title {
        font-size: 2.2rem !important;
    }
}
/* ========================================= */
/* 📱 تحويل المشاريع لسلايدر سحب (Swipe) 📱 */
/* ========================================= */

@media (max-width: 768px) {
    
    /* الحاوية (Row) تتحول لشريط تمرير */
    .projects-mobile-scroll {
        display: flex !important;
        flex-wrap: nowrap !important; /* منع العناصر تنزل تحت بعض */
        overflow-x: auto !important;   /* السماح بالتمرير الجانبي */
        gap: 15px !important;
        padding-bottom: 30px !important; /* مساحة عشان صباع المستخدم */
        scroll-snap-type: x mandatory;   /* الكارت يقف في النص بالظبط */
        -webkit-overflow-scrolling: touch; /* نعومة التمرير في الآيفون */
        
        /* إخفاء شريط التمرير (Scrollbar) لشكل أنظف */
        scrollbar-width: none; /* فايرفوكس */
        -ms-overflow-style: none; /* انترنت اكسبلورر */
    }
    
    .projects-mobile-scroll::-webkit-scrollbar { 
        display: none; /* كروم وسفاري */
    }

    /* الكارت نفسه (المشروع) */
    .projects-mobile-scroll .col-md-4 {
        flex: 0 0 85% !important;    /* الكارت ياخد 85% من عرض الشاشة */
        width: 85% !important;
        max-width: 85% !important;
        scroll-snap-align: center;   /* يثبت في نص الشاشة لما تسيب صباعك */
    }
    
    /* تعديل ارتفاع الصورة في الموبايل */
    .project-item {
        height: 280px !important; /* تصغير الارتفاع شوية للموبايل */
    }
}
/* تنسيق قائمة الروابط في الفوتر */
.footer-links { padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links li a {
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    transition: 0.3s;
    display: block;
}
.footer-links li a:before {
    content: "\F282"; /* أيقونة السهم من Bootstrap Icons */
    font-family: "bootstrap-icons";
    color: #b78a29;
    margin-left: 10px;
}
.footer-links li a:hover {
    color: #b78a29 !important;
    padding-right: 8px;
}

/* الأزرار العائمة */
.sticky-contact-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}
.contact-float-btn {
    width: 55px; height: 55px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-decoration: none;
    transition: 0.3s;
}
.float-whatsapp { background-color: #25d366; }
.float-phone { background-color: #b78a29; }
.contact-float-btn:hover { transform: scale(1.1); color: #fff; }

/* أزرار التواصل الاجتماعي */
.social-btn {
    width: 35px; height: 35px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    border-radius: 5px;
    transition: 0.3s;
}
.social-btn:hover { background: #b78a29; color: #fff; }
/* منع قص الصور في جميع كروت الصفحة الرئيسية */
.service-card img, .project-item img {
    object-fit: contain !important; /* إظهار الصورة كاملة */
    width: 100% !important;
    height: auto !important;
    background-color: #f8f8f8; /* خلفية خفيفة للمساحات الفارغة لو الصورة غير منتظمة */
}

/* تحسين شكل الصور في الجوال */
@media (max-width: 768px) {
    .service-card img {
        max-height: 250px;
    }
}
/* تنسيق حاوية السحب الجانبي */
.projects-wrapper {
    overflow-x: auto; /* تفعيل السحب الأفقي */
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* سحب ناعم في الآيفون */
    scroll-snap-type: x mandatory; /* توقف الصور عند السحب بشكل مغناطيسي */
    padding-left: 20px;
}

/* إخفاء شريط التمرير (Scrollbar) لشكل أنظف */
.projects-wrapper::-webkit-scrollbar {
    display: none;
}

/* كارت المشروع داخل السحب */
.project-card-scroll {
    min-width: 300px; /* عرض الكارت في الموبايل والكمبيوتر */
    max-width: 300px;
    scroll-snap-align: center;
    flex-shrink: 0;
}

/* ضمان ظهور الصورة كاملة */
.img-full-view {
    width: 100%;
    height: 250px; /* ارتفاع ثابت للكروت */
    object-fit: contain !important; /* إظهار الصورة كاملة بدون قص */
    background-color: #1a1a1a; /* خلفية سوداء للمساحات الفارغة */
}

.project-item {
    position: relative;
    border: 1px solid #333;
    transition: 0.3s;
}

.project-item:hover {
    border-color: #b78a29;
}
