/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Minimal normalize for cross-browser consistency */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Open+Sans:wght@400;600;700&display=swap');

html { line-height: 1.15; -webkit-text-size-adjust: 100% }
body { margin: 0 }
main { display: block }
h1 { font-size: 2em; margin: .67em 0 }
hr { box-sizing: content-box; height: 0; overflow: visible }
pre { font-family: monospace, monospace; font-size: 1em }
a { background-color: transparent }
abbr[title] { border-bottom: none; text-decoration: underline; text-decoration: underline dotted }
b, strong { font-weight: bolder }
code, kbd, samp { font-family: monospace, monospace; font-size: 1em }
small { font-size: 80% }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline }
sub { bottom: -.25em }
sup { top: -.5em }
img { border-style: none }
button, input, optgroup, select, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0 }
button, input { overflow: visible }
button, select { text-transform: none }
[type="button"], [type="reset"], [type="submit"], button { --webkit-appearance: button }
[type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner, button::-moz-focus-inner { border-style: none; padding: 0 }
[type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring, button:-moz-focusring { outline: 1px dotted ButtonText }
fieldset { padding: .35em .75em .625em }
legend { box-sizing: border-box; color: inherit; display: table; max-width: 100%; padding: 0; white-space: normal }
progress { vertical-align: baseline }
textarea { overflow: auto }
[type="checkbox"], [type="radio"] { box-sizing: border-box; padding: 0 }
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto }
[type="search"] { --webkit-appearance: textfield; outline-offset: -2px }
[type="search"]::-webkit-search-decoration { -webkit-appearance: none }
::-webkit-file-upload-button { -webkit-appearance: button; font: inherit }
details { display: block }
summary { display: list-item }
template { display: none }
[hidden] { display: none }

/* Custom Styles */

:root {
    --primary-color: #007bff; /* Edura Blue */
    --secondary-color: #6c757d; /* Grey */
    --accent-color: #4CAF50; /* Green for highlights */
    --light-bg: #f8f9fa; /* Light grey background */
    --dark-bg: #343a40; /* Dark text/footer background */
    --white: #ffffff;
    --border-color: #e0e0e0; /* Lighter border */
    --font-family-base: 'Open Sans', sans-serif;
    --font-family-headings: 'Cairo', sans-serif;
    --container-width: 1200px;
    --padding-section: 80px;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --dark-text-color: #333333; /* هذا هو اللون الجديد لنصوص الهيدر (أسود داكن) */
    --primary-hover-color: #0056b3;
    --gray-text-color: #6c757d; /* نص رمادي */
    --font-raleway: 'Raleway', sans-serif;
    --primary-color-rgb: 0, 123, 255;
    --dark-text-color-rgb: 33, 37, 41;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-base);
    color: var(--dark-bg);
    direction: rtl;
    text-align: right;
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    color: var(--dark-bg);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
p { margin-bottom: 1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

a:hover {
    color: #ffffff;
    text-decoration: none;
}

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-center { text-align: center !important; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}
.section-title.text-center::after {
    left: 50%; /* Ensure it's centered for text-center */
    right: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--white);
    padding: 12px 25px;
    border-radius: 6px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap; /* Prevent text wrap */
}

.btn-primary {
    background-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(108, 117, 125, 0.3);
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1.15rem;
    border-radius: 8px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
/* Header Section */
header {
    background-color: rgba(0, 0, 0, 0.05); /* شفافية عالية جداً - 5% تعتيم أسود (لإعطاء لمسة بسيطة جداً) */
    padding: 15px 0;
    /* border-bottom: 1px solid var(--border-color); */ /* يمكن إبقاؤها أو إزالتها حسب الرغبة */
    position: sticky; /* جيد للهيدر الثابت عند التمرير */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02); /* ظل أخف جداً */
    backdrop-filter: blur(5px); /* Soft blur effect */
    -webkit-backdrop-filter: blur(5px);
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* إضافة انتقال للخلفية والظل */
}

/* لجعل الهيدر يصبح أقل شفافية عند التمرير عليه */
header:hover {
    background-color: rgba(0, 0, 0, 0.2); /* يصبح شفافية أقل (أغمق قليلاً) عند التمرير */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* ظل أوضح قليلاً عند التمرير */
}


header .container {
    display: flex;
    justify-content: space-between; /* الشعار لليسار والقائمة لليمين */
    align-items: center; /* محاذاة عمودية */
    max-width: 1100px; /* تقليل العرض الأقصى للكونتينر */
    width: 90%; /* عرض نسبي ليناسب الشاشات الأصغر */
    margin: 0 auto; /* توسيط الكونتينر أفقياً */
    padding: 0 20px; /* حشو داخلي للحواف */
}

header .logo img {
    height: 45px; /* Slightly larger logo */
}

/* Main Navigation (Desktop) */
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.main-nav .nav-item {
    margin-left: 25px; /* More space */
}

.main-nav .nav-item:last-child {
    /* للحفاظ على المسافة قبل زر "تواصل" إذا كان الأخير في القائمة العادية */
    margin-left: 25px; /* أعدنا نفس المسافة للتناسق */
}

.main-nav .nav-item a {
    color: var(--dark-text-color); /* لون أسود داكن للنص ليبرز على الخلفية الشفافة */
    font-weight: 600;
    padding: 8px 12px;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav .nav-item a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 50%;
    transform: translateX(50%) scaleX(0);
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: transform 0.3s ease;
}

.main-nav .nav-item a:hover::after {
    transform: translateX(50%) scaleX(1);
}

.main-nav .nav-item-btn a {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.main-nav .nav-item-btn a:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark-text-color); /* لون أيقونة التبديل ليبرز */
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001; /* Above mobile nav */
}

