/* =========================================================
   DigitalShri – Testimonials (Elementor widget "DS Testimonials")
   Same design as the homepage "What Our Clients Say" section:
   - header part replicates its Elementor badge / heading / text widgets
   - marquee part is the homepage HTML widget's CSS, unchanged
   ========================================================= */

/* ---------- Section wrapper (= homepage container: 70px margin + 10px padding, 20px gap) ---------- */
.ds-tm {
  padding: 80px 10px; /* top/bottom adjustable in Elementor: Style → Spacing */
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: "Montserrat", sans-serif;
  box-sizing: border-box;
}
.ds-tm .ds-tm-badge {
  align-self: center;
  display: inline-block;
  padding: 4px 30px;
  border-radius: 25px;
  background: #EEEEEE;
  color: #1E51F1;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.ds-tm .ds-tm-title {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: var(--ds-h2-size, 40px); /* global H2 scale (40 / 34 / 28) */
  font-weight: 700;
  line-height: 1.2;
  color: #17181C;
  text-align: center;
}
.ds-tm .ds-tm-title span { color: #851CF2; }
.ds-tm .ds-tm-text {
  margin: 0 0 4px;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  color: #17181C;
  text-align: center;
}

/* ---------- Marquee (copied from the homepage HTML widget) ---------- */
.ds-testi {
  --t-primary: #851CF2;
  --t-secondary: #1E51F1;
  --t-text: #17181C;
  --t-accent: #F38218;
  --t-muted: #5E6170;
  --t-bg: #ffffff;
  --t-speed: 45s;              /* time for one full loop – higher = slower */
  font-family: "Montserrat", sans-serif;
  color: var(--t-text);
  background: var(--t-bg);
  padding: 20px 0;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.ds-testi *, .ds-testi *::before, .ds-testi *::after { box-sizing: border-box; }

/* soft background shapes */
.ds-testi::before, .ds-testi::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.ds-testi::before {
  width: 560px; height: 560px; left: -220px; top: -160px;
  background: radial-gradient(circle, rgba(133,28,242,.08), transparent 65%);
}
.ds-testi::after {
  width: 560px; height: 560px; right: -220px; bottom: -200px;
  background: radial-gradient(circle, rgba(243,130,24,.08), transparent 65%);
}

/* ---------- Marquee rows ---------- */
/* Rows sit close together; the row padding only leaves room for the hover lift + shadow */
.ds-testi .t-rows { position: relative; z-index: 1; display: grid; gap: 0; }
.ds-testi .t-row {
  overflow: hidden;
  padding: 10px 0 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ds-testi .t-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: tScroll var(--t-speed) linear infinite;
}
.ds-testi .t-row.is-reverse .t-track { animation-direction: reverse; }
.ds-testi .t-row:hover .t-track { animation-play-state: paused; }
@keyframes tScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 12px)); }
}

/* ---------- Card ---------- */
.ds-testi .t-card {
  --c: var(--t-primary);
  position: relative;
  flex: 0 0 380px;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #ECE8F4;
  box-shadow: 0 10px 30px rgba(23,24,28,.06);
  overflow: hidden;
  transition: transform .45s cubic-bezier(.22,.8,.3,1), box-shadow .45s ease, border-color .45s ease;
}
.ds-testi .t-card[data-c="blue"]   { --c: var(--t-secondary); }
.ds-testi .t-card[data-c="orange"] { --c: var(--t-accent); }
.ds-testi .t-card::before {                       /* gradient line on top */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--t-primary), var(--t-secondary), var(--t-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s ease;
}
.ds-testi .t-card:hover {
  transform: translateY(-8px);
  border-color: rgba(133,28,242,.35);
  box-shadow: 0 24px 50px rgba(133,28,242,.14);
}
.ds-testi .t-card:hover::before { transform: scaleX(1); }

.ds-testi .t-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ds-testi .t-stars { display: flex; gap: 3px; color: #FFB400; }
.ds-testi .t-stars svg { width: 17px; height: 17px; }
.ds-testi .t-qicon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(133,28,242,.08);
  color: var(--c);
  transition: background .4s ease, color .4s ease, transform .5s cubic-bezier(.34,1.56,.64,1);
}
.ds-testi .t-qicon svg { width: 20px; height: 20px; }
.ds-testi .t-card:hover .t-qicon {
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  color: #fff;
  transform: rotate(-10deg) scale(1.08);
}
.ds-testi .t-quote {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.75;
  color: #3B3D48;
  white-space: normal;
}
.ds-testi .t-person {
  margin-top: auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px dashed #E4DFEE;
}
.ds-testi .t-avatar {
  flex-shrink: 0;
  width: 50px; height: 50px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c), #B26BFF);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(133,28,242,.18);
}
.ds-testi .t-card[data-c="blue"]   .t-avatar { background: linear-gradient(135deg, #1E51F1, #7A96FF); }
.ds-testi .t-card[data-c="orange"] .t-avatar { background: linear-gradient(135deg, #F38218, #FFB36B); }
.ds-testi .t-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ds-testi .t-name {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 700;
  color: var(--t-text);
}
.ds-testi .t-role {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--t-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .ds-testi { padding: 80px 0; }
  .ds-testi .t-track { gap: 16px; }
  .ds-testi .t-card { flex-basis: 300px; padding: 22px 20px 20px; }
  .ds-testi .t-quote { font-size: 14px; }
  .ds-testi .t-row {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  }
  @keyframes tScroll { to { transform: translateX(calc(-50% - 8px)); } }
}
@media (prefers-reduced-motion: reduce) {
  .ds-testi .t-track { animation: none; }
  .ds-testi .t-row { overflow-x: auto; }
}
