/* ==========================================================================
   Client Voices Slider
   القيم الافتراضية هنا، وكلها قابلة للتغيير من لوحة تحكم Elementor.
   ========================================================================== */

.cvs-widget {
  --cvs-cols: 3;
  --cvs-gap: 24px;
  --cvs-speed: 500ms;
  --cvs-card-w: calc(
    (100% - (var(--cvs-cols) - 1) * var(--cvs-gap)) / var(--cvs-cols)
  );

  --cvs-arrow-size: 44px;
  --cvs-nav-gap: 24px;
  --cvs-side-inset: 12px;

  /* Arrows position (overridden per device by Elementor: top-start default) */
  --cvs-nav-display: flex;
  --cvs-nav-position: static;
  --cvs-nav-order: -1;
  --cvs-nav-justify: flex-start;
  --cvs-nav-top: auto;
  --cvs-nav-transform: none;
  --cvs-nav-events: auto;
  --cvs-nav-inset: 0px;
  --cvs-stage-pad: 0px;
  --cvs-nav-mb: var(--cvs-nav-gap);
  --cvs-nav-mt: 0px;

  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.cvs-widget *,
.cvs-widget *::before,
.cvs-widget *::after {
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .cvs-widget {
    --cvs-cols: 2;
  }
}

@media (max-width: 767px) {
  .cvs-widget {
    --cvs-cols: 1;
  }
}

/* ---------- Stage: arrows + viewport ---------- */
.cvs-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-inline: var(--cvs-stage-pad);
}

.cvs-nav {
  display: var(--cvs-nav-display);
  position: var(--cvs-nav-position);
  top: var(--cvs-nav-top);
  left: var(--cvs-nav-inset);
  right: var(--cvs-nav-inset);
  z-index: 5;
  order: var(--cvs-nav-order);
  align-items: center;
  justify-content: var(--cvs-nav-justify);
  gap: 12px;
  margin-top: var(--cvs-nav-mt);
  margin-bottom: var(--cvs-nav-mb);
  transform: var(--cvs-nav-transform);
  pointer-events: var(--cvs-nav-events);
}

.cvs-widget .cvs-arrow {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: var(--cvs-arrow-size);
  height: var(--cvs-arrow-size);
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: #1cc8ee;
  box-shadow: none;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease;
}

.cvs-arrow > i,
.cvs-arrow > svg {
  display: block;
  width: 1em;
  height: 1em;
}

.cvs-widget .cvs-arrow:hover:not(:disabled) {
  background-color: #14a9cc;
}

.cvs-widget .cvs-arrow:disabled {
  background-color: #d8f4fb;
  color: #1cc8ee;
  cursor: default;
}

.cvs-widget .cvs-arrow:focus-visible,
.cvs-viewport:focus-visible,
.cvs-dot:focus-visible {
  outline: 2px solid #14a9cc;
  outline-offset: 3px;
}

/* ---------- Viewport / track ---------- */
.cvs-viewport {
  overflow: hidden;
  touch-action: pan-y;
  outline-offset: 4px;
}

.cvs-track {
  display: flex;
  align-items: stretch; /* كل الكروت بنفس ارتفاع أطول كارت */
  gap: var(--cvs-gap);
  width: 100%;
  transition: transform var(--cvs-speed) cubic-bezier(0.25, 0.8, 0.3, 1);
  will-change: transform;
}

.cvs-track.is-dragging {
  transition: none;
  cursor: grabbing;
}

.cvs-widget[data-drag="yes"] .cvs-viewport {
  cursor: grab;
}

/* ---------- Card ---------- */
.cvs-card {
  --cvs-align: center;

  display: flex;
  flex: 0 0 var(--cvs-card-w);
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 28px 24px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, #c9f0fb 0%, #eafaff 40%, #fff 65%);
  box-shadow: 0 8px 30px rgba(20, 30, 80, 0.06);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- Quote mark ---------- */
.cvs-quote {
  display: flex;
  justify-content: var(--cvs-align);
  color: #1cc8ee;
  font-size: 72px;
  line-height: 1;
}

.cvs-quote > i,
.cvs-quote > svg {
  display: block;
  width: 1em;
  height: 1em;
}

.cvs-quote > svg {
  fill: currentColor;
}

.cvs-quote__img {
  display: block;
  width: 80px;
  max-width: 100%;
  height: auto;
}

/* ---------- Rating ---------- */
.cvs-rating {
  display: flex;
  justify-content: var(--cvs-align);
  gap: 4px;
  direction: ltr;
}

.cvs-star {
  position: relative;
  display: inline-flex;
  font-size: 20px;
  line-height: 1;
}

.cvs-star__base {
  display: inline-flex;
  color: #e2e6ea;
}

.cvs-star__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: inline-flex;
  overflow: hidden;
  color: #ffd21f;
  white-space: nowrap;
}

.cvs-star i,
.cvs-star svg {
  display: block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* ---------- Text ---------- */
.cvs-text {
  margin: 0;
  color: #3b3f4a;
  font-size: 14px;
  line-height: 1.9;
}

/* ---------- Author ---------- */
.cvs-author {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: var(--cvs-align);
  gap: 12px;
  margin-top: auto; /* يثبّت المعلّق أسفل الكارت مهما اختلف طول النص */
}

.cvs-avatar {
  display: block;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(28, 200, 238, 0.4);
}

.cvs-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: inherit;
  object-fit: cover;
  -webkit-user-drag: none;
}

.cvs-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cvs-name {
  color: #1b2a5c;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.cvs-job {
  color: #7b8190;
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- Dots ---------- */
.cvs-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.cvs-widget .cvs-dot {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cfd8de;
  box-shadow: none;
  cursor: pointer;
  transition:
    width 0.3s ease,
    background-color 0.3s ease;
}

.cvs-widget .cvs-dot.is-active {
  width: 26px;
  background: #1cc8ee;
}

@media (prefers-reduced-motion: reduce) {
  .cvs-track,
  .cvs-widget .cvs-arrow,
  .cvs-widget .cvs-dot {
    transition-duration: 0.01ms;
  }
}
