/* ============================================================
   Home page — Customer Reviews section (fragment/customer-reviews.php)
   Heading + short description, then TWO Bootstrap 5 carousels toggled
   by breakpoint (see .d-none/.d-md-none in the PHP) so only one is
   ever visible: #crCarouselDesktop groups 3 review cards per slide
   (md and up), #crCarouselMobile shows exactly 1 per slide (below
   md). Both auto-slide on a timer and are swipeable on touch (native
   Bootstrap behavior), plus recolored arrow/dot controls for mouse
   users — all restyled into the site's pine/brass/cream palette.
   Relies on the shared theme variables (--bg, --ink, --pine, etc.)
   declared in index.php's own <style> block, with hardcoded
   fallbacks so this still renders correctly on its own.
   ============================================================ */

.cr-section { padding: 64px 0; }

.cr-heading { text-align: center; max-width: 620px; margin: 0 auto 36px; }
.cr-heading h2 {
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--pine, #17402e);
  margin-bottom: 12px;
}
.cr-heading p {
  color: var(--muted, #8a8577);
  font-size: .95rem;
  margin: 0;
}

.cr-carousel { max-width: 1140px; margin: 0 auto; padding: 0 56px; }

/* Fixed height on every card (not just height:100%) so cards never
   grow/shrink with comment length, and the carousel doesn't "wobble"
   in height when it slides between groups of different content. */
.cr-card {
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background: var(--panel, #fff);
  border: 1px solid var(--line, #e7e1d4);
  box-shadow: 0 4px 16px rgba(23, 64, 46, .06);
  padding: 32px 26px;
}

/* Mobile carousel: the card sits directly in .carousel-item (no
   .row/.col wrapper), so center it and cap its width by hand. */
#crCarouselMobile .cr-card { max-width: 420px; margin: 0 auto; }

.cr-stars { color: var(--brass, #b98a2f); font-size: 1.1rem; margin-bottom: 16px; letter-spacing: 3px; flex: 0 0 auto; }

.cr-comment {
  color: var(--ink, #22271f);
  font-size: 1.02rem;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 16px;
  /* clamp to a fixed number of lines so long comments never push the
     card taller than short ones — every card ends up the same size */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cr-name { font-weight: 700; color: var(--pine, #17402e); font-size: .92rem; flex: 0 0 auto; }

/* Controls: circular buttons instead of Bootstrap's full-height
   default click zones, always fully opaque, positioned just outside
   the card on desktop. */
.cr-carousel .carousel-control-prev,
.cr-carousel .carousel-control-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  opacity: 1;
}
.cr-carousel .carousel-control-prev { left: 0; }
.cr-carousel .carousel-control-next { right: 0; }

.cr-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--panel, #fff);
  border: 1px solid var(--line, #e7e1d4);
  color: var(--pine, #17402e);
  font-size: 1.1rem;
  transition: background .18s ease, color .18s ease;
}
.cr-carousel .carousel-control-prev:hover .cr-arrow,
.cr-carousel .carousel-control-next:hover .cr-arrow {
  background: var(--brass, #b98a2f);
  color: #fff;
}

/* Dot indicators recolored (Bootstrap defaults to white bars) */
.cr-carousel .carousel-indicators { position: static; margin: 0 0 24px; }
.cr-carousel .carousel-indicators [data-bs-target] {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--line, #e7e1d4);
  border: 0;
  opacity: 1;
}
.cr-carousel .carousel-indicators .active { background-color: var(--brass, #b98a2f); }

@media (max-width: 575.98px) {
  .cr-section { padding: 44px 0; }
  .cr-carousel { padding: 0 40px; }
  .cr-card { height: 280px; padding: 28px 20px; }
}
