/* =========================================
    نظام التصميم الجديد (Design System)
========================================= */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=IBM+Plex+Sans+Condensed:wght@400;500;600;700&display=swap');
/* ==========================================================================
   🔤 الخطوط الموحّدة للموقع — مختارة لتطابق هوية اللوقو
   • العربية: 'IBM Plex Sans Arabic'   · English: 'IBM Plex Sans Condensed'
   (التفاصيل في assets/css/style.css)
   ========================================================================== */
:root {
    --safa-font-ar: 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
    --safa-font-en: 'IBM Plex Sans Condensed', 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
    --safa-font: var(--safa-font-ar);
}
button, input, select, textarea, optgroup { font-family: inherit; }
html[lang="en"], html[lang="en"] body { --safa-font: var(--safa-font-en); }

:root {
    /* Brand Colors */
    --primary: #5B2C86;
    --primary-hover: #472269;
    --primary-soft: #F8F5FB;
    
    --secondary: #00B0AD;
    --secondary-hover: #008A89;
    --secondary-soft: #EEFBFA;
    
    --accent: #FDB714;
    --accent-soft: #FFF0C2;
    
    /* Neutrals */
    --ink: #211A2A;
    --body-text: #51495B;
    --muted: #7C7484;
    --border: #E4DEE7;
    --soft-bg: #F7F5F8;
    --canvas: #FCFBFD;
    --white: #FFFFFF;
    
    /* Shadows & Radius */
    --shadow-card: 0 10px 30px rgba(58, 37, 77, 0.06);
    --shadow-hover: 0 20px 54px rgba(41, 24, 58, 0.12);
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

body {
    background-color: var(--canvas);
    color: var(--body-text);
    font-family: var(--safa-font, 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif);
    line-height: 1.85;
}

/* Typography */
h1, h2, h3, .heading-font {
    font-family: var(--safa-font, 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif);
    color: var(--ink);
    font-weight: 700;
}

h2.section-title {
    font-size: clamp(1.85rem, 3vw, 2.5rem);
    color: var(--primary);
    margin-bottom: 15px;
    letter-spacing: -0.01em;
}

/* Layout & Spacing */
.ds-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px;
}

.ds-section {
    padding: 80px 0;
    
    /* --- حيلة التمدد الكامل (Breakout) لكسر حاجز الحاوية --- */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    /* -------------------------------------------------------- */
}

.ds-section.soft-section {
    background-color: var(--soft-bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* Buttons */
.ds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    height: 44px;
    border-radius: var(--radius-md);
    font-family: var(--safa-font, 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
}

.ds-btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary); 
    transition: all 0.3s ease; 
}

.ds-btn-outline:hover {
    background-color: var(--primary); 
    color: var(--white); 
    transform: translateY(-3px); 
    box-shadow: 0 6px 15px rgba(92, 44, 135, 0.25); 
}

.ds-btn-outline i {
    transition: transform 0.3s ease;
}

.ds-btn-outline:hover i {
    transform: translateX(-5px); 
}

.ds-btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
    border: none;
    height: 48px;
    padding: 0 32px;
    border-radius: var(--radius-full); 
}

.ds-btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 176, 173, 0.2);
}

/* =========================================
    تنسيقات الهيرو التفاعلي الجديد
========================================= */
.gsft-hero {
    position: relative;
    
    /* --- حيلة التمدد الكامل (Breakout) لكسر حاجز الحاوية --- */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    /* -------------------------------------------------------- */
    
    /* --- إغلاق الفراغ العلوي المزعج --- */
    margin-top: -50px; /* السحب للأعلى (يمكنك زيادة الرقم مثلاً إلى -30px إذا تبقى جزء بسيط من الفراغ) */
    /* -------------------------------------------------------- */
    
    min-height: 80vh;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    transform-origin: center center;
}

.shape-top-left {
    top: -15%;
    left: -5%;
    width: 450px;
    animation: slow-spin 60s linear infinite;
}

.shape-bottom-right {
    bottom: -20%;
    right: -10%;
    width: 600px;
    animation: slow-spin 80s linear infinite reverse;
}

.shape-bottom-left {
    bottom: -30%;
    left: 5%;
    width: 700px;
    filter: blur(30px);
    animation: slow-spin 70s linear infinite;
}

@keyframes slow-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================
    تنسيقات الأشكال الهندسية الجديدة
========================================= */

/* المثلث الذهبي (متحرك يطفو) */
.shape-triangle-float {
    top: 20%;
    right: 32%;
    width: 50px;
    animation: float-up-down 6s ease-in-out infinite;
}

/* المثلث البنفسجي (ثابت ومائل) */
.shape-triangle-fixed {
    bottom: 25%;
    left: 28%;
    width: 70px;
    transform: rotate(-25deg);
}

/* الدائرة السماوية المجوفة (متحركة بشكل عكسي) */
.shape-circle-float {
    top: 35%;
    left: 38%;
    width: 65px;
    animation: float-up-down 8s ease-in-out infinite reverse;
}

/* الدائرة البنفسجية المصمتة (ثابتة) */
.shape-circle-fixed {
    bottom: 18%;
    right: 42%;
    width: 35px;
}

