/* ============================================================
   11-testimonials.css — customer testimonials + FB embed
   Module: <section id="testimonials">
   ============================================================ */

#testimonials { background: var(--c-white); }

/* ---- Desktop: 3-column grid ---- */
.tst-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}

/* ---- Mobile: touch-friendly horizontal carousel ---- */
/* scroll-snap works like a bead curtain — each card snaps cleanly into view
   as you flick sideways. No JS needed, pure CSS. */
@media (max-width: 900px) {
  .tst-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: var(--s-3);
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Bleed cards to the container edges on small screens */
    margin-inline: calc(-1 * var(--s-4));
    padding-inline: var(--s-4);
    /* Small visual indicator that there's more to scroll */
    padding-right: calc(var(--s-4) + 28px);
  }
  .tst-grid::-webkit-scrollbar { display: none; }

  .tst-card {
    /* Each card takes most of the viewport width — clear that more cards
       are hiding off to the right. */
    flex: 0 0 min(82vw, 340px);
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .tst-card {
    flex: 0 0 min(88vw, 320px);
  }
}

.tst-card {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  position: relative;
  /* Subtle lift on hover so the card feels interactive */
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .tst-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}
@media (hover: none) {
  .tst-card:active { transform: scale(0.99); }

/* Large decorative opening quote mark */
.tst-card::before {
  content: "\201C";
  position: absolute;
  top: 12px;
  left: 20px;
  font-family: var(--f-display);
  font-size: 5rem;
  line-height: 0.8;
  color: var(--c-yellow);
  opacity: 0.25;
  pointer-events: none;
  user-select: none;
}

/* ---- Stars ---- */
.tst-stars {
  display: flex;
  gap: 2px;
  font-size: 1rem;
  /* Each star is yellow with a slight shadow for crispness */
  color: var(--c-yellow);
  text-shadow: 0 1px 3px rgba(224,168,46,0.35);
  /* Give stars some breathing room from the quote-mark decoration */
  margin-top: var(--s-2);
}

/* ---- Quote text ---- */
.tst-quote {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-ink-soft);
  flex: 1;
  margin: 0;
  /* Indent slightly so text clears the decorative quote mark */
  padding-top: 4px;
}

/* ---- Author row ---- */
.tst-author {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  border-top: 1px solid var(--c-line);
  padding-top: var(--s-3);
}
.tst-avatar {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--c-blue);
  color: var(--c-yellow);
  display: grid; place-items: center;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1rem;
}
.tst-author strong {
  display: block;
  font-size: 0.95rem;
  color: var(--c-ink);
}
.tst-author span {
  font-size: 0.82rem;
  color: var(--c-muted);
}

/* ---- "Verified" indicator ---- */
/* Only shows when list-renderer.js adds data-verified="true" to the card.
   Like the little blue tick on social profiles — subtle trust signal. */
.tst-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: var(--s-1);
}
.tst-verified svg {
  width: 13px; height: 13px;
  flex-shrink: 0;
}

/* --- Facebook embed sub-module ---
   Disable by removing the .fb-block from the testimonials <section>.
*/
.fb-block {
  margin-top: var(--s-7);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  align-items: center;
}
.fb-block-copy h3 {
  margin-bottom: var(--s-2);
  font-size: 1.5rem;
}
.fb-block-copy p {
  color: var(--c-muted);
  margin-bottom: var(--s-4);
}
.fb-block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.fb-block-actions .btn-fb {
  background: #1877F2;
  color: var(--c-white);
}
.fb-block-actions .btn-fb:hover { background: #0e5dc7; }

.fb-embed {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  /* Reserve a min-height so the layout doesn't jump while iframe loads */
  min-height: 500px;
  display: flex;
  justify-content: center;
}
.fb-embed iframe {
  width: 100% !important;
  max-width: 500px;
  border: 0;
  display: block;
}
.fb-embed-fallback {
  display: none;
  padding: var(--s-5);
  text-align: center;
  color: var(--c-muted);
  font-size: 0.92rem;
}

@media (max-width: 880px) {
  .fb-block {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .fb-embed { min-height: 420px; }
}
