/* إعادة تعيين الهوامش الافتراضية للمتصفح لمنع الفراغات البيضاء */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تعريف متغيرات الألوان الأربعة لحرب أكتوبر لسهولة الاستخدام */
:root {
    --military-green: #4B5320;  /* الأخضر الزيتي العسكري */
    --victory-gold: #C5A059;   /* ذهبي النصر والنسر */
    --martyr-red: #8B0000;     /* أحمر دماء الشهداء */
    --sinai-sand: #D2B48C;     /* رمل سيناء الصحراوي */
    --dark-bg: #1e220d;        /* زيتي داكن جداً للخلفيات */
}

body {
    background-color: #332a21; /* خلفية هادئة مائلة للبيج الفاتح */
    color: #333;
}

/* تنسيق الهيدر العلوي */
.hero-section {
    position: relative;
    background: url('https://www.istockphoto.com/photo/battlefield-gm106569936-5568595?utm_source=unsplash&utm_medium=affiliate&utm_campaign=srp_photos_zsr&utm_content=https%3A%2F%2Funsplash.com%2Fs%2Fphotos%2F%25D8%25AD%25D8%25B1%25D8%25A8-%25D8%25A7%25D9%2583%25D8%25AA%25D9%2588%25D8%25A8%25D8%25B1&utm_term=%D8%AD%D8%B1%D8%A8+%D8%A7%D9%83%D8%AA%D9%88%D8%A8%D8%B1%3A%3A%3A%3A7f71ac64-7801-4c5c-a7c6-23609cd851e9') no-repeat center center/cover;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* طبقة شبه شفافة فوق الصورة لزيادة وضوح النص باللون الزيتي الداكن */
.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(75, 83, 32, 0.75); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-section h1 {
    color: var(--victory-gold);
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section p {
    color: var(--sinai-sand);
    font-size: 1.3rem;
}

/* تطبيق فكرة تحريك الـ hr بعرض الصفحة أسفل الهيدر */
.header-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: var(--victory-gold);
    border: none;
}

/* حاوية المحتوى الرئيسي */
.container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    color: var(--martyr-red);
    font-size: 2.2rem;
    margin-bottom: 40px;
    position: relative;
}

/* شبكة الكروت باستخدام Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* تنسيق الكارت الاحترافي */
.card {
    background-color: white;
    border: 1px solid rgba(75, 83, 32, 0.15);
    border-radius: 8px;
    padding: 30px 25px;
    position: relative; /* ضروري لضبط مكان الـ hr والـ badge بداخلها */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

/* تأثير حركة لطيف عند تمرير الماوس فوق الكارت */
.card:hover {
    transform: translateY(-5px);
}

/* الشارة الصغيرة أعلى الكارت بأسلوب الـ Position */
.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--martyr-red);
    color: white;
    padding: 5px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
    font-weight: bold;
}

.card h3 {
    color: var(--military-green);
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.card p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px; /* مسافة أمان قبل الخط السفلي */
}

/* تحريك وتثبيت الـ hr في أسفل كل كارت بدقة */
.card-footer-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--military-green);
    border: none;
}

/* تذييل الصفحة (Footer) */
footer {
    background-color: var(--dark-bg);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    border-top: 3px solid var(--victory-gold);
}