/* =========================================
    حركة الطفو الناعمة (Animation)
========================================= */
@keyframes float-up-down {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(15deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.hero-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    width: 100%;
    padding: 0 48px;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    text-align: right;
}

.hero-text h1 {
    font-family: var(--safa-font, 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif); /* تم التغيير إلى خط تجوال */
    color: var(--primary);
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 700; /* سماكة ممتازة تتناسب مع الشعار */
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--body-text);
    line-height: 1.8;
    font-weight: 500;
    padding-right: 1.5rem;
    border-right: 4px solid var(--accent);
    
    /* --- الإضافات الجديدة لضبط النص --- */
    text-align: justify;
    text-justify: inter-word; /* يضمن توزيع المسافات بشكل أنيق بين الكلمات */
}

.hero-logo {
    flex: 0 0 auto;
}

.hero-logo img {
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05));
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.125rem; 
    color: var(--body-text);
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

/* =========================================
    شريط الإحصائيات (Stats Strip)
========================================= */
.stats-strip {
    background-color: var(--primary); /* اللون البنفسجي */
    padding: 30px 0;
    
    /* --- حيلة التمدد الكامل (Breakout) --- */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    /* -------------------------------------------------------- */
    
    position: relative;
    z-index: 11; /* ليكون فوق الأشكال الهندسية للهيرو */
    box-shadow: 0 10px 30px rgba(41, 24, 58, 0.15);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px;
    gap: 10px;
}

/* =========================================
    شريط الإحصائيات (Stats Strip) - مُحدَّث مع تأثيرات التمرير
========================================= */
.stat-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 10px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    
    /* الإضافات الجديدة: حركة ناعمة ومؤشر الماوس */
    transition: transform 0.3s ease;
    cursor: default; 
}

/* إزالة الفاصل من أول عنصر يميناً */
.stat-item:first-child {
    border-right: none;
}

/* --- تأثير الرفع للأعلى عند التمرير --- */
.stat-item:hover {
    transform: translateY(-6px);
}

.stat-icon {
    font-size: 2.2rem;
    color: var(--secondary); /* الفيروزي (الافتراضي) */
    flex-shrink: 0;
    transition: color 0.3s ease; /* انتقال ناعم للون */
}

