/* ==========================================================================
   1. الإعدادات العامة والمتغيرات (Reset & Variables)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

[data-lang="ar"] * { font-family: 'Cairo', sans-serif; }
[data-lang="fr"] * { font-family: 'Poppins', sans-serif; }

:root {
    --primary-color: #0b2b20; 
    --sbc-blue: #1b358a;     
    --farha-green: #24963e;   
    --juga-blue: #133a8d;     
    --jufre-orange: #e06d10;  
    --light-bg: #f9fbfd;
    --white: #ffffff;
    --text-dark: #2b303a;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ==========================================================================
   2. شاشة الانتظار والمؤشر المخصص (Preloader & Custom Cursor)
   ========================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s;
}
.preloader-content { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 25px; }
.sbc-logo-preload { opacity: 0; transform: scale(0.9); animation: logoPopIn 0.8s forwards 0.2s ease-out; }
.preload-logo-img { max-width: 180px; height: auto; object-fit: contain; }
.loading-bar { width: 140px; height: 4px; background-color: rgba(27, 53, 138, 0.1); border-radius: 10px; position: relative; overflow: hidden; }
.loading-bar::after { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 100%; background-color: var(--sbc-blue); animation: loadProgress 2.6s linear forwards; }

@keyframes logoPopIn { to { opacity: 1; transform: scale(1); } }
@keyframes loadProgress { to { width: 100%; } }

@media (min-width: 769px) {
    html, body { cursor: none; }
    a, button, input, textarea { cursor: none; }
    .custom-cursor-dot { width: 8px; height: 8px; background-color: var(--sbc-blue); position: fixed; pointer-events: none; z-index: 10000; border-radius: 50%; transform: translate(-50%, -50%); }
    .custom-cursor-outline { width: 35px; height: 35px; border: 2px solid var(--sbc-blue); position: fixed; pointer-events: none; z-index: 9999; border-radius: 50%; transform: translate(-50%, -50%); transition: transform 0.1s ease-out; }
    .custom-cursor-dot.expand { width: 4px; height: 4px; background-color: var(--white); }
    .custom-cursor-outline.expand { width: 52px; height: 52px; background-color: rgba(27, 53, 138, 0.15); }
}

/* ==========================================================================
   3. شريط التنقل للكمبيوتر (Navbar Desktop)
   ========================================================================== */
