/* ===================================================
   1. FONT FACE — Variable Font
=================================================== */

@font-face {
    font-family: 'SFDroob';
    src: url('../fonts/SFDroob.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
  }
  
  /* ===================================================
     2. ROOT VARIABLES — Design System
  =================================================== */
  
  :root {
    --primary-color: #12a7a0;
    --accent-color: #065f5b;
    --text-color: #333;
    --bg-color: #ffffff;
    --soft-bg: #f5f7fa;
  
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-pill: 25px;
  
    --transition: all 0.3s ease;
  }
  
  /* ===================================================
     3. LANGUAGE & DIRECTION SYSTEM
  =================================================== */
  
  html[lang="ar"] {
    direction: rtl;
  }
  
  html[lang="en"] {
    direction: ltr;
  }
  
  /* Hide inactive language blocks */
  html[lang="ar"] .en-text,
  html[lang="ar"] #english-content {
    display: none !important;
  }
  
  html[lang="en"] .ar-text,
  html[lang="en"] #arabic-content {
    display: none !important;
  }
  
  /* ===================================================
     4. BASE BODY STYLE
  =================================================== */
  
  body {
    margin: 0;
    font-family: 'SFDroob', 'Tajawal', 'Segoe UI', sans-serif;
    line-height: 1.65;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #E9E6DD 100%);
    min-height: 100vh;
    transition: var(--transition);
  }
  
  /* ===================================================
     5. LAYOUT CONTAINERS
  =================================================== */
  
  /* للمقالات والنصوص */
  .container {
    max-width: 820px;
    margin: 50px auto;
    padding: 40px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  }
  
  /* لعرض الخطوط والمعاينات */
  .container-wide {
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px;
  }
  
  /* ===================================================
     6. NAVIGATION BUTTONS (Unified Pill Style)
  =================================================== */
  
  .nav-top,
  .footer-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 10px 0;
    padding: 5px 0;
  }
  
  .footer-nav-container {
    border-top: 1px solid var(--primary-color);
    margin-top: 50px;
    padding-top: 15px;
  }
  
  .lang-btn,
  .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
    padding: 8px 22px;
    border-radius: var(--radius-pill);
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .lang-btn:hover,
  .nav-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  
  /* ===================================================
     7. ARTICLE HEADER
  =================================================== */
  
  .article-header {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .category-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    background: rgba(18, 167, 160, 0.08);
  }
  
/* ===================================================
   8. HEADINGS — التعديل الجديد
=================================================== */

h1 {
  font-size: 2.4rem;
  color: var(--primary-color);
  margin: 15px 0 25px;
  line-height: 1.25;
  /* التعديل هنا: جعل العنوان يمتد على كامل عرض الحاوية */
  width: 100%; 
  max-width: 100%; 
  text-align: center; /* لضمان التوسيط بعد تمديد العرض */
}

.article-header {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* إضافة هذا لضمان تمدد العناصر الداخلية */
  width: 100%; 
}  
  /* ===================================================
     9. ARTICLE IMAGE
  =================================================== */
  
  .article-header img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 25px;
  }
  
  /* ===================================================
     10. ARTICLE LIST LINKS
  =================================================== */
  
/* ضمان ظهور النصوص بناءً على لغة الصفحة */
html[lang="ar"] .ar-text {
  display: inline !important; /* إظهار العربي في وضع العربية */
}

html[lang="en"] .en-text {
  display: inline !important; /* إظهار الإنجليزي في وضع الإنجليزية */
}

/* التأكد من أن القائمة نفسها لا تختفي */
.article-list {
  display: block !important;
  padding-inline-start: 20px; /* مسافة للنقاط الجانبية */
}

.article-list li {
  margin-bottom: 12px;
  display: list-item !important; /* لضمان ظهور النقاط (Markers) */
}

/* تحسين حركة الـ Hover لتكون أكثر سلاسة */
.article-list li a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

/* إضافة لون مختلف للرابط كما طلبت سابقاً */
.article-list li a:hover {
  color: var(--accent-color);
  padding-inline-start: 10px; /* تستخدم inline-start لتعمل مع الجهتين تلقائياً */
}

  /* ===================================================
     11. RESPONSIVE
  =================================================== */
  
  @media (max-width: 768px) {
  
    .container,
    .container-wide {
      padding: 25px;
    }
  
    h1 {
      font-size: 1.8rem;
    }
  
    .nav-link,
    .lang-btn {
      flex: 1 1 40%;
      font-size: 14px;
    }
  }
  /* الخط الفاصل بين الأزرار والرأس */
.section-divider {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0,0,0,0), rgba(18, 167, 160, 0.2), rgba(0,0,0,0));
  margin: 20px 0 30px 0;
  width: 100%;
}
  /* ===================================================
   12. TABLES — Enhanced Style
=================================================== */

.discount-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 0.95rem;
  background-color: #ffffff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid #eee;
}

/* تنسيق رأس الجدول */
.discount-table thead {
  background-color: var(--primary-color);
  color: #ffffff;
}

.discount-table th {
  padding: 18px 15px;
  text-align: center; /* توسيط العناوين */
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* تنسيق خلايا الجسم */
.discount-table td {
  padding: 15px;
  text-align: center; /* توسيط النصوص تحت العناوين */
  vertical-align: middle; /* التوسط العمودي */
  border-bottom: 1px solid #f0f0f0;
  color: #444;
}

/* محاذاة العمود الأخير (الهدف الاستراتيجي) لجهة البداية لأنه يحتوي نصاً طويلاً */
.discount-table td:last-child {
  text-align: start; 
  padding-inline-start: 25px;
}

/* تلوين الصفوف وتأثير المرور */
.discount-table tbody tr:nth-of-type(even) {
  background-color: #fafafa;
}

.discount-table tbody tr:hover {
  background-color: rgba(18, 167, 160, 0.03);
}

/* تمييز أرقام الخصم */
.discount-table td strong {
  color: var(--accent-color);
  background: rgba(6, 95, 91, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
}

.article-footer-note {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px dashed #ccc;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}
.author-box {
  margin-top: 40px;
  padding: 20px 25px;
  border-right: 4px solid var(--primary-color);
  background: rgba(18, 167, 160, 0.06);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.7;
}

html[lang="en"] .author-box {
  border-right: none;
  border-left: 4px solid var(--primary-color);
}

.author-box p {
  margin: 6px 0;
  font-weight: 500;
}