/* Mobile Navigation (Dropdown) */
@media (max-width: 992px) {
    header {
        background-color: rgba(255, 255, 255, 0.95); /* يصبح معتمًا أكثر على الجوال لضمان وضوح القائمة المفتوحة */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    header:hover { /* إزالة تأثير الشفافية عند التمرير على الجوال إذا أردت */
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-nav-toggle {
        color: var(--dark-text-color); /* يعود للون الداكن في وضع الجوال */
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0; /* Changed from left: 0; for slide-in from right */
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.98); /* Near opaque white */
        padding-top: 80px; /* Space for header */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transform: translateX(100%); /* Initially off-screen to the right */
        transition: transform 0.4s ease-out;
        z-index: 999;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        transform: translateX(0); /* Slide in from right */
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .main-nav .nav-item {
        margin: 15px 0;
        width: 80%; /* Wider items */
    }

    .main-nav .nav-item a {
        font-size: 1.4rem;
        padding: 15px 20px;
        display: block;
        border-radius: 8px;
        background-color: var(--light-bg); /* Light background for items */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        color: var(--dark-text-color); /* لون نص الروابط في قائمة الجوال (لتكون واضحة على الخلفية الفاتحة) */
    }
    .main-nav .nav-item a:hover {
        background-color: var(--primary-color);
        color: var(--white);
    }
    .main-nav .nav-item a::after {
        display: none; /* Hide underline on mobile */
    }

    .mobile-nav-toggle {
        display: block;
    }
}
/* Hero Section */
/* Hero Section */
.hero {
    padding: 0;
    background: transparent;
    overflow: hidden;
    position: relative;
    min-height: 300px; /* تم تخفيض الارتفاع الأدنى قليلاً ليتناسب مع الارتفاع الأقصى الجديد */
    height: 45vw; /* تم تقليل نسبة الـ vw للحفاظ على تناسب الارتفاع مع العرض في هذا النطاق الضيق */
    max-height: 400px; /* هذا هو الارتفاع الأقصى الجديد الذي طلبته */
    display: flex;
    flex-direction: column;
    justify-content: center; /* لمركزة المحتوى عمودياً */
    align-items: center; /* لمركزة المحتوى أفقياً */
    text-align: center; /* توسيط المحتوى النصي بشكل افتراضي للهيرو */
}

.hero__background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to top, rgba(54, 53, 53, 0.95), rgba(62, 102, 148, 0.75)),
        url('images/i.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero .hero-content-wrapper {
    position: relative;
    z-index: 1;
    padding-top: 60px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero__content {
    text-align: center;
    max-width: 900px;
    margin-bottom: 0; /* تم إزالة الهامش السفلي هنا */
}

.hero__title {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.hero__title .text-primary {
    color: #B0E0E6;
}

.hero__description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px; /* زيادة الهامش بين الوصف والأزرار لجعلها تظهر ككتلة منفصلة */
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
}

.hero__actions {
    display: flex;
    gap: 20px; /* مسافة بين زر "ابدأ الآن" وعداد الزوار */
    justify-content: center; /* توسيط الأزرار وعداد الزوار */
    align-items: center; /* محاذاة عمودية للعناصر داخلها */
    flex-wrap: wrap; /* للسماح للعناصر بالنزول لسطر جديد على الشاشات الصغيرة */
    margin-top: 0; /* لا حاجة لـ margin-top هنا إذا كانت المسافة من الوصف */
    margin-bottom: 0; /* لا حاجة لـ margin-bottom هنا */
}

/* تحديث نمط الـ hero__stats ليتناسب مع مظهر الزر ويكون أقرب */
.hero__stats {
    /* إزالة بعض الخصائص المكررة من .hero__stats--button إذا كانت موجودة */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2); /* خلفية شفافة أكثر */
    padding: 12px 25px; /* نفس حشو btn-lg ليتطابقا */
    border-radius: 8px; /* تدوير الزوايا */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* ظل خفيف */
    border: 1px solid rgba(255, 255, 255, 0.4); /* حدود أفتح قليلاً */
    cursor: default;
    transition: background-color 0.3s ease;
    /* min-width: 150px; */
    height: 52px; /* لضمان نفس ارتفاع زر btn-lg التقريبي */
    box-sizing: border-box; /* لضمان أن الحجم يشمل الحشو والحدود */
}

.hero__stats:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.hero__stat-number {
    font-size: 1.5rem; /* تقليل حجم الرقم ليتناسب بشكل أفضل */
    font-weight: 700;
    color: var(--white);
    display: block;
    line-height: 1;
    margin-bottom: 2px; /* تقليل المسافة بين الرقم والنص */
}

.hero__stat-text {
    font-size: 0.8rem; /* تقليل حجم النص أكثر */
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

/* تأكد من أن .btn-lg له ارتفاع محدد ليتناسب مع hero__stats */
.btn-lg {
    height: 52px; /* تحديد نفس ارتفاع hero__stats */
    display: flex; /* لجعل النص في المنتصف عموديًا إذا كان الحشو مختلفًا */
    align-items: center;
    justify-content: center;
}


/* Responsive Hero (تعديل الأنماط المستجيبة) */
@media (max-width: 1024px) {
    .hero {
        min-height: 450px;
        height: 65vw;
        max-height: 600px;
    }
    .hero .hero-content-wrapper {
        padding-top: 40px;
        padding-bottom: 40px;
    }
    .hero__title {
        font-size: 3rem;
    }
    .hero__description {
        font-size: 1.15rem;
        margin-bottom: 30px; /* تعديل الهامش السفلي للوصف */
    }
    .hero__actions {
        gap: 15px; /* تقليل المسافة بين العناصر */
        /* margin-top: 20px; */
    }
    .hero__stats {
        padding: 10px 20px;
        /* min-width: 140px; */
        height: 48px; /* تعديل الارتفاع */
    }
    .hero__stat-number {
        font-size: 1.6rem; /* تقليل الحجم أكثر */
    }
    .hero__stat-text {
        font-size: 0.75rem; /* تقليل الحجم أكثر */
    }
    .btn-lg {
        font-size: 0.95rem;
        padding: 10px 20px;
        height: 48px; /* تعديل الارتفاع */
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 400px;
        height: 75vw;
    }
    .hero__title {
        font-size: 2.5rem;
    }
    .hero__description {
        font-size: 1.1rem;
        margin-bottom: 25px; /* تعديل الهامش السفلي للوصف */
    }
    .hero__actions {
        flex-direction: column; /* تكديس الأزرار والإحصائيات عموديا */
        align-items: center;
        width: 100%;
        /* margin-top: 20px; */
    }
    .hero__actions .btn,
    .hero__actions .hero__stats {
        width: 80%;
        max-width: 300px;
        margin-bottom: 15px; /* مسافة بين الزر والإحصائيات عند التكديس */
    }
    .hero__stats {
        padding: 12px 25px; /* حشو مناسب عند التكديس */
        height: auto; /* السماح بالارتفاع التلقائي */
    }
    .hero__stat-number {
        font-size: 1.8rem;
    }
    .hero__stat-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 350px;
        height: 85vw;
    }
    .hero__title {
        font-size: 2rem;
    }
    .hero__description {
        font-size: 0.9rem;
        margin-bottom: 20px; /* تعديل الهامش السفلي للوصف */
    }
    .hero__actions .btn,
    .hero__actions .hero__stats {
        width: 90%;
        max-width: 280px;
        margin-bottom: 10px; /* تقليل المسافة بين العناصر المتكدسة */
    }
    .hero__stats {
        padding: 10px 20px;
    }
    .hero__stat-number {
        font-size: 1.5rem;
    }
    .hero__stat-text {
        font-size: 0.75rem;
    }
}
/* Features Section (below Hero) */
.features {
    padding: 40px 0; /* Less padding to be close to hero */
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03); /* Subtle shadow */
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    text-align: center;
}