.navbar { position: fixed; top: 0; width: 100%; background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: 0 2px 20px rgba(0,0,0,0.04); z-index: 1000; padding: 10px 0; }
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.logo { display: flex; align-items: center; }
.nav-logo-img { height: 55px; width: auto; object-fit: contain; }
.nav-links { display: flex; list-style: none; }
.nav-links li { margin: 0 15px; }
.nav-links a { text-decoration: none; color: #4a5568; font-weight: 600; transition: color 0.3s; }
.nav-links a.active, .nav-links a:hover { color: var(--sbc-blue); }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.lang-btn { background: transparent; border: 2px solid var(--sbc-blue); color: var(--sbc-blue); padding: 6px 14px; font-weight: 700; border-radius: 20px; transition: 0.3s; }
.lang-btn:hover { background-color: var(--sbc-blue); color: var(--white); }
.sbc-social-container { display: flex; gap: 12px; }
.sbc-social-link { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #4a5568; background: rgba(0,0,0,0.03); text-decoration: none; transition: 0.3s; }
.sbc-social-link:hover { color: var(--white); transform: translateY(-3px); }
.sbc-social-link.facebook:hover { background-color: #1877f2; }
.sbc-social-link.instagram:hover { background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); }

.mobile-only-actions { display: none; list-style: none; padding-top: 15px; border-top: 1px solid #eee; width: 100%; text-align: center; }
.menu-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--sbc-blue); cursor: pointer; z-index: 1001; }

/* ==========================================================================
   4. واجهة البداية (Hero Section)
   ========================================================================== */
.hero { position: relative; height: 100vh; display: flex; align-items: center; padding: 0 10%; overflow: hidden; }
.hero-bg-creative { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url('images/back.jpeg'); background-size: cover; background-position: center; z-index: -2; animation: sbcKenBurns 20s infinite alternate ease-in-out; will-change: transform; }
.hero-overlay-dark { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(11, 43, 32, 0.95) 20%, rgba(27, 53, 138, 0.7) 100%); z-index: -1; }
@keyframes sbcKenBurns { 0% { transform: scale(1) translateY(0); } 100% { transform: scale(1.08) translateY(-10px); } }
.hero-content { max-width: 750px; color: var(--white); opacity: 0; transform: translateY(30px); animation: heroContentFadeIn 1s ease forwards 3.1s; }
@keyframes heroContentFadeIn { to { opacity: 1; transform: translateY(0); } }
.hero-badge { background-color: rgba(255, 255, 255, 0.15); color: var(--white); padding: 6px 18px; border-radius: 30px; font-size: 13px; font-weight: 700; display: inline-block; margin-bottom: 25px; }
.hero h1 { font-size: 48px; font-weight: 900; line-height: 1.3; margin-bottom: 20px; text-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.hero p { font-size: 17px; color: rgba(255, 255, 255, 0.9); line-height: 1.8; margin-bottom: 35px; }
.hero-buttons { display: flex; gap: 20px; }
.sbc-btn { display: inline-flex; align-items: center; justify-content: center; padding: 15px 35px; font-size: 16px; font-weight: 700; text-decoration: none; border-radius: 8px; transition: 0.3s; }
.primary-btn { background-color: var(--sbc-blue); color: var(--white); border: 2px solid var(--sbc-blue); }
.primary-btn:hover { background-color: #2444b5; transform: translateY(-4px); }
.secondary-btn { background-color: rgba(255, 255, 255, 0.1); color: var(--white); border: 2px solid var(--white); backdrop-filter: blur(5px); }
.secondary-btn:hover { background-color: var(--white); color: var(--sbc-blue); transform: translateY(-4px); }

/* ==========================================================================
   5. قسم المنتجات (تعديل المدير: تحويل أسماء العلامات للأزرق)
   ========================================================================== */
.brands-section { padding: 100px 10%; background-color: var(--light-bg); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 34px; color: var(--sbc-blue); } /* أزرق للعنوان الرئيسي */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 35px; max-width: 1200px; margin: 0 auto; }
.brand-card { background: var(--white); padding: 40px 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); border-top: 6px solid #ccc; display: flex; flex-direction: column; justify-content: space-between; transition: 0.3s; }
.brand-card:hover { transform: translateY(-8px); }

.farha-card { border-top-color: var(--farha-green); }
.juga-card { border-top-color: var(--juga-blue); }
.jufre-card { border-top-color: var(--jufre-orange); }

.brand-tag { font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; color: var(--white); width: fit-content; }
.tag-farha { background-color: var(--farha-green); }
.tag-juga { background-color: var(--juga-blue); }
.tag-jufre { background-color: var(--jufre-orange); }

.brand-title-container { display: flex; align-items: center; gap: 15px; margin-top: 15px; }
.brand-logo-inline { width: 65px; height: 50px; object-fit: contain; border-radius: 4px; background-color: transparent; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.05)); }

/* ✅ تطبيق تعديل المدير: تحويل أسماء فرحة، جوقا، جوفري للون الأزرق الموحد */
.brand-title-container h3, 
.brand-card h3,
.info-card h4 { 
    color: var(--sbc-blue) !important; 
    font-size: 20px; 
    font-weight: 800; 
    margin: 0; 
}

[data-lang="ar"] .brand-title-container { flex-direction: row; }
[data-lang="fr"] .brand-title-container { flex-direction: row; }

