/* ===============================
   Reset & Base Styles
=============================== */
body {
  font-family: 'Tajawal', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
  direction: rtl;
  background-color: #f5f5f5;
  text-align: center; /* توسيط العناصر النصية بشكل عام */
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
}


/* ===============================
 Grid & Article Cards
=============================== */
.section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 10px auto;
  padding: 10px;
}

.article-card {
  background: linear-gradient(145deg, #e0efff, #ffffff);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto; /* توسيط البطاقة */
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 15px;
  text-align: center;
}

.article-title {
  font-size: 1.3em;
  color: #003366;
  margin: 10px 0;
  font-weight: bold;
}

.article-description {
  font-size: 1em;
  color: #555555;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 0.9em;
  color: #fff;
  background-color: #0078d7;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.read-more:hover {
  background-color: #005bb5;
}

/* ===============================
 Header & Branding
=============================== */

/* ------------------------------
   تعديل الهيدر ليبدأ من اليمين (اللوجو والاسم) والأزرار على اليسار
   وتقليل ارتفاع الهيدر
------------------------------- */
header {
  position: fixed; /* يجعل الهيدر ثابتًا أثناء التمرير */
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999; /* لضمان ظهور الهيدر فوق باقي المحتوى */
  background-color: rgb(248, 246, 241);
  color: #4374fa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px; /* يمكنك ضبط الحشوة حسب رغبتك */
  border-bottom: 1px solid rgb(211, 210, 210);
  /* تم إزالة border-radius والهوامش لجعل الهيدر يمتد بعرض الصفحة بالكامل */
}

/* تغيير ترتيب العناصر داخل الهيدر */
header nav {
  order: 2;  /* قائمة التنقل ستظهر على اليسار */
}

header img.logo1,
header .h5-logo,
header .h6-logo {
  order: 1;  /* الشعار واسم الشركة ستظهر على اليمين */
}

/* تنسيقات إضافية للعناصر داخل الهيدر */
header img.logo1 {
  width: 50px;
  padding: 5px;
  margin: 0;
  display: block;
}

header .h5-logo {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 10px;
}

header .h6-logo {
  font-size: 0.7rem;
  border: 1px solid #0056b3;
  border-radius: 150px;
  font-weight: 300;
  background-color: #fff;
  padding: 3px 8px;
  margin: 0 10px;
}




/* ===============================
 Date, Time & Additional Elements
=============================== */
#date-time {
  font-size: 18px;
  color: #555;
}

.time h6 {
  color: #3b79ff;
  background: #fff;
  border: 0.3px solid #dfdfdf;
  border-radius: 10px;
  padding: 3px;
  max-width: 150px;
  font-weight: 400;
  margin: 20px ;
  text-align: center;

  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===============================
 Main Content & Articles Section
=============================== */
.main {
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 1100px;
  margin: 20px 0 20px auto; /* أقصى اليسار */
  padding: 20px;
  border-radius: 20px;
  border: 2px solid rgba(0, 87, 179, 0.5);
}
.add-1 {
  display: block;
  margin: 100px 5px 20px 50px; /* أقصى اليسار */
  max-width: 100%;
  border-radius: 12px;
}

.articles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px auto;
  padding: 10px;
}

