/* Testimonials carousel — standalone copy for pages that use the original
   page styles (e.g. the Calculators template) and therefore do NOT load
   home-redesign.css. The homepage and residential pages keep these exact
   rules inside home-redesign.css, so KEEP THE TWO IN SYNC when editing the
   carousel (the ".quotes" / ".quote" blocks).

   The section is wrapped in a bare .blvd-redesign element on these pages so
   the scoped selectors below match; chrome.css does not define .blvd-redesign,
   so the minimal base (font, box-sizing, .wrap) is re-declared here. Colours
   in the carousel rules are hardcoded hex, so no CSS variables are needed. */

.blvd-redesign {
  font-family: "Aeonik", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.blvd-redesign *,
.blvd-redesign *::before,
.blvd-redesign *::after {
  box-sizing: border-box;
}

.blvd-redesign .wrap {
  width: min(1400px, calc(100% - 40px));
  margin-inline: auto;
}

@media (prefers-reduced-motion: reduce) {
  .quotes__track {
    animation: none;
    transition: none;
  }
}

@keyframes blvd-star-pop {
  0% {
    opacity: 0;
    transform: scale(0.2) translateY(3px);
  }

  60% {
    opacity: 1;
    transform: scale(1.18);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== quotes ===== */
.quotes {
  background: #823d40;
  color: #efe7db;
  padding: 80px 0 100px;
}

.blvd-redesign .quotes__intro {
  /* The intro is a <header>; the old site CSS (style.css, loaded on these
     pages) makes every <header> position:sticky z-index:99999, which would
     float it over the real site header. Reset it. */
  position: static;
  z-index: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(483px, 100%);
  margin: 0 auto;
  text-align: center;
  color: #efe7db;
}

.blvd-redesign .quotes__google {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84.373px;
  height: 42px;
}

.blvd-redesign .quotes__google img,
.blvd-redesign .quotes__google-svg {
  display: block;
  width: 84.372px;
  height: 27.038px;
  max-width: none;
}

/* testimonial header stars — split from the inline Google logo, pop in one by one */
.blvd-redesign .quotes__star {
  transform-box: fill-box;
  transform-origin: center;
}

.blvd-redesign .quotes__google.is-animating .quotes__star {
  animation: blvd-star-pop 0.55s ease-out both;
}

.blvd-redesign .quotes__google.is-animating .quotes__star:nth-child(1) {
  animation-delay: 0.15s;
}

.blvd-redesign .quotes__google.is-animating .quotes__star:nth-child(2) {
  animation-delay: 0.4s;
}

.blvd-redesign .quotes__google.is-animating .quotes__star:nth-child(3) {
  animation-delay: 0.65s;
}

.blvd-redesign .quotes__google.is-animating .quotes__star:nth-child(4) {
  animation-delay: 0.9s;
}

.blvd-redesign .quotes__google.is-animating .quotes__star:nth-child(5) {
  animation-delay: 1.15s;
}

@media (prefers-reduced-motion: reduce) {
  .blvd-redesign .quotes__google.is-animating .quotes__star {
    animation: none;
  }
}

.blvd-redesign .quotes__intro h2 {
  margin: 0;
  color: #efe7db;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
  text-wrap: balance;
}

.blvd-redesign .quotes__intro p {
  max-width: 448px;
  margin: 4px 0 0;
  color: #efe7db;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

.quotes__stage {
  position: relative;
  margin-top: 80px;
}

.quotes__viewport {
  height: 426px;
  overflow: hidden;
}

.quotes__track {
  display: flex;
  align-items: center;
  gap: 160px;
  width: max-content;
  height: 426px;
  transition: transform 0.45s ease;
}

.quote {
  flex: 0 0 800px;
  width: 800px;
  min-height: 314px;
  padding: 80px 70px 50px;
  border-radius: 10px;
  background: rgba(239, 231, 219, .1);
  text-align: center;
  opacity: .5;
}

.quote.is-active {
  min-height: 426px;
  padding: 100px 70px 60px;
  opacity: 1;
}

.blvd-redesign .quote p:first-child {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 18px;
}

.blvd-redesign .quote.is-active p:first-child {
  color: #efe7db;
  font-size: 22px;
  line-height: 24px;
}

.blvd-redesign .quote .quote__name,
.blvd-redesign .quote .quote__date {
  margin: 30px 0 0;
  color: #efe7db;
  font-size: 16px;
  font-weight: 700;
  line-height: 16px;
}

.blvd-redesign .quote.is-active .quote__name,
.blvd-redesign .quote.is-active .quote__date {
  margin-top: 50px;
}

.blvd-redesign .quote .quote__stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5.326px;
  width: 120px;
  height: 24px;
  margin: 0 auto;
}

.blvd-redesign .quote .quote__stars img {
  display: block;
  width: 18.674px;
  height: 17.859px;
  max-width: none;
}

.blvd-redesign .quote .quote__stars img.is-empty {
  opacity: .28;
}

.blvd-redesign .quote .quote__avatar {
  display: block;
  width: 56px;
  height: 56px;
  margin: 30px auto 0;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(239, 231, 219, .5);
}

.blvd-redesign .quote.is-active .quote__avatar {
  width: 72px;
  height: 72px;
  margin-top: 40px;
}

/* Tighten the gap when an avatar sits directly above the name. */
.blvd-redesign .quote .quote__avatar + .quote__name {
  margin-top: 14px;
}

.blvd-redesign .quote.is-active .quote__avatar + .quote__name {
  margin-top: 18px;
}

.quotes__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.quotes__nav--prev {
  left: max(8px, calc(50% - 536px));
}

.quotes__nav--next {
  right: max(8px, calc(50% - 536px));
}

.quotes__nav::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #efe7db;
  border-right: 2px solid #efe7db;
}

.quotes__nav--prev::before {
  transform: rotate(-135deg);
  margin-left: 6px;
}

.quotes__nav--next::before {
  transform: rotate(45deg);
  margin-right: 6px;
}

/* ===== tablet / small-desktop ===== */
@media (max-width: 1100px) {
  .quotes__stage {
    --quote-w: min(680px, calc(100vw - 80px));
  }

  .quotes__viewport {
    width: var(--quote-w);
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    height: auto;
  }

  .quotes__track {
    height: auto;
    gap: 24px;
  }

  .quote,
  .quote.is-active {
    flex: 0 0 var(--quote-w);
    width: var(--quote-w);
    max-width: var(--quote-w);
    min-height: 0;
    padding: 48px 28px 36px;
    box-sizing: border-box;
  }

  .quotes__nav--prev {
    left: max(8px, calc(50% - (var(--quote-w) / 2) - 44px));
  }

  .quotes__nav--next {
    right: max(8px, calc(50% - (var(--quote-w) / 2) - 44px));
  }
}

/* ===== mobile ===== */
@media (max-width: 800px) {
  .quotes {
    padding: 48px 0 64px;
    background: #823d40;
  }

  .blvd-redesign .quotes__intro {
    width: min(340px, 100%);
    margin: 0 auto;
    text-align: center;
  }

  .blvd-redesign .quotes__google {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 36px;
    margin: 0 auto 8px;
  }

  .blvd-redesign .quotes__google img,
  .blvd-redesign .quotes__google-svg {
    width: 84px;
    height: auto;
    max-width: none;
  }

  .blvd-redesign .quotes__intro h2 {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-wrap: balance;
  }

  .blvd-redesign .quotes__intro p {
    max-width: 330px;
    margin: 0 auto;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.45;
    color: #efe7db;
  }

  .quotes__stage {
    position: relative;
    width: 100%;
    margin-top: 32px;
    --quote-w: min(340px, calc(100vw - 72px));
  }

  .quotes__viewport {
    width: var(--quote-w);
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    overflow: hidden;
    border-radius: 20px;
  }

  .quotes__track {
    display: flex;
    align-items: stretch;
    gap: 20px;
    height: auto;
    width: max-content;
  }

  .quote,
  .quote.is-active {
    flex: 0 0 var(--quote-w);
    width: var(--quote-w);
    max-width: var(--quote-w);
    min-height: auto;
    padding: 38px 24px 32px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    text-align: center;
    box-sizing: border-box;
    opacity: 1;
  }

  .blvd-redesign .quote p:first-child,
  .blvd-redesign .quote.is-active p:first-child {
    margin: 0 0 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #ffffff;
  }

  .blvd-redesign .quote .quote__name,
  .blvd-redesign .quote.is-active .quote__name {
    margin: 24px 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
  }

  .blvd-redesign .quote .quote__date,
  .blvd-redesign .quote.is-active .quote__date {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #efe7db;
    line-height: 1.2;
  }

  .blvd-redesign .quote .quote__stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    width: auto;
    height: auto;
  }

  .blvd-redesign .quote .quote__stars img {
    width: 18px;
    height: 17px;
    display: block;
  }

  .quotes__nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .quotes__nav::before {
    display: none;
  }

  .quotes__nav--prev {
    left: max(4px, calc(50% - (var(--quote-w) / 2) - 34px));
    background: url("assets/arrow-line.svg") no-repeat center;
    background-size: 26px auto;
    transform: translateY(-50%) rotate(180deg);
  }

  .quotes__nav--next {
    right: max(4px, calc(50% - (var(--quote-w) / 2) - 34px));
    background: url("assets/arrow-line.svg") no-repeat center;
    background-size: 26px auto;
    transform: translateY(-50%);
  }
}
