/* --- الإعدادات العامة --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

:root {
    --fb-blue: #1877F2;
    --bg-light: #F0F2F5;
    --white: #FFFFFF;
    --text-main: #1C1E21;
    --text-muted: #65676B;
    --h-height: 75px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

/* استخدام padding-top لضمان عدم اختفاء المحتوى تحت الهيدر */
body { 
    background-color: var(--bg-light); 
    color: var(--text-main); 
    padding-top: var(--h-height);
    overflow-x: hidden; 
}

/* --- Fixed Header --- */
header {
    background: var(--white);
    width: 100%;
    height: var(--h-height);
    position: fixed;
    top: 0; left: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.header-container {
    width: 95%; max-width: 1400px; margin: auto;
    display: flex; justify-content: space-between; align-items: center;
    position: relative;
}

/* العنوان في المنتصف تماماً ولا يتأثر باللغة */
.header-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    white-space: nowrap;
}

.project-title { font-size: 1.1rem; font-weight: 700; color: var(--fb-blue); }

.header-right { display: flex; align-items: center; gap: 15px; }

.logo { text-decoration: none; color: var(--fb-blue); font-weight: 800; font-size: 1.4em; }

.navigation a { text-decoration: none; color: var(--text-main); font-weight: 600; font-size: 0.9rem; }

.lang-btn {
    background: transparent; border: 1px solid var(--fb-blue); color: var(--fb-blue);
    padding: 5px 15px; border-radius: 20px; cursor: pointer; font-weight: 700; transition: 0.3s;
}
.lang-btn:hover { background: var(--fb-blue); color: white; }

/* --- Sticky Sections --- */
.stack-section {
    position: sticky;
    top: var(--h-height);
    height: calc(100vh - var(--h-height));
    display: flex;
    align-items: center;
    padding: 0 5%;
    border-bottom: 1px solid #e0e0e0;
    background-color: var(--white); /* لضمان عدم ظهور السكاشن خلف بعضها بشفافية */
}

/* ألوان الخلفيات */
#timing { background-color: #FFFFFF; }
#content { background-color: #F8F9FA; }
#sentiment { background-color: #F1F3F5; }
#accuracy { background-color: #E9ECEF; }

/* الحاوية الرئيسية للسكشن */
.container { 
    display: flex; 
    align-items: center; 
    gap: 40px; 
    width: 100%; 
    max-width: 1200px; 
    margin: auto; 
}

/* جعل النصوص والرسوم تأخذ مساحة متساوية */
.text-side { flex: 1; }
.chart-side { flex: 1; width: 100%; }

.badge { color: var(--fb-blue); font-weight: 700; font-size: 0.8em; margin-bottom: 10px; display: block; }
h2 { font-size: 2.8em; line-height: 1.1; margin-bottom: 20px; }
p { font-size: 1.1em; color: var(--text-muted); line-height: 1.6; }
.highlight { color: var(--fb-blue); font-weight: 700; border-bottom: 2px solid var(--fb-blue); }

.chart-box {
    background: #ffffff; padding: 20px; border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 100%; height: 400px;
    display: flex; justify-content: center; align-items: center;
}

/* --- Footer --- */
.footer {
    background: var(--white); padding: 40px 10%;
    display: flex; justify-content: space-between; align-items: center;
    position: relative; z-index: 1001; border-top: 1px solid #ddd;
}

/* --- Responsive (الجوال والتابلت) --- */
@media (max-width: 1024px) {
    .container { gap: 20px; }
    h2 { font-size: 2.2em; }
}

@media (max-width: 768px) {
    .header-center { display: none; } /* إخفاء العنوان في الجوال لمنع التداخل */
    
    .stack-section { 
        position: relative; /* إلغاء الالتصاق في الجوال لسهولة التصفح */
        height: auto; 
        padding: 80px 20px; 
        top: 0;
    }
    
    .container { 
        flex-direction: column !important; /* إجبار العناصر على الترتيب الرأسي */
        text-align: center; 
    }
    
    .chart-side { order: 2; margin-top: 30px; }
    .text-side { order: 1; }

    .footer { flex-direction: column !important; gap: 20px; text-align: center; }
}