/* أضيفي هذا في أي مكان في بداية الملف */
html {
    scroll-behavior: smooth;
}
/* ======== إعدادات عامة وتنسيق الخط ======== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    /* تمت إضافة هذا لتعويض مساحة الهيدر الثابت */
    padding-top: 75px; 
}

.container {
    max-width: 1100px; /* أقصى عرض للمحتوى */
    margin: auto; /* لتوسيط الحاوية */
    padding: 0 20px; /* هوامش داخلية جانبية */
}

/* ======== تصميم الهيدر (الشريط العلوي) ======== */
header {
    background-color: #fff; /* لون خلفية أبيض */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* ظل خفيف لإبراز الشريط */
    padding: 15px 0; /* هوامش داخلية أعلى وأسفل */
    position: fixed; /* لتثبيت الشريط في الأعلى عند التمرير */
    width: 100%;
    top: 0;
    right: 0; /* مهم للغة العربية */
    z-index: 100; /* لضمان بقائه فوق كل العناصر الأخرى */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-right: 25px; /* المسافة بين عناصر القائمة */
}

nav ul li a {
    color: #555;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #007bff;
}


/* ======== تصميم قسم البطل (Hero Section) ======== */
.hero {
    /* 
       مهم جداً: ضعي صورة مناسبة في مجلد images/ 
       واستبدلي hero-background.jpg باسمها 
    */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    /* تم تغيير الارتفاع ليتناسب مع الهيدر الثابت */
    height: calc(100vh - 75px); 
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 50px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 22px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 30px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}
/* ======== تصميم الأقسام بشكل عام ======== */
.products-section /* يمكن تطبيق هذا الستايل على أقسام أخرى لاحقاً */ {
    padding: 60px 0; /* هوامش داخلية أعلى وأسفل القسم */
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #333;
}

/* ======== تصميم شبكة المنتجات ======== */
.products-grid {
    display: grid;
    /* إنشاء 3 أعمدة متساوية في العرض */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; /* المسافة بين البطاقات */
}

/* تصميم بطاقة المنتج الواحدة */
.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* لإخفاء أي جزء من الصورة يخرج عن الحواف الدائرية */
}

.product-card:hover {
    transform: translateY(-10px); /* تأثير رفع البطاقة للأعلى عند مرور الماوس */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-card img {
    max-width: 100%;
    height: 200px; /* ارتفاع ثابت للصور */
    object-fit: cover; /* لضمان ملء الصورة للمساحة بدون تشويه */
    border-radius: 5px;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
}

.product-card p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* إعادة استخدام تصميم الزر مع تعديل بسيط */
.product-card .btn {
    width: 100%; /* جعل الزر يملأ عرض البطاقة */
}
/* ======== تصميم قسم "من نحن" ======== */
.about-section {
    padding: 60px 0;
    background-color: #f9f9f9; /* لون خلفية رمادي فاتح جداً لتمييز القسم */
}

.about-content {
    display: flex; /* لوضع الصورة والنص بجانب بعضهما */
    align-items: center; /* لمحاذاة العناصر عمودياً في المنتصف */
    gap: 40px; /* مسافة بين النص والصورة */
}

.about-text {
    flex: 1; /* لجعل النص يأخذ المساحة المتاحة */
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.about-text p {
    font-size: 17px;
    color: #666;
    line-height: 1.8; /* لزيادة المسافة بين السطور وجعل القراءة أسهل */
    margin-bottom: 15px;
}

.about-image {
    flex: 1; /* لجعل الصورة تأخذ المساحة المتاحة */
}

.about-image img {
    max-width: 100%;
    border-radius: 8px; /* حواف دائرية للصورة */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
/* ======== تصميم قسم تواصل معنا ======== */
.contact-section {
    padding: 60px 0;
}

.contact-content {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* لمحاذاة العناصر من الأعلى */
}

.contact-info, .contact-map {
    flex: 1; /* ليتقاسما المساحة */
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 17px;
    margin-bottom: 15px;
    line-height: 1.8;
}

.contact-info p strong {
    color: #333;
}

.contact-info p a {
    color: #007bff;
    text-decoration: none;
}

.contact-info p a:hover {
    text-decoration: underline;
}

.social-media {
    margin-top: 20px;
}

.social-media a {
    display: inline-block;
    margin-left: 15px; /* مسافة بين أيقونات التواصل */
    color: #333;
    font-size: 18px;
    text-decoration: none;
    font-weight: bold;
}

.social-media a:hover {
    color: #007bff;
}
/* ======================================== */
/* ======== التصميم المتجاوب (للهواتف) ======== */
/* ======================================== */

/* نطبق هذه التنسيقات فقط إذا كان عرض الشاشة 768 بكسل أو أقل */
@media (max-width: 768px) {

    /* --- تعديل إعدادات عامة --- */
    body {
        /* تقليل الحشو العلوي قليلاً ليناسب الهيدر الجديد */
        padding-top: 100px;
    }

    .section-title {
        font-size: 28px; /* تصغير حجم عناوين الأقسام */
    }


    /* --- تعديل الهيدر --- */
    header .container {
        flex-direction: column; /* جعل الشعار والقائمة فوق بعضهما البعض */
        gap: 15px; /* إضافة مسافة بين الشعار والقائمة */
    }


    /* --- تعديل قسم البطل (Hero) --- */
    .hero h1 {
        font-size: 36px; /* تصغير حجم الخط الرئيسي */
    }

    .hero p {
        font-size: 18px; /* تصغير حجم النص الفرعي */
    }


    /* --- تعديل قسم المنتجات (الأهم) --- */
    .products-grid {
        /* تغيير الشبكة من 3 أعمدة إلى عمود واحد فقط */
        grid-template-columns: 1fr; 
    }


    /* --- تعديل قسم "من نحن" --- */
    .about-content {
        flex-direction: column; /* جعل الصورة والنص فوق بعضهما البعض */
    }

    .about-text {
        text-align: center; /* توسيط النص ليبدو أفضل */
    }


    /* --- تعديل قسم "تواصل معنا" --- */
    .contact-content {
        flex-direction: column; /* جعل المعلومات والخريطة فوق بعضهما البعض */
    }

    .contact-info {
        text-align: center; /* توسيط معلومات الاتصال */
    }

    .social-media {
        text-align: center; /* توسيط روابط التواصل الاجتماعي */
    }
    .social-media a {
        margin: 0 10px; /* تعديل المسافات بين الروابط */
    }
}

.contact-map iframe {
    border-radius: 8px; /* حواف دائرية للخريطة */
}

/* ======== تصميم التذييل (Footer) ======== */
.footer {
    background-color: #333; /* خلفية رمادية غامقة */
    color: #fff; /* نص أبيض */
    text-align: center;
    padding: 20px 0;
    margin-top: 40px; /* مسافة فوق التذييل */
}
