/* ==========================================================================
   1. المتغيرات وإعدادات الألوان (Variables & Theming)
   ========================================================================== */
   :root {
    /* 🌑 الوضع الليلي (Dark Mode) - الافتراضي */
    --bg-main: #0a192f;           /* كحلي غامق جداً (الخلفية) */
    --bg-secondary: #112240;      /* كحلي أفتح قليلاً (الكروت) */
    
    --primary-color: #D4AF37;     /* ذهبي ميتاليك */
    --primary-glow: rgba(212, 175, 55, 0.4); /* وهج ذهبي */
    
    --text-main: #a8b2d1;         /* رمادي فضي للنصوص */
    --text-heading: #ffffff;      /* أبيض للعناوين */
    
    --overlay-color: rgba(10, 25, 47, 0.95); /* تراكب الهيدر */
    --glass-border: rgba(212, 175, 55, 0.3); /* حدود ذهبية خفيفة */
    --pattern-opacity: 0.05;
    
    --footer-bg: #050b14;         /* أسود مزرق للفوتر */
    --font-main: 'Tajawal', sans-serif; /* الخط المستخدم */
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ☀️ الوضع النهاري (Light Mode) */
body.light-mode {
    --bg-main: #F9FAFB;           /* أبيض لؤلؤي هادئ */
    --bg-secondary: #FFFFFF;      /* أبيض نقي للكروت */
    
    --primary-color: #B8860B;     /* ذهبي داكن */
    --primary-glow: rgba(184, 134, 11, 0.3);
    
    --text-main: #475569;         /* رمادي غامق مزرق */
    --text-heading: #0a192f;      /* كحلي غامق للعناوين */
    
    --overlay-color: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(10, 25, 47, 0.1); /* حدود كحلية خفيفة */
    --pattern-opacity: 0.03;
    
    --footer-bg: #F1F5F9;         /* رمادي فاتح جداً */
}

/* ==========================================================================
   2. التأسيس والأنماط العامة (Base Styles)
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; /* إخفاء الماوس الافتراضي لاستخدام المخصص */ }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.7;
    overflow-x: hidden;
    direction: rtl;
    transition: background-color 0.5s ease, color 0.5s ease;
    position: relative;
    /* خلفية حية فاخرة */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.08), transparent 25%), 
        radial-gradient(circle at 85% 30%, rgba(157, 123, 206, 0.08), transparent 25%);
    background-attachment: fixed;
}

/* الزخرفة الإسلامية الخلفية العامة */
body::before {
    content: '';
    position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4AF37' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
    opacity: var(--pattern-opacity);
    animation: rotatePattern 200s linear infinite;
    pointer-events: none;
}
@keyframes rotatePattern { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* سكرول بار */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 4px; }

/* الروابط والنصوص */
h1, h2, h3, h4, h5 { color: var(--text-heading); font-weight: 700; margin-bottom: 1rem; transition: color 0.5s ease; letter-spacing: -0.5px; }
a { text-decoration: none; transition: var(--transition); color: inherit; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; }
.section-padding { padding: 100px 0; position: relative; }
.text-center { text-align: center; }

/* النصوص الذهبية والمشعة */
.gold-text, .text-gradient {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shine 4s linear infinite;
    font-weight: bold;
}
/* إصلاح للوضع النهاري للنصوص المتدرجة */
body.light-mode .text-gradient { background: none; color: var(--primary-color); -webkit-text-fill-color: var(--primary-color); }
@keyframes shine { to { background-position: 200% center; } }

/* الفواصل الناعمة بين الأقسام */
section::after {
    content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
}

/* ==========================================================================
   3. الأزرار (Buttons)
   ========================================================================== */
.btn {
    display: inline-block; padding: 12px 35px; border-radius: 50px; 
    font-weight: 700; cursor: pointer; border: none; transition: var(--transition);
    position: relative; overflow: hidden; z-index: 1;
}
.btn-primary { 
    background: linear-gradient(45deg, #D4AF37, #B8860B);
    color: #fff !important;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover { 
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}
/* لمعة الزر */
.btn-primary::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}
.btn-primary:hover::before { left: 100%; }

/* ==========================================================================
   4. الماوس المخصص (Custom Cursor)
   ========================================================================== */
.cursor-dot {
    width: 6px !important; height: 6px !important;
    background: var(--primary-color) !important;
    box-shadow: 0 0 10px var(--primary-color) !important;
    border-radius: 50% !important; position: fixed; pointer-events: none; z-index: 9999;
}
.cursor-outline {
    width: 35px !important; height: 35px !important;
    background: transparent !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 50% !important; position: fixed; pointer-events: none; z-index: 9999;
    transition: width 0.2s, height 0.2s, background 0.2s, transform 0.2s !important;
}
/* تكبير الماوس عند التفاعل */
a:hover ~ .cursor-outline, button:hover ~ .cursor-outline, .glass-card:hover ~ .cursor-outline, .flip-card:hover ~ .cursor-outline {
    width: 50px !important; height: 50px !important;
    background: rgba(212, 175, 55, 0.05) !important;
    border-color: var(--primary-color) !important;
}
.cursor-trail { display: none !important; }

/* ==========================================================================
   5. الهيدر (Header)
   ========================================================================== */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 30px 0; transition: all 0.4s ease; background: transparent;
}
header.scrolled {
    background: var(--overlay-color);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

header nav { display: flex; justify-content: space-between; align-items: center; }

/* اللوجو */
.nav-brand { display: flex; align-items: center; gap: 15px; z-index: 2001; }
.logo-img { height: 70px; filter: brightness(0) invert(1); transition: 0.4s; }
header.scrolled .logo-img { height: 50px; }
body.light-mode header.scrolled .logo-img { filter: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-weight: 800; font-size: 1.2rem; color: #fff; margin: 0; }
.brand-subtitle { font-size: 0.75rem; color: var(--primary-color); margin-top: -2px; }
body.light-mode header.scrolled .brand-title { color: var(--text-heading); }

/* الروابط */
.nav-links { display: flex; gap: 30px; list-style: none; align-items: center; }
.nav-links a { color: #fff; font-weight: 500; transition: 0.3s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }
body.light-mode header.scrolled .nav-links a { color: var(--text-heading); }
body.light-mode header.scrolled .nav-links a:hover { color: var(--primary-color); }

/* أزرار الهيدر */
.nav-actions { display: flex; align-items: center; gap: 15px; }
.btn-theme {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.1); border: 1px solid var(--primary-color);
    color: var(--primary-color); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}
.btn-theme:hover { background: var(--primary-color); color: #fff; transform: rotate(30deg); }
body.light-mode .btn-theme { border-color: var(--primary-color); background: rgba(0,0,0,0.05); }

/* الموبايل */
.mobile-item { display: none !important; }
.menu-toggle { display: none; }

@media (max-width: 900px) {
    .desktop-item { display: none !important; }
    .nav-links {
        position: fixed; top: 0; right: 0; width: 100%; height: 100vh;
        background: var(--bg-main); flex-direction: column; justify-content: center;
        gap: 20px; transform: translateX(100%); transition: 0.4s ease; z-index: 2000;
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links a { font-size: 1.5rem; color: var(--text-heading); }
    .mobile-item { display: block !important; width: 80%; text-align: center; }
    .menu-toggle { display: flex; flex-direction: column; gap: 5px; cursor: pointer; z-index: 2001; }
    .bar { width: 25px; height: 3px; background: #fff; transition: 0.3s; border-radius: 2px; }
    body.light-mode header.scrolled .bar { background: var(--text-heading); }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ==========================================================================
   6. الهيرو (Hero Section)
   ========================================================================== */
.hero-section { height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--overlay-color); opacity: 0.8; }
.hero-content { position: relative; z-index: 2; padding: 0 20px; text-align: center; }
.hero-title { font-size: clamp(3rem, 7vw, 6rem); line-height: 1.2; margin-bottom: 25px; color: #ffffff; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.hero-subtitle { font-size: 1.3rem; max-width: 700px; margin: 0 auto; color: #e0e6ff; font-weight: 300; }
/* إيقاف حركة التنفس عن العنوان حسب الطلب */
.hero-title .gold-text.pulse-glow { animation: none !important; filter: none !important; text-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }

.scroll-down {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px; 
    color: var(--primary-color); z-index: 10; cursor: pointer;
}
.mouse-icon { width: 26px; height: 42px; border: 2px solid rgba(255,255,255,0.5); border-radius: 20px; position: relative; }
body.light-mode .mouse-icon { border-color: rgba(255,255,255,0.8); }
.wheel { width: 4px; height: 6px; background: var(--primary-color); border-radius: 2px; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); animation: scrollMouse 1.5s infinite; }
@keyframes scrollMouse { 0% { top: 8px; opacity: 1; height: 6px; } 100% { top: 25px; opacity: 0; height: 2px; } }

/* ==========================================================================
   7. العناوين المشتركة والزخارف (Royal Headers)
   ========================================================================== */
.section-header {
    width: 100%; max-width: 100%;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin-bottom: 50px; position: relative; z-index: 2;
}
.section-tag { 
    display: inline-block; color: var(--primary-color); font-size: 0.9rem; letter-spacing: 2px; margin-bottom: 10px; text-transform: uppercase; 
    border-bottom: 1px solid var(--primary-color); padding-bottom: 5px; 
}
.section-header h2 {
    display: inline-flex; justify-content: center; align-items: center; gap: 15px;
    font-size: 2.5rem; color: var(--text-heading); margin: 0;
}
.section-header::before {
    content: '◈'; position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
    color: var(--primary-color); font-size: 1rem; opacity: 0.6;
}

/* ==========================================================================
   8. نظام القلب الشامل (Flip Cards Logic)
   ========================================================================== */
.cards-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; width: 100%; justify-content: center;
}
.cards-grid.four-cols { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.flip-card-container { background-color: transparent; perspective: 1000px; min-height: 350px; }
.flip-card { position: relative; width: 100%; height: 100%; text-align: center; cursor: pointer; }
.flip-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s; transform-style: preserve-3d; }
/* التفاعل */
@media (hover: hover) { .flip-card:hover .flip-inner { transform: rotateY(180deg); } }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }

/* الأوجه المشتركة */
.flip-front, .flip-back {
    position: absolute; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 15px; display: flex; flex-direction: column; justify-content: center; align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: all 0.5s ease;
}

/* --- تصميم كروت الهوية (Identity Section) --- */
#identity .flip-front {
    background: rgba(10, 25, 47, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.15);
}
#identity .flip-card:hover .flip-front { transform: translateY(-8px); border-color: var(--primary-color); }
#identity .card-icon {
    width: 90px; height: 90px; border: 1px dashed rgba(212, 175, 55, 0.3); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--primary-color);
    margin-bottom: 20px; transition: 0.5s;
}
#identity .flip-card:hover .card-icon { transform: rotate(360deg); background: rgba(212, 175, 55, 0.1); }

/* الخلفية للهوية */
#identity .flip-back {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    border: 1px solid var(--primary-color); color: #fff; transform: rotateY(180deg);
}
#identity .flip-back p { font-size: 1.1rem; line-height: 2; padding: 20px; }

/* سنترة محتوى الهوية */
#identity .section-header { width: 100%; margin: 0 auto 50px auto; }
#identity .section-header h2 { justify-content: center; width: auto; display: inline-flex; }

/* --- تصميم كروت المبادرات (Initiatives Section) --- */
#initiatives .flip-front {
    background: rgba(10, 25, 47, 0.7); border: 1px solid rgba(212, 175, 55, 0.15);
}
#initiatives .flip-card:hover .flip-front {
    transform: translateY(-10px); border-color: rgba(212, 175, 55, 0.5);
    background: rgba(10, 25, 47, 0.9);
}
#initiatives .card-icon {
    width: 80px; height: 80px; border: 1px dashed rgba(212, 175, 55, 0.3); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--primary-color);
    margin-bottom: 20px;
}
#initiatives .flip-back {
    background-color: var(--bg-main); border: 1px solid var(--primary-color);
    transform: rotateY(180deg); padding: 20px;
}
#initiatives .back-title { color: var(--primary-color); border-bottom: 1px solid rgba(212, 175, 55, 0.3); width: 100%; text-align: center; padding-bottom: 10px; margin-bottom: 15px; }
#initiatives .back-list { list-style: none; text-align: right; width: 100%; color: #e0e0e0; }
#initiatives .back-list li { margin-bottom: 8px; position: relative; padding-right: 15px; font-size: 0.9rem; }
#initiatives .back-list li::before { content: '▪'; color: var(--primary-color); position: absolute; right: 0; }

/* الوضع النهاري للكروت */
body.light-mode #initiatives .flip-front, body.light-mode #identity .flip-front {
    background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-color: #e0e0e0;
}
body.light-mode #initiatives .flip-back, body.light-mode #identity .flip-back {
    background: #fdfbf7; border-color: var(--primary-color); color: var(--text-heading);
}
body.light-mode #initiatives .back-list { color: #555; }

/* ==========================================================================
   9. تفاصيل المبادرة المخفية (The Zero Space Logic)
   ========================================================================== */
.initiative-details-container {
    /* الحالة الافتراضية: مخفي تماماً وبدون مساحة */
    max-height: 0; margin: 0; padding: 0; border: none;
    opacity: 0; overflow: hidden; visibility: hidden;
    
    background: rgba(255, 255, 255, 0.03); border-radius: 20px; width: 100%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* حركة ناعمة جداً */
}

/* الكلاس الذي يضاف عند الهوفر */
.initiative-details-container.show-details {
    max-height: 600px; /* ارتفاع كافي للمحتوى */
    margin-top: 40px; padding: 40px; border: 1px solid var(--glass-border);
    opacity: 1; visibility: visible;
}

