/* ---------- Google reviews marquee (homepage, below Our Previous Projects) ---------- */
/* Section sits on the page white, matching Our Previous Projects above it;
   the cards carry the #F0F0F0 alt tone so they read as raised panels. */
.mot-reviews {
  background: #FFFFFF;
  padding: 72px 0 76px;
  overflow: hidden;
}

.mot-reviews__head {
  max-width: 1280px;
  margin: 0 auto 38px;
  padding: 0 16px;
  text-align: center;
}

.mot-reviews__title {
  font-family: "Gilda Display", serif;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2;
  color: #111111;
  margin: 0 0 14px;
}

.mot-reviews__summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: "Work Sans", sans-serif;
  font-size: 15px;
  color: #4C4943;
}

.mot-reviews__score {
  font-weight: 700;
  font-size: 19px;
  color: #111111;
}

.mot-reviews__summary .mot-review-stars svg { width: 17px; height: 17px; }

.mot-reviews__link {
  color: #B58E40;
  text-decoration: none;
  border-bottom: 1px solid rgba(181, 142, 64, 0.35);
}
.mot-reviews__link:hover { border-bottom-color: #B58E40; }

/* Viewport: clips the loop and softens both edges */
.mot-reviews-viewport {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

/* Offset is driven from JS (see reviews-carousel.js) so the same position can be
   advanced by autoplay or dragged by hand. Pausing is handled there too. */
.mot-reviews-track {
  display: flex;
  width: -webkit-max-content;
  width: max-content;
  will-change: transform;
}

/* Grab to scrub horizontally; vertical page scroll stays with the browser */
.mot-reviews-viewport {
  cursor: -webkit-grab;
  cursor: grab;
  touch-action: pan-y;
}

.mot-reviews.is-dragging .mot-reviews-viewport {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

/* No text selection while scrubbing */
.mot-reviews.is-dragging .mot-reviews-track {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.mot-reviews-set {
  display: flex;
  gap: 24px;
  padding-right: 24px;
}

/* Fixed height + fixed width = every card identical, however long the review */
.mot-review-card {
  flex: 0 0 360px;
  width: 360px;
  height: 384px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: #F0F0F0;
  border: 1px solid rgba(76, 73, 67, 0.09);
  border-radius: 14px;
  padding: 24px 24px 18px;
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.04);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.mot-reviews-viewport:hover .mot-review-card:hover {
  box-shadow: 0 10px 26px rgba(17, 17, 17, 0.10);
  transform: translateY(-3px);
}

.mot-review-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mot-review-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
}

.mot-review-id {
  flex: 1 1 auto;
  min-width: 0;
}

.mot-review-name {
  display: block;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  font-size: 15.5px;
  color: #111111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mot-review-meta {
  display: block;
  font-family: "Work Sans", sans-serif;
  font-size: 12.5px;
  color: #8A857C;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mot-review-g { flex: 0 0 20px; width: 20px; height: 20px; }

.mot-review-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}
.mot-review-stars svg {
  width: 16px;
  height: 16px;
  fill: #F4B400;
}

/* Body flexes; min-height:0 lets the expanded state scroll inside a fixed card */
.mot-review-body {
  flex: 1 1 auto;
  min-height: 0;
}

.mot-review-text {
  font-family: "Work Sans", sans-serif;
  font-size: 14.5px;
  line-height: 1.62;
  color: #4C4943;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mot-review-text p { margin: 0 0 0.85em; }
.mot-review-text p:last-child { margin-bottom: 0; }

.mot-review-card.is-open .mot-review-text {
  display: block;
  height: 100%;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(181, 142, 64, 0.5) transparent;
}
.mot-review-card.is-open .mot-review-text::-webkit-scrollbar { width: 5px; }
.mot-review-card.is-open .mot-review-text::-webkit-scrollbar-thumb {
  background: rgba(181, 142, 64, 0.5);
  border-radius: 3px;
}

.mot-review-foot {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(76, 73, 67, 0.16);
}
.mot-review-foot[hidden] { display: none; }

.mot-review-toggle {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: "Work Sans", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #B58E40;
}
.mot-review-toggle:hover { text-decoration: underline; }
.mot-review-toggle:focus-visible {
  outline: 2px solid #B58E40;
  outline-offset: 3px;
  border-radius: 2px;
}
.mot-review-toggle[hidden] { display: none; }

@media (max-width: 1024px) {
  .mot-reviews { padding: 56px 0 60px; }
  .mot-review-card { flex-basis: 330px; width: 330px; height: 376px; }
}

@media (max-width: 640px) {
  .mot-reviews { padding: 44px 0 48px; }
  .mot-reviews__head { margin-bottom: 28px; }
  .mot-reviews-set { gap: 16px; padding-right: 16px; }
  .mot-review-card {
    flex-basis: 284px;
    width: 284px;
    height: 392px;
    padding: 20px 20px 16px;
  }
  .mot-review-text { font-size: 14px; -webkit-line-clamp: 9; }
}

/* Autoplay is disabled in JS under reduced motion; dragging still works. */
@media (prefers-reduced-motion: reduce) {
  .mot-review-card { transition: none; }
  .mot-reviews-viewport:hover .mot-review-card:hover { transform: none; }
}

/* ---------- Grid variant: dedicated reviews page ---------- */
/* Same card, laid out so all reviews are readable at once rather than looping. */
.mot-reviews--grid { padding: 56px 0 64px; }

.mot-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: stretch;
}

.mot-reviews--grid .mot-review-card {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 340px;
}

.mot-reviews--grid .mot-review-card:hover {
  box-shadow: 0 10px 26px rgba(17, 17, 17, 0.10);
  transform: translateY(-3px);
}

/* Nothing is scrolling here, so an opened card simply grows to fit its text */
.mot-reviews--grid .mot-review-card.is-open .mot-review-body {
  flex: 0 0 auto;
  min-height: 0;
}
.mot-reviews--grid .mot-review-card.is-open .mot-review-text {
  height: auto;
  overflow: visible;
  padding-right: 0;
}

@media (max-width: 640px) {
  .mot-reviews--grid { padding: 40px 0 44px; }
  .mot-reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 20px;
  }
  .mot-reviews--grid .mot-review-card { min-height: 0; }
}


/* ---------- Location page content (Danbury, Brookfield) ---------- */
.mot-loc {
  background: #fff;
  padding: 64px 0 72px;
}
.mot-loc__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.mot-loc__lede {
  font-size: 19px;
  line-height: 1.7;
  color: #4C4943;
  max-width: 900px;
}
.mot-loc h2 {
  font-size: 32px;
  line-height: 1.25;
  color: #1a1a1a;
  margin: 56px 0 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid #BC9342;
}
.mot-loc h2:first-of-type { margin-top: 8px; }
.mot-loc h3 {
  font-size: 21px;
  line-height: 1.3;
  color: #4C4943;
  margin: 32px 0 8px;
}
.mot-loc p {
  font-size: 17px;
  line-height: 1.75;
  color: #444;
  margin: 0 0 16px;
  max-width: 900px;
}
.mot-loc ul.mot-loc__list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  max-width: 900px;
}
.mot-loc ul.mot-loc__list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  font-size: 17px;
  line-height: 1.7;
  color: #444;
}
.mot-loc ul.mot-loc__list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #BC9342;
}
.mot-loc__panel {
  background: #f5f1e8;
  border-left: 4px solid #BC9342;
  padding: 22px 26px;
  margin: 24px 0 8px;
  max-width: 900px;
}
.mot-loc__panel p:last-child { margin-bottom: 0; }
.mot-loc__faq { max-width: 900px; }
.mot-loc__faq h3 { margin-top: 28px; }
.mot-loc a { color: #B58E40; }
.mot-loc a:hover { color: #4C4943; }
.mot-loc__cta {
  background: #f5f1e8;
  border: 1px solid rgba(76, 73, 67, 0.15);
  padding: 30px 32px;
  margin-top: 28px;
  max-width: 900px;
}
.mot-loc__cta p:last-child { margin-bottom: 0; }
@media (max-width: 1024px) {
  .mot-loc { padding: 48px 0 56px; }
  .mot-loc h2 { font-size: 27px; margin-top: 44px; }
  .mot-loc h3 { font-size: 19px; }
}
@media (max-width: 768px) {
  .mot-loc h2 { font-size: 23px; }
  .mot-loc p, .mot-loc ul.mot-loc__list li { font-size: 16px; }
  .mot-loc__lede { font-size: 17px; }
}

/* location page figures */
.mot-loc__figure {
  margin: 26px 0 10px;
  max-width: 560px;
}
.mot-loc__figure--wide { max-width: 820px; }
.mot-loc__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.mot-loc__figure figcaption {
  font-size: 14px;
  line-height: 1.5;
  color: #6b675f;
  padding-top: 10px;
  border-top: 1px solid rgba(76, 73, 67, 0.15);
  margin-top: 10px;
}
