/* ============================================================
   Clients & Previous Users — homepage Sections A + B
   (Design proposal v3, pages 3 & 4)
   ============================================================ */
.sec_clients,
.sec_client-stories {
  --cl-bg: #1b1c20;
  --cl-card: #24252b;
  --cl-line: #34363e;
  --cl-muted: #a1a3ab;
  --cl-violet: #8b7bff;
  --cl-grad: linear-gradient(90deg, var(--color, #d647ee), var(--color-2, #3636ec));
  color: #fff;
  font-family: Lato, sans-serif;
}

/* .container-4 is a centered flex column — stretch our blocks to full width */
.sec_clients .container_main > *,
.sec_client-stories .container_main > * {
  align-self: stretch;
  width: 100%;
  min-width: 0;
}
.sec_clients .container_main,
.sec_client-stories .container_main { grid-row-gap: 0; row-gap: 0; }

.cl_head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.cl_eyebrow {
  margin: 0 0 10px;
  color: var(--color, #d647ee);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cl_title {
  margin: 0;
  color: #fff;
  font-family: Sandborg, sans-serif;
  font-size: var(--dktp-heading-size, 38px);
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}
.cl_sub {
  margin: 12px 0 0;
  color: var(--cl-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- Counters ---------- */
.cl_stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.cl_stat {
  position: relative;
  padding: 22px 22px 18px;
  background: var(--cl-card);
  border: 1px solid var(--cl-line);
  border-radius: 12px;
}
.cl_stat::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 3px;
  background: var(--cl-grad);
}
.cl_stat_num {
  display: block;
  font-family: Sandborg, sans-serif;
  font-size: 34px;
  line-height: 1;
}
.cl_stat_label {
  display: block;
  margin-top: 6px;
  color: var(--cl-muted);
  font-size: 14px;
}

/* ---------- Logo strip ----------
   js/clients.js sets --logo-w / --logo-gap / --logo-duration and fills the strip. */
.cl_logos {
  position: relative;
  overflow: hidden;
  margin: 4px auto 32px;
  padding: 10px 0 14px; /* room for the hover lift + glow */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.cl_logos_track {
  --logo-w: 160px;
  --logo-gap: 20px;
  display: flex;
  gap: var(--logo-gap);
  width: max-content;
  animation: cl-marquee var(--logo-duration, 30s) linear infinite;
}
.cl_logos:hover .cl_logos_track { animation-play-state: paused; }
.cl_logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--logo-w);
  height: 64px;
  padding: 10px 16px;
  background: var(--cl-card);
  border: 1px solid var(--cl-line);
  border-radius: 12px;
  color: #fff;
  font-family: Sandborg, sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
/* Image logos: white tile so logos with white/black backgrounds sit cleanly */
.cl_logo:has(img) {
  background: linear-gradient(180deg, #fff, #f4f4f7);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.cl_logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.cl_logo:hover {
  transform: translateY(-4px);
  border-color: var(--color, #d647ee);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--color, #d647ee), 0 0 24px rgba(214, 71, 238, 0.35);
}
.cl_logo:hover img { transform: scale(1.05); }
/* Too few logos to fill the strip: show them once, centred, without scrolling */
.cl_logos.is-static { -webkit-mask-image: none; mask-image: none; }
.cl_logos.is-static .cl_logos_track { animation: none; width: auto; justify-content: center; flex-wrap: wrap; }
.cl_logos.is-static .cl_logo[aria-hidden="true"] { display: none; }
@keyframes cl-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - var(--logo-gap, 24px) / 2)); }
}

.cl_dot:focus-visible { outline: 2px solid var(--cl-violet); outline-offset: 2px; }

/* ---------- Client cards ---------- */
.cl_grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}
.cl_grid .cl_card[hidden] { display: none; }
.cl_grid_more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.cl_grid_more[hidden] { display: none; }
.cl_card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cl-card);
  border: 1px solid var(--cl-line);
  border-radius: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
}
.cl_card:hover {
  transform: translateY(-4px);
  border-color: var(--color, #d647ee);
  box-shadow: 0 14px 36px rgba(214, 71, 238, 0.18);
}
.cl_card_media {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111;
}
.cl_card_media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-sizing: border-box;
}
.cl_card_logo {
  position: absolute;
  left: 14px;
  bottom: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #2c2d34;
  border: 2px solid var(--cl-card);
  color: var(--cl-muted);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
}
.cl_card_logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
/* S3 logos: same 4:3 white frame; full logo via contain + padding */
.cl_card_media.is-profile { background: #fff; }
.cl_card_media.is-profile img {
  object-fit: contain;
  object-position: center center;
  padding: 12px;
}
.cl_card_body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px 12px 12px;
  min-height: 0;
}
/* Reserve 2 lines so long names (e.g. Imayam) don't push location/chip down */
.cl_card_name {
  margin: 0;
  min-height: calc(1.3em * 2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.cl_card_loc {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.2;
  color: #7d7f88;
  min-height: 1.2em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cl_card_since { margin: 12px 0 0; font-size: 12px; color: #7d7f88; }
.cl_card_foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}
.cl_chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139, 123, 255, 0.16);
  color: var(--cl-violet);
  font-size: 12px;
  font-weight: 600;
}
.cl_product { font-size: 12px; font-weight: 700; color: #d4d5da; }

/* ---------- Buttons ---------- */
.cl_btn_primary,
.cl_btn_secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  font: 700 14px/1.2 Lato, sans-serif;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.cl_btn_primary { background: var(--cl-grad); color: #fff; border: 0; }
.cl_btn_secondary {
  background: transparent;
  color: #fff;
  border: 1px solid var(--cl-line);
  cursor: pointer;
}
.cl_btn_secondary:hover {
  border-color: var(--color, #d647ee);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(214, 71, 238, 0.18);
}
.cl_btn_secondary:focus-visible { outline: 2px solid var(--cl-violet); outline-offset: 2px; }
.cl_btn_primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(214, 71, 238, 0.42);
}
.cl_link {
  color: var(--cl-violet);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.cl_link:hover { color: #fff; }

/* ---------- Section B: testimonials ---------- */
.cl_quotes {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 6px;
}
.cl_quotes::-webkit-scrollbar { display: none; }
.cl_quote {
  position: relative;
  flex: 0 0 calc((100% - 48px) / 3);
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 28px 24px 22px;
  overflow: hidden;
  background: var(--cl-card);
  border: 1px solid var(--cl-line);
  border-radius: 12px;
  scroll-snap-align: start;
}
.cl_quote::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--cl-grad);
}
.cl_quote_mark {
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 0.6;
  color: var(--color, #d647ee);
}
.cl_quote blockquote {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  color: #e6e7ea;
  font-size: 15px;
  line-height: 1.6;
}
.cl_quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  text-align: left;
}
.cl_avatar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2f3038;
  color: var(--cl-violet);
  font-size: 14px;
  font-weight: 700;
}
.cl_quote_role { display: block; color: #fff; font-size: 14px; font-weight: 700; }
.cl_quote_org { display: block; color: var(--cl-muted); font-size: 13px; }

.cl_dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 32px;
}
.cl_dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #4a4c55;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.cl_dot.is-active { width: 22px; background: var(--color, #d647ee); }

/* ---------- Featured case study ---------- */
.cl_case {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  width: auto !important;
  margin: 0 2px; /* line up with the testimonial cards above */
  overflow: hidden;
  background: var(--cl-card);
  border: 1px solid var(--cl-line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}
.cl_case::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1;
  background: var(--cl-grad);
}
.cl_case_media { position: relative; min-height: 420px; background: #111; }
.cl_case_media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cl_case_media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(27, 28, 32, 0) 70%, rgba(36, 37, 43, 0.55));
  pointer-events: none;
}
.cl_case_badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cl-grad);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cl_case_body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 44px;
}
.cl_case_tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cl_case_tag {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(139, 123, 255, 0.14);
  color: var(--cl-violet);
  font-size: 12px;
  font-weight: 700;
}
.cl_case_title {
  margin: 14px 0 24px;
  color: #fff;
  font-family: Sandborg, sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
}
.cl_case_cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cl_case_col {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--cl-line);
  border-left: 3px solid #6b6d76;
  border-radius: 10px;
}
.cl_case_col.is-solution { border-left-color: var(--color, #d647ee); }
.cl_case_cols h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cl_case_cols p { margin: 0; color: #c4c6cd; font-size: 14px; line-height: 1.55; }
.cl_case_results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 24px 0 0;
  background: #18191d;
  border: 1px solid var(--cl-line);
  border-radius: 12px;
}
.cl_result {
  padding: 18px 16px;
  text-align: center;
}
.cl_result + .cl_result { border-left: 1px solid var(--cl-line); }
.cl_result strong {
  display: block;
  font-family: Sandborg, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
  color: #fff;
  background: var(--cl-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cl_result span { display: block; margin-top: 6px; color: var(--cl-muted); font-size: 13px; line-height: 1.35; }
.cl_case_note { margin: 8px 0 24px; color: #6f717a; font-size: 11px; text-align: right; }
.cl_case_ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }

.cl_note {
  margin: 20px 0 0;
  color: #6f717a;
  font-size: 12px;
  text-align: center;
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
  .cl_title { font-size: var(--tab, 32px); }
  .cl_stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cl_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl_quote { flex-basis: calc((100% - 24px) / 2); }
  .cl_case { grid-template-columns: 1fr; }
  .cl_case_media { min-height: 280px; }
  .cl_case_media::after { background: linear-gradient(180deg, rgba(27, 28, 32, 0) 70%, rgba(36, 37, 43, 0.55)); }
  .cl_case_body { padding: 32px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .cl_head { margin-bottom: 28px; }
  .cl_title { font-size: var(--mobile, 25px); }
  .cl_sub { font-size: 15px; }
  .cl_stat { padding: 16px; }
  .cl_stat_num { font-size: 26px; }
  .cl_logo { height: 54px; padding: 8px 12px; font-size: 13px; }
  /* Smaller cards: shorter picture, tighter body and type */
  .cl_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cl_card { border-radius: 10px; }
  .cl_card:hover { transform: none; }
  .cl_card_media.is-profile img { padding: 8px; }
  .cl_card_body { padding: 8px 10px 10px; }
  .cl_card_name { font-size: 13px; }
  .cl_card_loc { margin-top: 4px; font-size: 10.5px; }
  .cl_card_foot { padding-top: 8px; }
  .cl_chip { padding: 3px 8px; font-size: 10.5px; }
  /* Section + container padding stacked to ~40px a side; keep only the section's */
  .sec_clients .container_main,
  .sec_client-stories .container_main { padding-left: 0; padding-right: 0; }

  /* Testimonials: one full-width card per swipe */
  .cl_quote { flex-basis: 100%; padding: 24px 20px 20px; }
  .cl_quote::before { left: 20px; right: 20px; }
  .cl_quote blockquote { font-size: 15px; line-height: 1.55; }
  .cl_quote figcaption { padding-top: 20px; }
  .cl_dots { margin: 16px 0 28px; }

  /* Case study: shorter image, stacked text, results as compact rows */
  .cl_case_media { min-height: 200px; }
  .cl_case_badge { top: 12px; left: 12px; font-size: 11px; padding: 5px 10px; }
  .cl_case_body { padding: 22px 18px 24px; }
  .cl_case_title { font-size: 20px; margin: 12px 0 18px; }
  .cl_case_cols { grid-template-columns: 1fr; gap: 10px; }
  .cl_case_results { margin-top: 18px; }
  .cl_result { padding: 14px 6px; }
  .cl_result strong { font-size: 19px; }
  .cl_result span { font-size: 12px; }
  .cl_case_note { margin-bottom: 20px; }
  .cl_case_ctas { flex-direction: column; align-items: stretch; gap: 14px; text-align: center; }
  .cl_case_ctas .cl_btn_primary { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cl_logos_track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .cl_logos_track [aria-hidden="true"] { display: none; }
  .cl_logos { -webkit-mask-image: none; mask-image: none; }
  .cl_card, .cl_dot, .cl_quotes { transition: none; scroll-behavior: auto; }
}

/* Hospitals-only: three counters */
.cl_stats.cl_stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767px) {
  .cl_stats.cl_stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl_stats.cl_stats-3 .cl_stat:last-child { grid-column: 1 / -1; }
}
