/* ============================================================
   Customer Reviews — portable component
   Drop-in: copy this folder, link this CSS + customer-reviews.js
   All classes are prefixed `cr-` so nothing collides with the host site.
   Theme it by overriding the --cr-* variables below.
   ============================================================ */

.cr-section {
  /* --- Theme tokens (override these on .cr-section or :root) --- */
  --cr-accent: #0658b8;
  --cr-accent-2: #02a96b;
  --cr-text: #111827;
  --cr-text-muted: #4b5563;
  --cr-bg: #f8fafc;
  --cr-card-bg: #ffffff;
  --cr-border: #e2e8f0;
  --cr-radius: 20px;
  --cr-shadow: 0 4px 24px rgba(15, 40, 70, 0.07);
  --cr-shadow-hover: 0 14px 38px rgba(6, 88, 184, 0.13);
  --cr-font-heading: inherit;
  --cr-font-body: inherit;
  --cr-card-min: 340px;

  padding: 96px 0;
  background: var(--cr-bg);
  font-family: var(--cr-font-body);
  color: var(--cr-text-muted);
}

.cr-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* The component owns its box model — host sites may not ship a reset. */
.cr-section,
.cr-section *,
.cr-section *::before,
.cr-section *::after {
  box-sizing: border-box;
}

/* --- Header --- */
.cr-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.cr-eyebrow {
  display: inline-block;
  font-family: var(--cr-font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cr-accent-2);
  margin-bottom: 12px;
}

.cr-header h2 {
  font-family: var(--cr-font-heading);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.2;
  color: var(--cr-text);
  margin: 0 0 14px;
}

.cr-header p {
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0;
}

/* --- Viewport / track --- */
.cr-viewport {
  position: relative;
}

.cr-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(var(--cr-card-min), 1fr);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 28px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cr-track::-webkit-scrollbar {
  display: none;
}

@media (min-width: 900px) {
  .cr-track {
    grid-auto-columns: calc((100% - 48px) / 3);
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .cr-track {
    grid-auto-columns: calc((100% - 24px) / 2);
  }
}

@media (max-width: 639px) {
  .cr-track {
    grid-auto-columns: 100%;
    --cr-card-min: 0;
  }
}

/* --- Card --- */
.cr-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--cr-card-bg);
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius);
  padding: 32px 28px 26px;
  box-shadow: var(--cr-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cr-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cr-shadow-hover);
  border-color: transparent;
}

.cr-quote-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3.4rem;
  line-height: 0.7;
  height: 30px;
  color: var(--cr-accent);
  opacity: 0.22;
  margin-bottom: 14px;
  user-select: none;
}

.cr-quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--cr-text-muted);
  margin: 0 0 18px;
  flex: 1 0 auto;
}

.cr-quote.cr-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 0;
}

.cr-more {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0 0 18px;
  margin-top: -10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cr-accent);
  cursor: pointer;
}

.cr-more:hover {
  text-decoration: underline;
}

.cr-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--cr-border);
}

.cr-logo {
  flex: none;
  width: 60px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.cr-meta {
  min-width: 0;
}

.cr-company {
  display: block;
  font-family: var(--cr-font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cr-text);
  line-height: 1.3;
}

.cr-author {
  display: block;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--cr-text-muted);
}

/* --- Pending card (logo approved, recommendation not in yet) --- */
.cr-card-pending {
  background:
    linear-gradient(var(--cr-card-bg), var(--cr-card-bg)) padding-box,
    linear-gradient(135deg, var(--cr-accent), var(--cr-accent-2)) border-box;
  border: 1px dashed transparent;
}

.cr-card-pending:hover {
  transform: none;
  box-shadow: var(--cr-shadow);
}

.cr-badge {
  align-self: flex-start;
  padding: 5px 12px;
  margin-bottom: 18px;
  border-radius: 50px;
  font-family: var(--cr-font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--cr-accent), var(--cr-accent-2));
}

/* Decorative only — aria-hidden in the markup. */
.cr-blur {
  display: flex;
  flex-direction: column;
  gap: 11px;
  filter: blur(4px);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
  margin-bottom: 20px;
}

.cr-blur-line {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--cr-border), #cbd5e1, var(--cr-border));
}

.cr-blur-line:nth-child(1) { width: 100%; }
.cr-blur-line:nth-child(2) { width: 96%; }
.cr-blur-line:nth-child(3) { width: 88%; }
.cr-blur-line:nth-child(4) { width: 62%; }

.cr-pending-note {
  font-size: 0.92rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--cr-text-muted);
  opacity: 0.85;
  margin: 0 0 18px;
}

/* --- Controls --- */
.cr-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
}

.cr-arrow {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--cr-border);
  background: var(--cr-card-bg);
  color: var(--cr-accent);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, opacity 0.2s, transform 0.2s;
}

.cr-arrow:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--cr-accent), var(--cr-accent-2));
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

.cr-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.cr-arrow svg {
  width: 18px;
  height: 18px;
}

.cr-dots {
  display: flex;
  gap: 8px;
}

.cr-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--cr-border);
  cursor: pointer;
  transition: width 0.25s, background 0.25s;
}

.cr-dot[aria-current='true'] {
  width: 26px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--cr-accent), var(--cr-accent-2));
}

/* --- Logo wall --- */
.cr-wall {
  margin-top: 64px;
  text-align: center;
}

.cr-wall h3 {
  font-family: var(--cr-font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-text-muted);
  margin: 0 0 28px;
}

.cr-wall-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cr-wall-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 74px;
  padding: 12px;
  overflow: hidden;
  background: var(--cr-card-bg);
  border: 1px solid var(--cr-border);
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cr-wall-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--cr-shadow);
}

/* width/height + object-fit rather than max-*: a flex/grid child has an
   automatic minimum size, so max-width:100% alone lets a wide logo spill
   out of the tile. min-width:0 disables that floor. */
.cr-wall-item img {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 639px) {
  .cr-section { padding: 64px 0; }
  .cr-card { padding: 26px 22px 22px; }
  .cr-wall-item { width: 116px; height: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  .cr-track { scroll-behavior: auto; }
  .cr-card, .cr-arrow, .cr-wall-item { transition: none; }
}