.feature {
    padding: 20px;
    background-color: var(--white);
    border-radius: 10px;
    /* No shadow here, relies on parent section shadow */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    background-color: var(--light-bg); /* Slight background change on hover */
}

.feature__icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-bg);
}

@media (max-width: 768px) {
    .features .container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
    .feature__icon {
        font-size: 2rem;
    }
    .feature__title {
        font-size: 1rem;
    }
}
@media (max-width: 768px) { /* تطبيق هذا على الشاشات الأصغر من 768px */
    .features .container {
        /* تعديل لجعلها عمودين على الأقل، حتى على الشاشات الصغيرة جداً */
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* تقليل الحد الأدنى للعرض */
        gap: 10px; /* تقليل الفراغات بين العناصر */
    }
    .feature {
        padding: 15px; /* تقليل الحشو داخل البطاقة */
    }
    .feature__icon {
        font-size: 1.8rem; /* تقليل حجم الأيقونة قليلاً */
    }
    .feature__title {
        font-size: 0.95rem; /* تقليل حجم العنوان قليلاً */
    }
}

@media (max-width: 480px) { /* تخصيص إضافي للشاشات الأصغر من 480px */
    .features .container {
        grid-template-columns: repeat(2, 1fr); /* ضمان عمودين متساويين */
        gap: 8px; /* تقليل الفراغات أكثر */
    }
    .feature__icon {
        font-size: 1.6rem; /* تقليل حجم الأيقونة أكثر */
    }
    .feature__title {
        font-size: 0.85rem; /* تقليل حجم العنوان أكثر */
    }
}


/* About Section */
.about {
    padding: var(--padding-section) 0;
    background-color: var(--light-bg);
}

.about .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about__image {
    flex: 1;
    text-align: center;
}

.about__image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about__content {
    flex: 1;
    text-align: right;
}

.about__description {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 1.8rem;
}

.about__list {
    list-style: none;
    padding: 0;
    margin-bottom: 2.5rem;
}

.about__item {
    display: flex;
    align-items: flex-start; /* Align icon to top of text */
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: var(--dark-bg);
}

.about__item i {
    color: var(--primary-color);
    margin-left: 10px;
    font-size: 1.2em; /* Slightly larger icon */
    line-height: inherit; /* Align with text baseline */
}

@media (max-width: 992px) {
    .about .container {
        flex-direction: column;
        text-align: center;
    }
    .about__image {
        margin-bottom: 30px;
    }
    .about__content {
        text-align: center;
    }
    .about__item {
        justify-content: center; /* Center list items */
    }
}

/* Courses Section */
.courses {
    padding: var(--padding-section) 0;
    background-color: var(--white);
}

.courses .container {
    max-width: 1100px; /* Slightly wider for course cards */
}

.courses__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.course-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.course-card__header {
    background-color: #f0f4f7; /* Light blueish grey */
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.course-card__icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: inline-block; /* For centering */
}

.course-card__title {
    font-size: 1.4rem;
    margin-bottom: 0;
    color: var(--dark-bg);
}

.course-card__body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-card__description {
    color: var(--secondary-color);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1; /* Push link to bottom */
}

.course-card__link {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: bold;
    margin-top: auto; /* Push to bottom */
    transition: color 0.3s ease;
}
.course-card__link i {
    margin-left: 8px; /* Space for arrow */
    transition: transform 0.3s ease;
}
.course-card__link:hover {
    color: #0056b3;
}
.course-card__link:hover i {
    transform: translateX(5px); /* Move arrow on hover */
}

@media (max-width: 768px) {
    .courses__grid {
        grid-template-columns: 1fr;
    }
}


/* Opportunities Section (similar to courses cards) */
/* Opportunities Section */
.opportunities {
    padding: var(--padding-section, 50px) 0; /* حشو علوي وسفلي للقسم */
    background-color: var(--light-bg);
}

.opportunities .container {
    max-width: 900px; /* عرض الكونتينر مناسب لبطاقات مربعة أكثر كثافة */
    margin: 0 auto;
    padding: 0 10px; /* حشو جانبي */
}

/* عنوان القسم العام */
.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--dark-text-color);
    font-weight: 700;
}

.opportunities__grid {
    display: grid;
    /* لإنشاء بطاقات مربعة تقريبا، يجب أن يكون minmax متقاربًا */
    /* هنا نهدف إلى عرض 3-4 بطاقات في الصف الواحد على الشاشات الكبيرة */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px; /* المسافة بين البطاقات */
    margin-top: 1.5rem;
}

.opportunity-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.opportunity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.opportunity-card__header {
    height: 120px; /* **الارتفاع الرئيسي للتحكم بشكل البطاقة المربع** */
    overflow: hidden;
    position: relative;
}

.opportunity-card__header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out;
}

.opportunity-card:hover .opportunity-card__header img {
    transform: scale(1.03);
}

