/* --- 1. المتغيرات الأساسية (Variables) --- */
:root {
    /* التدرج الأزرق الخاص بالمؤسسة */
    --primary-blue: #0056b3;
    --secondary-blue: #00a8cc;
    --gradient-blue: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    
    /* ألوان عامة */
    --bg-color: #f4f6f9;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    
    /* ألوان شريط التنقل */
    --nav-bg: #ffffff;
    --nav-active: var(--primary-blue);
    --nav-inactive: #95a5a6;
}

/* --- 2. الإعدادات العامة (Reset) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    /* ترك مساحة علوية وسفلية لكي لا يختفي المحتوى خلف الهيدر والفوتر */
    padding-top: 60px; 
    padding-bottom: 80px; 
}

/* --- 3. تنسيق الهيدر العلوي --- */
.app-header {
    position: fixed;
    top: 15px; /* إبعاده عن الأعلى ليظهر الشكل البيضاوي */
    left: 5%;
    width: 90%; /* تصغير العرض ليكون بيضاوياً */
    background: rgba(93, 159, 221, 0.95);
    color: var(--text-dark);
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 50px; /* الشكل البيضاوي */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 40px;
    width: auto;
}

/* تنسيق زر تواصل معنا في الهيدر */
.header-contact-btn {
    background: var(--gradient-blue);
    color: var(--text-light);
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 0.2s;
}

.header-contact-btn:active {
    transform: scale(0.95);
}

/* --- 4. تنسيق شريط التنقل السفلي --- */
.bottom-nav {
    position: fixed;
    bottom: 15px; /* إبعاده عن الأسفل */
    left: 5%;
    width: 90%; /* تصغير العرض */
    background: var(--gradient-blue); /* جعله أزرق متدرج */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    border-radius: 50px; /* الشكل البيضاوي */
}

.nav-item {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6); /* أيقونات غير نشطة شفافة قليلاً */
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

/* حركة بسيطة عند التفعيل */
.nav-item.active {
    color: #ffffff; /* لون أبيض ناصع عند التفعيل */
    transform: translateY(-3px);
}



/* --- 5. تنسيق القسم الأول (سلايدر الصور) --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 40vh; /* ارتفاع القسم ليناسب شاشات الجوال */
    overflow: hidden;
    border-bottom-left-radius: 25px; /* حواف دائرية لتعزيز شكل التطبيق */
    border-bottom-right-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slider-container {
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* حركة انتقال ناعمة بين الصور */
}

.slide.active {
    opacity: 1; /* إظهار الصورة النشطة فقط */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* تعتيم الخلفية لإبراز النص */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    z-index: 10;
}

.hero-overlay h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6); /* ظل للنص لزيادة الوضوح */
}

.hero-overlay p {
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    text-align: center;
    padding: 0 15px;
}


/* --- 6. تنسيق قسم الخدمات --- */
.section-container {
    padding: 30px 15px; /* مسافة داخلية لترتيب العناصر بعيداً عن حواف الشاشة */
}

.section-title {
    text-align: center;
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
}

/* خط تزييني تحت عنوان القسم */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--gradient-blue);
    border-radius: 5px;
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 20px; /* المسافة بين البطاقات */
}

.service-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06); /* ظل خفيف جداً يبرز البطاقة */
}

.card-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* تنسيق زر التفاصيل */
.details-btn {
    width: 100%;
    padding: 10px 15px;
    background: var(--gradient-blue);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between; /* توزيع النص والأيقونة */
    align-items: center;
    transition: background 0.3s ease;
    font-family: inherit;
    font-weight: 700;
}

/* دوران السهم عند الفتح */
.details-btn i {
    transition: transform 0.3s ease;
}
.details-btn.active i {
    transform: rotate(180deg);
}

/* حاوية التفاصيل (مخفية برمجياً عبر الارتفاع) */
.service-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease, margin 0.4s ease;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* الفئة التي سيضيفها الجافاسكريبت لإظهار النص */
.service-details.show {
    max-height: 500px; /* رقم كبير كفاية لاحتواء النص */
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #e1e8ed;
}

.service-details p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}

.service-details p:last-child {
    margin-bottom: 0;
}




/* --- 7. تنسيق قسم المقالات --- */
.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    /* لمسة تصميمية: خط جانبي ملون لتمييز المقالات */
    border-right: 4px solid var(--secondary-blue); 
}

.article-image {
    width: 100%;
    height: 160px; /* ارتفاع أقل قليلاً من صور الخدمات */
    background-size: cover;
    background-position: center;
}

.article-content {
    padding: 15px;
}

.article-content h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* تصميم الزر الشفاف ذو الإطار الملون */
.article-btn {
    width: 100%;
    padding: 8px 15px;
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 700;
}

/* انعكاس الألوان عند التفعيل أو مرور الماوس */
.article-btn:hover, .article-btn.active {
    background: var(--primary-blue);
    color: var(--text-light);
}

.article-btn i {
    transition: transform 0.3s ease;
}
.article-btn.active i {
    transform: rotate(180deg);
}

/* حاوية تفاصيل المقال */
.article-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease, margin 0.4s ease;
}

.article-details.show {
    max-height: 800px;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px dashed #ccc; /* خط متقطع يفصل بين العنوان والمحتوى */
}

.article-details p {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 10px;
}




/* --- 8. تنسيق قسم أحدث الأعمال (السلايدر المزدوج) --- */
.portfolio-block {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.portfolio-subtitle {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
}

.portfolio-slider {
    position: relative;
    width: 100%;
    height: 220px; /* ارتفاع مناسب للصور في الجوال */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.portfolio-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.p-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.p-slide.active {
    opacity: 1; /* إظهار الصورة النشطة فقط */
}

/* تنسيق أزرار التقليب فوق الصور */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-blue);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background 0.3s ease;
}