.stat-content {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.stat-number {
    color: var(--white);
    font-family: var(--safa-font, 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.3;
    transition: color 0.3s ease; /* انتقال ناعم للون */
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--safa-font, 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease; /* انتقال ناعم للون */
}

/* =========================================
    تأثيرات تغيير الألوان للذهبي (الهوية)
========================================= */
.stat-item:hover .stat-icon,
.stat-item:hover .stat-number {
    color: var(--accent); /* تغيير لون الأيقونة والرقم للذهبي */
}

.stat-item:hover .stat-label {
    color: var(--accent-soft); /* تغيير النص الصغير لذهبي فاتح ليظل مقروءاً ومتناسقاً */
}

/* استجابة الشاشات الصغيرة */
@media (max-width: 992px) {
    .stats-grid { gap: 20px; }
    .stat-item { 
        border-right: none; 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
        padding: 15px 10px; 
        justify-content: center; 
    }
    .stat-item:last-child { border-bottom: none; }
}

@media (max-width: 640px) {
    .stats-grid { padding: 0 20px; }
}

/* News Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.ds-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.ds-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

.ds-card:hover .news-image img {
    transform: scale(1.03);
}

.news-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 20px;
    transition: color 0.2s ease;
    display: block;
}

.news-title:hover {
    color: var(--secondary);
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: auto; 
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.news-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-meta i {
    color: var(--secondary); 
    font-size: 1rem;
}

/* Events Section */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.event-card {
    padding: 32px;
}

.ds-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ألوان الشارات الدلالية */
.badge-purple { background-color: var(--primary-soft); color: var(--primary); }
.badge-teal { background-color: var(--secondary-soft); color: var(--secondary); }
.badge-gold { background-color: var(--accent-soft); color: #9A590E; }
.badge-red { background-color: #FFF0F2; color: #B53A4B; }

.event-info-list {
    margin-top: 20px;
    list-style: none;
    padding: 0;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.event-info-list li {
    display: flex;
    align-items: center;
    color: var(--body-text);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.event-info-list li i {
    color: var(--secondary);
    width: 24px;
    margin-left: 8px;
    font-size: 1.1rem;
}

.event-action {
    margin-top: 24px;
}

.view-all-container {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ds-container, .hero-container { padding: 0 32px; }
    .ds-section { padding: 60px 0; }
}

@media (max-width: 992px) {
    .gsft-hero {
        min-height: auto;
        padding: 4rem 0;
    }
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }
    .hero-text {
        text-align: center;
    }
    .hero-text p {
        padding-right: 0;
        border-right: none;
        border-bottom: 4px solid var(--accent);
        padding-bottom: 1.5rem;
        display: inline-block;
    }
    .hero-logo img {
        max-width: 220px;
    }
}

@media (max-width: 640px) {
    .ds-container, .hero-container { padding: 0 20px; }
    .ds-section { padding: 48px 0; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .events-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ✨ شريط الإحصائيات (Stats Strip) — إعادة تصميم بهوية الجمعية
   --------------------------------------------------------------------------
   السبب: كان الشريط لوناً بنفسجياً **مسطّحاً** (var(--primary) كامل) مع خطوط
   بيضاء شفافة، فيبدو كتلة ثقيلة منفصلة عن نعومة بقية الصفحة (الهيرو أبيض
   وقسم «من نحن» رمادي فاتح جداً) — أي أنه لم يكن «خارج الهوية» لوناً بل
   لأنه لم يستخدم طبقات الهوية (الفيروزي والذهبي والتدرّجات).
   التصميم الجديد يستخدم ألوان الهوية نفسها فقط:
     • تدرّج بنفسجي غني            #4E2470 → #5B2C86 → #6A3A96
     • توهّج فيروزي من الأعلى      rgba(0, 176, 173, 0.30)
     • توهّج ذهبي من الأسفل        rgba(253, 183, 20, 0.18)
     • خط تمييز علوي: فيروزي → ذهبي
     • بطاقات ناعمة + أيقونة فيروزية داخل شارة + أرقام بيضاء
     • عند التمرير: ارتفاع خفيف + إطار فيروزي + أيقونة ذهبية (لمسة الهوية)
   ملاحظة تقنية: القواعد مُلحقة في نهاية الملف بنفس الخصوصية أو أعلى ولاحقة،
   لذا تتقدّم في التتالي دون الحاجة لتعديل القواعد القديمة (بلا مخاطرة).
   ========================================================================== */
.stats-strip {
    padding: clamp(2.1rem, 3.6vw, 3rem) 0;
    background:
        radial-gradient(1100px 300px at 10% -20%, rgba(0, 176, 173, 0.30), transparent 62%),
        radial-gradient(900px 280px at 92% 118%, rgba(253, 183, 20, 0.18), transparent 64%),
        linear-gradient(135deg, #4E2470 0%, var(--primary) 48%, #6A3A96 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 18px 44px rgba(41, 24, 58, 0.20);
}

/* خط التمييز العلوي = ألوان الهوية الثانوية (فيروزي → ذهبي) */
.stats-strip::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    /* لونا الهوية الثانويان فقط: الفيروزي → الذهبي */
    background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 100%);
}

/* نقاط خفيفة جداً تضيف عمقاً بلا أي صور */
.stats-strip::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.055) 1.5px, transparent 1.6px),
        radial-gradient(circle at 34px 30px, rgba(255, 255, 255, 0.035) 1.5px, transparent 1.6px);
    background-size: 58px 58px, 92px 92px;
}

/* الشبكة فوق الطبقات الزخرفية + مساحات مريحة */
.stats-strip .stats-grid {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    padding: 0 clamp(1rem, 3vw, 3rem);
    gap: clamp(0.7rem, 1.3vw, 1.05rem);
}

/* البطاقة بدل العناصر المفصولة بخطوط بيضاء */
.stats-strip .stat-item {
    gap: 0.95rem;
    padding: 1.05rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.stats-strip .stat-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(0, 176, 173, 0.45);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

/* الأيقونة داخل شارة فيروزية ناعمة (بدل أيقونة سائبة) */
.stats-strip .stat-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.45rem;
    color: var(--secondary);
    background: rgba(0, 176, 173, 0.14);
    border: 1px solid rgba(0, 176, 173, 0.30);
    transition: transform 0.25s ease, background-color 0.25s ease,
                border-color 0.25s ease, color 0.25s ease;
}

.stats-strip .stat-item:hover .stat-icon {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary-hover);
    transform: scale(1.06);
}

/* النصوص — محاذاة منطقية تعمل في العربية والإنجليزية */
.stats-strip .stat-content { text-align: start; }

.stats-strip .stat-number {
    color: #ffffff;
    font-family: var(--safa-font, 'IBM Plex Sans Arabic', 'IBM Plex Sans', 'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif);
    font-size: clamp(1.15rem, 1.35vw, 1.45rem);
    font-weight: 800;
    line-height: 1.35;
}

.stats-strip .stat-item:hover .stat-number { color: var(--accent-soft); }

.stats-strip .stat-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    line-height: 1.6;
}

.stats-strip .stat-item:hover .stat-label { color: #ffffff; }

/* سهم زر «اقرأ المزيد» يتجه صحيحاً في اللغتين */
html[dir="ltr"] .about-content .ds-btn-outline i { transform: scaleX(-1); }

/* ================= الاستجابة ================= */
@media (max-width: 992px) {
    .stats-strip .stat-item {
        justify-content: flex-start;      /* يلغي توسيط الجوال القديم */
        padding: 1rem 1.05rem;
    }
}

@media (max-width: 640px) {
    .stats-strip .stats-grid { padding: 0 1rem; }
    .stats-strip .stat-icon {
        width: 46px;
        height: 46px;
        font-size: 1.25rem;
        border-radius: 12px;
    }
    .stats-strip .stat-number { font-size: 1.05rem; }
    .stats-strip .stat-label { font-size: 0.8rem; }
}