.opportunity-card__body {
    padding: 10px; /* تقليل الحشو ليتناسب مع الحجم المربع */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
}

.opportunity-card__title {
    font-size: 1rem; /* تقليل حجم الخط ليتناسب مع المساحة الصغيرة */
    margin-bottom: 5px;
    color: var(--dark-text-color);
    line-height: 1.2;
    min-height: 28px; /* ارتفاع أدنى لسطرين */
    display: -webkit-box;
    --webkit-line-clamp: 2; /* قص النص بعد سطرين */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.opportunity-card__type {
    font-size: 0.75rem; /* تقليل حجم الخط أكثر */
    color: var(--gray-text-color);
    margin-bottom: 8px;
    text-transform: capitalize;
}

.opportunity-card__link {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: bold;
    margin-top: auto;
    transition: color 0.3s ease;
    justify-content: flex-end;
    direction: rtl; /* مهم: لترتيب النص والأيقونة بشكل صحيح في الـ RTL */
    font-size: 0.75rem; /* تقليل حجم خط الرابط */
}
.opportunity-card__link i {
    margin-left: 4px;
    margin-right: 0;
    transition: transform 0.3s ease;
}
.opportunity-card__link:hover {
    color: var(--primary-hover-color, #0056b3);
}
.opportunity-card__link:hover i {
    transform: translateX(-2px);
}

/* تنسيق رسالة "لا توجد عناصر" */
.opportunities .no-items-message {
    font-size: 1rem;
    color: var(--gray-text-color);
    padding: 25px;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    background-color: var(--white);
    max-width: 400px;
    margin: 15px auto;
    text-align: center;
    grid-column: 1 / -1; /* لجعلها تمتد على عرض الشبكة بالكامل */
}

/* تنسيق زر "عرض جميع المنح" */
.opportunities .text-center {
    margin-top: 30px;
}
.opportunities .btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 0.85rem;
    display: inline-block; /* الافتراضي لزر الروابط */
}

.opportunities .btn-secondary:hover {
    background-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .opportunities .container {
        max-width: 800px; /* تقليل عرض الكونتينر أكثر */
    }
    .opportunities__grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* 4-5 أعمدة محتملة */
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .opportunities {
        padding: 40px 0;
    }
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    .opportunities__grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* 3-4 أعمدة على تابلت */
        gap: 10px;
    }
    .opportunity-card__header {
        height: 100px; /* ضبط ارتفاع الصورة ليتناسب مع حجم البطاقة */
    }
    .opportunity-card__title {
        font-size: 0.95rem;
    }
    .opportunity-card__body {
        padding: 8px; /* تقليل حشو البطاقة */
    }
    /* توسيط زر "عرض جميع المنح" */
    .opportunities .btn-secondary {
        display: block; /* جعله يأخذ عرض السطر بالكامل */
        margin: 20px auto 0 auto; /* توسيطه أفقياً مع مسافة علوية */
        width: fit-content; /* يجعل الزر بعرض محتواه فقط */
        max-width: 200px; /* تحديد أقصى عرض للزر */
    }
}

@media (max-width: 768px) {
    .opportunities {
        padding: 30px 0;
    }
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    .opportunities__grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* 2-3 أعمدة على الهاتف الأفقي */
        gap: 8px;
    }
    .opportunity-card {
        max-width: none; /* إزالة الـ max-width لتناسب الشبكة */
    }
    .opportunity-card__header {
        height: 90px; /* تقليل ارتفاع الصورة لهواتف أصغر */
    }
    .opportunity-card__title {
        font-size: 0.85rem;
        min-height: auto;
    }
    .opportunity-card__type {
        font-size: 0.65rem;
    }
    .opportunity-card__link {
        font-size: 0.7rem;
    }
    .opportunities .btn-secondary {
        margin-top: 15px; /* مسافة علوية أقل قليلاً */
        font-size: 0.75rem;
        padding: 6px 12px;
        max-width: 180px; /* تقليل أقصى عرض للزر على الهواتف */
    }
}

@media (max-width: 480px) {
    .opportunities__grid {
        grid-template-columns: 1fr; /* عمود واحد على أصغر الهواتف */
        gap: 15px;
    }
    .opportunity-card {
        max-width: 250px; /* تحديد أقصى عرض للبطاقة في العمود الواحد وتوسيطها */
        margin: 0 auto;
    }
    .opportunity-card__header {
        height: 150px; /* زيادة الارتفاع هنا لجعل الصورة أوضح على الهواتف */
    }
    .opportunity-card__title {
        font-size: 1rem;
    }
    .opportunity-card__type {
        font-size: 0.75rem;
    }
    .opportunity-card__link {
        font-size: 0.8rem;
    }
    .opportunities .btn-secondary {
        margin-top: 10px; /* مسافة علوية أقل */
        font-size: 0.7rem;
        padding: 5px 10px;
        max-width: 150px; /* تقليل أقصى عرض للزر على أصغر الهواتف */
    }
}
/* Contact Section */
.contact {
    padding: var(--padding-section, 80px) 0;
    background-color: var(--white);
}

.contact .container {
    display: grid; /* استخدام Grid لإنشاء عمودين */
    grid-template-columns: 1fr 1.2fr; /* عمود للمعلومات وعمود أكبر قليلاً للنموذج */
    gap: 50px; /* مسافة بين العمودين */
    align-items: center; /* محاذاة العناصر في المنتصف عمودياً */
    max-width: 1100px; /* زيادة عرض الكونتينر لاستيعاب العمودين */
    margin: 0 auto;
    padding: 0 20px;
    min-height: 500px; /* زيادة الارتفاع الأدنى للقسم */
}

.contact__info {
    text-align: right; /* محاذاة معلومات الاتصال لليمين */
    padding-left: 20px; /* حشو لليمين لتجنب التصاق المحتوى بالحافة عند التقسيم */
}

.contact .section-title {
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: var(--dark-text-color);
    font-weight: 700;
}

.contact__description {
    font-size: 1.1rem;
    color: var(--gray-text-color);
    line-height: 1.6;
    margin-bottom: 40px;
}

