/* =========================================
    نظام التصميم الجديد (Design System)
========================================= */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Noto+Kufi+Arabic:wght@400;500;600;700;800&family=Tajawal:wght@500;700;800;900&display=swap');
: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: 'IBM Plex Sans Arabic', sans-serif;
    line-height: 1.85;
}

/* Typography */
h1, h2, h3, .heading-font {
    font-family: 'Noto Kufi Arabic', 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: 'IBM Plex Sans Arabic', 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: 'Tajawal', 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: 'Tajawal', 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: 'Noto Kufi Arabic', 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; }
}