/* Customer photos and reviews from Google (scripts/customer_photos.py): the reviews area after the hero, the
   /customer-photos grid and the review dialog. The site's own colours and fonts: navy #00206a, blue #157cd9,
   Poppins headings, Roboto text. Selectors carry an element or second class where the theme styles buttons and links. */
.csm-reviews, .csm-photos, .csm-rv-dialog {
  --csm-navy: #00206a; --csm-blue: #157cd9; --csm-ink: #1a1a1a; --csm-muted: #4f5660; --csm-line: #dbe3ee; --csm-star: #f4a51c;
}
.csm-reviews { padding: 96px 0; background: #f3f6fa; color: var(--csm-ink); font-family: "Roboto", sans-serif; }
.csm-reviews-inner { box-sizing: border-box; max-width: 1180px; min-width: 0; margin: 0 auto; padding: 0 20px; }
.csm-reviews .csm-reviews-title, .csm-reviews .csm-reviews-sub {
  margin: 0; color: var(--csm-navy); font-family: "Poppins", "Roboto", sans-serif; font-weight: 500; text-transform: none; text-wrap: balance;
}
.csm-reviews .csm-reviews-title { font-size: 36px; line-height: 1.2; letter-spacing: -.01em; }
.csm-reviews .csm-reviews-sub { margin: 64px 0 24px; font-size: 24px; line-height: 1.25; letter-spacing: -.01em; }
.csm-reviews .csm-reviews-intro { max-width: 640px; margin: 12px 0 32px; color: var(--csm-muted); font-size: 17px; line-height: 1.6; text-wrap: pretty; }

/* Desktop: a grid of up to six. Phones: each row scrolls sideways inside the page width. */
.csm-rv-scroll { max-width: 100%; min-width: 0; }
.csm-rv-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.csm-review-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; margin: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--csm-line); border-radius: 10px;
}
/* The frame sits on the image itself: on the link, a portrait photo's own height overrode the ratio. */
.csm-review-card a.csm-rv-photo { display: block; flex: none; overflow: hidden; background: #e4eaf2; cursor: zoom-in; }
.csm-review-card a.csm-rv-photo img {
  display: block; width: 100%; height: auto; max-width: none; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0;
}
/* Cards in a row stretch to one height; the body takes the rest, so no bare strip sits under a short card. */
.csm-rv-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 18px 20px 20px; }
.csm-review-card .csm-rv-name, .csm-rv-dialog .csm-rv-name {
  color: var(--csm-navy); font-size: 15px; font-weight: 500; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere;
}
.csm-review-card a.csm-rv-name:hover, .csm-rv-dialog a.csm-rv-name:hover { color: var(--csm-navy); text-decoration: underline; text-underline-offset: 3px; }
.csm-rv-stars { --fill: 100%; display: block; font-size: 14px; line-height: 1; letter-spacing: .08em; }
.csm-rv-stars::before {
  content: "★★★★★"; content: "★★★★★" / "";
  background: linear-gradient(90deg, var(--csm-star) var(--fill), #cfd6df var(--fill)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.csm-rv-stars[data-rating="4"] { --fill: 80%; }
.csm-rv-stars[data-rating="3"] { --fill: 60%; }
.csm-rv-stars[data-rating="2"] { --fill: 40%; }
.csm-rv-stars[data-rating="1"] { --fill: 20%; }
.csm-rv-stars[data-rating="0"] { --fill: 0%; }
.csm-rv-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* The quote opens the full review; it keeps the look of quoted text. */
.csm-review-card button.csm-rv-quote, .csm-review-card button.csm-rv-quote:hover, .csm-review-card button.csm-rv-quote:focus {
  display: block; width: 100%; margin: 4px 0 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--csm-ink); font: inherit; font-size: 15px; font-weight: 400; line-height: 1.6; letter-spacing: normal;
  text-align: left; text-transform: none; white-space: normal; cursor: pointer;
}
.csm-rv-quote > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; text-wrap: pretty; }
.csm-rv-text .csm-rv-quote > span { -webkit-line-clamp: 5; line-clamp: 5; }
@media (hover: hover) and (pointer: fine) {
  .csm-review-card button.csm-rv-quote:hover > span { text-decoration: underline; text-decoration-color: #9fb0c6; text-underline-offset: 3px; }
}
.csm-review-card button.csm-rv-quote:focus-visible, .csm-review-card a.csm-rv-photo:focus-visible { outline: 3px solid var(--csm-blue); outline-offset: 2px; }
.csm-reviews-links { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 32px 0 0; }
.csm-reviews-links a, .csm-reviews-links a:hover {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--csm-blue); font-size: 16px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px;
}