/* ===============================
 Navigation & Links
=============================== */
nav {
  margin: 10px auto 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.back-home, 
.price {
  text-decoration: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 10px;
  font-weight: 550;
  background: linear-gradient(145deg, #96c9ff, #014b9b);
}

/* ===============================
 Span Labels for Sections
=============================== */
.span-first,
.span-mid,
.span-end {
  background: linear-gradient(145deg, #fdbc59, #c28730);
  padding: 0 20px;
  border-radius: 10px;
}

/* ===============================
 Article Specific Styles
=============================== */
article h1 {
  color: #fff;
  background: linear-gradient(145deg, #96c9ff, #014b9b);
  width: 80%;
  margin: 20px auto;
  padding: 10px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 0.7px solid #838282;
}

article h4 {
  color: #fff;
  background: linear-gradient(145deg, #96c9ff, #014b9b);
  width: 60%;
  margin: 10px auto;
  padding: 5px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 0.6px solid #757575;
  font-size: 0.8rem;
}

.p-in-article {
  width: 85%;
  margin: 0 auto;
  padding: 50px;
  text-align: center;
}

/* ===============================
 Images
=============================== */
/* Thumbnail Images */
.thumbnail {
  display: block;
  margin: 10px auto;
  max-width: 30%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Large Images */
.large-image {
  width: 70%;
  max-width: 720px;
  max-height: 500px;
  margin: 20px auto;
  display: block;
  height: auto;
  border-radius: 30px;
  border: 4px solid rgba(2, 61, 223, 0.53);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===============================
 Layout: Container & Sidebar
=============================== */
.container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  max-width: 1200px;
  padding: 20px;
  margin: 0 auto;
  position: relative;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 25%;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-height: 100%;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 100px;
  border-right: 2px solid #ddd;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #007bff;
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-track {
  background: #f0f0f0;
}

/* ===============================
 Ad Banner
=============================== */
.ad-banner img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(0, 87, 179, 0.5);
}

.ad-banner img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ===============================
 Summary Section
=============================== */
.summary h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #333;
  border-bottom: 2px solid #007bff;
}

.summary p {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

/* ===============================
 Quick Links
=============================== */
.quick-links h2 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 10px;
  padding: 4px;
  color: #fff;
  text-align: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #96c9ff, #014b9b);
}

.quick-links ul {
  list-style: none;
  padding: 0;
}

.quick-links li {
  margin-bottom: 10px;
}

.quick-links a {
  text-decoration: none;
  color: #007bff;
}

.quick-links a:hover {
  text-decoration: underline;
  color: #0056b3;
}

/* ===============================
 Social Media
=============================== */
.social-media h2 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 10px;
  padding: 4px;
  color: #fff;
  text-align: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #96c9ff, #014b9b);
}

.social-icons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.social-icon img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
  border-radius: 10px;
}

.social-icon:hover img {
  transform: scale(1.2);
}

/* ===============================
 Top Articles
=============================== */
.top-articles h2 {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 10px;
  padding: 4px;
  color: #fff;
  text-align: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #96c9ff, #014b9b);
}

.top-articles ul {
  list-style: none;
  padding: 0;
}

.top-articles li {
  margin-bottom: 10px;
}

.top-articles a {
  text-decoration: none;
  color: #007bff;
}

.top-articles a:hover {
  text-decoration: underline;
  color: #0056b3;
}

/* ===============================
 Professional Footer
=============================== */
footer {
  background: linear-gradient(145deg, #96c9ff, #01366e);
  color: #fff;
  padding: 10px 20px;
  margin-top: 10px;
  margin: 10px 0 40px auto; /* أقصى اليسار */
  max-width: 67%;
  border-radius: 10PX;

  text-align:left;
}

.footer-container {
  display: flex;
  flex-direction: column;
  justify-content: center; /* توسيط رأسي */
  align-items: center; /* توسيط أفقي */
  height: 600px; /* أو أي قيمة مناسبة */
}

.footer-section {
  flex: 1 1 250px;
  text-align: center;
  margin-bottom: 20px;
}

.footer-section h3 {
  font-size: 1.2rem;
  border-bottom: 2px solid rgba(3, 60, 121, 0.9);
  padding-bottom: 10px;
  margin-bottom: 15px;
  color: rgba(3, 60, 121, 0.9);
}

.h6-logo-footer{
  text-align: center;
  margin-bottom: 20PX;
}

.footer-section p,
.footer-section ul {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 5px 0;

}

.logo-footer{display: block;
  margin: auto; /* تأكد من عدم وجود هوامش غير ضرورية */
  max-width: 90px; /* يمكنك ضبط الحجم حسب الحاجة */

}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: #c0c0c0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  margin-top: 20px;
  padding-top: 15px;
  font-size: 0.9rem;
  text-align: center;
}

/* ===============================
 Responsive Adjustments
=============================== */
@media (max-width: 1400px) {
  
  .main {
    margin: 20px auto; /* إعادة التوسيط للشاشات الصغيرة */
  }
  .add-1 {
    margin: 150px auto; /* إعادة التوسيط للشاشات الصغيرة */
  }
  footer {
    margin: 70px auto; /* إعادة التوسيط للشاشات الصغيرة */
  
  }

  .footer-container {
    flex-direction: column; /* ترتيب عمودي للشاشات الصغيرة */
    justify-content: center;
    align-items: center;
    height: auto;
}

  .logo-footer{
    width: 80px; /* ضبط الحجم عند الحاجة */    
    }
  .sidebar {
    display: none; /* إخفاء الشريط الجانبي */  }
}



@media (max-width: 1000px) {

  header{
    position:relative;
  }
  .main {
    margin: 20px auto; /* إعادة التوسيط للشاشات الصغيرة */
  }
  .add-1 {
    margin: 150px auto; /* إعادة التوسيط للشاشات الصغيرة */
  }
  footer {
    margin: 70px auto; /* إعادة التوسيط للشاشات الصغيرة */
  
  }

  .footer-container {
    flex-direction: column; /* ترتيب عمودي للشاشات الصغيرة */
    justify-content: center;
    align-items: center;
    height: auto;
}

  .logo-footer{
    width: 80px; /* ضبط الحجم عند الحاجة */    
    }

  .sidebar {
    display: none; /* إخفاء الشريط الجانبي */  }
}

@media (max-width: 720px) {
  body{width: 100%;}

  header{
    position:relative;
  }
  .main {
    margin: 20px auto; /* إعادة التوسيط للشاشات الصغيرة */
  }
  .add-1 {
    margin: 150px auto; /* إعادة التوسيط للشاشات الصغيرة */
  }
  footer {
    margin: 70px auto; /* إعادة التوسيط للشاشات الصغيرة */
  
  }
  .footer-container {
    flex-direction: column; /* ترتيب عمودي للشاشات الصغيرة */
    justify-content: center;
    align-items: center;
    height: auto;
}

  .logo-footer{
    width: 80px; /* ضبط الحجم عند الحاجة */    
    }

  .sidebar {
    display: none; /* إخفاء الشريط الجانبي */  }
}