.contact__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact__item {
    font-size: 1.15rem;
    color: var(--dark-text-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* محاذاة عناصر القائمة لليمين */
    direction: rtl; /* اتجاه النص من اليمين لليسار */
}

.contact__item i {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-left: 15px; /* مسافة بين الأيقونة والنص */
    margin-right: 0;
    min-width: 25px;
    text-align: center;
}

.contact__item:last-child {
    margin-bottom: 0;
}

/* أنماط نموذج الاتصال */
.contact__form-wrapper {
    background-color: var(--light-bg); /* خلفية فاتحة للنموذج */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05); /* ظل خفيف */
    border: 1px solid var(--border-color);
}

.contact__form-title {
    font-size: 2rem;
    color: var(--dark-text-color);
    margin-bottom: 25px;
    text-align: center; /* توسيط عنوان النموذج */
    font-weight: 600;
}

.contact__form .form-group {
    margin-bottom: 20px;
}

.contact__form input[type="text"],
.contact__form input[type="email"],
.contact__form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--dark-text-color);
    background-color: var(--white);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    text-align: right; /* محاذاة النص المدخل لليمين */
}

.contact__form input[type="text"]:focus,
.contact__form input[type="email"]:focus,
.contact__form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 0, 123, 255), 0.25); /* ظل تركيز بلون أساسي */
    outline: none;
}

.contact__form textarea {
    resize: vertical; /* السماح بتغيير حجم مربع النص عمودياً فقط */
}

/* زر الإرسال */
.contact__form .btn-primary {
    display: block; /* لجعل الزر يأخذ العرض الكامل */
    width: 100%;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center; /* توسيط النص داخل الزر */
}

.contact__form .btn-primary:hover {
    background-color: var(--primary-hover-color, #0056b3);
    transform: translateY(-2px);
}

/* Visually hidden for accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive Styles for Contact Section with Form */
@media (max-width: 992px) {
    .contact .container {
        grid-template-columns: 1fr; /* عمود واحد على الشاشات المتوسطة والصغيرة */
        gap: 40px; /* مسافة بين معلومات الاتصال والنموذج */
        min-height: auto; /* إزالة الارتفاع الأدنى للسماح بالتدفق */
    }
    .contact__info {
        text-align: center; /* توسيط معلومات الاتصال عندما تكون في عمود واحد */
        padding-left: 0;
    }
    .contact__item {
        justify-content: center; /* توسيط عناصر القائمة */
    }
    .contact__item i {
        margin-left: 15px; /* الاحتفاظ بالمسافة مع التوسيط */
    }
    .contact__form-wrapper {
        padding: 25px;
    }
    .contact__form-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .contact {
        padding: 60px 0;
    }
    .contact .section-title {
        font-size: 2.2rem;
    }
    .contact__description {
        font-size: 1rem;
    }
    .contact__form-wrapper {
        padding: 20px;
    }
    .contact__form-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    .contact__form input,
    .contact__form textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    .contact__form .btn-primary {
        padding: 10px 18px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact {
        padding: 40px 0;
    }
    .contact .container {
        padding: 0 15px;
        gap: 30px;
    }
    .contact .section-title {
        font-size: 2rem;
    }
    .contact__description {
        font-size: 0.9rem;
    }
    .contact__item {
        font-size: 0.95rem;
        margin-bottom: 10px;
        flex-direction: column; /* جعل الأيقونة والنص فوق بعضهما البعض */
        align-items: center; /* توسيط الأيقونة والنص */
        text-align: center; /* توسيط النص */
    }
    .contact__item i {
        font-size: 1.5rem; /* تكبير الأيقونة لتكون بارزة */
        margin-left: 0; /* إزالة الهامش الأفقي */
        margin-bottom: 5px; /* إضافة مسافة سفلية للأيقونة */
    }
    .contact__form-wrapper {
        padding: 15px;
    }
    .contact__form-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    .contact__form input,
    .contact__form textarea {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    .contact__form .btn-primary {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}


/* Footer */
.site-footer {
    background-color: var(--dark-bg);
    color: rgba(255, 255, 255, 0.8);
    padding: 30px 0;
    font-size: 0.9rem;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    text-align: right;
}

.site-footer p {
    margin: 0;
}

.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .site-footer .container {
        flex-direction: column;
        text-align: center;
    }
    .site-footer p {
        margin-bottom: 15px;
    }
    .social-links {
        margin-top: 15px;
    }
}
/* Animate Button (for general buttons on scroll) */
.animate-btn {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out 0.4s, transform 0.6s ease-out 0.4s;
}
.animate-btn.appear {
    opacity: 1;
    transform: translateY(0);
}
/* أنماط خاصة بصفحة 'جميع المنح والقبولات' (all_opportunities.php) */
/* General Variables (Make sure these are at the top of your styl.css) */

/* General Variables (Make sure these are at the top of your styl.css) */
:root {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --secondary-color: #6c757d;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --dark-text-color: #212529; /* أغمق قليلاً للتباين */
    --gray-text-color: #6c757d;
    --border-color: #e9ecef;
    --padding-section: 80px;
    --font-cairo: 'Cairo', sans-serif;
    --font-raleway: 'Raleway', sans-serif;

    /* RGB values for box-shadow with opacity */
    --primary-color-rgb: 0, 123, 255;
    --dark-text-color-rgb: 33, 37, 41;
}

/* Animations for fade-in (ensure these are present and correct) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* زيادة مدة الانتقال قليلاً */
}

.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out; /* زيادة مدة الانتقال قليلاً */
}

.fade-in-item.appear {
    opacity: 1;
}

/* Page Specific Styles: All Opportunities Page */

/* Hero Section for All Opportunities Page */
.page-hero-section {
    position: relative;
    width: 100%;
    height: 350px;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(106, 109, 138, 0.65)), var(--hero-bg-image, url('images/i.jpg')) no-repeat center center/cover; /* إضافة متغير للصورة */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    margin-top: 0;
    /* تأثير Parallax خفيف */
    background-attachment: fixed;
}

.page-hero-section .hero-content {
    z-index: 2;
    padding: 0 20px;
    animation-delay: 0.2s; /* تأخير بسيط للظهور */
}