@media (max-width: 768px) {
    .initiative-details-container.show-details { max-height: 1200px; padding: 20px; }
}

/* محتوى التفاصيل */
.detail-item { display: none; align-items: center; gap: 40px; }
.detail-item.active { display: flex; animation: fadeInSlide 0.5s ease forwards; }
.detail-text { flex: 2; text-align: right; }
.detail-text h3 { color: var(--primary-color); font-size: 1.5rem; margin-bottom: 20px; }
.quote-text {
    font-size: 0.95rem; line-height: 1.8; color: var(--text-main); margin-bottom: 15px; font-style: italic;
    background: rgba(0,0,0,0.2); padding: 15px; border-right: 3px solid var(--primary-color); border-radius: 5px;
}
body.light-mode .quote-text { background: rgba(0,0,0,0.03); }
.quote-author { display: block; color: var(--text-heading); font-weight: bold; font-size: 0.85rem; }
.detail-image { flex: 1; display: flex; justify-content: center; }
.detail-image img {
    width: 150px; height: 150px; border-radius: 50%; border: 3px solid var(--primary-color);
    object-fit: cover; box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}
@keyframes fadeInSlide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   10. قسم المشاريع (السلايدر الملكي)
   ========================================================================== */
.golden-slider-section { position: relative; width: 100%; }
.royal-card {
    width: 100%; height: 400px; perspective: 1000px; cursor: pointer;
}
.royal-card-inner {
    position: relative; width: 100%; height: 100%; text-align: center;
    transition: transform 0.8s; transform-style: preserve-3d;
}
.royal-card:hover .royal-card-inner, .royal-card.is-flipped .royal-card-inner { transform: rotateY(180deg); }

.royal-front, .royal-back {
    position: absolute; width: 100%; height: 100%; border-radius: 20px;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border: 1px solid var(--glass-border); overflow: hidden;
}
.royal-front { background-size: cover; background-position: center; }
.royal-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.95), transparent);
}
.royal-overlay h3 { color: #fff; font-size: 1.2rem; margin: 0; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }

.royal-back {
    background: var(--bg-secondary); color: var(--text-heading); transform: rotateY(180deg);
    display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px;
    border: 1px solid var(--primary-color);
}
body.light-mode .royal-back { background: #fff; }
.royal-back h3 { color: var(--primary-color); margin-bottom: 10px; }
.royal-back p { font-size: 0.9rem; line-height: 1.6; }

/* تنسيق Swiper */
.swiper { padding-bottom: 50px !important; }
.swiper-pagination-bullet { background: var(--text-main) !important; opacity: 0.5; transform: rotate(45deg); width: 10px; height: 10px; border-radius: 2px; }
.swiper-pagination-bullet-active { background: var(--primary-color) !important; opacity: 1; transform: rotate(45deg) scale(1.3); }
.custom-next, .custom-prev {
    position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
    background: rgba(255,255,255,0.1); border-radius: 50%; color: var(--primary-color);
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10;
    border: 1px solid var(--primary-color); transition: 0.3s;
}
.custom-next:hover, .custom-prev:hover { background: var(--primary-color); color: #fff; }
.custom-next { right: -50px; } .custom-prev { left: -50px; }
@media (max-width: 1100px) { .custom-next, .custom-prev { display: none; } }

/* ==========================================================================
   11. الماركيه (Marquee Strip) وشريط النصوص
   ========================================================================== */
.marquee-strip {
    background: var(--primary-color); padding: 15px 0; overflow: hidden;
    position: relative; z-index: 10; transform: skewY(-2deg); margin: 50px 0;
    border-top: 2px solid #fff; border-bottom: 2px solid #fff; box-shadow: 0 0 20px var(--primary-glow);
}
.marquee-content { display: flex; width: fit-content; animation: scrollText 20s linear infinite; }
.marquee-tag {
    font-size: 1.5rem; font-weight: 800; color: #0a192f; margin: 0 40px; white-space: nowrap;
    display: flex; align-items: center; gap: 10px;
}
@keyframes scrollText { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }

/* ==========================================================================
   12. خلفيات الأقسام الزخرفية (Decorations)
   ========================================================================== */
/* نقشة قسم المشاريع */
#projects::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0 L100 50 L50 100 L0 50 Z' fill='none' stroke='%23D4AF37' stroke-width='1' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 600px 600px; background-position: left center; opacity: 0.04; pointer-events: none;
}
/* نقشة قسم الهوية (نجوم) */
#identity::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg stroke='%23D4AF37' stroke-width='1' stroke-opacity='0.3'%3E%3Cpath d='M0 20 L20 0 L40 20 L20 40 Z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 60px 60px; opacity: 0.04; pointer-events: none; z-index: -1;
}

/* ==========================================================================
   13. الفوتر (Footer)
   ========================================================================== */
footer {
    background: var(--footer-bg); border-top: 1px solid var(--glass-border);
    padding: 80px 0 20px; margin-top: 50px; position: relative; color: var(--text-main);
}
footer::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/8/80/World_map_-_low_resolution.svg');
    background-size: cover; opacity: 0.03; filter: invert(1); pointer-events: none;
}
body.light-mode footer::before { filter: invert(0); opacity: 0.05; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; position: relative; z-index: 2; }
.footer-brand img { max-width: 150px; margin-bottom: 20px; opacity: 0.8; filter: brightness(0) invert(1); }
body.light-mode .footer-brand img { filter: none; opacity: 1; }
.footer-links h4 { color: var(--text-heading); margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-links h4::after { content: ''; position: absolute; bottom: 0; right: 0; width: 30px; height: 2px; background: var(--primary-color); }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a:hover { color: var(--primary-color); padding-right: 5px; }
.copyright { text-align: center; border-top: 1px solid var(--glass-border); padding-top: 25px; opacity: 0.8; }
.sweesa-link { color: var(--primary-color); font-weight: 800; }

@media (max-width: 900px) {
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-links h4::after { right: 50%; transform: translateX(50%); }
    .split-section { flex-direction: column; text-align: center; }
    .hero-title { font-size: 3.5rem; }
}

/* ==========================================================================
   14. شركاء النجاح (Partners)
   ========================================================================== */
.partners-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; margin-top: 40px; }
.partner-card {
    width: 150px; height: 120px; background: var(--bg-secondary);
    border: 1px solid var(--glass-border); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); opacity: 0.7;
}
.partner-card img { max-width: 80%; max-height: 60%; object-fit: contain; filter: grayscale(100%); transition: 0.3s; }
.partner-card:hover { transform: translateY(-5px); opacity: 1; border-color: var(--primary-color); box-shadow: 0 5px 15px var(--primary-glow); }
.partner-card:hover img { filter: grayscale(0%); }
body.light-mode .partner-card { background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

/* ==========================================================================
   15. شاشة التحميل (Preloader)
   ========================================================================== */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--bg-main); z-index: 10000;
    display: flex; justify-content: center; align-items: center; overflow: hidden; 
}
.loader-text { font-size: 4rem; color: var(--primary-color); letter-spacing: 5px; margin-bottom: 20px; opacity: 0; transform: translateY(20px); }
.loader-bar { width: 200px; height: 2px; background: var(--bg-secondary); overflow: hidden; margin: 0 auto; }
.bar-fill { width: 0%; height: 100%; background: var(--primary-color); }
/* ======================================================
   1. إصلاح وتجميل قسم المؤسس (زي الصورة المرفقة)
   ====================================================== */
#founder .split-section {
    display: flex;
    align-items: center; /* سنترة الفيديو مع الكلام رأسياً */
    justify-content: space-between;
    gap: 50px;
    flex-direction: row; /* التأكيد على أنهم جنب بعض */
}

/* تنسيق النصوص في قسم المؤسس */
#founder .split-content {
    flex: 1;
    text-align: right; /* محاذاة لليمين */
    padding-left: 20px;
}

/* تكبير وتفخيم الاقتباس */
#founder .text-block p {
    font-size: 1.2rem;
    line-height: 1.9;
    color: #e0e6ff;
    font-weight: 300;
    position: relative;
    padding-right: 20px;
    border-right: 3px solid var(--primary-color); /* خط ذهبي جانبي */
}

/* تنسيق التوقيع (أ. عبدالرحمن السليم) */
.founder-sign {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.founder-sign span {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
}

.founder-sign .line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
}

/* استايل كارت الفيديو (البرواز والظل) */
#founder .video-card-3d {
    flex: 1;
    border: 1px solid rgba(212, 175, 55, 0.3); /* إطار ذهبي خفيف */
    padding: 10px;
    background: rgba(10, 25, 47, 0.5); /* خلفية نصف شفافة */
    border-radius: 15px;
    /* الظل اللي بيدي عمق زي الصورة */
    box-shadow: -20px 20px 0px rgba(0, 0, 0, 0.2); 
    transform: rotate(-2deg); /* ميلان بسيط جداً شيك */
    transition: 0.4s ease;
}

#founder .video-card-3d:hover {
    transform: rotate(0deg) scale(1.02); /* يرجع مظبوط لما تقف عليه */
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
}

/* ======================================================
   2. ضبط الهيرو (العنوان في النص + زر السكرول تحت خالص)
   ====================================================== */

/* سنترة المحتوى بالكامل */
.hero-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* سنترة رأسية */
    align-items: center;     /* سنترة أفقية */
    text-align: center;
    position: relative;
    z-index: 3;
}

/* تكبير العنوان وضبطه */
.hero-title {
    margin-bottom: 20px;
    width: 100%;
    max-width: 900px; /* عشان ميفردش أوي */
}

/* إنزال "اكتشف القصة" للأسفل */
.scroll-down {
    position: absolute;
    bottom: 40px; /* نزلناها لتحت خالص */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.scroll-text {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    font-weight: 300;
}

/* ======================================================
   3. إصلاح الزخرفة الإسلامية (Code Fixed)
   ====================================================== */
/* تأكد إن العنصر واخد position relative */
.islamic-bg-section {
    position: relative;
    overflow: hidden; 
}

/* طبقة الزخرفة الجديدة (SVG Clean Pattern) */
.islamic-pattern-overlay {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.04; /* شفافية هادية جداً */
    /* باترن إسلامي هندسي متصل (Seamless) */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4AF37' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    animation: patternFloat 60s linear infinite; /* حركة بطيئة جداً */
}

/* حركة هادية للباترن */
@keyframes patternFloat {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* ======================================================
   4. ميديا كويري (عشان الموبايل يفضل مظبوط)
   ====================================================== */
@media (max-width: 900px) {
    #founder .split-section {
        flex-direction: column-reverse; /* الفيديو يطلع فوق الكلام في الموبايل */
        text-align: center;
        gap: 30px;
    }
    
    #founder .split-content {
        padding-left: 0;
        text-align: center;
    }

    #founder .text-block p {
        border-right: none;
        padding-right: 0;
        border-bottom: 2px solid var(--primary-color);
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .founder-sign {
        justify-content: center; /* سنترة التوقيع في الموبايل */
    }
    
    .scroll-down {
        bottom: 80px; /* نرفعها شوية في الموبايل عشان متبقاش لازقة في شريط المتصفح */
    }
}
/* ==========================================================================
   1. تعريف الألوان والخطوط (نظام الألوان الملكي)
   ========================================================================== */
   :root {
    /* 🌑 الوضع الليلي (Dark Mode) - الافتراضي */
    --bg-main: #0a192f;           /* كحلي ملكي عميق */
    --bg-secondary: #112240;      /* كحلي أفتح للكروت */
    --bg-accent: #1d3356;         /* درجة ثالثة للتباين */
    
    --primary-color: #D4AF37;     /* ذهبي ميتاليك صريح */
    --primary-glow: rgba(212, 175, 55, 0.5); /* وهج ذهبي */
    
    --text-main: #a8b2d1;         /* رمادي فضي */
    --text-heading: #ffffff;      /* أبيض ناصع للعناوين */
    
    --glass-bg: rgba(255, 255, 255, 0.03); /* خلفية زجاجية */
    --glass-border: rgba(212, 175, 55, 0.2); /* حدود ذهبية خفيفة */
    
    --pattern-opacity: 0.04;      /* شفافية الزخرفة */
    --font-main: 'Tajawal', sans-serif;
}

/* ☀️ الوضع النهاري (Light Mode) - اللؤلؤي */
body.light-mode {
    --bg-main: #F8F9FA;           /* أبيض لؤلؤي */
    --bg-secondary: #FFFFFF;      /* أبيض نقي */
    --bg-accent: #F1F5F9;         /* رمادي فاتح جداً للتباين */
    
    --primary-color: #B8860B;     /* ذهبي برونزي (عشان يبان في الأبيض) */
    --primary-glow: rgba(184, 134, 11, 0.3);
    
    --text-main: #475569;         /* رمادي مزرق */
    --text-heading: #0F172A;      /* كحلي غامق جداً للعناوين */
    
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(184, 134, 11, 0.15);
    
    --pattern-opacity: 0.03;
}

/* ==========================================================================
   2. التأسيس والأنماط العامة (Base Styles)
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.8;
    overflow-x: hidden;
    direction: rtl;
    transition: background 0.6s ease, color 0.6s ease;
    position: relative;
}

/* الزخرفة الإسلامية (Background Pattern) - شغالة في الاتنين */
body::before {
    content: '';
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* باترن هندسي إسلامي SVG */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23D4AF37' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: var(--pattern-opacity);
    z-index: -1;
    pointer-events: none;
    animation: patternMove 100s linear infinite; /* حركة خلفية بطيئة جداً */
}
@keyframes patternMove { 0% { background-position: 0 0; } 100% { background-position: 100px 100px; } }

/* النصوص */
h1, h2, h3 { color: var(--text-heading); font-weight: 800; letter-spacing: -0.5px; margin-bottom: 20px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; z-index: 2; }