.brand-desc { color: #718096; font-size: 14.5px; line-height: 1.7; margin: 20px 0; }
.gallery-btn { width: 100%; padding: 12px; border: none; border-radius: 6px; font-weight: 700; background-color: #edf2f7; transition: 0.3s; }
.btn-farha:hover { background-color: var(--farha-green); color: white; }
.btn-juga:hover { background-color: var(--juga-blue); color: white; }
.btn-jufre:hover { background-color: var(--jufre-orange); color: white; }

/* ==========================================================================
   6. النوافذ المنبثقة (Modal & Lightbox)
   ========================================================================== */
.modal { display: none; position: fixed; z-index: 2000; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); backdrop-filter: blur(5px); align-items: center; justify-content: center; }
.modal-content { background-color: var(--white); padding: 40px; border-radius: 12px; max-width: 750px; width: 90%; max-height: 85vh; overflow-y: auto; position: relative; }
.close-modal { position: absolute; top: 15px; left: 20px; font-size: 30px; color: #a0aec0; }
.modal-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; margin-top: 25px; }
.product-card-modal { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; text-align: center; }
.product-card-modal img { width: 100%; max-height: 180px; object-fit: contain; margin-bottom: 10px; cursor: zoom-in; transition: 0.2s; }
.product-card-modal img:hover { transform: scale(1.05); }

.lightbox-modal { display: none; position: fixed; z-index: 3000; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); backdrop-filter: blur(8px); align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox-img-content { max-width: 90%; max-height: 85vh; object-fit: contain; border-radius: 8px; animation: zoomEffect 0.3s ease; }
@keyframes zoomEffect { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close-lightbox { position: absolute; top: 25px; right: 35px; color: #fff; font-size: 45px; font-weight: bold; }

/* ==========================================================================
   7. قسم من نحن والتواصل والفوتر (About & Contact & Footer)
   ========================================================================== */
.about-section { padding: 100px 10%; background: #ffffff; }
.about-container { display: flex; align-items: center; gap: 60px; max-width: 1200px; margin: 0 auto; }
.about-text { flex: 1; }
.about-text h2 { font-size: 32px; color: var(--sbc-blue); margin-bottom: 20px; }
.about-text p { color: #4a5568; line-height: 1.8; font-size: 16px; margin-bottom: 25px; }
.features-list { display: flex; flex-direction: column; gap: 15px; }
.feat-item { display: flex; align-items: center; gap: 15px; font-weight: 600; color: var(--text-dark); }
.feat-item i { font-size: 20px; color: var(--sbc-blue); }

.about-visual-creative { flex: 1; height: 380px; background: radial-gradient(circle, rgba(27, 53, 138, 0.05) 0%, rgba(240, 244, 255, 0.4) 100%); border-radius: 24px; display: flex; align-items: center; justify-content: center; position: relative; overflow: visible; }
.animated-logo-glow { position: absolute; width: 200px; height: 200px; background: rgba(27, 53, 138, 0.12); border-radius: 50%; filter: blur(25px); animation: sbcPulseGlow 4s infinite ease-in-out; }
.about-logo-animated { max-width: 250px; height: auto; object-fit: contain; z-index: 2; animation: sbcLogoFloat 4s infinite ease-in-out; filter: drop-shadow(0 10px 20px rgba(27, 53, 138, 0.15)); }

@keyframes sbcLogoFloat { 0% { transform: translateY(0px) scale(1); } 50% { transform: translateY(-12px) scale(1.03); } 100% { transform: translateY(0px) scale(1); } }
@keyframes sbcPulseGlow { 0% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1); opacity: 0.6; } }

.contact-section { padding: 100px 10%; background-color: var(--light-bg); }
.contact-wrapper { display: flex; gap: 50px; max-width: 1200px; margin: 0 auto; }
.contact-info, .contact-form { flex: 1; }
.info-card { background: var(--white); padding: 20px; border-radius: 8px; margin-bottom: 15px; display: flex; gap: 15px; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.01); }
.info-card i { font-size: 24px; color: var(--sbc-blue); }
.form-group { margin-bottom: 15px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 6px; background-color: #f7fafc; }
.submit-btn { width: 100%; padding: 14px; background-color: var(--sbc-blue); color: var(--white); border: none; font-weight: 700; border-radius: 6px; }
footer { background-color: #1a202c; color: #a0aec0; padding: 30px 10%; text-align: center; }

/* ==========================================================================
   8. استعلامات الميديا للهواتف والشاشات الصغيرة (All Responsive Design)
   ========================================================================== */
@media (max-width: 768px) {
    /* إلغاء المؤشر المخصص فوراً في الهواتف لمنع مشاكل اللمس والتفادي */
    .custom-cursor-dot, .custom-cursor-outline { display: none !important; }
    html, body { cursor: default !important; }
    
    /* تفعيل وإظهار زر القائمة للهاتف بشكل آمن وعالي الطبقة */
    .menu-toggle { display: block; position: relative; z-index: 9999 !important; pointer-events: auto !important; padding: 10px; }
    .nav-container { position: relative; justify-content: space-between; }
    .desktop-only { display: none !important; }
    .mobile-only-actions { display: block; }

    /* القائمة المنسدلة للهواتف */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        gap: 15px;
        text-align: center;
        border-bottom: 3px solid var(--sbc-blue);
        z-index: 999;
    }
    .nav-links.active { display: flex; }
    .nav-actions { display: none; }

    /* موازنة الهيدر وباقي الأقسام المتجاوبة */
    .about-hero { padding-top: 100px; }
    .about-container, .contact-wrapper { flex-direction: column; text-align: center; }
    .info-card { flex-direction: column; text-align: center; }
    .hero h1 { font-size: 32px; }
    .about-visual-creative { height: 280px; margin-top: 30px; }
    .about-logo-animated { max-width: 180px; }
    .brand-title-container { justify-content: center; }
}