.page-hero-section h1 {
    font-size: 3.8rem; /* تكبير الخط قليلاً */
    color: whitesmoke;
    margin-bottom: 20px;
    font-family: var(--font-cairo);
    font-weight: 800;
    text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.6); /* ظل أقوى */
}

.page-hero-section p {
    font-size: 1.4rem; /* تكبير الخط قليلاً */
    line-height: 1.6;
    font-family: var(--font-raleway);
    font-weight: 400;
    max-width: 700px; /* تحديد عرض ليكون سهل القراءة */
    margin: 0 auto;
}

/* Opportunities Listing Section (previously .projects.all-opportunities-page) */
.opportunities-listing-section {
    padding: var(--padding-section) 0;
    background-color: var(--light-bg);
    text-align: center;
}

.opportunities-listing-section .container {
    max-width: 1200px; /* مطابقة لأقصى عرض للـ masonry-grid */
    margin: 0 auto;
    padding: 0 15px;
}

.opportunities-listing-section .section-title {
    font-size: 3rem; /* تكبير الخط قليلاً */
    color: var(--dark-text-color);
    margin-bottom: 60px; /* مسافة أكبر */
    font-weight: 800; /* أثقل */
    font-family: var(--font-cairo);
    position: relative;
    display: inline-block; /* لتحديد عرض للخط السفلي */
}

/* خط تزييني أسفل العنوان */
.opportunities-listing-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -15px; /* المسافة من الأسفل */
    left: 50%;
    transform: translateX(-50%);
    width: 80px; /* عرض الخط */
    height: 4px; /* سمك الخط */
    background-color: var(--primary-color);
    border-radius: 2px;
}


/* Search and Filter Section */
/* Search and Filter Section (Updated for Select Box) */
/* Search and Filter Section (Updated for Search Box) */
.search-filter-section {
    display: flex;
    justify-content: center;
    margin-bottom: 50px; /* مسافة أكبر أسفل قسم البحث/الفلترة */
    padding: 0 15px; /* حشو جانبي للتأكد من عدم التصاق المحتوى بالحواف */
}

.search-box { /* حاوية حقل البحث والأيقونة */
    position: relative; /* مهم لوضع الأيقونة بشكل مطلق داخله */
    width: 100%;
    max-width: 600px; /* تحديد أقصى عرض لحقل البحث لجعله متناسقًا */
}

.search-input { /* حقل الإدخال النصي للبحث */
    width: 100%; /* اجعله يملأ المساحة المتاحة في الأب */
    padding: 18px 25px 18px 60px; /* الحشو: 
                                     18px علوي وسفلي،
                                     25px من اليمين (حيث يبدأ النص)،
                                     60px من اليسار (لإفساح المجال للأيقونة). */
    border: 1px solid var(--border-color); /* حدود رقيقة بلون فاتح */
    border-radius: 35px; /* لجعل الحقل دائري الحواف */
    font-size: 1.15rem; /* حجم خط النص المدخل */
    color: var(--dark-text-color); /* لون النص المدخل */
    background-color: var(--white); /* خلفية بيضاء للحقل */
    transition: all 0.3s ease; /* انتقال سلس عند التفاعل */
    direction: rtl; /* اتجاه النص من اليمين لليسار */
    text-align: right; /* محاذاة النص لليمين */
    box-shadow: 0 4px 15px rgba(var(--dark-text-color-rgb), 0.05); /* ظل خفيف لإعطاء عمق */
}

.search-input::placeholder { /* نمط نص الـ placeholder */
    color: var(--gray-text-color); /* لون رمادي لنص الـ placeholder */
    opacity: 0.8; /* جعل نص الـ placeholder أفتح قليلاً */
}

.search-input:focus { /* نمط الحقل عند التركيز عليه */
    border-color: var(--primary-color); /* تغيير لون الحدود إلى اللون الأساسي */
    box-shadow: 0 0 0 5px rgba(var(--primary-color-rgb), 0.25); /* ظل أكبر وأوضح عند التركيز */
    outline: none; /* إزالة الخط الخارجي الافتراضي للمتصفح */
}

.search-icon { /* أيقونة البحث */
    position: absolute; /* لوضعها في مكان محدد داخل search-box */
    left: 25px; /* **الموضع الرئيسي:** 25 بكسل من الحافة اليسرى لـ search-box */
    top: 50%; /* وضع الأيقونة في منتصف الارتفاع */
    transform: translateY(-50%); /* ضبط الموضع لمنتصف الأيقونة بالضبط */
    color: var(--gray-text-color); /* لون الأيقونة رمادي */
    font-size: 1.4rem; /* حجم الأيقونة */
    pointer-events: none; /* لمنع الأيقونة من اعتراض النقرات (تسمح بالضغط على الحقل من خلالها) */
    z-index: 10; /* للتأكد من أنها تظهر فوق حقل البحث */
}


/* Masonry Grid (Card Container) */
.masonry-grid {
    margin: 0 auto;
    padding: 0 15px;
    max-width: 1200px;
    /* تحسين إعدادات الـ Grid لتحديد الأعمدة بشكل أكثر مرونة */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 3-4 أعمدة تقريباً */
    gap: 30px; /* مسافة بين البطاقات */
}

/* Individual Card Styles */
.clickable-card {
    background-color: var(--white);
    border-radius: 15px; /* حواف أكثر استدارة */
    box-shadow: 0 10px 30px rgba(var(--dark-text-color-rgb), 0.08); /* ظل أقوى */
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* انتقال أكثر سلاسة */
    text-decoration: none;
    display: flex; /* استخدام فليكس لترتيب المحتوى داخلياً */
    flex-direction: column;
    border: 1px solid var(--border-color);
    margin-bottom: 0; /* Masonry يتعامل مع المسافات بين العناصر عبر الـ gap */
}

.clickable-card:hover {
    transform: translateY(-10px); /* تحريك أكثر وضوحاً */
    box-shadow: 0 20px 45px rgba(var(--dark-text-color-rgb), 0.15); /* ظل أكبر وأوضح */
}