/* الفواصل بين الأقسام (تباين وجمال) */
.section-padding { padding: 120px 0; position: relative; }

/* سحر الفواصل: خط ذهبي متلاشي بين كل سكشن */
section + section {
    border-top: 1px solid transparent;
}
section::after {
    content: ''; position: absolute; bottom: 0; left: 15%; right: 15%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), var(--primary-color), var(--glass-border), transparent);
    opacity: 0.6;
}

/* ==========================================================================
   3. إصلاح الهيرو (سنترة عنيزة + فخامة العنوان)
   ========================================================================== */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center; /* سنترة رأسية */
    justify-content: center; /* سنترة أفقية */
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.hero-bg video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 25, 47, 0.85); }
body.light-mode .hero-overlay { background: rgba(255, 255, 255, 0.85); } /* تفتيح الفيديو في النهاري */

.hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
}

/* العنوان الرئيسي */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem); /* حجم متجاوب ضخم */
    line-height: 1.3;
    color: var(--text-heading);
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

/* كلمة "في قلب عنيزة" - السنترة واللمعان */
.hero-title .gold-text {
    display: block; /* تنزل في سطر لوحدها */
    margin-top: 15px;
    color: var(--primary-color);
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 5s linear infinite;
    text-align: center; /* تأكيد السنترة */
    width: 100%;
}
@keyframes goldShine { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }

/* زر النزول (Scroll Down) */
.scroll-down {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    color: var(--primary-color); cursor: pointer; animation: bounce 2s infinite;
}
.mouse-icon { width: 26px; height: 40px; border: 2px solid var(--primary-color); border-radius: 20px; position: relative; }
.wheel { width: 4px; height: 6px; background: var(--primary-color); border-radius: 2px; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);} 40% {transform: translateX(-50%) translateY(-10px);} 60% {transform: translateX(-50%) translateY(-5px);} }


/* ==========================================================================
   4. الهلالات (The Moons) - تعمل 100%
   ========================================================================== */
.moons-wrapper {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; overflow: hidden; z-index: 0;
}

.moon-element {
    position: absolute;
    color: var(--primary-color);
    opacity: 0.05; /* خفيف جداً عشان الشياكة */
    filter: drop-shadow(0 0 15px var(--primary-color));
    animation: moonFloat 12s ease-in-out infinite;
}

/* توزيع الهلالات */
.pos-1 { top: 10%; right: 5%; font-size: 4rem; animation-delay: 0s; }
.pos-2 { top: 60%; left: 8%; font-size: 8rem; opacity: 0.03; animation-delay: 3s; } /* هلال كبير في الخلفية */
.pos-3 { bottom: 15%; right: 20%; font-size: 3rem; animation-delay: 6s; }

@keyframes moonFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}


/* ==========================================================================
   5. الكروت والأقسام (تحسين التباين)
   ========================================================================== */
/* قسم الهوية (خلفية داكنة/مميزة) */
.islamic-bg-section {
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-accent) 100%);
    position: relative;
}

/* العناوين المشتركة */
.section-header { text-align: center; margin-bottom: 60px; position: relative; z-index: 2; }
.section-tag { 
    font-size: 0.9rem; letter-spacing: 2px; color: var(--primary-color); 
    border: 1px solid var(--primary-color); padding: 5px 15px; border-radius: 50px;
    display: inline-block; margin-bottom: 15px;
}
.section-header h2 { font-size: 2.5rem; margin: 0; position: relative; display: inline-block; }

/* كروت الهوية (Glassmorphism) */
.flip-card-container { perspective: 1000px; }
.flip-card { width: 100%; height: 350px; position: relative; transform-style: preserve-3d; transition: transform 0.8s; cursor: pointer; }
.flip-card:hover .flip-inner { transform: rotateY(180deg); }

.flip-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s; transform-style: preserve-3d; }

.flip-front, .flip-back {
    position: absolute; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 20px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid var(--glass-border);
}

/* الوجه الأمامي */
.flip-front {
    background: var(--bg-secondary);
    /* تأثير زجاجي */
    backdrop-filter: blur(10px);
}
.card-icon {
    font-size: 3rem; color: var(--primary-color); margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    transition: 0.4s;
}
.flip-card:hover .card-icon { transform: scale(1.1) rotate(10deg); }

/* الوجه الخلفي */
.flip-back {
    background: linear-gradient(135deg, var(--bg-main), var(--bg-secondary));
    color: var(--text-heading);
    transform: rotateY(180deg);
    border: 2px solid var(--primary-color);
}
.flip-back h3 { color: var(--primary-color); margin-bottom: 15px; border-bottom: 1px solid rgba(212,175,55,0.3); padding-bottom: 10px; }
.flip-back p { font-size: 1rem; color: var(--text-main); }

/* ==========================================================================
   6. التوافق مع الوضع النهاري (Light Mode Fixes)
   ========================================================================== */
/* في الوضع النهاري، نزود ظل الكروت عشان تبان في الأبيض */
body.light-mode .flip-front {
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
body.light-mode .section-header h2 { color: #0F172A; }
body.light-mode .flip-back { background: #fffaf0; } /* خلفية كريمي فاتحة جداً للظهر */
/* ==========================================================================
   1. تحديث الألوان (تغيير الفوتر وتخفيف التباين)
   ========================================================================== */
:root {
    /* تعديل لون الفوتر ليكون كحلي ملكي بدلاً من الأسود */
    --footer-bg: #0d1b2a; 
}

/* ==========================================================================
   2. إصلاح الفيديو والهيدر في الوضع النهاري (Light Mode Fixes)
   ========================================================================== */

/* أهم تعديل: الفيديو دائماً عليه طبقة داكنة حتى في الوضع الأبيض */
/* عشان الكلام الأبيض يبان والفيديو ميكونش "أبيض زيادة" */
body.light-mode .hero-overlay {
    background: rgba(10, 25, 47, 0.6) !important; /* كحلي شفاف بدلاً من الأبيض */
}

/* الهيدر وهو شفاف (فوق الفيديو) - الكلام لازم يفضل أبيض دائماً */
body.light-mode header:not(.scrolled) .brand-title,
body.light-mode header:not(.scrolled) .nav-links a {
    color: #ffffff !important;
}

/* الهيدر لما يتعمل سكرول (يتحول لأبيض والنص كحلي) */
body.light-mode header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
body.light-mode header.scrolled .brand-title,
body.light-mode header.scrolled .nav-links a {
    color: #0a192f !important; /* النص يرجع كحلي عشان الخلفية بيضاء */
}
/* إصلاح اللوجو في الوضعين */
header:not(.scrolled) .logo-img { filter: brightness(0) invert(1); } /* دائماً أبيض فوق الفيديو */
body.light-mode header.scrolled .logo-img { filter: none; } /* يرجع لألوانه الأصلية في السكرول الأبيض */


/* ==========================================================================
   3. تخفيف تدرج الخلفية (Soft Gradient)
   ========================================================================== */
.islamic-bg-section {
    /* تدرج ناعم جداً وغير ملحوظ بقوة */
    background: linear-gradient(180deg, var(--bg-main) 0%, #0d1b2a 100%);
    position: relative;
    /* إضافة ظل داخلي خفيف يعطي عمق */
    box-shadow: inset 0 0 100px rgba(0,0,0,0.2);
}

/* ==========================================================================
   4. تنسيق الفوتر الجديد (Royal Footer)
   ========================================================================== */
footer {
    background-color: var(--footer-bg) !important;
    border-top: 1px solid rgba(212, 175, 55, 0.1); /* خط ذهبي خافت جداً */
}

/* ==========================================================================
   5. كود قسم الهوية والهلالات (الذي تم مسحه)
   ========================================================================== */

/* حاوية الهلالات */
.moons-wrapper {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; overflow: hidden; z-index: 0;
}

/* تصميم الهلال */
.moon-element {
    position: absolute;
    color: var(--primary-color);
    opacity: 0.03; /* شفافية عالية جداً للهدوء */
    filter: drop-shadow(0 0 15px var(--primary-color));
    animation: moonFloat 15s ease-in-out infinite;
}

/* أماكن الهلالات */
.pos-1 { top: 10%; right: 5%; font-size: 4rem; animation-delay: 0s; }
.pos-2 { top: 50%; left: 5%; font-size: 8rem; opacity: 0.02; animation-delay: 2s; }
.pos-3 { bottom: 15%; right: 20%; font-size: 3rem; animation-delay: 4s; }

/* حركة الطيران */
@keyframes moonFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(10deg); }
}

/* تنسيق الكروت (Vision Cards) */
.flip-card-container { perspective: 1000px; }
.flip-card { 
    width: 100%; height: 350px; position: relative; 
    transform-style: preserve-3d; transition: transform 0.8s; cursor: pointer; 
}
.flip-card:hover .flip-inner { transform: rotateY(180deg); }

.flip-inner { 
    position: relative; width: 100%; height: 100%; text-align: center; 
    transition: transform 0.8s; transform-style: preserve-3d; 
}

/* الوجه الأمامي */
.flip-front {
    background: rgba(17, 34, 64, 0.6); /* كحلي شفاف */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}

/* أيقونة الكارت */
.card-icon {
    font-size: 3.5rem; color: var(--primary-color); margin-bottom: 25px;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3));
    transition: 0.4s;
}
.flip-card:hover .card-icon { transform: scale(1.1) rotate(10deg); }

/* الوجه الخلفي */
.flip-back {
    background: var(--bg-main); /* لون الخلفية نفسه */
    border: 1px solid var(--primary-color);
    color: var(--text-heading);
    transform: rotateY(180deg);
    border-radius: 20px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px;
}
.flip-back h3 { color: var(--primary-color); margin-bottom: 10px; }

/* تحسين الوضع النهاري للكروت */
body.light-mode .flip-front {
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}
body.light-mode .flip-back {
    background: #fff;
    border-color: var(--primary-color);
}
/* ==========================================================================
   1. استعادة التدريجة اللونية الفخمة (Royal Deep Gradient)
   ========================================================================== */
.islamic-bg-section {
    /* هذه هي التدريجة اللي بتعمل تباين رائع: إضاءة خفيفة في النص وكحلي غامق في الأطراف */
    background: radial-gradient(circle at top center, #162c46 0%, #0a192f 60%, #050b14 100%);
    position: relative;
    /* إضافة لمعة خفيفة جداً من فوق لتحت */
    box-shadow: inset 0 100px 150px -50px rgba(0,0,0,0.5);
}

/* زيادة تباين الكروت عشان تلمع فوق الخلفية الجديدة */
.flip-front, .royal-card-inner {
    background: rgba(17, 34, 64, 0.7); /* كحلي متوسط الشفافية */
    border: 1px solid rgba(212, 175, 55, 0.25); /* تقوية الإطار الذهبي سنة بسيطة */
    box-shadow: 0 20px 50px rgba(0,0,0,0.25); /* ظل أقوى للعمق */
}

/* ==========================================================================
   2. سنترة كلمة "عنيزة" في الهيدر (فوق الستارة) بالميزان
   ========================================================================== */
/* ضبط حاوية اللوجو بالكامل */
.nav-brand {
    display: flex;
    align-items: center; /* سنترة رأسية صارمة للأيقونة مع الكلام */
    gap: 15px; /* مسافة مريحة بين اللوجو والكلام */
    height: 100%; /* عشان ياخد ارتفاع الهيدر */
}

/* ضبط النصوص (عنيزة + روح المبادرة) */
.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center; /* سنترة الكلام رأسياً */
    height: auto;
    /* هكر بسيط: ساعات الخط العربي بيحتاج ينزل 2 بيكسل عشان يبان متسنتر مع الانجليزي أو الأيقونات */
    padding-top: 3px; 
}

.brand-title {
    line-height: 1.1; /* تقليل المسافة بين الكلمتين */
    margin-bottom: 2px;
}

.brand-subtitle {
    line-height: 1;
}

/* ==========================================================================
   3. سنترة شريط الماركيه "الستارة المتحركة" (احتياطي لو ده اللي تقصده)
   ========================================================================== */
.marquee-strip {
    display: flex;         /* تفعيل الفليكس */
    align-items: center;   /* سنترة الكلام رأسياً جوه الشريط */
    justify-content: center; /* سنترة أفقية */
    height: 60px;          /* ارتفاع ثابت ومحترم */
    padding: 0;            /* إلغاء أي حشو بيبوظ السنترة */
    line-height: 1;        /* ضبط سطر الكلام */
}

.marquee-tag {
    display: flex;         /* عشان الأيقونة والكلام يجوا قصاد بعض */
    align-items: center;   /* سنترة النجمة مع الكلام */
    height: 100%;          /* ياخد طول الشريط */
    padding-top: 4px;      /* ضبط دقيق للخط العربي */
}
/* ==========================================================================
   إصلاح شاشة التحميل (سنترة كلمة عنيزة والخط)
   ========================================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* واخد طول الشاشة كلها */
    background-color: var(--bg-main);
    z-index: 10000;
    
    /* السحر للسنترة */
    display: flex !important;
    justify-content: center !important; /* سنترة بالعرض */
    align-items: center !important;     /* سنترة بالطول */
    
    overflow: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column; /* يرتب الكلمة وتحتها الخط */
    align-items: center;    /* يتأكد ان الخط تحت الكلمة في النص بالظبط */
    justify-content: center;
    position: relative;
    width: 100%;
    
    /* تعديل بسيط عشان العين تشوفها في النص بالظبط (Visual Center) */
    transform: translateY(-5%); 
}

.loader-text {
    font-size: 5rem; /* حجم فخم */
    font-weight: 900;
    color: var(--primary-color);
    margin: 0 0 15px 0; /* مسافة بين الكلمة والخط فقط، وبدون هوامش تانية */
    padding: 0;
    line-height: 1; /* عشان ميكونش فيه مساحات وهمية فوق وتحت الكلمة */
    opacity: 0;
    transform: translateY(20px);
}