.slider-btn:active {
    background: var(--primary-blue);
    color: #fff;
}

.prev-btn { right: 10px; } /* زر السابق يمين لأن الموقع عربي RTL */
.next-btn { left: 10px; }  /* زر التالي يسار */

.portfolio-desc {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    line-height: 1.6;
}

/* --- 9. تنسيق قسم عن المؤسسة --- */
.about-intro {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.about-intro p {
    color: #444;
    font-size: 1rem;
    line-height: 1.8;
}

.about-intro strong {
    color: var(--primary-blue);
}

.about-grid {
    display: flex;
    flex-direction: column;
    gap: 15px; /* المسافة بين البطاقات الثلاث */
}

.about-card {
    background-color: #fff;
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

/* حركة تصميمية: خط أزرق متدرج أعلى كل بطاقة */
.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-blue);
}

.about-icon {
    width: 60px;
    height: 60px;
    background: #f0f4f8; /* لون خلفية خفيف جداً للأيقونة */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px auto;
}

.about-icon i {
    font-size: 1.8rem;
    color: var(--secondary-blue);
}

.about-card h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.about-card p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
}






/* --- 9. تنسيق قسم عن المؤسسة (المعدل لسطر واحد) --- */
.about-intro {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.about-intro p {
    color: #444;
    font-size: 1rem;
    line-height: 1.8;
}

.about-intro strong {
    color: var(--primary-blue);
}

/* الشبكة التي تضع الخانات في سطر واحد */
.about-grid {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* 3 أعمدة متساوية */
    gap: 10px; /* المسافة بين البطاقات */
}

.about-card {
    background-color: #fff;
    padding: 15px 5px; /* حواف داخلية مناسبة */
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

/* الخط الأزرق المدرج أعلى البطاقة */
.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-blue);
}

.about-icon {
    width: 40px;
    height: 40px;
    background: #f0f4f8;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px auto;
}

.about-icon i {
    font-size: 1.2rem;
    color: var(--secondary-blue);
}

.about-card h3 {
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.about-card p {
    color: #555;
    font-size: 0.7rem; /* حجم خط يتناسب مع المساحة */
    line-height: 1.5;
}








/* --- 10. تنسيق قسم لماذا نحن --- */
.why-us-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* المسافة العمودية بين المميزات */
}

.why-us-item {
    display: flex;
    align-items: center; /* توسيط العناصر عمودياً */
    background-color: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.04);
    transition: transform 0.3s ease; /* حركة بسيطة عند التفاعل */
}

/* تأثير خفيف عند لمس العنصر في الجوال */
.why-us-item:active {
    transform: scale(0.98);
}

.why-icon {
    flex-shrink: 0; /* منع الأيقونة من الانضغاط */
    width: 55px;
    height: 55px;
    background: var(--gradient-blue); /* استخدام التدرج الأزرق الخاص بنا */
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 15px; /* مسافة بين الأيقونة والنص (يسار الأيقونة لأن الموقع عربي RTL) */
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.2); /* ظل أزرق خفيف للأيقونة */
}

.why-icon i {
    font-size: 1.5rem;
    color: var(--text-light); /* أيقونة بيضاء لتبرز فوق التدرج */
}

.why-text {
    flex-grow: 1; /* جعل النص يأخذ المساحة المتبقية */
}

.why-text h3 {
    color: var(--text-dark);
    font-size: 1.05rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.why-text p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
}





/* --- 11. تنسيق قسم التواصل --- */
.contact-desc {
    text-align: center;
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 15px; /* المسافة بين أزرار التواصل */
}

/* التنسيق الأساسي المشترك لكل الأزرار */
.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none; /* إزالة الخط السفلي من الروابط */
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* حركة انضغاط الزر عند اللمس في الجوال */
.contact-btn:active {
    transform: translateY(3px);
}

.contact-btn i {
    font-size: 1.5rem;
    margin-left: 10px; /* مسافة بين الأيقونة والنص (لليسار لأننا عربي) */
}

/* --- ألوان الأزرار المخصصة --- */

/* لون واتساب الرسمي مع ظل خفيف */
.whatsapp-btn {
    background-color: #25D366; 
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* تدرج إنستغرام الرسمي */
.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.3);
}

/* لون المؤسسة (الأزرق) للإيميل */
.email-btn {
    background-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}





/* --- 12. تنسيق قسم الموقع والفوتر --- */
.location-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.location-image {
    width: 100%;
    height: 200px; /* ارتفاع مناسب للخريطة */
    object-fit: cover;
    display: block; /* لمنع أي مساحات بيضاء تحت الصورة */
}

.location-info {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
}

.location-info i {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-left: 10px; /* مسافة لليسار */
}

.location-info p {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 700;
}

/* --- تنسيق الفوتر --- */
.app-footer {
    text-align: center;
    background-color: var(--text-dark); /* لون داكن للفوتر ليعطي وزناً للتصميم */
    color: var(--text-light);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    
    /* حيلة برمجية مهمة جداً: */
    /* نضيف مساحة علوية وسفلية، السفلية يجب أن تكون أكبر من ارتفاع شريط التنقل السفلي */
    /* لكي لا يغطي شريط التنقل على حقوق الملكية عندما ينزل المستخدم لآخر الصفحة */
    padding: 30px 15px 100px 15px; 
    margin-top: 30px;
}

.app-footer p {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #bdc3c7; /* لون رمادي فاتح مريح */
}

.developer-credit {
    font-size: 0.75rem !important;
    color: var(--secondary-blue) !important;
    margin-top: 15px;
    letter-spacing: 1px;
}



