/**
 * WhatsApp Testimonial Carousel – Base Styles
 * Version: 1.0.0
 */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.tcw-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 1.5rem 0;
  background: #ECE5DD;
  border-radius: 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Fade-out edges */
.tcw-wrap::before,
.tcw-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(30px, 8vw, 80px);
  z-index: 2;
  pointer-events: none;
}
.tcw-wrap::before {
  left: 0;
  background: linear-gradient(to right, #ECE5DD, transparent);
}
.tcw-wrap::after {
  right: 0;
  background: linear-gradient(to left, #ECE5DD, transparent);
}

/* ── Row ──────────────────────────────────────────────────────────────────── */
.tcw-row {
  display: flex;
  gap: var(--tcw-gap, 14px);
  padding: 6px 0;
  width: max-content;
  will-change: transform;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.tcw-card {
  flex: 0 0 var(--tcw-w, 290px);
  width: var(--tcw-w, 290px);
  background: #fff;
  border-radius: 0 14px 14px 14px;
  position: relative;
  cursor: default;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tcw-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

/* Speech-bubble tail */
.tcw-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 9px 9px 0;
  border-color: transparent #fff transparent transparent;
}

/* ── Quote Block ──────────────────────────────────────────────────────────── */
.tcw-qblock {
  background: #F0FAF4;
  border-left: 4px solid #25D366;
  border-radius: 0 8px 8px 0;
  margin: 10px 10px 0 10px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tcw-qicon {
  width: 24px;
  height: 24px;
  background: #D9F5E5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tcw-qicon svg {
  width: 11px;
  height: 11px;
  fill: #25D366;
}

.tcw-qlabel {
  font-size: var(--tcw-fs-label, 11px);
  font-weight: 600;
  color: #25D366;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-family: inherit;
}

/* ── Inner Content ────────────────────────────────────────────────────────── */
.tcw-inner {
  padding: 9px 11px 11px;
}

/* ── Stars ────────────────────────────────────────────────────────────────── */
.tcw-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 7px;
}

.tcw-star {
  width: var(--tcw-fs-star, 13px);
  height: var(--tcw-fs-star, 13px);
  fill: #F5A623;
}

/* ── Quote Text ───────────────────────────────────────────────────────────── */
.tcw-text {
  font-size: var(--tcw-fs-body, 13.5px);
  line-height: 1.55;
  color: #111B21;
  font-weight: 400;
  margin: 0 0 9px;
  font-family: inherit;
  word-break: break-word;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.tcw-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid #F0F0F0;
}

.tcw-author {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

/* ── Avatar ───────────────────────────────────────────────────────────────── */
.tcw-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--tcw-fs-avatar, 10px);
  font-weight: 600;
  flex-shrink: 0;
  font-family: inherit;
}

/* ── Name ─────────────────────────────────────────────────────────────────── */
.tcw-name {
  font-size: var(--tcw-fs-name, 12.5px);
  font-weight: 600;
  color: #111B21;
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Meta (time + ticks) ──────────────────────────────────────────────────── */
.tcw-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.tcw-time {
  font-size: var(--tcw-fs-time, 10.5px);
  color: #8696A0;
  font-family: inherit;
}

.tcw-tick {
  width: 14px;
  height: 9px;
}

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .tcw-wrap {
    border-radius: 10px;
  }
}


/* ==========================================================================
   CB Logo Testimonial Grid
   ========================================================================== */

/* ── Grid container ───────────────────────────────────────────────────────── */
.cb-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* overridden by Elementor responsive */
  gap: 1px;
  background: #e5e5e5; /* gap colour = divider colour */
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
}

/* ── Cell ─────────────────────────────────────────────────────────────────── */
.cb-logo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: #ffffff;
  transition: background 0.25s ease, transform 0.25s ease;
  position: relative;

  /* Starting state for pop-in animation */
  opacity: 0;
  transform: translateY(22px) scale(0.96);
}

/* Pop-in animation trigger */
.cb-logo-cell.cb-visible {
  animation: cb-pop-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* No-animation override (editor preview / animation disabled) */
.cb-logo-cell.cb-no-anim {
  opacity: 1;
  transform: none;
  animation: none;
}

@keyframes cb-pop-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Hover – only active when grid carries .cb-hover-on ──────────────────── */
.cb-logo-grid.cb-hover-on .cb-logo-cell:hover {
  background: #f7f7f7; /* overridden by Elementor selector */
  transform: scale(1.04);
  z-index: 2;
}

.cb-logo-grid.cb-hover-on .cb-logo-cell:hover img {
  transform: scale(1.08);
}

/* ── Link wrapper inside cell ────────────────────────────────────────────── */
.cb-logo-cell a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

/* ── Logo image ───────────────────────────────────────────────────────────── */
.cb-logo-cell img {
  width: 100%;
  max-width: 120px;
  max-height: 56px;
  object-fit: contain;
  transition: transform 0.25s ease, filter 0.25s ease;
  display: block;
}