.card-image-wrapper {
    width: 100%;
    height: 220px; /* ارتفاع أكبر للصورة */
    overflow: hidden;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.clickable-card:hover .card-image-wrapper img {
    transform: scale(1.1); /* تكبير أكثر */
}

.card-info {
    padding: 25px; /* حشو أكبر */
    text-align: right;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* لجعل الجسم ينمو ويشغل المساحة المتاحة */
}

.card-category {
    font-size: 1rem; /* تكبير الخط */
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px; /* تباعد الحروف */
}

.card-title {
    font-size: 1.5rem; /* تكبير الخط */
    color: var(--dark-text-color);
    font-weight: 800; /* أثقل */
    line-height: 1.3;
    margin-bottom: 20px;
    display: -webkit-box;
    --webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 70px; /* ارتفاع أدنى لعنوان من 3 أسطر (بخط أكبر) */
}

.card-details-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--primary-color); /* استخدام اللون الأساسي للرابط */
    font-weight: 700;
    font-size: 1.05rem; /* تكبير الخط قليلاً */
    transition: color 0.3s ease;
    direction: rtl;
    margin-top: auto; /* لدفع الرابط للأسفل */
}

.card-details-link i {
    margin-left: 10px; /* مسافة أكبر */
    font-size: 1.1em; /* تكبير الأيقونة نسبة للنص */
    transition: transform 0.3s ease;
}

.clickable-card:hover .card-details-link {
    color: var(--primary-hover-color);
}

.clickable-card:hover .card-details-link i {
    transform: translateX(-8px); /* تحريك أكثر عند التمرير */
}

/* No items message */
.no-items-message {
    font-size: 1.3rem;
    color: var(--gray-text-color);
    padding: 40px;
    border: 2px dashed var(--border-color); /* حدود أسمك */
    border-radius: 12px;
    background-color: var(--white);
    max-width: 700px; /* عرض أكبر للرسالة */
    margin: 60px auto;
    text-align: center;
    grid-column: 1 / -1;
    display: none; /* يتم التحكم في عرضها بواسطة JS */
    opacity: 0;
    transition: opacity 0.6s ease; /* مدة أطول للظهور */
}

.no-items-message.appear {
    opacity: 1;
}

/* Footer (ensure it matches your main footer) */
.footer {
    background-color: var(--dark-text-color);
    color: var(--white);
    padding: 40px 20px; /* حشو أكبر */
    text-align: center;
    font-family: var(--font-raleway);
    direction: rtl;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 20px; /* مسافة أكبر */
    font-weight: 400;
}

.footer-title span {
    color: var(--primary-color);
    font-weight: 700;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px; /* مسافة أكبر بين الأيقونات */
}

.social-icon-item {
    color: var(--white);
    font-size: 1.8rem; /* تكبير الأيقونات */
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-icon-item:hover {
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.1); /* تأثير أكبر عند التمرير */
}

/* Responsive Styles for All Opportunities Page (Adjusted) */
@media (max-width: 1200px) {
    .page-hero-section h1 {
        font-size: 3.5rem;
    }
    .page-hero-section p {
        font-size: 1.3rem;
    }
    .opportunities-listing-section .section-title {
        font-size: 2.8rem;
    }
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 25px;
    }
    .clickable-card {
        border-radius: 12px;
    }
    .card-image-wrapper {
        height: 200px;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }
    .card-title {
        font-size: 1.4rem;
        min-height: 65px;
    }
}

