/* ====== تصميم شبكة التصنيفات ====== */

/* الحاوية العامة */
.categories-list {
    display: grid;
    gap: 14px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}


/* 🔶 موبايل: 2 في كل صف */
@media (max-width: 599px) {
    .categories-list {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        padding-bottom: 6px;
    }

    .category-item {
        flex: 0 0 auto;
        scroll-snap-align: start;
        min-width: 90px; /* تحكم بعرض العنصر */
    }

    /* إخفاء شريط التمرير (اختياري) */
    .categories-list::-webkit-scrollbar {
        display: none;
    }
}

/* 🔶 تابلت: 3 في كل صف */
@media (min-width: 600px) and (max-width: 991px) {
    .categories-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 🔶 ديسكتوب: 6 في كل صف (بدون فرض عرض على العناصر) */
@media (min-width: 992px) {
    .categories-list {
        display: grid;
        gap: 14px;
        width: 560px;       /* 🔥 عرض مناسب ليتمركز في المنتصف */
        margin: 0 auto;     /* 🔥 يجعل الشبكة في الوسط */
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        justify-items: center;
    }
}

/* ====== عنصر التصنيف ====== */
.category-item {
    padding: 14px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.25s ease;
    gap: 2px;
}

/* 🚫 مهم: احذف أي width أو min-width هنا */
@media (min-width: 992px) {
    .category-item {
        width: 100%;      /* ينسجم مع الـ grid */
        max-width: 141px; /* لتثبيت الاتساق بدون تداخل */
    }
}

.category-item:hover {
    border-color: #ffe08a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    transform: translateY(-3px);
}

/* الصورة */
.category-item img {
    width: 35px;
    height: 35px;
    object-fit: cover;
    margin-bottom: 8px;
}

/* النص */
.category-item span {
    font-size: 13px;
    color: #333;
    line-height: 1.3;
}
.value-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e0e0e0;
    padding: 30px 20px;
    transition: all 0.3s ease;
}

.value-card:hover {
    transform: translateY(-4px);
    border-color: #0d6efd;
    background: #f8f8f8;
}


  .value-card .icon {
    font-size: 36px;
    margin-bottom: 15px;
  }

  .value-card h5 {
    font-weight: 700;
    margin-bottom: 10px;
  }

  .value-card p {
    color: #6c757d;
    font-size: 15px;
  }

  /* Highlight the middle card */
  .value-card.featured {
    background: linear-gradient(180deg, #f8fbff, #ffffff);
  }
  .badge {
    border: 1px;
  }
    /* تنسيق الشريط البسيط */
  .minimal-ticker {
    width: 100%;
    background-color: #f9f9f9;
    /* لون هادئ جداً */
    padding: 8px 0;
    font-family: inherit;
  }

  .ticker-link-wrapper {
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #444;
    /* لون نص مريح للعين */
    transition: color 0.3s ease;
  }

  .ticker-link-wrapper:hover {
    color: #000;
    /* يغمق اللون قليلاً عند التمرير */
  }

  #ticker-text {
    font-size: 14px;
    font-weight: 400;
  }

  /* النص التفاعلي (بدل الزر) */
  .action-text {
    font-size: 14px;
    font-weight: 700;
    /* عريض لتمييزه كفعل */
    color: #e8b136;
    /* لون الهوية الخاص بك */
    /* خط منقط بسيط أسفله */
  }

  /* تحسينات الموبايل */
  @media (max-width: 767px) {

    #ticker-text,
    .action-text {
      font-size: 12.5px;
    }
  }

  /* تأثير الانتقال السلس */
  .fade-out {
    opacity: 0;
    transform: scale(0.98);
  }

  .ticker-link-wrapper {
    transition: all 0.5s ease-in-out;
  }
  /* ⚠️ الحل يكمن في إضافة هذا الكود الجديد ⚠️ */

/* ضبط الاتجاه بناءً على لغة الصفحة */
[lang="en"] .ticker-link-wrapper {
  direction: ltr;
}

[lang="ar"] .ticker-link-wrapper {
  direction: rtl;
}

/* التنسيق الذكي للسهم بناءً على اللغة */
.action-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* إضافة سهم لليمين في اللغة الإنجليزية */
[lang="en"] .action-text::after {
    content: "→";
    display: inline-block;
    transition: transform 0.3s ease;
}

/* إضافة سهم لليسار في اللغة العربية */
[lang="ar"] .action-text::after {
    content: "←";
    display: inline-block;
    transition: transform 0.3s ease;
}

/* حركة لطيفة للسهم عند التمرير (Hover) */
.ticker-link-wrapper:hover [lang="en"] .action-text::after {
    transform: translateX(3px);
}

.ticker-link-wrapper:hover [lang="ar"] .action-text::after {
    transform: translateX(-3px);
}
