.news-area {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
              url('../assets/img/blog-bg.webp') center center / cover no-repeat;
  padding: 200px 0;
  direction: rtl;
  text-align: right;
  color: #f8f9fa;
  margin-top: 0 !important;   /* ✅ يمنع أي هوامش فوق */
  padding-top: 200px;         /* ✅ موجود فعليًا، بس نعيد تأكيده */
}

.news-box {
  max-width: 1200px;
  margin: 0 auto;
}
.news-heading {
  font-size: 32px;
  font-weight: bold;
  color: #f8f9fa;
  margin-bottom: 50px;
  padding-right: 60px;
  text-align: right;
}

/* ✅ للموبايل: توسيط العنوان تلقائيًا */
@media (max-width: 767px) {
  .news-heading {
    text-align: center;
    padding-right: 0;
    font-size: 24px;
  }
}

.news-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between; /* أو center حسب الشكل المطلوب */
}

.news-inner-wrapper {
  background-color: #ffffff;
  border-top-left-radius: 100px;
  border-bottom-right-radius: 50px;
  padding: 60px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-top: 30px; /* ✅ يجعل الكتلة تنزل تحت العنوان */
  margin-bottom: 80px;
}

.post-item {
  position: relative;
  width: calc(25% - 22.5px);
  height: 340px;
  border-top-left-radius: 40px;
  border-bottom-right-radius: 40px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: 0.3s;
  background: #000;
}

.post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.post-item:hover .post-thumb {
  transform: scale(1.02);
}

.post-text {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 40px 20px 20px;
  background-color: rgba(0, 0, 0, 0.4);
  transition: background-color 0.4s ease;
  z-index: 2;
}



.post-date {
  position: absolute;
  top: -15px;
  right: 20px;
  background-color: #2d8446;
  color: white;
  padding: 6px 16px;
  font-size: 14px;
  border-top-left-radius: 16px;
  border-bottom-right-radius: 16px;
  font-weight: bold;
  z-index: 3;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.post-title {
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  line-height: 1.7;
  margin: 0 0 10px 0;
}

.post-link {
  font-size: 14px;
  color: #f0f0f0;
  text-decoration: underline;
}

/* ✅ شاشات أصغر من 1200px: 3 بطاقات في الصف */
@media (max-width: 1199px) {
  .post-item {
    width: calc(33.333% - 20px);
  }
}

/* ✅ شاشات أصغر من 768px: بطاقتين في الصف */
@media (max-width: 767px) {
  .post-item {
    width: calc(50% - 15px);
  }
}

/* ✅ شاشات أصغر من 480px: بطاقة واحدة فقط */
@media (max-width: 479px) {
  .post-item {
    width: 100%;
  }
}



.k-slider {
  margin: 60px auto;
  max-width: 1200px;
  overflow: hidden;
  border-top-left-radius: 40px;
  border-bottom-right-radius: 40px;
  position: relative;
  direction: ltr; /* ضروري لكي يعمل السحب بشكل صحيح */
}

.k-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.k-slide {
  flex-shrink: 0;
  width: 100%;
  height: 500px;
  border-top-left-radius: 40px;
  border-bottom-right-radius: 40px;
  overflow: hidden;
  position: relative;
}

.k-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.k-slide-content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 30px 20px;
  z-index: 2;
  text-align: right;
}

.k-slide-content h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

.k-slide-content .k-date {
  background-color: #2d8446;
  display: inline-block;
  padding: 6px 12px;
  border-top-left-radius: 12px;
  border-bottom-right-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
}

.k-slide-content a {
  color: #f0f0f0;
  font-size: 15px;
  text-decoration: underline;
}


/* ✅ تخصيص عرض المقالة الواحدة فقط داخل article.php */
.news-area .news-wrapper {
  display: block; /* إلغاء flex */
}

.news-area .post-item {
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  position: relative;
}

.news-area .post-thumb {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 25px;
  display: block;
}

.news-area .post-text {
  background: none;
  padding: 0;
  position: relative;
}

.news-area .post-date {
  position: static;
  display: inline-block;
  background-color: #2d8446;
  color: white;
  padding: 6px 16px;
  font-size: 14px;
  border-top-left-radius: 16px;
  border-bottom-right-radius: 16px;
  font-weight: bold;
  margin-bottom: 20px;
}

.news-area .post-title {
  font-size: 32px !important;
  font-weight: bold;
  color: #1e3d59;
  margin-bottom: 25px;
}

.news-area .post-content {
  font-size: 18px;
  line-height: 2;
  color: #333;
}

.news-area .post-link {
  display: inline-block;
  margin-top: 40px;
  color: #2d8446;
  font-weight: bold;
  text-decoration: underline;
  font-size: 15px;
}

/* ✅ Responsive tweaks */
@media (max-width: 768px) {
  .news-area .post-title {
    font-size: 24px !important;
  }

  .news-area .post-content {
    font-size: 17px;
  }
}

.related-section {
  padding: 80px 20px;
  background-color: #fdfaf4;
}

.related-heading {
  font-size: 28px;
  font-weight: bold;
  color: #1e3d59;
  margin-bottom: 40px;
  text-align: center;
}

.related-box {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.related-card {
  width: calc(25% - 22.5px);
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s;
}

.related-card:hover {
  transform: translateY(-5px);
}

.related-card a {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}

.related-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.related-info {
  padding: 20px;
}

.related-date {
  display: inline-block;
  background-color: #2d8446;
  color: #fff;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.related-title {
  font-size: 16px;
  font-weight: bold;
  color: #1e3d59;
  line-height: 1.6;
}

@media (max-width: 991px) {
  .related-card {
    width: calc(50% - 15px);
  }
}

@media (max-width: 576px) {
  .related-card {
    width: 100%;
  }
}

