/* ========== تنسيق السيكشن الأساسي ========== */
.s-block--features {
  padding: 4rem 1rem;
  position: relative;
  overflow: hidden;
}

/* ========== العنوان الرئيسي ========== */
.features--title-outer {
  margin-bottom: 3rem;
  animation: fadeInDown 0.8s ease-out;
}

.features--title-outer h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.features--title-outer h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #e53e3e, transparent);
  border-radius: 2px;
}

/* ========== البطاقات ========== */
.s-block--features__item {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out backwards;
}

/* تأخير الأنيميشن لكل بطاقة */
.s-block--features__item:nth-child(1) {
  animation-delay: 0.1s;
}

.s-block--features__item:nth-child(2) {
  animation-delay: 0.2s;
}

.s-block--features__item:nth-child(3) {
  animation-delay: 0.3s;
}

/* تأثير الخلفية المتحركة */
.s-block--features__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.05) 0%, rgba(72, 72, 72, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.s-block--features__item::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(229, 62, 62, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.6s ease;
  z-index: 0;
}

/* Hover على البطاقة */
.s-block--features__item:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(229, 62, 62, 0.3);
  box-shadow: 0 20px 40px rgba(229, 62, 62, 0.15),
              0 0 30px rgba(229, 62, 62, 0.1);
}

.s-block--features__item:hover::before {
  opacity: 1;
}

.s-block--features__item:hover::after {
  opacity: 1;
  animation: pulse 2s ease-in-out infinite;
}

/* ========== الأيقونة ========== */
.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(229, 62, 62, 0.3);
  animation: ripple 2s ease-out infinite;
}

.feature-icon i {
  font-size: 2rem;
  transition: all 0.3s ease;
}

.s-block--features__item:hover .feature-icon {
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 10px 30px rgba(229, 62, 62, 0.4);
}

.s-block--features__item:hover .feature-icon i {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(229, 62, 62, 0.6));
}

/* ========== العنوان والوصف ========== */
.s-block--features__item h4 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.s-block--features__item:hover h4 {
  transform: translateY(-3px);
  text-shadow: 0 0 10px rgba(229, 62, 62, 0.3);
}

.s-block--features__item p {
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.s-block--features__item:hover p {
  opacity: 1;
  transform: translateY(-2px);
}

/* ========== الأنيميشنات ========== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.15;
  }
}

/* ========== تأثير الإضاءة المتحركة ========== */
.s-block--features__item {
  position: relative;
}

.s-block--features__item::after {
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    top: -50%;
    left: -50%;
  }
  25% {
    top: -50%;
    left: 0%;
  }
  50% {
    top: 0%;
    left: 0%;
  }
  75% {
    top: 0%;
    left: -50%;
  }
}

/* ========== تنسيق الجريد ========== */
.s-block--features .grid {
  gap: 2rem;
}

/* ========== الديسكتوب ========== */
@media (min-width: 1024px) {
  .s-block--features {
    padding: 5rem 2rem;
  }

  .features--title-outer h3 {
    font-size: 2.5rem;
  }

  .s-block--features__item {
    padding: 2.5rem 2rem;
  }

  .s-block--features .grid {
    gap: 2.5rem;
  }
}

/* ========== الموبايل ========== */
@media (max-width: 640px) {
  .s-block--features {
    padding: 3rem 1rem;
  }

  .features--title-outer {
    margin-bottom: 2rem;
  }

  .features--title-outer h3 {
    font-size: 1.5rem;
  }

  .s-block--features__item {
    padding: 1.75rem 1.25rem;
  }

  .feature-icon {
    width: 60px;
    height: 60px;
  }

  .feature-icon i {
    font-size: 1.75rem;
  }

  .s-block--features__item h4 {
    font-size: 1.2rem;
  }

  .s-block--features__item p {
    font-size: 0.9rem;
  }
}

/* ========== تحسين الأداء ========== */
.s-block--features__item {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ========== تأثير إضافي: شعاع ضوئي ========== */
.s-block--features__item:hover {
  position: relative;
}

.s-block--features__item:hover::before {
  background: linear-gradient(
    135deg,
    rgba(229, 62, 62, 0.1) 0%,
    transparent 50%,
    rgba(72, 72, 72, 0.15) 100%
  );
}
/* غيّر لون الروابط في وصف المنتجات والمقالات إلى اللون الأحمر */
.product-description a,
.article a {
  color: #E90000;
}

/* غيّر لون الروابط عند مرور الماوس فوقها */
.product-description a:hover,
.article a:hover {
  color: #CC0000; /* يمكنك تغيير هذا اللون إلى أي لون آخر تفضله لتأثير الـ hover */
  text-decoration: underline; /* هذا يضيف خط تحت الرابط عند مرور الماوس، يمكنك إزالته إذا لم ترغب به */
}
/* تلوين جميع الروابط داخل وصف المنتج - محدث */
.product__description a,
.product__description article a,
.product__description .article a,
div.product__description a[href] {
    color: #0052a3 !important;
    text-decoration: underline !important;
}

/* تغيير اللون عند التمرير بالماوس */
.product__description a:hover,
.product__description article a:hover,
.product__description .article a:hover {
    color: #003d7a !important;
    opacity: 0.8;
}

/* استهداف محدد للروابط في الفقرات */
.product__description p a {
    color: #0052a3 !important;
}

/* إلغاء أي لون موروث */
.product__description a[rel="noopener noreferrer"] {
    color: #0052a3 !important;
}
.ql-align-right a,
.ql-direction-rtl a,
.text-right a {
  color: #1155cc !important;
  text-decoration: underline;
}
.ql-align-right a:hover,
.ql-direction-rtl a:hover,
.text-right a:hover {
  color: #0b3d91 !important;
}
[id^="product-"] .product__description a {
  color: #ff0000 !important;
}

[id^="product-"] .product__description a:hover {
  color: #cc0000 !important;
}