.loader-bar {
    width: 150px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50px;
    margin: 0 auto; /* تأكيد السنترة */
    position: relative;
    overflow: hidden;
}

.bar-fill {
    width: 0%;
    height: 100%;
    background: #fff; /* لون ملو الخط */
    position: absolute;
    top: 0;
    left: 0;
}
/* ==========================================================================
   تحديث شامل للوضع النهاري (The Royal White Theme)
   ========================================================================== */

/* 1. ضبط ألوان الخلفيات والنصوص في الوضع النهاري */
body.light-mode {
    --bg-main: #F0F4F8;           /* لون رمادي مزرق فاتح جداً (عشان الأبيض يبان عليه) */
    --bg-secondary: #FFFFFF;      /* الكروت بيضاء ناصعة */
    --text-heading: #0a192f;      /* العناوين كحلي غامق (للتباين) */
    --text-main: #475569;         /* النصوص رمادي غامق */
    --primary-color: #B8860B;     /* ذهبي داكن */
}

/* ==========================================================================
   2. تثبيت لون "نبض العطاء" والهيرو أبيض دائماً
   ========================================================================== */
/* مهما كان الوضع (ليلي أو نهاري)، الكلام اللي فوق الفيديو يفضل أبيض */
body.light-mode .hero-title,
body.light-mode .hero-subtitle,
body.light-mode .hero-content h1, 
body.light-mode .hero-content p {
    color: #ffffff !important;
    text-shadow: 0 2px 15px rgba(0,0,0,0.5); /* ظل عشان الكلام يبان لو الفيديو فاتح */
}

/* كلمة "في قلب عنيزة" تفضل ذهبية مشعة */
body.light-mode .hero-title .gold-text {
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* ==========================================================================
   3. تعميم تصميم الكروت البيضاء (زي الصورة)
   ========================================================================== */

/* ستايل موحد لكل الكروت في الموقع للوضع النهاري */
body.light-mode .flip-front,
body.light-mode .flip-back,
body.light-mode .glass-card,
body.light-mode .royal-card-inner,
body.light-mode .partner-card {
    background-color: #ffffff !important; /* خلفية بيضاء صريحة */
    border: 1px solid #e2e8f0;            /* حدود رمادية خفيفة */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important; /* ظل ناعم */
    backdrop-filter: none;                /* إلغاء تأثير الزجاج في الأبيض */
}

/* ==========================================================================
   4. تغيير ألوان العناوين داخل الكروت (الرؤية، الرسالة، الأهداف)
   ========================================================================== */

/* العناوين (الرؤية، الرسالة..) تبقى كحلي غامق */
body.light-mode .flip-front h3, 
body.light-mode .flip-front h4,
body.light-mode .royal-back h3 {
    color: #0a192f !important; 
    font-weight: 800;
}

/* النصوص الوصفية تبقى رمادي غامق */
body.light-mode .flip-front p,
body.light-mode .flip-back p,
body.light-mode .flip-back li {
    color: #475569 !important;
}

/* ==========================================================================
   5. الأيقونات والزخارف في الوضع النهاري
   ========================================================================== */

/* الدائرة اللي حول الأيقونة تكون خلفيتها ذهبي فاتح جداً */
body.light-mode .card-icon {
    background: rgba(184, 134, 11, 0.1) !important;
    border: 1px dashed var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* تحسين شكل الهلالات الخلفية في الأبيض */
body.light-mode .moon-element {
    color: #0a192f; /* الهلالات تبقى كحلي خفيف */
    opacity: 0.03;  /* شفافة جداً */
}

/* ==========================================================================
   6. الفوتر في الوضع النهاري
   ========================================================================== */
body.light-mode footer {
    background-color: #0a192f !important; /* الفوتر يفضل غامق عشان الفخامة */
    color: #fff !important;
}
body.light-mode footer h4,
body.light-mode footer a,
body.light-mode footer p {
    color: #fff !important; /* النصوص بيضاء في الفوتر */
}
/* ==========================================================================
   1. إصلاح وضوح نص "كلمة المؤسس" في الوضع الفاتح
   ========================================================================== */
body.light-mode #founder .text-block p {
    color: #1e293b !important; /* كحلي غامق جداً (شبه الأسود) للقراءة */
    font-weight: 600; /* تغليظ الخط قليلاً */
    text-shadow: none !important; /* إلغاء أي ظل أبيض */
    line-height: 2; /* تحسين المسافات بين السطور */
}

/* لون اسم المؤسس */
body.light-mode #founder .founder-sign span {
    color: var(--primary-color) !important;
    font-weight: 800;
}

/* ==========================================================================
   2. خلق التباين (Making "Identity" Section Dark in Light Mode)
   ========================================================================== */
/* هنجبر قسم الهوية (الرؤية والرسالة) إنه يفضل كحلي فخم حتى لو الموقع أبيض */
body.light-mode #identity.islamic-bg-section {
    background: radial-gradient(circle at top center, #162c46 0%, #0a192f 60%, #050b14 100%) !important;
    color: #fff !important;
    padding-top: 100px;
    padding-bottom: 100px;
}

/* العناوين داخل القسم الكحلي ترجع بيضاء */
body.light-mode #identity .section-header h2 {
    color: #ffffff !important;
}

/* الكروت ترجع شفافة (Glass) داخل هذا القسم فقط */
body.light-mode #identity .flip-front,
body.light-mode #identity .flip-back {
    background: rgba(17, 34, 64, 0.6) !important; /* كحلي شفاف */
    border: 1px solid rgba(212, 175, 55, 0.2) !important; /* إطار ذهبي */
    box-shadow: 0 15px 35px rgba(0,0,0,0.3) !important; /* ظل قوي */
}

/* نصوص الكروت ترجع بيضاء وذهبية */
body.light-mode #identity .flip-front h3,
body.light-mode #identity .flip-back h3 {
    color: #fff !important;
}
body.light-mode #identity .flip-front p,
body.light-mode #identity .flip-back p,
body.light-mode #identity .flip-back li {
    color: #e0e6ff !important; /* أبيض مائل للأزرق خفيف */
}
body.light-mode #identity .card-icon {
    background: transparent !important;
    color: var(--primary-color) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

/* ==========================================================================
   3. تحسين فاصل التباين (Divider)
   ========================================================================== */
/* إضافة موجة أو فاصل ناعم بين القسم الأبيض والقسم الكحلي */
body.light-mode #identity::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.8;
}
/* ==========================================================================
   كسر الملل: تحويل قسم "شركاء النجاح" للثيم الكحلي في الوضع النهاري
   ========================================================================== */

/* 1. تغيير خلفية القسم للكحلي الملكي (نفس تدريجة الرؤية والرسالة) */
body.light-mode #partners, 
body.light-mode .bg-navy-light {
    background: radial-gradient(circle at center, #162c46 0%, #0a192f 100%) !important;
    position: relative;
    padding-top: 80px;
    padding-bottom: 80px;
}

/* 2. تعديل النصوص للعناوين لتصبح بيضاء */
body.light-mode #partners .section-header h2,
body.light-mode #partners h2 {
    color: #ffffff !important;
}

/* 3. كروت الشركاء: تحويلها لستايل "الزجاج الغامق" */
body.light-mode #partners .partner-card {
    background: rgba(17, 34, 64, 0.6) !important; /* كحلي شفاف */
    border: 1px solid rgba(212, 175, 55, 0.2) !important; /* إطار ذهبي خافت */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important; /* ظل للعمق */
    border-radius: 15px; /* تدوير الحواف */
}

/* تأثير عند الوقوف على الكارت */
body.light-mode #partners .partner-card:hover {
    border-color: var(--primary-color) !important;
    background: rgba(17, 34, 64, 0.8) !important;
    transform: translateY(-5px);
}

/* 4. معالجة صور اللوجوهات (مهم جداً!) */
/* عشان الخلفية بقت غامقة، لازم اللوجوهات تبقى بيضاء عشان تبان */

/* لما تقف على اللوجو، يرجع لألوانه الأصلية (اختياري، أو يلمع أبيض) */
body.light-mode #partners .partner-card:hover img {
    opacity: 1;
    filter: none !important; /* يرجع لألوانه الطبيعية */
    /* لو اللوجوهات غامقة ومش بتبان، ممكن نخليها تلمع أبيض بس: */
    /* filter: drop-shadow(0 0 5px #fff) brightness(0) invert(1) !important; */
}

/* 5. فواصل ذهبية (فوق وتحت القسم) عشان النقلة تكون شيك */
body.light-mode #partners::before,
body.light-mode #partners::after {
    content: '';
    position: absolute;
    left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}
body.light-mode #partners::before { top: 0; }
body.light-mode #partners::after { bottom: 0; }
/* ==========================================================================
   تنسيقات اللوجوهات (الهيدر + الرؤية + الفوتر)
   ========================================================================== */

/* 1. تنسيق لوجو الرؤية الجديد */
.vision-img {
    height: 45px; /* نفس ارتفاع اللوجو الأساسي */
    filter: brightness(0) invert(1); /* أبيض افتراضياً */
    transition: 0.4s;
    margin-left: 10px;
}

/* الخط الفاصل بين اللوجوهين */
.brand-divider {
    width: 1px;
    height: 30px;
    background-color: rgba(255,255,255,0.3);
    margin: 0 10px;
}

/* ==========================================================================
   2. تحويل اللوجوهات للكحلي في الوضع النهاري (عند السكرول فقط)
   ========================================================================== */

/* لما نكون في الوضع الأبيض + ونعمل سكرول (يعني الخلفية بقت بيضاء) */
body.light-mode header.scrolled .logo-img,
body.light-mode header.scrolled .vision-img {
    /* فلتر يحول الأبيض إلى كحلي غامق (#0a192f) */
    filter: invert(8%) sepia(61%) saturate(4466%) hue-rotate(213deg) brightness(93%) contrast(96%) !important;
}

/* لون الخط الفاصل في الوضع النهاري */
body.light-mode header.scrolled .brand-divider {
    background-color: rgba(10, 25, 47, 0.2);
}

/* ملاحظة: اللوجوهات هتفضل بيضاء طول ما احنا فوق الفيديو حتى في الوضع النهاري */


/* ==========================================================================
   3. لوجو الفوتر (تحويله للأزرق)
   ========================================================================== */

/* ==========================================================================
   تنسيق اللوجوهات الذهبية (Golden Logos Fix)
   ========================================================================== */

/* 1. ضبط المحاذاة بعد حذف النص */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

/* تكبير اللوجوهات قليلاً لتعويض غياب النص */
.logo-img, .vision-img {
    height: 55px; /* تكبير بسيط (كان 45) */
    width: auto;
    object-fit: contain;
    transition: 0.4s;
}

/* تنسيق الخط الفاصل */
.brand-divider {
    height: 35px;
    width: 1px;
    background-color: rgba(255,255,255,0.4);
    margin: 0 5px;
}

/* ==========================================================================
   2. الفلتر السحري (تحويل الأبيض لذهبي في الوضع النهاري)
   ========================================================================== */

/* لما الموقع يكون في الوضع الأبيض + وتعمل سكرول (الهيدر خلفيته بيضا) */
body.light-mode header.scrolled .logo-img,
body.light-mode header.scrolled .vision-img {
    /* هذا الفلتر يحول الصورة البيضاء إلى اللون الذهبي (#B8860B) */
    filter: invert(53%) sepia(35%) saturate(935%) hue-rotate(1deg) brightness(92%) contrast(89%) !important;
}

/* تغيير لون الخط الفاصل للذهبي أيضاً */
body.light-mode header.scrolled .brand-divider {
    background-color: rgba(184, 134, 11, 0.4);
}
/* ==========================================================================
   تنسيق لوجو الفوتر (التحويل للذهبي الفخم)
   ========================================================================== */


/* تأثير إضافي: لما تقف عليه يلمع أكثر */
footer .footer-brand img:hover {
    filter: invert(68%) sepia(40%) saturate(674%) hue-rotate(356deg) brightness(101%) contrast(93%) !important; /* ذهبي أفتح سنة */
    transform: scale(1.05); /* تكبير بسيط */
}
/* ==========================================================================
   تنسيق شاشة التحميل (اللوجو + النص الكامل)
   ========================================================================== */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--bg-main);
    z-index: 10000;
    display: flex !important; justify-content: center !important; align-items: center !important;
    overflow: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column; /* يرتبهم فوق بعض */
    align-items: center;
    justify-content: center;
    transform: translateY(-5%); /* رفعة بسيطة للسنترة البصرية */
}

/* 1. تنسيق اللوجو في التحميل */
.loader-logo {
    width: 100px; /* حجم متوسط وشيك */
    margin-bottom: 20px;
    /* الفلتر الذهبي الفخم */
    opacity: 0; /* مخفي في البداية */
    animation: fadeInUp 0.8s ease forwards; /* يظهر ويطلع لفوق */
}

/* 2. تنسيق النص */
.loader-text {
    font-size: 2.5rem; /* صغرنا الخط شوية عشان الجملة طويلة */
    font-weight: 700;
    color: #fff; /* أبيض عشان يتباين مع اللوجو الذهبي */
    letter-spacing: 1px;
    margin: 0 0 25px 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards; /* تأخير بسيط (يظهر بعد اللوجو) */
}

/* 3. شريط التحميل */
.loader-bar {
    width: 150px; height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.6s forwards; /* يظهر آخر حاجة */
}

.bar-fill {
    width: 0%; height: 100%;
    background: var(--primary-color);
    /* الأنيميشن بيتم عن طريق الجافاسكريبت أو CSS لو حابب */
}

/* حركة الظهور الناعمة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}
/* ==========================================================================
   تنسيقات صفحة "من نحن" (About Page Styles)
   ========================================================================== */