@media (max-width: 992px) {
    .page-hero-section {
        height: 300px;
    }
    .page-hero-section h1 {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    .page-hero-section p {
        font-size: 1.15rem;
    }
    .opportunities-listing-section {
        padding: 60px 0;
    }
    .opportunities-listing-section .section-title {
        font-size: 2.5rem;
        margin-bottom: 50px;
    }
    .opportunities-listing-section .section-title::after {
        bottom: -12px;
        width: 70px;
        height: 3px;
    }
    .search-input {
        padding: 15px 50px 15px 20px;
        font-size: 1.05rem;
    }
    .search-icon {
        left: 20px;
        font-size: 1.3rem;
    }
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    .clickable-card {
        box-shadow: 0 8px 20px rgba(var(--dark-text-color-rgb), 0.07);
    }
    .card-image-wrapper {
        height: 180px;
    }
    .card-info {
        padding: 20px;
    }
    .card-title {
        font-size: 1.3rem;
        min-height: 60px;
    }
    .card-category {
        font-size: 0.95rem;
    }
    .card-details-link {
        font-size: 1rem;
    }
    .no-items-message {
        max-width: 600px;
        font-size: 1.2rem;
        padding: 30px;
        margin: 50px auto;
    }
    .footer {
        padding: 30px 15px;
    }
    .footer-title {
        font-size: 1rem;
    }
    .social-icon-item {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .page-hero-section {
        height: 250px;
    }
    .page-hero-section h1 {
        font-size: 2.5rem;
    }
    .page-hero-section p {
        font-size: 1rem;
    }
    .opportunities-listing-section {
        padding: 50px 0;
    }
    .opportunities-listing-section .section-title {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }
    .opportunities-listing-section .section-title::after {
        bottom: -10px;
        width: 60px;
    }
    .search-input {
        padding: 12px 40px 12px 15px;
        font-size: 0.95rem;
    }
    .search-icon {
        left: 15px;
        font-size: 1.1rem;
    }
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* 2-3 أعمدة */
        gap: 15px;
    }
    .clickable-card {
        border-radius: 10px;
    }
    .card-image-wrapper {
        height: 150px;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }
    .card-info {
        padding: 15px;
    }
    .card-category {
        font-size: 0.9rem;
    }
    .card-title {
        font-size: 1.1rem;
        min-height: 50px;
        margin-bottom: 15px;
    }
    .card-details-link {
        font-size: 0.9rem;
    }
    .no-items-message {
        max-width: 500px;
        font-size: 1.1rem;
        padding: 25px;
        margin: 40px auto;
    }
    .social-icon-item {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .page-hero-section {
        height: 200px;
    }
    .page-hero-section h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    .page-hero-section p {
        font-size: 0.9rem;
    }
    .opportunities-listing-section {
        padding: 40px 0;
    }
    .opportunities-listing-section .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    .opportunities-listing-section .section-title::after {
        width: 50px;
        height: 2px;
    }
    .search-filter-section {
        margin-bottom: 30px;
    }
    .search-input {
        padding: 10px 35px 10px 10px;
        font-size: 0.85rem;
    }
    .search-icon {
        left: 10px;
        font-size: 1rem;
    }
    .masonry-grid {
        grid-template-columns: 1fr; /* عمود واحد على أصغر الشاشات */
        gap: 20px;
    }
    .clickable-card {
        max-width: 320px; /* تحديد أقصى عرض للبطاقة في العمود الواحد */
        margin: 0 auto; /* توسيط البطاقة */
        border-radius: 8px;
    }
    .card-image-wrapper {
        height: 180px; /* زيادة ارتفاع الصورة هنا قليلاً */
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }
    .card-info {
        padding: 12px;
    }
    .card-category {
        font-size: 0.75rem;
    }
    .card-title {
        font-size: 1rem;
        min-height: 45px;
        margin-bottom: 10px;
    }
    .card-details-link {
        font-size: 0.8rem;
    }
    .no-items-message {
        max-width: 280px;
        font-size: 0.9rem;
        padding: 20px;
        margin: 30px auto;
    }
    .footer {
        padding: 15px 10px;
    }
    .footer-title {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    .social-icons {
        gap: 10px;
    }
    .social-icon-item {
        font-size: 1.1rem;
    }
}
/* ------------------------------------------- */
/* أنماط صفحة تفاصيل الفرصة (details.php) */
/* ------------------------------------------- */

.details-page-section {
    padding-top: 80px; /* مسافة علوية لتناسب الهيدر */
    min-height: calc(100vh - 100px); /* لتأمين الفوتر في الأسفل */
    background-color: var(--background-light); /* خلفية فاتحة */
}

.details-card {
    max-width: 900px;
    margin: 40px auto;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-image-wrapper-details {
    width: 100%;
    height: 450px; /* ارتفاع ثابت للصورة */
    overflow: hidden;
}
.details-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.details-card .card-body {
    padding: 2.5rem; /* بادينغ داخلي */
}

.card-title-details {
    font-family: 'Raleway', sans-serif; /* استخدم خط Raleway من تصميمك الرئيسي */
    font-size: 2.5em; /* حجم الخط */
    color: var(--heading-color); /* لون العنوان من متغيراتك */
    font-weight: 800; /* وزن الخط */
    margin-bottom: 1.5rem; /* مسافة سفلية */
    text-align: right; /* محاذاة لليمين */
}

.info-row-details {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    direction: rtl; /* لضمان عرض العناصر من اليمين لليسار */
    justify-content: flex-end; /* لدفعها إلى اليمين */
}

.info-badge-details {
    background-color: var(--light-gray); /* لون خلفية من لوحة ألوانك */
    color: var(--text-color); /* لون النص */
    padding: 10px 18px; /* بادينغ أكبر قليلاً */
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* ظل خفيف */
}

.info-badge-details i {
    color: var(--primary-color); /* لون الأيقونة */
}

.card-text-details {
    font-family: 'Cairo', sans-serif; /* خط القاهرة */
    font-size: 1.15em;
    line-height: 1.9;
    color: var(--text-color);
    white-space: pre-line; /* للحفاظ على تنسيق الأسطر الجديدة */
    margin-bottom: 2.5rem;
    text-align: justify; /* محاذاة النص على الجانبين */
}

/* زر "رابط المنحة" استخدم نفس أنماط الأزرار المخصصة لديك */
.btn-primary-custom { /* حافظت على هذا الاسم لأنك استخدمته من قبل */
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); /* استخدام ألوانك المتغيرة */
    color: var(--white);
    padding: 15px 30px; /* بادينغ أكبر قليلاً */
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1em;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: inline-block;
    border: none; /* تأكيد إزالة أي حدود */
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark)); /* ألوان أغمق عند التمرير */
    color: white;
    text-decoration: none;
    transform: translateY(-3px); /* حركة خفيفة */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.social-share-details {
    margin-top: 35px;
    display: flex;
    justify-content: flex-end; /* لليمين */
    gap: 25px; /* مسافة أكبر بين الأيقونات */
    font-size: 1.8em; /* حجم أكبر للأيقونات */
}

.social-share-details a {
    color: var(--primary-color); /* لون أيقونات التواصل الاجتماعي */
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-share-details a:hover {
    color: var(--accent-color); /* تغيير اللون عند التمرير */
    transform: scale(1.1); /* تكبير خفيف */
}

/* Media Queries for responsiveness */
@media (max-width: 992px) {
    .details-card .card-body {
        padding: 2rem;
    }
    .card-title-details {
        font-size: 2.2em;
    }
    .details-card img {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .details-page-section {
        padding-top: 60px;
    }
    .details-card {
        margin: 20px auto;
        border-radius: 10px;
    }
    .details-card .card-body {
        padding: 1.5rem;
    }
    .card-title-details {
        font-size: 1.8em;
        margin-bottom: 1rem;
    }
    .details-card img {
        height: 280px;
    }
    .info-badge-details {
        font-size: 0.9em;
        padding: 8px 15px;
        gap: 5px;
    }
    .card-text-details {
        font-size: 1em;
        line-height: 1.7;
        margin-bottom: 2rem;
    }
    .btn-primary-custom {
        padding: 12px 25px;
        font-size: 1em;
    }
    .social-share-details {
        font-size: 1.5em;
        gap: 20px;
        justify-content: center; /* توسيط الأيقونات على الشاشات الصغيرة */
    }
}

@media (max-width: 480px) {
    .details-page-section {
        padding-top: 40px;
    }
    .details-card .card-body {
        padding: 1rem;
    }
    .card-title-details {
        font-size: 1.5em;
    }
    .details-card img {
        height: 220px;
    }
    .info-row-details {
        flex-direction: column; /* جعل الشارات تظهر تحت بعضها */
        align-items: center;
    }
    .info-badge-details {
        width: fit-content; /* لتناسب المحتوى */
        margin: 5px auto; /* توسيط كل شارة */
    }
    .card-text-details {
        font-size: 0.95em;
    }
    .btn-primary-custom {
        width: 100%; /* جعل الزر يأخذ عرض كامل */
        text-align: center;
    }
}