/* ===== Testimonials — auto-scrolling recommendation cards ===== */
.tm { background: var(--cream); overflow: hidden; padding-bottom: 110px; }
.tm-head { display: grid; grid-template-columns: 1.1fr .65fr; gap: 9vw; align-items: end; margin: 45px 0 60px; }
.tm-head p { font-size: 14px; line-height: 1.8; color: #63707b; margin: 0; }

.tm-stage {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: stretch;
  padding-left: max(6vw, calc((100vw - 1120px) / 2));
}

/* fixed label card (left) */
.tm-label {
  position: relative; z-index: 2; background: var(--navy); color: #fff; border-radius: 26px;
  padding: 28px 26px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 18px 38px rgba(7, 20, 39, .22); min-height: 100%;
}
.tm-label .tm-mark { font: 700 74px/0.7 "Playfair Display", serif; color: var(--gold); opacity: .9; height: 38px; }
.tm-label h3 { font: 500 clamp(24px, 2.2vw, 31px)/1.15 "Playfair Display", serif; letter-spacing: -.03em; margin: 18px 0 0; }
.tm-label small { display: block; margin-top: 26px; font: 11px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: #8fa3cf; }
.tm-label a {
  display: inline-block; margin-top: 12px; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--gold); padding-bottom: 4px; align-self: flex-start;
}
.tm-label a:hover { color: var(--gold); }

/* rows */
.tm-rows { display: grid; gap: 16px; min-width: 0; }
.tm-row {
  overflow: hidden; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.tm-track { display: flex; width: max-content; animation: tm-scroll var(--tm-dur, 120s) linear infinite; will-change: transform; }
.tm-row--rev .tm-track { animation-direction: reverse; }
.tm-row:hover .tm-track, .tm-row:focus-within .tm-track, .tm.is-paused .tm-track { animation-play-state: paused; }
.tm-set { display: flex; gap: 16px; padding-right: 16px; }
@keyframes tm-scroll { to { transform: translateX(-50%); } }

/* cards */
.tm-card {
  all: unset; box-sizing: border-box; cursor: pointer; flex: 0 0 auto; width: 330px; height: 318px;
  background: #fff; border: 1px solid var(--darkline); border-radius: 22px; padding: 24px 22px 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.tm-card:hover, .tm-card:focus-visible { transform: translateY(-5px); box-shadow: 0 16px 32px rgba(25, 38, 52, .13); border-color: var(--blue); }
.tm-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.tm-av {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 600 17px "DM Sans", sans-serif; color: #fff; letter-spacing: .02em;
}
.tm-name { flex: none; font: 700 16px/1.2 "DM Sans", sans-serif; color: #0e1b30; margin: 11px 0 3px; }
.tm-role { flex: none; font-size: 12px; line-height: 1.35; color: #66707b; max-width: 260px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-quote { flex: 0 0 auto; max-height: calc(1.55em * 5); font-size: 14px; line-height: 1.55; color: #1c2738; margin: 14px 0 0;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tm-quote::before { content: "\201C"; } .tm-quote::after { content: "\201D"; }
.tm-foot { flex: none; margin-top: auto; padding-top: 10px; font: 10px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: #8a939d; }
.tm-foot b { color: var(--blue); font-weight: 600; }

/* modal */
.tm-modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 22px;
  background: rgba(5, 15, 30, .62); backdrop-filter: blur(6px); }
.tm-modal.open { display: grid; }
.tm-dialog { position: relative; width: min(640px, 100%); max-height: 86vh; overflow: auto; background: var(--paper); color: var(--ink);
  border-radius: 24px; padding: 34px 34px 28px; box-shadow: 0 30px 70px rgba(0, 0, 0, .4); }
.tm-dialog header { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.tm-dialog .tm-av { width: 58px; height: 58px; font-size: 19px; }
.tm-dialog h4 { margin: 0; font: 600 20px/1.2 "Playfair Display", serif; }
.tm-dialog header p { margin: 3px 0 0; font-size: 12.5px; color: #66707b; line-height: 1.4; }
.tm-dialog .tm-body p { color: #1c2738; font-size: 15px; line-height: 1.75; margin: 0 0 14px; }
.tm-dialog .tm-meta { margin-top: 6px; font: 11px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: #8a939d; }
.tm-close { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--darkline);
  background: transparent; color: inherit; font-size: 20px; cursor: pointer; }
.tm-close:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* dark theme */
[data-theme="dark"] .tm { background: var(--dk-bg-3); }
[data-theme="dark"] .tm-head p, [data-theme="dark"] .tm-role { color: var(--dk-text-2); }
[data-theme="dark"] .tm-label { background: var(--dk-surface-2); box-shadow: 0 18px 38px rgba(0, 0, 0, .45); }
[data-theme="dark"] .tm-card { background: var(--dk-surface); border-color: var(--dk-line); }
[data-theme="dark"] .tm-card:hover, [data-theme="dark"] .tm-card:focus-visible { border-color: var(--dk-accent); box-shadow: 0 16px 32px rgba(0, 0, 0, .45); }
[data-theme="dark"] .tm-name, [data-theme="dark"] .tm-quote { color: var(--dk-text); }
[data-theme="dark"] .tm-foot b { color: var(--dk-accent); }
[data-theme="dark"] .tm-foot, [data-theme="dark"] .tm-dialog .tm-meta { color: var(--dk-text-3); }
[data-theme="dark"] .tm-dialog { background: var(--dk-surface); color: var(--dk-text); }
[data-theme="dark"] .tm-dialog header p { color: var(--dk-text-2); }
[data-theme="dark"] .tm-dialog .tm-body p { color: var(--dk-text); }
[data-theme="dark"] .tm-close { border-color: var(--dk-line-2); }

/* responsive */
@media (max-width: 800px) {
  .tm { padding-bottom: 70px; }
  .tm-head { grid-template-columns: 1fr; gap: 25px; margin: 34px 0 40px; }
  .tm-stage { grid-template-columns: 1fr; padding: 0 0 0 6vw; gap: 16px; }
  .tm-label { margin-right: 6vw; min-height: 0; flex-direction: row; align-items: center; gap: 14px; padding: 20px 22px; }
  .tm-label .tm-mark { font-size: 56px; height: 28px; }
  .tm-label h3 { margin: 0; font-size: 21px; }
  .tm-label small { display: none; }
  .tm-label a { margin: 0; white-space: nowrap; }
  .tm-label > div:last-child { display: none; }
  .tm-card { width: 282px; height: 312px; }
  .tm-dialog { padding: 28px 22px 22px; }
  .tm-foot { letter-spacing: .04em; font-size: 9.5px; }
}

/* motion-sensitive users: stop auto-scroll, allow manual swipe */
@media (prefers-reduced-motion: reduce) {
  .tm-track { animation: none; }
  .tm-row { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .tm-set[aria-hidden="true"] { display: none; }
}

/* profile photos in avatars */
.tm-av { overflow: hidden; }
.tm-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-dialog .tm-profile { display: inline-block; margin-top: 8px; color: var(--blue); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ===== Client testimonials (single large quote carousel) ===== */
.ct { background: var(--paper); padding-bottom: 110px; }
.ct-wrap { max-width: 920px; margin: 45px auto 0; text-align: center; }
.ct-wrap h2 { font: 700 clamp(34px, 4.6vw, 58px)/1.1 "DM Sans", sans-serif; letter-spacing: -.03em; margin: 0; color: var(--ink); }
.ct-wrap h2 em { font-style: normal; color: var(--blue); }
.ct-sub { color: #63707b; font-size: 16px; line-height: 1.7; margin: 18px auto 0; max-width: 520px; }
.ct-mark { font: 700 90px/1 "Playfair Display", serif; color: var(--blue); opacity: .35; margin-top: 34px; height: 56px; }
.ct-slides { display: grid; }
.ct-slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .5s, transform .5s, visibility .5s; }
.ct-slide.is-active { opacity: 1; visibility: visible; transform: none; }
.ct-slide blockquote { margin: 0; font: 500 clamp(20px, 2.6vw, 31px)/1.5 "DM Sans", sans-serif; letter-spacing: -.01em; color: var(--ink); }
.ct-slide figcaption { margin-top: 26px; font-weight: 600; font-size: 16px; color: var(--blue); }
.ct-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 38px; }
.ct-dots { display: flex; gap: 9px; }
.ct-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: #c3ccd6; cursor: pointer; transition: width .3s, background .3s; }
.ct-dot.is-active { width: 26px; border-radius: 6px; background: var(--blue); }
.ct-arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--darkline); background: transparent; color: inherit; font-size: 17px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.ct-arrow:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
[data-theme="dark"] .ct { background: var(--dk-bg-3); }
[data-theme="dark"] .ct-wrap h2, [data-theme="dark"] .ct-slide blockquote { color: var(--dk-text); }
[data-theme="dark"] .ct-sub { color: var(--dk-text-2); }
[data-theme="dark"] .ct-dot { background: var(--dk-line-2); }
[data-theme="dark"] .ct-dot.is-active, [data-theme="dark"] .ct-slide figcaption, [data-theme="dark"] .ct-mark { background-color: transparent; }
[data-theme="dark"] .ct-dot.is-active { background: var(--dk-accent); }
[data-theme="dark"] .ct-slide figcaption, [data-theme="dark"] .ct-mark, [data-theme="dark"] .ct-wrap h2 em { color: var(--dk-accent); }
@media (max-width: 800px) { .ct { padding-bottom: 70px; } .ct-wrap { margin-top: 34px; } }
@media (prefers-reduced-motion: reduce) { .ct-slide { transition: none; } }

/* LinkedIn badge on each card */
.tm-cw { position: relative; flex: 0 0 auto; }
.tm-in { position: absolute; top: 14px; right: 14px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: #0a66c2; background: rgba(10, 102, 194, .1); text-decoration: none; transition: background .2s, color .2s, transform .2s; }
.tm-in:hover, .tm-in:focus-visible { background: #0a66c2; color: #fff; transform: scale(1.1); outline: none; }
[data-theme="dark"] .tm-in { color: #8fb8ff; background: rgba(143, 184, 255, .14); }
[data-theme="dark"] .tm-in:hover, [data-theme="dark"] .tm-in:focus-visible { background: #0a66c2; color: #fff; }

/* Client testimonial person block */
.ct-slide blockquote { font-size: clamp(17px, 1.9vw, 22px); line-height: 1.65; }
.ct-person { display: flex; align-items: center; justify-content: center; gap: 16px; text-align: left; margin-top: 30px !important; flex-wrap: wrap; }
.ct-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--blue); }
.ct-meta { display: flex; flex-direction: column; gap: 3px; }
.ct-meta strong { font-size: 16px; font-weight: 700; }
.ct-meta small { font-size: 13px; font-weight: 400; color: #63707b; }
.ct-meta a { font-size: 13px; color: inherit; text-decoration: underline; text-underline-offset: 3px; width: fit-content; }
[data-theme="dark"] .ct-meta small { color: var(--dk-text-2); }