/* 1. هيدر الصفحات الفرعية (Page Header) */
.page-header {
    height: 60vh; /* ارتفاع مناسب للصفحات الفرعية */
    background-image: url('uploads/header-bg.jpg'); /* تأكد من وجود صورة بهذا الاسم */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* تأثير تثبيت الخلفية (Parallax) */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 80px;
    border-bottom: 1px solid var(--glass-border);
}

/* طبقة التعتيم فوق صورة الهيدر */
.page-header .header-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* تدرج من الكحلي للشفاف عشان الكلام يبان */
    background: linear-gradient(to bottom, rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.7));
}
/* تعديل التعتيم في الوضع النهاري */
body.light-mode .page-header .header-overlay {
    background: linear-gradient(to bottom, rgba(10, 25, 47, 0.8), rgba(255, 255, 255, 0.1));
}

.page-header h1 {
    position: relative; z-index: 2;
    font-size: 3.5rem; color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.page-header p {
    position: relative; z-index: 2;
    font-size: 1.2rem; color: #e0e6ff;
    max-width: 600px; margin: 0 auto;
}


/* 2. قسم الإحصائيات والأرقام (Stats) */
.stats-list {
    display: flex;
    justify-content: space-around; /* توزيع متساوي */
    list-style: none;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--glass-border); /* خط فاصل ذهبي خفيف */
    flex-wrap: wrap; gap: 30px;
}

.stats-list li {
    text-align: center;
    position: relative;
    min-width: 150px;
}

/* الأرقام (العداد) */
.stats-list h3.counter {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color); /* ذهبي */
    margin-bottom: 5px;
    line-height: 1;
    font-family: 'Tajawal', sans-serif; /* لضمان شكل الأرقام */
}
/* إضافة علامة + بعد الرقم */
.stats-list h3.counter::after {
    content: '+';
    font-size: 1.5rem;
    vertical-align: top;
    opacity: 0.7;
}

.stats-list span {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
}

/* الوضع النهاري للأرقام */
body.light-mode .stats-list h3.counter {
    color: var(--primary-color); /* يفضل ذهبي غامق */
    text-shadow: none;
}
body.light-mode .stats-list span {
    color: var(--text-heading); /* كحلي غامق */
}


/* 3. كروت مجلس الإدارة (Team Cards - Royal Style) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden; /* عشان الصورة متطلعش بره */
    transition: var(--transition);
    position: relative;
    group: translateY(0);
}

.team-card:hover {
    transform: translateY(-10px); /* يرفع لفوق */
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* صورة العضو */
.member-img {
    width: 100%;
    height: 320px; /* طول ثابت */
    position: relative;
    overflow: hidden;
}

.member-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
    filter: grayscale(20%); /* رمادي خفيف للشياكة */
}

.team-card:hover .member-img img {
    transform: scale(1.05); /* زوم خفيف */
    filter: grayscale(0%); /* يرجع ألوان */
}

/* طبقة السوشيال ميديا (تظهر من تحت) */
.social-overlay {
    position: absolute;
    bottom: -60px; /* مخفية تحت */
    left: 0; width: 100%;
    background: rgba(212, 175, 55, 0.95); /* خلفية ذهبية */
    padding: 15px 0;
    display: flex; justify-content: center; gap: 20px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.team-card:hover .social-overlay {
    bottom: 0; /* تطلع لفوق */
}

.social-overlay a {
    color: #0a192f; /* أيقونات كحلية على خلفية ذهبية */
    font-size: 1.2rem;
    transition: 0.3s;
}
.social-overlay a:hover {
    color: #fff;
    transform: scale(1.2);
}

/* معلومات العضو */
.member-info {
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 2;
    background: var(--bg-secondary); /* تغطية عشان لو الصورة طويلة */
}

.member-info h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--text-heading);
}

.member-info .position {
    display: block;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* ==========================================================================
   4. التوافق مع الوضع النهاري (Light Mode Team)
   ========================================================================== */
body.light-mode .team-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}
body.light-mode .team-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
body.light-mode .member-info {
    background: #ffffff;
}
body.light-mode .member-info h3 {
    color: #0a192f; /* الاسم كحلي */
}
body.light-mode .member-info .position {
    color: var(--primary-color); /* المنصب ذهبي */
}

/* ==========================================================================
   5. تحسينات التجاوب (Mobile Response)
   ========================================================================== */
@media (max-width: 768px) {
    .page-header h1 { font-size: 2.5rem; }
    .split-section { flex-direction: column; }
    .stats-list { flex-direction: column; gap: 40px; }
    .stats-list li::after { /* خط فاصل بين الأرقام في الموبايل */
        content: ''; position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
        width: 50px; height: 1px; background: var(--glass-border);
    }
    .stats-list li:last-child::after { display: none; }
}
/* ==========================================================================
   تنسيقات صفحة "من نحن" الجديدة (Journey & Values)
   ========================================================================== */

/* 1. إصلاح اللي أوت (الصورة جنب الكلام) */
.split-section {
    display: flex;
    align-items: center; /* سنترة عمودية */
    justify-content: space-between;
    gap: 60px; /* مسافة بين العمودين */
    flex-wrap: wrap; /* عشان الموبايل */
}

.split-content {
    flex: 1; /* ياخد نص المساحة */
    text-align: right;
    min-width: 300px;
}

.split-image {
    flex: 1; /* ياخد نص المساحة */
    min-width: 300px;
    display: flex;
    justify-content: center;
}

/* 2. تصميم الصورة الملكية (The Royal Image Frame) */
.royal-image-frame {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 20px 20px 0px rgba(212, 175, 55, 0.1); /* ظل ذهبي صلب */
}

.royal-image-frame img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.royal-image-frame:hover img {
    transform: scale(1.05);
}

/* برواز رفيع فوق الصورة */
.frame-border {
    position: absolute; top: 15px; left: 15px; right: 15px; bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}


/* 3. تنسيق قسم الأرقام (العدادات) مع الخط الفاصل */
.stats-wrapper {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.3); /* الخط الفاصل المطلوب */
    display: flex;
    justify-content: flex-start; /* الأرقام تبدأ من اليمين */
    align-items: center;
    gap: 40px;
}

.stats-item {
    text-align: center;
}

.stats-item .counter {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 5px;
    display: block;
}
.stats-item .counter::after { content: '+'; font-size: 1.5rem; vertical-align: top; }

.stats-item span {
    font-size: 0.9rem;
    color: var(--text-main);
}

/* فواصل عمودية صغيرة بين الأرقام */
.stats-divider {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, transparent, var(--glass-border), transparent);
}


/* 4. كروت القيم (Glassmorphism Cards) */
.glass-value-card {
    background: rgba(255, 255, 255, 0.03); /* خلفية شفافة جداً */
    backdrop-filter: blur(10px); /* تمويه الخلفية */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); /* حدود كريستالية */
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: 0.4s ease;
}

/* في الوضع النهاري، الكروت تكون بيضاء */
body.light-mode .glass-value-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.glass-value-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.value-icon {
    width: 70px; height: 70px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 25px auto;
    border: 1px dashed var(--primary-color);
    transition: 0.4s;
}

.glass-value-card:hover .value-icon {
    background: var(--primary-color);
    color: #fff;
    transform: rotate(360deg);
}

.glass-value-card h3 { margin-bottom: 15px; font-size: 1.3rem; }
.glass-value-card p { color: var(--text-main); font-size: 0.95rem; line-height: 1.6; }

/* تأثير اللمعة (Glow) */
.card-glow {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
    opacity: 0; transition: 0.5s; pointer-events: none;
}
.glass-value-card:hover .card-glow { opacity: 1; }
/* ==========================================================================
   تنسيقات صفحة المشاريع (Projects Page Styles)
   ========================================================================== */

/* 1. شريط البحث الكريستالي (Glass Search Bar) */
.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 30px auto 0;
    display: flex;
    align-items: center;
}

.search-wrapper input {
    width: 100%;
    padding: 15px 60px 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 1.1rem;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    transition: 0.3s;
}

.search-wrapper input::placeholder { color: rgba(255, 255, 255, 0.7); }

.search-wrapper input:focus {
    background: rgba(10, 25, 47, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--primary-glow);
}

.search-btn {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    background: var(--primary-color);
    border: none; width: 40px; height: 40px; border-radius: 50%;
    color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}
.search-btn:hover { transform: translateY(-50%) scale(1.1); }

/* وضع النهار لشريط البحث */
body.light-mode .search-wrapper input {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff; /* النص يفضل أبيض لأنه فوق الهيدر */
}
body.light-mode .search-wrapper input:focus {
    background: #fff; color: #0a192f;
}


/* 2. شبكة المشاريع (Grid) */
.projects-clean-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* 3. كارت المشروع القلاب (3D Flip Card) */
.project-flip-card {
    background-color: transparent;
    height: 400px; /* ارتفاع ثابت وممتاز */
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative; width: 100%; height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.project-flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* الأوجه */
.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

/* --- الوجه الأمامي (الصورة) --- */
.flip-card-front {
    background-size: cover; background-position: center;
    border: 1px solid var(--glass-border);
}

.front-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.95), transparent 60%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 25px; text-align: center;
}

.front-overlay h3 {
    color: #fff; font-size: 1.4rem; margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.tap-hint {
    font-size: 0.8rem; color: var(--primary-color); opacity: 0.8; margin-top: 5px;
}

/* --- الوجه الخلفي (التفاصيل) --- */
.flip-card-back {
    background: var(--bg-secondary); /* كحلي فاتح */
    color: var(--text-heading);
    transform: rotateY(180deg);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--primary-color);
    padding: 30px;
}

.back-content { width: 100%; }

.flip-card-back h3 {
    color: var(--primary-color); margin-bottom: 15px; font-size: 1.3rem;
}

.separator-line {
    width: 50px; height: 2px; background: rgba(212, 175, 55, 0.3);
    margin: 0 auto 20px auto;
}

.flip-card-back p {
    font-size: 0.95rem; line-height: 1.7; color: var(--text-main);
}

