/* ═══════════════════════════════════════════
   Certifications Marquee — شريط الشهادات
   assets/css/certifications.css
═══════════════════════════════════════════ */

.section-certs {
  border-top: 1px solid var(--gold-border, rgba(201,162,39,.25));
  border-bottom: 1px solid var(--gold-border, rgba(201,162,39,.25));
  overflow: hidden;
}

.cert-marquee {
  --cert-gap: 28px;
  margin-top: 44px;
  direction: ltr;               /* الحركة ثابتة بغض النظر عن RTL */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.cert-track {
  display: flex;
  width: max-content;
}

.cert-group {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  gap: var(--cert-gap);
  padding-right: var(--cert-gap);
  min-width: 100vw;
  flex-shrink: 0;
  animation: certScroll var(--cert-dur, 40s) linear infinite;
  will-change: transform;
}

.cert-marquee:hover .cert-group {
  animation-play-state: paused;
}

@keyframes certScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ─── العنصر ─── */
.cert-item {
  direction: rtl;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease;
}
.cert-item:hover { transform: translateY(-3px); }   /* lift only — بدون glow */

.cert-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  padding: 12px;
  background: #fff;             /* الشهادات عادة خلفيتها بيضاء */
  border: 1px solid var(--gold-border, rgba(201,162,39,.25));
  border-radius: 14px;
  overflow: hidden;
}

.cert-img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 340px;
  object-fit: contain;
}

.cert-cap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: 260px;
  text-align: center;
}
.cert-cap strong { font-size: 15px; font-weight: 800; line-height: 1.4; }
.cert-cap small  { font-size: 12px; color: var(--muted, #888); line-height: 1.5; direction: ltr; }

/* ─── موبايل ─── */
@media (max-width: 768px) {
  .cert-marquee { --cert-gap: 18px; margin-top: 32px; }
  .cert-frame   { height: 200px; }
  .cert-img     { max-width: 260px; }
}

/* ─── لمن المستخدم مش عايز حركة ─── */
@media (prefers-reduced-motion: reduce) {
  .cert-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .cert-group   { animation: none; padding-inline: 20px; }
  .cert-group[aria-hidden="true"] { display: none; }
}
