/**
 * Testimonials strip — RiseVerse #02–inspired (light), RTL, scoped to home section.
 * https://riseverse.com/library/preview/testimonial-02-light-mode
 */
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) {
  background: #fff;
  font-family: var(--_nafsak---font--font-primary, "Nafsak Font", sans-serif);
  direction: rtl;
}

/* أثناء انتظار GSAP: يمنع بروز الماركي (هوامش سالبة) فوق أقسام أخرى أثناء التحميل */
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02).nafsak-t02-motion-armed {
  overflow-x: hidden;
}

/* يُضاف من JS — إخفاء كتلة المحتوى حتى يبدأ الـ tween (احتياط مع inline من GSAP) */
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02).nafsak-t02-motion-armed
  > .padding-global.padding-section-large {
  opacity: 0;
  visibility: hidden;
}

/* أخف من padding-section-large الافتراضي (8rem) — يلائم ارتفاع الشريط والبطاقات */
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .padding-global.padding-section-large {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  :is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .padding-global.padding-section-large {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_inner {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

/* Horizontal cards */
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider-wrap {
  position: relative;
  margin-left: calc(-1 * max(1.5rem, (100vw - 80rem) / 2 + 1.5rem));
  margin-right: calc(-1 * max(1.5rem, (100vw - 80rem) / 2 + 1.5rem));
  padding-bottom: 0;
}

/* فيد ناعم على الحافتين (مثل المرجع) — يطابق خلفية القسم */
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider-wrap::before,
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(2rem, 8vw, 5rem);
  z-index: 3;
  pointer-events: none;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider-wrap::before {
  left: 0;
  background: linear-gradient(
    to right,
    #fff 0%,
    rgba(255, 255, 255, 0.92) 35%,
    rgba(255, 255, 255, 0) 100%
  );
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider-wrap::after {
  right: 0;
  background: linear-gradient(
    to left,
    #fff 0%,
    rgba(255, 255, 255, 0.92) 35%,
    rgba(255, 255, 255, 0) 100%
  );
}

@media (min-width: 1280px) {
  :is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider-wrap {
    margin-left: -2rem;
    margin-right: -2rem;
  }
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem max(1.5rem, (100vw - 80rem) / 2 + 1.5rem) 0.35rem;
  scrollbar-width: thin;
}

/* ماركي: HTML يضم مساراً مكرراً (نسختان متطابقتان) + translate -50% — يعمل بدون قياس JS */
/* شريط متحرك لانهائي (.nafsak-t02_slider--marquee في الـ HTML أو بعد جلب الشهادات) */
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider.nafsak-t02_slider--marquee {
  overflow: hidden !important;
  overflow-x: hidden !important;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: auto;
  direction: ltr;
  touch-action: pan-y;
  overscroll-behavior-x: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02)
  .nafsak-t02_slider.nafsak-t02_slider--marquee::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_marquee-track {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  width: max-content;
  direction: ltr;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02)
  .nafsak-t02_slider.nafsak-t02_slider--marquee
  .nafsak-t02_marquee-track {
  will-change: transform;
  animation-name: nafsak-t02-marquee-x;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: 48s;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider.nafsak-t02_slider--marquee .nafsak-t02_card {
  direction: rtl;
}

/* النصف الثاني من المسار نسخة مطابقة للأول — -50% من عرض المسار = لوب بلا قفز */
@keyframes nafsak-t02-marquee-x {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.section_nafsak_testimonials_t02, #section_testimonials_t02)
    .nafsak-t02_slider.nafsak-t02_slider--marquee
    .nafsak-t02_marquee-track {
    animation-duration: 180s !important;
  }

  :is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider.nafsak-t02_slider--marquee {
    overflow: hidden !important;
    overflow-x: hidden !important;
    scroll-snap-type: none;
  }
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider::-webkit-scrollbar {
  height: 6px;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_slider::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_card {
  flex: 0 0 min(100%, 22rem);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 14rem;
  align-self: stretch;
}

@media (min-width: 640px) {
  :is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_card {
    flex-basis: 20rem;
  }
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_card-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_card-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: #ececec;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_avatar svg {
  width: 55%;
  height: 55%;
  display: block;
  flex-shrink: 0;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_avatar .nafsak-t02_avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  display: block;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_role {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.15rem 0 0;
  line-height: 1.35;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_stars {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  line-height: 1;
  width: max-content;
  max-width: 100%;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_stars .star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  color: #fbbf24;
  flex-shrink: 0;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_stars .star svg {
  width: 100%;
  height: 100%;
  display: block;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_stars .score {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_quote {
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #334155;
  min-height: 0;
}

/* هايلايت باستيل كبطاقة العينات (#fef3c7 ≈ amber-100) — !important يتجاوز reset Webflow لـ mark */
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_quote mark.nafsak-t02_mark,
:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_quote mark {
  background-color: #fef3c7 !important;
  background-image: none !important;
  color: #374151 !important;
  padding: 0.1em 0.34em;
  border-radius: 8px;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

:is(.section_nafsak_testimonials_t02, #section_testimonials_t02) .nafsak-t02_date {
  margin-top: 0.65rem;
  font-size: 0.75rem;
  color: #94a3b8;
}