/* /customer-photos */
.csm-photos-head p { max-width: 640px; margin: 0 0 32px; color: #4f5660; font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.csm-page .csm-photos-head h1 { font-family: "Poppins", "Roboto", sans-serif; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.csm-photos { font-family: "Roboto", sans-serif; color: var(--csm-ink); }

@media (max-width: 1024px) {
  .csm-rv-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .csm-reviews { padding: 64px 0; }
  .csm-reviews .csm-reviews-title { font-size: 28px; }
  .csm-reviews .csm-reviews-sub { margin-top: 48px; font-size: 22px; }
  .csm-rv-scroll { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .csm-rv-scroll .csm-rv-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; gap: 16px; }
  .csm-rv-scroll .csm-review-card { scroll-snap-align: start; }
  .csm-rv-grid { grid-template-columns: minmax(0, 1fr); }
}

/* The larger photo with the full review. */
.csm-rv-dialog {
  box-sizing: border-box; width: min(1000px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto;
  padding: 0; overflow: auto; overscroll-behavior: contain; border: 0; border-radius: 10px; background: #fff;
  color: var(--csm-ink); font-family: "Roboto", sans-serif;
}
.csm-rv-dialog:not([data-photo]) { width: min(640px, calc(100vw - 32px)); }
.csm-rv-dialog::backdrop { background: rgb(0 20 60 / .72); }
.csm-rv-dialog[data-photo] .csm-rv-dialog-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); }
.csm-rv-dialog-image { display: grid; place-items: center; min-width: 0; background: #0b1a33; }
.csm-rv-dialog-image img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 32px); object-fit: contain; }
.csm-rv-dialog-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 40px 28px 24px; }
.csm-rv-dialog-text { margin-top: 8px; }
.csm-rv-dialog-text p { margin: 0; font-size: 16px; line-height: 1.7; text-wrap: pretty; }
.csm-rv-dialog-text p + p { margin-top: 12px; }
.csm-rv-dialog a.csm-rv-google, .csm-rv-dialog a.csm-rv-google:hover {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--csm-blue); font-size: 15px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px;
}
.csm-rv-close { position: absolute; top: 12px; right: 12px; z-index: 1; margin: 0; }
.csm-rv-dialog .csm-rv-close button, .csm-rv-dialog .csm-rv-close button:hover, .csm-rv-dialog .csm-rv-close button:focus {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: var(--csm-navy); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 0 2px 12px rgb(0 0 0 / .25);
}
.csm-rv-dialog .csm-rv-close button:active { transform: scale(.97); }
@media (prefers-reduced-motion: no-preference) {
  .csm-rv-dialog[open] { transition: opacity 200ms cubic-bezier(.23, 1, .32, 1), transform 200ms cubic-bezier(.23, 1, .32, 1); }
  @starting-style { .csm-rv-dialog[open] { opacity: 0; transform: scale(.97); } }
}
@media (max-width: 767px) {
  .csm-rv-dialog[data-photo] .csm-rv-dialog-body { grid-template-columns: minmax(0, 1fr); }
  .csm-rv-dialog-image img { max-height: 55dvh; }
  .csm-rv-dialog-copy { padding: 22px 20px 20px; }
}
