.bbb-footer-grid {
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
}

/* The SVG contains its final green/gold/white colours. Never recolour it with
 * the legacy footer inversion rule. Keep !important here as a defensive override
 * for cached/older theme CSS while this client-feedback branch is reviewed. */
.bbb-site-footer .bbb-footer-brand img {
  filter: none !important;
}

/* Homepage welcome copy: keep the client-provided wording, but give it a clearer
 * hierarchy so the narrow middle column does not become one oversized headline. */
.bbb-story-copy h2 {
  font-size: clamp(1.9rem, 2.7vw, 2.55rem);
  line-height: 1.08;
  margin-bottom: .9rem;
  max-width: 13ch;
}

.bbb-story-copy .bbb-story-lead {
  color: var(--bbb-forest);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: .85rem;
  max-width: 34ch;
}

.bbb-story-copy .bbb-story-body {
  line-height: 1.65;
  margin-bottom: 1rem;
  max-width: 38ch;
}

.bbb-story-copy .bbb-story-closing {
  border-left: 3px solid var(--bbb-gold);
  color: var(--bbb-forest);
  font-weight: 600;
  line-height: 1.55;
  margin: 1.05rem 0 1.35rem;
  max-width: 38ch;
  padding-left: .85rem;
}

.bbb-story-emojis {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  font-size: 1.16em;
  letter-spacing: .06em;
  margin-left: .16em;
  white-space: nowrap;
}

/* Mid-page review carousel. Keep this visually distinct, but deliberately
 * compact: three readable cards on desktop, two on tablet and one on mobile. */
.bbb-reviews-section {
  background: var(--bbb-forest);
  border-radius: var(--bbb-radius-lg);
  box-shadow: 0 18px 45px rgb(30 69 62 / 18%);
  color: white;
  margin-bottom: clamp(3rem, 5vw, 5rem);
  margin-top: clamp(.5rem, 2vw, 1.5rem);
  overflow: hidden;
  padding: clamp(1.65rem, 3vw, 2.35rem);
}

.bbb-reviews-heading {
  align-items: end;
  display: grid;
  gap: 1rem 1.25rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-bottom: 1.25rem;
}

.bbb-reviews-section .bbb-eyebrow {
  color: var(--bbb-gold);
  margin-bottom: .45rem;
}

.bbb-reviews-section h2 {
  color: white;
  font-size: clamp(1.85rem, 3.25vw, 2.55rem);
  margin-bottom: .4rem;
}

.bbb-reviews-intro {
  color: rgb(255 255 255 / 72%);
  font-size: .92rem;
  line-height: 1.5;
  margin: 0;
  max-width: 52ch;
}

.bbb-reviews-summary {
  align-items: baseline;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto auto;
  padding: .68rem .85rem;
}

.bbb-reviews-score {
  color: white;
  font-family: var(--bbb-display);
  font-size: 1.75rem;
  line-height: 1;
}

.bbb-reviews-summary > span:not(.bbb-reviews-score) {
  color: rgb(255 255 255 / 70%);
  font-size: .75rem;
  margin-left: .18rem;
}

.bbb-reviews-summary small {
  color: var(--bbb-gold);
  font-size: .66rem;
  font-weight: 700;
  grid-column: 1 / -1;
  margin-top: .2rem;
  white-space: nowrap;
}

.bbb-reviews-controls {
  display: flex;
  gap: .5rem;
}

.bbb-reviews-controls button {
  align-items: center;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.05rem;
  height: 42px;
  justify-content: center;
  padding: 0;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
  width: 42px;
}

.bbb-reviews-controls button:hover,
.bbb-reviews-controls button:focus-visible {
  background: white;
  border-color: white;
  color: var(--bbb-forest);
  transform: translateY(-1px);
}

/* Flex is intentional here. The previous grid-auto-column approach could allow
 * all cards to shrink into one row in some browsers, leaving no overflow for
 * the arrow controls to scroll. */
