/* رأس الصفحة */
header {
  background: linear-gradient(90deg, #6a6a6a, #000);
  min-height: 60px;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* الخط العام */
html, body {
  font-family: 'Cairo', sans-serif;
  font-weight: 200;
  margin: 0;
  padding: 0;
}

/* العنوان */
.site-titles {
  flex: 1;
  margin: 0;
  text-align: center;   /* الافتراضي */
  font-size: 1rem;
  font-weight: 600;
    z-index: 9000;

}

/* في الشاشات الصغيرة */
@media (max-width: 768px) {
  .site-titles {
    text-align: center;              /* يدفع النص إلى اليسار */
  }
}



/* أوزان مختلفة حسب حجم الشاشة */
@media (min-width: 992px) {
  .site-titles {
    font-size: 2rem;
    font-weight: 700; /* ثقيل */
  }
      .site-titles p {
    font-size: 1.6rem;
    font-weight: 500; /* خفيف */
        color: #ffcc00;

  }
}
@media (min-width: 481px) and (max-width: 991px) {
  .site-titles {
    font-size: 1.4rem;
    font-weight: 500; /* متوسط */
  }
    .site-titles p {
    font-size: 1.2rem;
    font-weight: 300; /* خفيف */
        color: #ffcc00;

  }
}
@media (max-width: 480px) {
  .site-titles {
    font-size: 1.2rem;
    font-weight: 300; /* خفيف */
  }
  .site-titles p {
    font-size: 0.8rem;
    font-weight: 300; /* خفيف */
    color: #ffcc00;
  }
}



.site-title {
  flex: 1;
  margin: 0;
  text-align: center;   /* الافتراضي */
  font-size: 1rem;
  font-weight: 600;
    z-index: 9000;

}

/* في الشاشات الصغيرة */
@media (max-width: 768px) {
  .site-title {
    text-align: center;              /* يدفع النص إلى اليسار */
  }
}

/* أوزان مختلفة حسب حجم الشاشة */
@media (min-width: 992px) {
  .site-title {
    font-size: 2rem;
    font-weight: 700; /* ثقيل */
  }
}
@media (min-width: 481px) and (max-width: 991px) {
  .site-title {
    font-size: 1.4rem;
    font-weight: 500; /* متوسط */
  }
}
@media (max-width: 480px) {
  .site-title {
    font-size: 1rem;
    font-weight: 300; /* خفيف */
  }
}




/* عند التفعيل */
.menu-toggle.active {
  color: #ffcc00;
}

/* أيقونة البحث *//* زر القائمة */
.search-icon,
.menu-toggle {
  font-size: 0.8rem;   /* نفس الحجم */
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 10px;
  color: #fff;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;   /* أو fixed حسب رغبتك */
  top: 5px;            /* المسافة من أعلى الصفحة */
  z-index: 9999;        /* يظهر فوق الهيدر */
}
/* أيقونة البحث *//*   */
.search-icon {
      left: 50px;          /* المسافة من يسار الصفحة */
}
/* زر القائمة */
.menu-toggle {
  left: 1px;          /* المسافة من يسار الصفحة */

}

.admin-icon {
  font-size: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 20px;
  color: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon.active i {
  color: #ffcc00;
}

/* أنيميشن دوران */
.rotate {
  animation: spin 0.4s ease;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(180deg); }
}


/* إخفاء زر القائمة في الشاشات الكبيرة */
@media (min-width: 901px) {
  .menu-toggle {
    display: none !important; /* تأكيد الإخفاء */
  }
}


@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(180deg); }
}

/* القائمة للشاشات الصغيرة */
@media (max-width: 900px) {
  .menu-toggle { display: block; }

  #mainNav {
    position: fixed;
    font-size: 1rem;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background: #ffcc00;
    padding: 20px;
    transition: left 0.3s ease-in-out;
    z-index: 2000;
  }
  #mainNav.show { left: 0; }
  #mainNav a {
    display: block;
    margin: 4px 0;
    color: #000;
    text-decoration: none;
    font-weight: bold;
  }
}


/* الشعار */
.logo {
  position: absolute;
  top: 10px;               /* يلتصق بأعلى الهيدر */
  right: 10px;             /* يلتصق باليمين */
  width: 75px;          /* الحجم الافتراضي */
  transition: width 0.4s ease;
}

/* في الشاشات الكبيرة */
@media (min-width: 992px) {
  .logo {
    top: 30px;               /* يلتصق بأعلى الهيدر */
    right: 30px;             /* يلتصق باليمين */
    width: 120px;       /* يكبر الشعار */
    transition: width 0.3s ease;
  }
  /* عندما يتم التمرير للأسفل */
.scrolled .logo {
    top: 10px;               /* يلتصق بأعلى الهيدر */
    right: 10px;             /* يلتصق باليمين */
  width: 90px;        /* الحجم المصغر */
}
}

.img-wrapper {
  position: relative;
  width: 100%;
  height: 180px;       /* ارتفاع ثابت */
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.thumbnail {
  width: 100%;
  height: 100%;       /* ارتفاع ثابت */
  object-fit: cover;   /* يقتطع الصورة لتناسب الإطار */
  border-radius: 6px;
  margin-bottom: 10px;
  display: block;
}

@media (max-width: 768px) {
  .img-wrapper {
    height: 10px;   /* ارتفاع أصغر للشاشات الصغيرة */
  }
  .thumbnail {
    height: 20px;    /* يملأ الإطار فقط */
    object-fit: cover;
  }
}