/* --- 4. الوضع النهاري للكروت (Royal White) --- */
body.light-mode .flip-card-back {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
body.light-mode .flip-card-back h3 { color: #0a192f; }
body.light-mode .flip-card-back p { color: #475569; }
body.light-mode .separator-line { background: var(--primary-color); }

/* تأثير الهوفر للنهاري */
body.light-mode .project-flip-card:hover .flip-card-inner {
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
/* ==========================================================================
   تنسيقات صفحة العضوية (Membership Page) - Royal Split Design
   ========================================================================== */

/* 1. التنسيق العام للقسم */
.membership-section {
    padding: 140px 0 80px; /* مسافة من فوق عشان الهيدر */
    min-height: 100vh;
    display: flex; align-items: center;
}

.split-wrapper {
    display: flex;
    align-items: flex-start; /* محاذاة للأعلى */
    gap: 60px;
    flex-wrap: wrap;
}

/* ==========================================================================
   2. الجانب الجمالي (Visual Side - Left)
   ========================================================================== */
.visual-side {
    flex: 1;
    position: sticky; top: 120px; /* يثبت لما تعمل سكرول */
    min-width: 300px;
}

.visual-content {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px dashed rgba(212, 175, 55, 0.2);
}

/* اللوجو الكبير المشع */
.logo-glow {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}
.big-logo {
    max-width: 180px;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.2));
    animation: floatLogo 6s ease-in-out infinite;
}
/* تعديل اللوجو في النهاري */
body.light-mode .big-logo {
    filter: drop-shadow(0 0 10px rgba(184, 134, 11, 0.2));
}

@keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.visual-content h2 { font-size: 2.2rem; margin-bottom: 15px; }
.visual-content p { color: var(--text-main); font-size: 1.1rem; margin-bottom: 30px; line-height: 1.6; }

/* قائمة المميزات */
.benefits-list {
    text-align: right;
    list-style: none;
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}
.benefits-list li {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: var(--text-heading);
    display: flex; align-items: center; gap: 10px;
    transition: 0.3s;
}
.benefits-list li:last-child { margin-bottom: 0; }
.benefits-list i { color: var(--primary-color); font-size: 1.2rem; }
.benefits-list li:hover { transform: translateX(-5px); }


/* ==========================================================================
   3. جانب النموذج (Form Side - Right)
   ========================================================================== */
.form-side {
    flex: 1.5;
    min-width: 350px;
}

.form-glass-card {
    background: rgba(17, 34, 64, 0.8); /* كحلي زجاجي */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}
.form-title::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 3px; background: var(--primary-color); border-radius: 2px;
}

/* تنسيق الحقول */
.form-row { display: flex; gap: 20px; }
.input-group { margin-bottom: 25px; width: 100%; }

.input-group label {
    display: block; margin-bottom: 10px;
    font-size: 0.95rem; color: var(--text-heading); font-weight: 700;
}
.input-group label small { color: var(--text-main); font-weight: normal; font-size: 0.8rem; }

.input-wrapper {
    position: relative; display: flex; align-items: center;
}

.input-wrapper i {
    position: absolute; right: 15px;
    color: var(--primary-color); z-index: 1; opacity: 0.7; transition: 0.3s;
}

.input-wrapper input, .input-wrapper select {
    width: 100%;
    padding: 14px 45px 14px 15px; /* مسافة للأيقونة */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

/* التركيز (Focus) */
.input-wrapper input:focus, .input-wrapper select:focus {
    border-color: var(--primary-color);
    background: rgba(10, 25, 47, 0.9);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}
.input-wrapper input:focus + i { opacity: 1; transform: scale(1.1); }

/* تنسيق الراديو (ذكر/أنثى) */
.radio-wrapper { display: flex; gap: 20px; }
.radio-box { cursor: pointer; flex: 1; }
.radio-box input { display: none; } /* إخفاء الراديو الأصلي */

.radio-custom {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    transition: 0.3s;
    background: rgba(255,255,255,0.02);
    font-weight: bold;
}

/* عند اختيار الراديو */
.radio-box input:checked + .radio-custom {
    background: linear-gradient(45deg, var(--primary-color), #b8860b);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px var(--primary-glow);
    transform: translateY(-2px);
}

/* الزرار الكامل */
.btn-full { width: 100%; padding: 15px; font-size: 1.1rem; }
.mt-4 { margin-top: 1.5rem; }

/* رسائل التنبيه */
.alert {
    padding: 15px; border-radius: 10px; margin-bottom: 25px;
    text-align: center; font-weight: bold; font-size: 0.95rem;
}
.alert-success { background: rgba(40, 167, 69, 0.15); color: #2ecc71; border: 1px solid #2ecc71; }
.alert-error { background: rgba(220, 53, 69, 0.15); color: #e74c3c; border: 1px solid #e74c3c; }


/* ==========================================================================
   4. التوافق مع الوضع النهاري (Light Mode Form)
   ========================================================================== */
body.light-mode .visual-content {
    background: #fff;
    border-color: rgba(184, 134, 11, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

body.light-mode .benefits-list {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .form-glass-card {
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    border-color: #e2e8f0;
}

body.light-mode .input-wrapper input, 
body.light-mode .input-wrapper select {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0a192f;
}

body.light-mode .input-wrapper input:focus, 
body.light-mode .input-wrapper select:focus {
    background: #fff;
    border-color: var(--primary-color);
}

body.light-mode .radio-custom {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

/* ==========================================================================
   5. تجاوب الموبايل
   ========================================================================== */
@media (max-width: 900px) {
    .split-wrapper { flex-direction: column; }
    .visual-side { position: relative; top: 0; width: 100%; margin-bottom: 30px; }
    .form-row { flex-direction: column; gap: 0; }
    .form-glass-card { padding: 25px; }
}
/* ==========================================================================
   تنسيقات صفحة طلب المبادرة (Request Initiative)
   ========================================================================== */

/* نفس تنسيق السكشن العام */
.request-section {
    padding: 140px 0 80px;
    min-height: 100vh;
}

/* تنسيق النجمة الحمراء للحقول المطلوبة */
.required { color: #e74c3c; margin-right: 3px; font-weight: bold; }

/* 1. كارت "رحلة المبادرة" (في الجانب الجمالي) */
.steps-card {
    margin-top: 40px;
    background: rgba(255,255,255,0.03);
    padding: 25px;
    border-radius: 15px;
    border: 1px dashed var(--primary-color);
    text-align: right;
    position: relative;
}

.steps-card h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2rem;
}

.steps-card ul { list-style: none; padding: 0; }

.steps-card li {
    margin-bottom: 15px;
    display: flex; align-items: center; gap: 15px;
    color: var(--text-main);
    font-weight: 500;
    transition: 0.3s;
}

/* الأرقام الدائرية */
.steps-card span {
    width: 30px; height: 30px;
    background: linear-gradient(45deg, var(--primary-color), #b8860b);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: bold;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.steps-card li:hover { transform: translateX(-5px); color: #fff; }


/* 2. شبكة اختيار نوع المبادرة (Checkbox Grid) */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}

.custom-checkbox input { display: none; } /* إخفاء الصندوق التقليدي */

.box-content {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 20px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-main);
    text-align: center;
    font-size: 0.9rem;
}

.box-content i { font-size: 1.5rem; color: var(--primary-color); transition: 0.3s; }

/* حالة الاختيار (Checked) */
.custom-checkbox input:checked + .box-content {
    background: var(--primary-color);
    color: #fff; /* النص يبقى أبيض */
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

/* الأيقونة داخل الحالة المختارة */
.custom-checkbox input:checked + .box-content i {
    color: #fff;
    transform: scale(1.2);
}


/* 3. تنسيق منطقة الكتابة الكبيرة (Textarea) */
.textarea-wrapper textarea {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    resize: vertical; /* يسمح بالتكبير الرأسي فقط */
    outline: none;
    min-height: 100px;
}


/* 4. منطقة رفع الملفات (File Upload) */
.file-upload-box {
    position: relative;
    border: 2px dashed rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    transition: 0.3s;
    background: rgba(255,255,255,0.01);
    cursor: pointer;
}

.file-upload-box:hover {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.05);
}

.file-upload-box input[type="file"] {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}

.upload-content i {
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: 15px;
    transition: 0.3s;
}

.upload-content p { margin-bottom: 5px; color: var(--text-heading); font-weight: bold; }
.upload-content span { font-size: 0.8rem; color: var(--text-main); }


/* ==========================================================================
   5. التوافق مع الوضع النهاري (Light Mode Request)
   ========================================================================== */

/* الكارت الجمالي (الخطوات) */
body.light-mode .steps-card {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
body.light-mode .steps-card li:hover { color: var(--primary-color); }

/* مربعات الاختيار (Checkboxes) */
body.light-mode .box-content {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}
body.light-mode .box-content:hover { border-color: var(--primary-color); }

/* عند الاختيار في الأبيض */
body.light-mode .custom-checkbox input:checked + .box-content {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* التكست إريا */
body.light-mode .textarea-wrapper textarea { color: #0a192f; }

/* منطقة رفع الملفات */
body.light-mode .file-upload-box {
    background: #f8fafc;
    border-color: #cbd5e1;
}
body.light-mode .file-upload-box:hover {
    border-color: var(--primary-color);
    background: #fff;
}
body.light-mode .upload-content p { color: #0a192f; }

/* الأيقونة الكبيرة في الجانب الجمالي */
body.light-mode .logo-glow i {
    filter: drop-shadow(0 5px 15px rgba(184, 134, 11, 0.3));
}
/* ==========================================================================
   إضافات الإبداع والفخامة (Magic Effects)
   ========================================================================== */

/* 1. شريط التقدم الذهبي (Scroll Progress) */
.scroll-progress-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 3px;
    z-index: 99999; background: transparent;
}
.scroll-progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #fff, var(--primary-color));
    box-shadow: 0 0 10px var(--primary-color);
    border-radius: 0 2px 2px 0;
    transition: width 0.1s ease-out;
}

/* 2. طبقة الضجيج (Cinematic Noise) - سر الفخامة */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9000; opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
/* تخفيف الضجيج في الوضع النهاري */
body.light-mode .noise-overlay { opacity: 0.05; mix-blend-mode: multiply; }


/* 3. تأثير اللمعة المتحركة على الكروت (Sheen Effect) */
/* ضيف الكلاس ده لأي كارت: flip-card, glass-card, team-card */
.flip-card, .glass-card, .team-card, .project-flip-card, .partner-card {
    position: relative; overflow: hidden;
}

.flip-card::before, 
.glass-card::before, 
.team-card::before,
.project-flip-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
    z-index: 10;
}

/* اللمعة تجري لما تقف بالماوس */
.flip-card:hover::before, 
.glass-card:hover::before, 
.team-card:hover::before,
.project-flip-card:hover::before {
    left: 150%;
    transition: 0.7s ease-in-out;
}


/* 4. تجميل النصوص المختارة (Text Selection) */
::selection {
    background: var(--primary-color);
    color: #fff;
    text-shadow: 0 0 5px rgba(0,0,0,0.2);
}
/* ==========================================================================
   1. إخفاء شكل المؤشر المخصص في الموبايل (Touch Devices)
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor, 
    .cursor-dot, 
    .cursor-outline {
        display: none !important; /* إخفاء تام */
    }
    
    * { cursor: auto !important; } /* استرجاع مؤشر النظام العادي */
}

/* ==========================================================================
   2. تنسيق الهيدر في الوضع النهاري (قبل الحركة - ثابت)
   ========================================================================== */

/* الروابط تكون ذهبية وهي فوق الفيديو */
body.light-mode header:not(.scrolled) .nav-links a {
    color: var(--primary-color) !important; /* ذهبي */
    font-weight: 700;
}

/* اللوجوهات (الجمعية + الرؤية) تكون ذهبية وهي فوق الفيديو */
body.light-mode header:not(.scrolled) .logo-img,
body.light-mode header:not(.scrolled) .vision-img {
    /* فلتر اللون الذهبي */
    filter: invert(53%) sepia(35%) saturate(935%) hue-rotate(1deg) brightness(92%) contrast(89%) !important;
}

/* الخط الفاصل بينهم يكون ذهبي */
body.light-mode header:not(.scrolled) .brand-divider {
    background-color: var(--primary-color) !important;
}

/* زرار "طلب عضوية" في الموبايل أو "من نحن" ..إلخ عند الهوفر */
body.light-mode header:not(.scrolled) .nav-links a:hover {
    color: #fff !important; /* يقلب أبيض لما تقف عليه */
    text-shadow: 0 0 10px var(--primary-glow);
}


/* ==========================================================================
   3. تنسيق قائمة الموبايل (Drawer) في الوضع النهاري
   ========================================================================== */
@media (max-width: 900px) {
    /* خلفية القائمة بيضاء */
    body.light-mode .nav-links {
        background-color: #ffffff !important;
    }

    /* الروابط داخل القائمة تكون كحلي (عشان تبان على الأبيض) */
    body.light-mode .nav-links a {
        color: #0a192f !important;
    }

    /* زرار الوضع الليلي داخل القائمة */
    body.light-mode .theme-row span {
        color: #0a192f !important;
        font-weight: bold;
    }

    /* زرار الهلال (أيقونة الثيم) */
    body.light-mode .btn-theme-mobile {
        border-color: var(--primary-color) !important;
        color: var(--primary-color) !important;
        background: transparent;
    }

    /* الفواصل داخل القائمة */
    body.light-mode .mobile-item.separator {
        border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    }
}
/* ==========================================================================
   إصلاح شاشة التحميل في الوضع النهاري (Light Mode Preloader)
   ========================================================================== */

/* 1. النص (عنيزة.. روح المبادرة) يقلب كحلي غامق عشان يبان بوضوح */
body.light-mode .loader-text {
    color: #0a192f !important; /* كحلي ملكي */
    font-weight: 800; /* تقيل عشان الفخامة */
}

/* 2. اللوجو يقلب ذهبي داكن (بدل الأبيض) */
body.light-mode .loader-logo {
    /* فلتر يحول اللوجو للون الذهبي الواضح (#B8860B) */
    filter: invert(53%) sepia(35%) saturate(935%) hue-rotate(1deg) brightness(92%) contrast(89%) !important;
    opacity: 1;
}

/* 3. خلفية شريط التحميل (عشان تبان على الأبيض) */
body.light-mode .loader-bar {
    background: rgba(0, 0, 0, 0.05); /* رمادي خفيف جداً */
}

/* 4. لون الشريط نفسه يفضل ذهبي زي ما هو */
body.light-mode .bar-fill {
    background: var(--primary-color) !important;
}
/* ==========================================================================
   إصلاح حجم الفيديو ليملأ الإطار (Video Fit Fix)
   ========================================================================== */

/* 1. ضبط الكارت الخارجي (الإطار الذهبي) */
#founder .video-card-3d {
    width: 100%;
    /* إلغاء أي ارتفاع ثابت عشان يتمدد مع الفيديو */
    height: auto !important; 
    min-height: auto !important;
    /* تقليل الحشو الداخلي عشان الفيديو يقرب من البرواز */
    padding: 8px !important; 
    display: block;
}

/* 2. ضبط حاوية الفيديو (السر هنا: Aspect Ratio 16:9) */
#founder .video-wrapper {
    position: relative;
    width: 100%;
    /* هذا السطر هو اللي بيظبط أبعاد اليوتيوب بالظبط */
    padding-bottom: 56.25%; /* نسبة 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px; /* تدوير خفيف للفيديو نفسه */
    background: #000;   /* خلفية سوداء عشان لو الفيديو بيحمل */
}

/* 3. إجبار الـ iframe (الفيديو نفسه) إنه يملأ المساحة */
#founder .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
}
/* إصلاح ظهور الشركاء */
.partner-card {
    opacity: 1 !important; /* إلغاء الشفافية */
    background: #fff !important; /* خلفية بيضاء لضمان ظهور اللوجو */
}

.partner-card img {
    filter: none !important; /* إلغاء الأبيض والأسود */
    opacity: 1 !important;
    max-width: 90%; /* تنسيق لضمان عدم خروج الصورة */
    max-height: 90%;
}

/* تكبير بسيط عند الوقوف بالماوس كنوع من التفاعل */
.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
/* 1. إجبار الكروت على الظهور بخلفية بيضاء دائماً (ليظهر اللوجو الشفاف) */
.partner-card {
    opacity: 1 !important;                 /* إلغاء الشفافية */
    background-color: #ffffff !important;  /* خلفية بيضاء نقية للكارت */
    border: 1px solid #ddd !important;     /* حدود خفيفة */
    filter: none !important;               /* إلغاء أي فلاتر على الكارت */
    transform: none !important;            /* إلغاء أي تحجيم افتراضي */
}

/* 2. إجبار الصور على الظهور بألوانها الأصلية */
.partner-card img {
    opacity: 1 !important;             /* ظهور كامل */
    filter: none !important;           /* إلغاء الرمادي والأبيض/الأسود */
    visibility: visible !important;    /* تأكيد الظهور */
    mix-blend-mode: normal !important; /* منع دمج الألوان مع الخلفية */
}

/* 3. تأثير بسيط عند مرور الماوس (اختياري) */
.partner-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
    border-color: #D4AF37 !important; /* لون ذهبي عند الماوس */
}
/* تصغير الخط للقوائم الطويلة في الخلف */
.flip-back .back-list li {
    font-size: 0.8rem !important; /* تصغير الخط قليلاً */
    margin-bottom: 5px !important; /* تقليل المسافة بين السطور */
}
/* 1. إصلاح ظهور فيديو المؤسس */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* نسبة 16:9 عشان الفيديو يحافظ على ابعاده */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    background: #000; /* خلفية سوداء لحد ما الفيديو يحمل */
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border: none;
}

/* 2. زرار كتم/تشغيل الصوت في الهيرو */
.mute-btn-container {
    position: absolute;
    bottom: 100px; /* فوق زرار السكرول بشوية */
    left: 50px; /* على الشمال */
    z-index: 20;
}

.mute-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-color); /* اللون الذهبي */
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    font-size: 1.2rem;
}

.mute-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mute-btn-container {
        left: 20px;
        bottom: 120px;
    }
}
/* تحديث شبكة الفوتر لتصبح 4 أعمدة */
.footer-content {
    display: grid;
    /* تقسيم الأعمدة: اللوجو والتواصل أكبر قليلاً من الروابط */
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr; 
    gap: 30px;
    text-align: right;
}