.bbb-reviews-viewport {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: .1rem .1rem .45rem;
  scroll-behavior: smooth;
  scroll-padding-inline: .1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.bbb-reviews-viewport::-webkit-scrollbar {
  display: none;
}

.bbb-review-card {
  background: var(--bbb-surface);
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 16px;
  color: var(--bbb-charcoal);
  display: flex;
  flex: 0 0 calc((100% - 2rem) / 3);
  flex-direction: column;
  min-height: 225px;
  min-width: 0;
  padding: 1.15rem 1.2rem;
  scroll-snap-align: start;
}

.bbb-review-stars {
  color: var(--bbb-gold);
  font-size: .82rem;
  letter-spacing: .11em;
  margin-bottom: .7rem;
}

.bbb-review-card blockquote {
  color: var(--bbb-charcoal);
  display: -webkit-box;
  font-family: var(--bbb-display);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-height: 1.4;
  margin: 0 0 1rem;
  overflow: hidden;
}

.bbb-review-card blockquote::before {
  color: var(--bbb-gold);
  content: "“";
  font-size: 1.8rem;
  line-height: 0;
  margin-right: .1em;
  vertical-align: -.24em;
}

.bbb-review-card footer {
  align-items: end;
  border-top: 1px solid var(--bbb-border);
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .75rem;
}

.bbb-review-card footer strong {
  color: var(--bbb-forest);
  font-size: .92rem;
}

.bbb-review-card footer span {
  color: var(--bbb-muted);
  font-size: .66rem;
  line-height: 1.35;
  text-align: right;
}

.bbb-reviews-footer {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: .7rem;
}

.bbb-reviews-footer p {
  color: rgb(255 255 255 / 62%);
  font-size: .7rem;
  margin: 0;
}

.bbb-reviews-source-link {
  color: white;
  font-size: .78rem;
  font-weight: 700;
  text-decoration-color: rgb(205 180 116 / 65%);
  text-underline-offset: 4px;
}

.bbb-reviews-source-link:hover {
  color: var(--bbb-gold);
}

@media (max-width: 1020px) {
  .bbb-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bbb-reviews-heading {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bbb-reviews-controls {
    grid-column: 2;
  }

  .bbb-review-card {
    flex-basis: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 820px) {
  .bbb-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bbb-story-copy h2,
  .bbb-story-copy .bbb-story-lead,
  .bbb-story-copy .bbb-story-body,
  .bbb-story-copy .bbb-story-closing {
    max-width: 100%;
  }

  .bbb-reviews-heading {
    align-items: start;
    grid-template-columns: 1fr auto;
  }

  .bbb-reviews-summary {
    grid-column: 1;
    justify-self: start;
  }

  .bbb-reviews-controls {
    align-self: end;
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 560px) {
  .bbb-footer-grid {
    grid-template-columns: 1fr;
  }

  .bbb-footer-brand {
    text-align: center;
  }

  .bbb-footer-brand img {
    margin-inline: auto;
  }

  .bbb-reviews-section {
    border-radius: 20px;
    margin-inline: 1rem;
    padding: 1.35rem;
  }

  .bbb-reviews-heading {
    grid-template-columns: 1fr auto;
  }

  .bbb-reviews-heading > div:first-child {
    grid-column: 1 / -1;
  }

  .bbb-reviews-summary {
    grid-column: 1;
  }

  .bbb-reviews-controls {
    grid-column: 2;
    grid-row: 2;
  }

  .bbb-review-card {
    flex-basis: 88%;
    min-height: 215px;
    padding: 1.05rem;
  }

  .bbb-review-card blockquote {
    -webkit-line-clamp: 7;
  }

  .bbb-review-card footer {
    align-items: start;
    flex-direction: column;
    gap: .2rem;
  }

  .bbb-review-card footer span {
    text-align: left;
  }

  .bbb-reviews-footer {
    align-items: start;
    flex-direction: column;
    gap: .4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bbb-reviews-viewport {
    scroll-behavior: auto;
  }
}
