/* ==========================================================================
   1. الإعدادات الأساسية وإعادة التعيين (Reset & Global Styles)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

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

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f4f6f8; /* خلفية عامة مريحة وفاتحة تمنع العشوائية المظلمة */
    color: #333333;
    line-height: 1.8;
    font-size: 16px;
    direction: rtl;
    text-align: right;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================================================
   2. هيدر الموقع وقائمة التنقل (Header & Navigation)
   ========================================================================== */
header {
    background-color: #1a1a1a;
    border-bottom: 3px solid #ffc107;
    position: relative; /* منع الهيدر من ابتلاع محتوى الصفحات */
    z-index: 999;
    padding: 15px 0;
}

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

.logo {
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffc107;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ffc107;
}

/* زر الاتصال العلوي المميز الأصفر */
.btn-call {
    background-color: #ffc107;
    color: #1a1a1a !important;
    padding: 8px 18px !important;
    border-radius: 4px;
    font-weight: 700 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* ==========================================================================
   3. البانر الرئيسي وبانرات الصفحات الفرعية (Hero Section)
   ========================================================================== */
.hero, .sub-hero {
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    position: relative;
    color: #ffffff;
    text-align: center;
    padding: 60px 0;
    margin-bottom: 30px;
    clear: both;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.hero-content, .sub-hero-content {
    position: relative;
    z-index: 10;
}

.sub-hero h1, .hero h1 {
    font-size: 2.3rem;
    font-weight: 900;
    color: #ffc107;
    margin-bottom: 10px;
}

/* ==========================================================================
   4. الهيكل الأساسي لتوزيع المحتوى والأقسام (Main Layout Structure)
   ========================================================================== */
/* حل مشكلة تداخل الصفحات الفرعية وتنسيق المحتوى والمقالات */
.service-page-content, .main-page-content {
    display: flex;
    gap: 30px;
    margin: 40px auto;
    clear: both;
}

/* الصندوق الأبيض المستقل الذي يحمي النصوص من التداخل العشوائي */
.service-page-content article, .main-article-box {
    flex: 2.5;
    background: #ffffff;      /* إجبار الخلفية على اللون الأبيض للنظافة البصرية */
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #eef2f5;
}

/* تفكيك التداخل في صفحة اتصل بنا وباقي الصفحات التعريفية */
.contact-section, .about-section, .faq-section {
    background: #ffffff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 30px;
    width: 100%;
    clear: both;
}

/* ==========================================================================
   5. تنسيق العناصر الداخلية والنصوص (Typography & Content Formatting)
   ========================================================================== */
h2, h3, h4 {
    color: #1a1a1a;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 700;
}

article h3, .contact-section h3, .faq-section h3 {
    font-size: 1.5rem;
    border-right: 4px solid #ffc107; /* حافة يمين مميزة لترتيب العناوين بدل التداخل */
    padding-right: 12px;
    margin-bottom: 20px;
}

p {
    color: #4a5568;
    margin-bottom: 18px;
    font-size: 1.05rem;
    text-align: justify;
    line-height: 1.9;
}

.lead-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111111;
    background: #fff9db;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 25px;
}

/* تنسيق القوائم النقطية المبعثرة */
ul, ol {
    margin-right: 25px;
    margin-bottom: 25px;
}

ul li, ol li {
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: 600;
}

/* صناديق الميزات والأسئلة الشائعة المنظمة */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
    clear: both;
}

.feature-card, .faq-item {
    background: #f8fafc;
    padding: 22px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #ffc107;
}

.faq-item {
    margin-bottom: 15px;
    border-top: none;
    border-right: 4px solid #ffc107;
}

/* البوكسات الإرشادية والتنبيهات المستعملة بالموقع */
.warning-box {
    padding: 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-weight: 600;
}
.info-box { background-color: #fffde7; border-right: 5px solid #ffc107; color: #533f03; }
.euro-box { background-color: #f1f3f5; border-right: 5px solid #343a40; color: #212529; }
.price-box { background-color: #e8f5e9; border-right: 5px solid #28a745; color: #155724; }

/* ==========================================================================
   6. شريط الاتصال الجانبي الذكي (Sidebar Structure)
   ========================================================================== */
.cta-sidebar {
    flex: 1;
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.cta-sidebar h4 {
    color: #ffc107;
    margin-top: 0;
    font-size: 1.25rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.sidebar-btn {
    display: block;
    text-align: center;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s;
}

.sidebar-btn:hover { transform: translateY(-2px); }
.sidebar-btn.phone { background-color: #ffc107; color: #1a1a1a; }
.sidebar-btn.whatsapp { background-color: #25d366; color: #ffffff; }

/* ==========================================================================
   7. أزرار التواصل الكبيرة والروابط (Buttons & Links)
   ========================================================================== */
.contact-buttons-container {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    clear: both;
}

.main-contact-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    border-radius: 6px;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 700;
}

.phone-btn { background-color: #0275d8; }
.whatsapp-btn { background-color: #25d366; }

/* ==========================================================================
   8. الفوتر وتوقيع أسفل الموقع (Footer Styling)
   ========================================================================== */
footer {
    background-color: #111111;
    color: #a0aec0;
    text-align: center;
    padding: 35px 0;
    margin-top: 50px;
    border-top: 4px solid #ffc107;
    clear: both; /* منع الفوتر من التداخل مع العناصر الطافية أعلاه */
}

footer p {
    color: #a0aec0;
    text-align: center;
    margin-bottom: 10px;
}

footer p.designed-by a {
    color: #ffc107;
    text-decoration: none;
    font-weight: 700;
}

/* ==========================================================================
   9. التجاوب الكامل وإصلاح شاشات الهواتف والتابلت (Responsive Design)
   ========================================================================== */
@media (max-width: 992px) {
    .service-page-content, .main-page-content {
        flex-direction: column;
    }
    .cta-sidebar {
        position: static;
        width: 100%;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .contact-buttons-container {
        flex-direction: column;
    }
    .sub-hero h1, .hero h1 {
        font-size: 1.8rem;
    }
}