/* تنسيق عناصر التواصل */
.contact-item {
    display: flex;
    align-items: flex-start; /* عشان الأيقونة تيجي فوق مع الكلام */
    gap: 10px;
    margin-bottom: 15px;
    color: #b0b0b0; /* لون النص */
    font-size: 0.95rem;
}

.contact-item a {
    color: #b0b0b0;
    transition: 0.3s;
}
.contact-item a:hover {
    color: var(--primary-color);
}

.contact-item span {
    display: block;
    font-weight: bold;
    color: #fff;
}

.gold-icon {
    color: var(--primary-color);
    margin-top: 5px; /* ضبط محاذاة الأيقونة مع النص */
}

/* تنسيق أيقونات السوشيال ميديا */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* التجاوب مع الموبايل (مهم جداً) */
@media (max-width: 991px) {
    .footer-content {
        grid-template-columns: 1fr; /* عمود واحد في الموبايل */
        text-align: center;
    }
    
    .contact-item {
        justify-content: center; /* توسيط عناصر التواصل */
        text-align: center;
    }
    
    .social-icons {
        justify-content: center; /* توسيط السوشيال ميديا */
    }
}
/* =========================================
   تصميم الفوتر الجديد (Royal Footer)
   ========================================= */
footer {
    background-color: #050b14; /* لون داكن جداً وفخم */
    color: #fff;
    padding-top: 60px;
    padding-bottom: 20px;
    position: relative;
    font-family: 'Tajawal', sans-serif;
    border-top: 5px solid var(--primary-color); /* الخط الذهبي العلوي */
}

/* الشبكة الرئيسية (3 أعمدة واسعة) */
.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.5fr; /* العمود الأخير (التواصل) أكبر */
    gap: 50px;
    margin-bottom: 50px;
}

/* --- العمود 1: الهوية --- */
.footer-logo {
    max-width: 140px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* جعل اللوجو أبيض */
}

.brand-bio {
    color: #b0b0b0;
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.map-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 10px 20px;
    border-radius: 50px;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
}
.map-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* --- العمود 2: القائمة --- */
.footer-nav h4, .footer-contact-info h4 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}
/* خط صغير تحت العنوان */
.footer-nav h4::after, .footer-contact-info h4::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 40px; height: 3px;
    background: var(--primary-color);
}

.clean-list {
    list-style: none;
    padding: 0;
}
.clean-list li {
    margin-bottom: 12px;
}
.clean-list a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.clean-list a i { font-size: 0.8rem; color: var(--primary-color); }
.clean-list a:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

/* --- العمود 3: التواصل (الأهم) --- */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}
.info-box i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 5px;
}
.info-text { display: flex; flex-direction: column; }
.info-text .label { font-size: 0.85rem; color: #888; margin-bottom: 2px; }
.info-text .value { color: #fff; font-weight: 500; }

.email-box a { color: #fff; text-decoration: none; transition: 0.3s; }
.email-box a:hover { color: var(--primary-color); }

/* أزرار الاتصال والواتساب */
.contact-buttons {
    display: flex;
    gap: 15px;
    margin: 25px 0;
}
.contact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}
.contact-btn.phone {
    background: #fff;
    color: #000;
}
.contact-btn.whatsapp {
    background: #25D366; /* لون الواتس الرسمي */
    color: #fff;
}
.contact-btn:hover { transform: translateY(-3px); opacity: 0.9; }

/* أيقونات السوشيال ميديا */
.social-row {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}
.sc-icon {
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
}
.sc-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(360deg);
}

/* حقوق النشر */
.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #777;
    font-size: 0.9rem;
}
.dev-by a { color: var(--primary-color); text-decoration: none; font-weight: bold; }

/* --- التجاوب مع الموبايل --- */
@media (max-width: 991px) {
    .footer-content {
        grid-template-columns: 1fr; /* عمود واحد */
        text-align: center;
        gap: 40px;
    }
    
    .footer-nav h4::after, .footer-contact-info h4::after {
        left: 50%; transform: translateX(-50%); /* سنترة الخط */
    }

    .info-box {
        justify-content: center;
        text-align: center;
    }
    
    .contact-buttons {
        flex-direction: column; /* الأزرار تحت بعض في الموبايل */
    }

    .social-row { justify-content: center; }
    
    .copyright {
        flex-direction: column;
        gap: 10px;
    }
}
/* تنسيق قسم التواصل الجديد (قائمة موحدة) */
.info-line {
    display: flex;
    align-items: center; /* محاذاة في المنتصف */
    gap: 15px;
    margin-bottom: 20px;
    padding: 5px 0;
}

/* صندوق الأيقونة */
.icon-box {
    width: 35px; /* عرض ثابت لضمان المحاذاة */
    text-align: center;
}
.icon-box i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* تنسيق النصوص والروابط */
.text-content {
    display: flex;
    flex-direction: column;
}
.text-content .label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 2px;
}
.text-content .value {
    color: #fff;
    font-weight: 500;
}

/* الروابط (الهاتف، الواتس، الايميل) */
.text-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    transition: 0.3s;
    font-family: sans-serif; /* للأرقام الإنجليزية */
}

/* تأثير عند المرور على الروابط */
.info-line.clickable:hover .text-link {
    color: var(--primary-color);
    padding-right: 5px; /* حركة بسيطة لليمين */
}
.info-line.clickable:hover .icon-box i {
    transform: scale(1.2); /* تكبير الأيقونة */
}

/* تعديل أيقونة الواتس لتكون مميزة قليلاً (اختياري) */
.info-line .fa-whatsapp {
    font-size: 1.5rem; /* أكبر قليلاً */
}
/* =========================================
   تحديث الفوتر (المحاذاة الدقيقة)
   ========================================= */

/* 1. ضبط الشبكة لتكون 3 أقسام متساوية تماماً لضمان السنترة */
.footer-content {
    display: grid;
    /* ثلاث أعمدة متساوية، هذا يضمن أن العمود الأوسط في سنتر الشاشة */
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 20px;
    margin-bottom: 50px;
    align-items: start; /* محاذاة من الأعلى */
}

/* 2. العمود الأول (الهوية) - يمين */
.footer-brand {
    /* يبقى كما هو (محاذاة لليمين افتراضياً) */
    text-align: right;
}

/* 3. العمود الأوسط (المركز الإعلامي) - سنتر بالمللي */
.footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center; /* يسنتر العناصر أفقياً */
}

/* سنترة العنوان والخط تحته */
.footer-nav h4 {
    text-align: center;
}
.footer-nav h4::after {
    right: auto; /* إلغاء المحاذاة اليمين */
    left: 50%;   /* وضع نقطة البداية في النص */
    transform: translateX(-50%); /* سحب الخط ليتسنتر */
}

/* سنترة القائمة والأسهم */
.clean-list li {
    justify-content: center; /* يخلي الكلام والأيقونة في النص */
}

/* 4. العمود الأخير (تواصل معنا) - أقصى اليسار */
.footer-contact-info {
    display: flex;
    flex-direction: column;
    /* في المواقع العربي (RTL)، الـ flex-end معناها اليسار */
    align-items: flex-end; 
}

/* محاذاة العنوان والخط لليسار */
.footer-contact-info h4 {
    text-align: left;
    width: 100%; /* عشان ياخد مساحة ويقدر يحاذي النص */
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* محاذاة العنوان لليسار */
}
.footer-contact-info h4::after {
    right: auto;
    left: 0; /* الخط يجي في اليسار تحت الكلمة */
}

/* ضبط اتجاه السطور (الأيقونة والنص) ليظل شكلها مرتب */
/* نخلي السطر نفسه يبدأ من اليمين لليسار (عربي) بس البلوك كله مرمي في اليسار */
.info-line {
    flex-direction: row; /* الأيقونة يمين والكلام يسار */
    width: fit-content;  /* عشان الخلفية او التحديد يكون على قد الكلام */
}

/* تعديل السوشيال ميديا لتكون في اليسار */
.social-row {
    justify-content: flex-end;
    width: 100%;
}

/* =========================================
   التجاوب مع الموبايل (مهم جداً عشان ميبوظش)
   ========================================= */
@media (max-width: 991px) {
    .footer-content {
        grid-template-columns: 1fr; /* عمود واحد */
        text-align: center;
    }
    
    /* في الموبايل نرجع كل حاجة في النص */
    .footer-nav, .footer-contact-info, .footer-brand {
        align-items: center;
        text-align: center;
    }
    
    .footer-contact-info h4 {
        align-items: center;
    }
    
    .footer-nav h4::after, .footer-contact-info h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-row {
        justify-content: center;
    }
}
/* =========================================
   تحديث عمود تواصل معنا (السنترة مع المحاذاة يمين)
   ========================================= */

/* 4. العمود الأخير (تواصل معنا) */
.footer-contact-info {
    display: flex;
    flex-direction: column;
    /* هذا السطر يضع الكتلة كلها في منتصف العمود الأيسر */
    align-items: center; 
}

/* هنا السر: نحدد عرض ثابت للمحتوى ليكون "بلوك" واحد مرتب */
.footer-contact-info h4,
.info-line,
.social-row {
    width: 100%;
    /* هذا العرض يضمن أن الكلام لا يتمدد ويظل ملموماً في المنتصف */
    max-width: 280px; 
}

/* محاذاة العنوان والخط الأصفر لليمين داخل البلوك */
.footer-contact-info h4 {
    text-align: right;
    display: block;
    position: relative;
}

.footer-contact-info h4::after {
    right: 0;        /* الخط يبدأ من اليمين */
    left: auto;      /* إلغاء أي محاذاة يسار أو وسط */
    transform: none; /* إلغاء السنترة */
}

/* محاذاة السطور (أيقونة + نص) لتبدأ من اليمين */
.info-line {
    justify-content: flex-start; /* الأيقونة يمين والنص بعدها */
    flex-direction: row; /* التأكيد على الترتيب الأفقي */
}

/* محاذاة السوشيال ميديا لتبدأ من اليمين */
.social-row {
    justify-content: flex-start;
}

/* =========================================
   تعديل الموبايل (عشان يفضل في النص)
   ========================================= */
