/* الصفحة كلها */
.homes-services {
  font-family: 'Cairo', sans-serif;
  padding: 80px 20px;
  background-color: #f8f9fa;
  direction: rtl;
}

/* عنوان القسم */
.homes-services h2.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #0d6efd;
  text-align: center;
  margin-bottom: 50px;
}

/* بطاقات الخدمة */
.service-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

.service-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.service-card .card-body {
  padding: 20px;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.service-card h5 {
  color: #0d6efd;
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.service-card p {
  color: #555;
  font-size: 1rem;
  line-height: 1.7;
}

/* تأثير الهوفر */
.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  background-color: #0dcaf0;
}

/* التدرج فوق الصورة */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  z-index: 1;
}

/* زرار المزيد */
.service-card .more-btn {
  background-color: #0dcaf0;
  color: #fff;
  padding: 8px 15px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  transition: background-color 0.3s;
}

.service-card .more-btn:hover {
  background-color: #0bb8dc;
}

/* الجريد */
.services-home .row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  direction: rtl;
}

@media (max-width: 360px) {
  .services-home .row {
    grid-template-columns: 1fr;
  }

  .service-card img {
    height: 160px;
  }

  .service-card .card-body {
    padding: 15px;
  }

  .service-card p {
    font-size: 0.9rem;
  }
}


/* الحركة */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* التأثير عند التمييز */
.highlight {
  animation: highlightFlash 5s ease-in-out;
}

@keyframes highlightFlash {
  0%   { background-color: #fdd835; }
  100% { background-color: transparent; }
}

/* استجابة الهواتف */
@media (max-width: 768px) {
  .homes-services h2.section-title {
    font-size: 2rem;
  }

  .service-card img {
    height: 180px;
  }
}

/* استجابة الشاشات الكبيرة */
@media (min-width: 992px) {
  .service-card {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ضبط الاتجاه */
body .row {
  flex-direction: row-reverse;
}

.card-text {
  direction: rtl;
}

/* الاكثر طلبا */
.badge-popular {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ffc107;
  color: #000;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* جديد */
.badge-new {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #0dcaf0; /* أزرق فاتح */
  color: #fff;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* عرض خاص */
.badge-sale {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #dc3545; /* أحمر */
  color: #fff;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