@media (max-width: 991px) {
    .footer-contact-info {
        align-items: center;
    }
    
    /* في الموبايل نلغي المحاذاة اليمين ونخليها سنتر عشان الشكل */
    .footer-contact-info h4,
    .info-line,
    .social-row {
        max-width: 100%; /* ياخد راحته في الموبايل */
        text-align: center;
        justify-content: center;
    }
    
    .footer-contact-info h4::after {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}
/* إخفاء مؤشر الماوس الافتراضي في الموقع بالكامل */
* {
    cursor: none !important;
}

/* تصميم المؤشر الجديد الثابت */
.custom-cursor {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color); /* إطار ذهبي */
    background-color: rgba(212, 175, 55, 0.1); /* تعبئة خفيفة */
    border-radius: 50%;
    position: fixed;
    pointer-events: none; /* عشان ميمنعش الضغط على الروابط */
    z-index: 9999;
    transform: translate(-50%, -50%); /* لضبط السنتر */
    transition: transform 0.1s ease; /* نعومة بسيطة جداً عند التكبير فقط */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* النقطة الصغيرة في النص */
.custom-cursor::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* تكبير المؤشر عند الوقوف على الروابط */
.custom-cursor.hovered {
    transform: translate(-50%, -50%) scale(1.8);
    background-color: rgba(212, 175, 55, 0.05);
    border-color: #fff;
}

/* إخفاء المؤشر في الموبايل */
@media (max-width: 900px) {
    .custom-cursor { display: none !important; }
    * { cursor: auto !important; }
}
/* ======================================================
   تنسيق زر تغيير الثيم (القمر) في قائمة الموبايل
   ====================================================== */

/* 1. ضبط الحاوية (السطر) لضمان التوسيط */
.mobile-item.theme-row {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-top: 30px; /* مسافة بينه وبين آخر رابط */
    margin-bottom: 20px;
    width: 100%;
}

/* 2. تصميم الزر نفسه */
.btn-theme-mobile {
    background: rgba(255, 255, 255, 0.05); /* خلفية شفافة جداً */
    border: 2px solid var(--primary-color); /* إطار ذهبي */
    color: var(--primary-color);            /* لون القمر ذهبي */
    width: 55px;
    height: 55px;
    border-radius: 50%; /* دائري تماماً */
    font-size: 1.5rem;  /* تكبير حجم القمر */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* حركة ناعمة */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 3. تأثير عند الضغط أو اللمس */
.btn-theme-mobile:hover,
.btn-theme-mobile:active {
    background: var(--primary-color); /* الخلفية تصبح ذهبية */
    color: #fff;                      /* القمر يصبح أبيض */
    transform: scale(1.1) rotate(15deg); /* تكبير ودوران بسيط */
    box-shadow: 0 0 20px var(--primary-glow); /* وهج ذهبي */
}

/* 4. تعديل بسيط في الوضع النهاري (Light Mode) */
body.light-mode .btn-theme-mobile {
    background: #fff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}
body.light-mode .btn-theme-mobile:hover {
    background: var(--primary-color);
    color: #fff;
}
/* ======================================================
   1. تنسيق أزرار التحكم في الفيديو (الصوت + الإعادة)
   ====================================================== */
.mute-btn-container {
    position: absolute;
    bottom: 50px;       /* المسافة من الأسفل */
    left: 50px;         /* المسافة من اليسار */
    z-index: 20;
    display: flex !important; /* عرض الأزرار بجانب بعض */
    gap: 15px;          /* مسافة بين الزرين */
    flex-direction: row-reverse; /* (اختياري) لترتيبهم */
}

.mute-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%; /* جعل الزر دائري */
    background: rgba(0, 0, 0, 0.4); /* خلفية سوداء شفافة */
    border: 2px solid var(--primary-color); /* إطار ذهبي */
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
}

/* تأثير عند الوقوف بالماوس */
.mute-btn:hover {
    background: var(--primary-color); /* الخلفية تصبح ذهبية */
    color: #fff;
    transform: scale(1.1); /* تكبير بسيط */
    box-shadow: 0 0 15px var(--primary-glow);
}

/* في الموبايل نصغرهم ونضبط مكانهم */
@media (max-width: 768px) {
    .mute-btn-container {
        left: 20px;
        bottom: 80px;
    }
    .mute-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ======================================================
   2. حل مشكلة القمر المكرر (إخفاء نسخة الموبايل من اللابتوب)
   ====================================================== */

/* الوضع الافتراضي (لابتوب وكمبيوتر): إخفاء عناصر الموبايل */
.mobile-item {
    display: none !important;
}

/* الوضع الخاص (شاشات الموبايل والتابلت): إظهار عناصر الموبايل */
@media (max-width: 991px) {
    .mobile-item {
        display: block !important;
    }
    
    /* تنسيق خاص لسطر الثيم في الموبايل لضمان التوسيط */
    .mobile-item.theme-row {
        display: flex !important;
    }
}
/* ======================================================
   1. حل مشكلة القمر (إخفاء زر الموبايل من اللابتوب)
   ====================================================== */

/* الوضع الافتراضي (لابتوب/كمبيوتر): إخفاء أي عنصر يخص الموبايل */
.mobile-item,
.btn-theme-mobile,
#theme-toggle-mobile {
    display: none !important; /* إخفاء إجباري */
}

/* الوضع الخاص (موبايل/تابلت فقط - أقل من 991px): إظهار العناصر */
@media (max-width: 991px) {
    .mobile-item {
        display: block !important;
    }
    
    /* تنسيق الحاوية في الموبايل */
    .mobile-item.theme-row {
        display: flex !important;
        justify-content: center;
        align-items: center;
        margin-top: 20px;
        width: 100%;
    }

    /* إظهار زر القمر في الموبايل فقط */
    .btn-theme-mobile,
    #theme-toggle-mobile {
        display: flex !important;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
        font-size: 1.4rem;
        align-items: center;
        justify-content: center;
    }
}

/* ======================================================
   2. تنسيق أزرار الفيديو (إعادة التشغيل + الصوت)
   ====================================================== */

.mute-btn-container {
    position: absolute;
    bottom: 40px;       /* ارتفاع مناسب من الأسفل */
    left: 40px;         /* مسافة من اليسار */
    z-index: 20;
    display: flex !important; /* ترتيب بجانب بعض */
    align-items: center;
    gap: 15px;          /* مسافة بين الزرين */
}

.mute-btn {
    width: 45px;        /* حجم متوسط وأنيق */
    height: 45px;
    border-radius: 50%; /* دائرة كاملة */
    background: rgba(0, 0, 0, 0.5); /* خلفية نصف شفافة */
    border: 1px solid var(--primary-color); /* إطار ذهبي رفيع */
    color: #fff;
    font-size: 1rem;    /* حجم الأيقونة */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

/* تأثير عند المرور بالماوس */
.mute-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* ضبط الأيقونات داخل الأزرار */
.mute-btn i {
    pointer-events: none; /* لمنع مشاكل الضغط على الأيقونة */
}

/* تنسيق خاص للموبايل للأزرار السفلية */
@media (max-width: 768px) {
    .mute-btn-container {
        left: 20px;
        bottom: 80px; /* رفعها قليلاً لتجنب التداخل */
        gap: 10px;
    }
    .mute-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}
/* ======================================================
   إصلاح "شبح" زر الموبايل (الإزالة التامة من الكمبيوتر)
   ====================================================== */

/* على الشاشات الكبيرة (لابتوب وكمبيوتر) */
@media (min-width: 992px) {
    
    /* استهداف عنصر القائمة الخاص بالموبايل بالكامل */
    li.mobile-item, 
    .mobile-item,
    .btn-theme-mobile {
        display: none !important;      /* إخفاء العنصر */
        width: 0 !important;           /* جعل العرض صفر */
        height: 0 !important;          /* جعل الطول صفر */
        margin: 0 !important;          /* إلغاء الهوامش */
        padding: 0 !important;         /* إلغاء الحشو */
        border: none !important;       /* إلغاء الحدود */
        visibility: hidden !important; /* تأكيد الإخفاء */
        opacity: 0 !important;         /* شفافية تامة */
        position: absolute !important; /* إخراجه من تدفق الصفحة */
        pointer-events: none !important; /* منع أي تفاعل */
    }
}

/* ======================================================
   تنسيق عناصر الهيدر اليسرى (الزر + القمر) لعدم التداخل
   ====================================================== */
/* هذا الجزء يضمن أن زر "طلب مبادرة" والقمر بجانب بعضهما بشكل سليم */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px; /* مسافة مريحة بين الزر والقمر */
}

/* في حالة وجود مسافات زائدة في القائمة */
.nav-links {
    gap: 30px; /* ضبط المسافة بين روابط القائمة */
}
/* ======================================================
   إصلاح قسم الرؤية والرسالة في الموبايل
   ====================================================== */
@media (max-width: 768px) {
    
    /* 1. ضبط العنوان الكبير (رؤية ورسالة الجمعية) */
    #identity .section-header h2 {
        font-size: 1.8rem !important; /* تصغير حجم الخط */
        line-height: 1.4 !important;  /* ضبط المسافة بين السطور */
        display: block !important;    /* التأكد أن الكلام يظهر ككتلة واحدة */
        margin-bottom: 20px !important;
    }

    /* 2. تصغير حجم الكروت (الرؤية، الرسالة، الأهداف) */
    #identity .flip-card-container,
    #identity .flip-card {
        min-height: 240px !important; /* تقليل الارتفاع (كان 350px) */
        height: 240px !important;
    }

    /* 3. تصغير الأيقونة (العين، الورقة..) */
    #identity .card-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.8rem !important; /* تصغير الرمز */
        margin-bottom: 15px !important;
    }

    /* 4. ضبط النصوص داخل الكارت */
    #identity .flip-front h3 {
        font-size: 1.2rem !important;
        margin-bottom: 5px !important;
    }
    
    #identity .card-slogan {
        font-size: 0.9rem !important;
    }
}
/* =========================================================
   تلوين اللوجو الكبير بالذهبي في الوضع النهاري فقط
   ========================================================= */

body.light-mode .big-logo {
    /* هذا الفلتر يحول اللون الأبيض إلى اللون الذهبي (#D4AF37) */
    filter: invert(53%) sepia(35%) saturate(935%) hue-rotate(1deg) brightness(92%) contrast(89%) !important;
    
    /* زيادة الوضوح */
    opacity: 1 !important;
    
    /* إضافة ظل ذهبي خفيف عشان يبرز أكتر */
    drop-shadow: 0 5px 15px rgba(212, 175, 55, 0.3) !important;
}
/* ======================================================
   إصلاح مشاكل الكروت (Flip Cards) للموبايل
   ====================================================== */

.project-flip-card {
    background-color: transparent;
    height: 400px;
    perspective: 1000px; /* عمق 3D */
    cursor: pointer;
    /* منع تحديد النص عشان لما تضغط ميعملش تظليل */
    -webkit-tap-highlight-color: transparent; 
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d; /* لمتصفحات أبل */
}

/* الكلاس اللي هيضاف بالجافا سكريبت عشان يقلب */
.project-flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* الوش والظهر */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    /* أهم سطر: إخفاء الظهر لما يلف */
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    top: 0; left: 0;
}

/* الوش الأمامي */
.flip-card-front {
    background-color: #000; /* لون خلفية عشان لو الصورة حملت ببطء */
    transform: rotateY(0deg);
    z-index: 2;
}

/* الظهر (التفاصيل) */
.flip-card-back {
    background: var(--bg-secondary); 
    color: var(--text-heading);
    /* تدوير الظهر 180 درجة مسبقاً عشان لما يلف يظهر معدول */
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-color);
    z-index: 1;
}

/* تحسينات للموبايل فقط */
@media (hover: none) {
    /* إلغاء الهوفر في الشاشات اللي باللمس */
    .project-flip-card:hover .flip-card-inner {
        transform: none; 
    }
    /* الاعتماد فقط على كلاس .flipped */
    .project-flip-card.flipped .flip-card-inner {
        transform: rotateY(180deg);
    }
}

/* للحواسيب (Mouse) يفضل شغال هوفر عادي */
@media (hover: hover) {
    .project-flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
}
/* ======================================================
   إصلاحات الموبايل (العناوين + قسم التفاصيل والاقتباسات)
   ====================================================== */

@media (max-width: 768px) {

    /* 1. تصغير عنوان "شركاء عنيزة روح المبادرة" */
    #partners h2 {
        font-size: 1.5rem !important; /* تصغير الخط */
        line-height: 1.4 !important;
        padding: 0 10px; /* مسافة جانبية عشان ميكونش لازق فالحواف */
    }

    /* 2. إصلاح قسم الاقتباسات (الصورة الثانية) */
    
    /* توسيع الحاوية لملء الشاشة */
    .initiative-details-container.show-details {
        padding: 20px 15px !important; /* تقليل الحواف الداخلية */
        max-height: none !important;   /* السماح بالتمدد حسب طول النص */
    }

    /* ترتيب العناصر فوق بعض (الصورة فوق والنص تحت) */
    .detail-item.active {
        flex-direction: column-reverse !important; /* الصورة فوق والنص تحت */
        gap: 20px !important;
        text-align: center !important; /* سنترة الكلام */
    }

    /* ضبط عرض النصوص لتأخذ راحتها */
    .detail-text {
        width: 100% !important;
        text-align: center !important;
    }

    /* تحسين شكل مربع الاقتباس */
    .quote-text {
        width: 100% !important;
        font-size: 1rem !important; /* حجم خط مقروء */
        line-height: 1.8 !important; /* تباعد مريح للأسطر */
        
        /* تغيير مكان الخط الذهبي من الجنب للأسفل ليكون أشيك في الموبايل */
        border-right: none !important;
        border-bottom: 2px solid var(--primary-color) !important;
        
        padding: 0 0 15px 0 !important; /* إزالة الحشو الجانبي */
        margin-bottom: 15px !important;
    }

    /* ضبط صورة الشخصية */
    .detail-image {
        width: 100% !important;
        justify-content: center !important;
        margin-bottom: 10px !important;
    }

    .detail-image img {
        width: 120px !important;  /* حجم مناسب للموبايل */
        height: 120px !important;
    }
}
/* ======================================================
   إصلاح شاشة التحميل والنص في الموبايل (Mobile Loader Fix)
   ====================================================== */

@media (max-width: 768px) {
    
    /* 1. ضبط حاوية المحتوى لتكون في المنتصف تماماً */
    .preloader {
        padding: 0 20px; /* هوامش جانبية عشان الكلام ميلزقش في الشاشة */
    }

    .loader-content {
        width: 100%;
        max-width: 100%;
        transform: translateY(-10%); /* رفعة بسيطة لفوق عشان لو الكيبورد ظهرت أو شريط المتصفح */
    }

    /* 2. تصغير اللوجو في الموبايل */
    .loader-logo {
        width: 80px !important; /* حجم مناسب للموبايل */
        margin-bottom: 15px !important;
    }

    /* 3. تنسيق النص (عنيزة.. روح المبادرة الوقفية) */
    .loader-text {
        font-size: 1.6rem !important; /* تصغير الخط من 4rem إلى 1.6rem */
        line-height: 1.5 !important;  /* تباعد مريح بين السطور */
        margin: 0 auto 25px auto !important; /* سنترة ومسافة سفلية */
        white-space: normal !important; /* السماح للنص بالنزول لسطر ثاني بشكل طبيعي */
        width: 90%; /* عرض النص */
    }

    /* 4. ضبط شريط التحميل */
    .loader-bar {
        width: 120px !important; /* تصغير عرض الشريط */
        height: 3px !important;
    }
}
@media (max-width: 768px) {
    /* ... الأكواد الأخرى تبقى كما هي ... */

    /* 3. تنسيق النص (عنيزة.. روح المبادرة الوقفية) */
    .loader-text {
        font-size: 1.4rem !important;     /* تم تصغير الخط قليلاً بناءً على طلبك */
        text-align: center !important;    /* تأكيد السنترة الأفقية للنص */
        line-height: 1.4 !important;      /* تقليل المسافة بين السطور لجعلها ملمومة */
        margin: 0 auto 20px auto !important; /* السنترة التلقائية مع مسافة أسفل الكلمة */
        width: 85%;                       /* تضييق العرض قليلاً ليظهر النص بشكل مرتب في الوسط */
        white-space: normal !important; 
        display: block !important;
    }
    
    /* ... بقية الأكواد ... */
}