/* Homepage testimonials (section #reviews-355, components/card-review.php, data in config/testimonials.php). */

/* ------------------------------------------------------------------ section and decorative circles (as before) */
#reviews-355 {
  position: relative;
  padding: var(--sectionPadding);
  z-index: 1;
}
#reviews-355 .cs-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  max-width: 80rem;
  width: 100%;
  gap: clamp(3rem, 6vw, 4rem);
  position: relative;
  z-index: 10;
}
#reviews-355 .cs-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}
/* One line where there is room, balanced lines where there is not. */
#reviews-355 .cs-title {
  max-width: 100%;
  text-wrap: balance;
}
#reviews-355 .cs-bubbles {
  z-index: -1;
  position: absolute;
  bottom: -3.125em;
  left: -16.25em;
  height: 26.6875em;
  width: 26.1875em;
  font-size: min(2.5vw, .7em);
}
#reviews-355 .cs-bubbles:before {
  position: absolute;
  top: 0;
  left: 0;
  content: "";
  opacity: 1;
  display: block;
  border: 1px solid #1a1a1a;
  border-radius: 50%;
  background: transparent;
  height: 20.625em;
  width: 20.625em;
  animation-name: floatAnimation;
  animation-duration: 5s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
}
#reviews-355 .cs-bubbles:after {
  z-index: -1;
  position: absolute;
  bottom: 0;
  right: 0;
  content: "";
  opacity: 0.15;
  display: block;
  border-radius: 50%;
  background: var(--primary);
  height: 16.25em;
  width: 16.25em;
  animation-name: floatAnimation2;
  animation-duration: 14s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
  transition: box-shadow 0.3s;
}
@keyframes floatAnimation {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2rem);
  }
  100% {
    transform: translateY(0);
  }
}
@keyframes floatAnimation2 {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3rem);
  }
  100% {
    transform: translateY(0);
  }
}
@media only screen and (min-width: 64rem) {
  #reviews-355 .cs-bubbles {
    font-size: min(2.5vw, 1em);
  }
}
@media only screen and (min-width: 100rem) {
  #reviews-355 .cs-bubbles {
    bottom: 1.875rem;
    right: 50%;
    margin-right: 40.625rem;
  }
}
html.dark-mode #reviews-355:after {
  border-color: #0a2030;
}
html.dark-mode #reviews-355 .cs-title, html.dark-mode #reviews-355 .cs-text {
  color: var(--bodyTextColorWhite);
}
html.dark-mode #reviews-355 .cs-bubbles:before {
  border-color: #ffffff;
  box-shadow: rgba(67, 183, 255, 0.2) 0px 0px 44px, inset rgba(67, 183, 255, 0.2) 0px 0px 30px, inset rgba(67, 183, 255, 0.2) 0px 0px 55px, inset rgba(67, 183, 255, 0.4) 0px 0px 75px, rgba(67, 183, 255, 0.4) 0px 0px 105px;
}
html.dark-mode #reviews-355 .cs-bubbles:after {
  background-color: var(--secondary);
}

/* ------------------------------------------------------------------ cards: a swipe row below 64rem, then three across */
.tm-carousel {
  width: 100%;
}
.tm-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tm-card {
  position: relative;
  display: flex;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 1rem;
  background-color: #f4f6f8;
}
.tm-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background-color: var(--secondary);
}
.tm-figure {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 2rem 1.5rem 1.5rem;
}
.tm-mark {
  display: block;
  height: 2.75rem;
  margin-left: -0.15rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.5rem;
  line-height: 1;
  color: var(--secondary);
  user-select: none;
}
.tm-quote {
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}
.tm-quote p {
  margin: 0;
  font-family: var(--bodyFont);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #34324a;
  text-wrap: pretty;
}
/* Pinned to the foot of the card with a fixed minimum height, so rules and names line up across cards of different lengths. */
.tm-by {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  box-sizing: border-box;
  min-height: 6.25rem;
  margin-top: auto;
  border-top: 1px solid #d9e0e8;
  padding-top: 1.25rem;
}
.tm-who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.tm-name {
  font-family: var(--headerFont);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--headerColor);
}
.tm-company {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--bodyTextColor);
}
.tm-source {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0a6aa8;
}
a.tm-source:focus-visible {
  outline: 2px solid #0a74b5;
  outline-offset: 2px;
}
/* Company logos in one quiet tone; the supplied files are not altered. */
.tm-logo {
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  height: auto;
  max-width: 6.5rem;
  max-height: 2.25rem;
  filter: grayscale(1) brightness(0.55);
  opacity: 0.85;
}
.tm-dots {
  display: none;
}
@media only screen and (min-width: 40rem) {
  .tm-figure {
    padding: 2.25rem 1.5rem 1.5rem;
  }
}
@media only screen and (min-width: 64rem) {
  .tm-list {
    gap: 1.5rem;
  }
  .tm-card {
    flex: 0 0 calc((100% - 3rem) / 3);
  }
  .tm-figure {
    padding: 2.5rem 2rem 1.75rem;
  }
}
@media only screen and (min-width: 80rem) {
  .tm-figure {
    padding: 2.75rem 2.5rem 2rem;
  }
  .tm-logo {
    max-width: 7.5rem;
  }
}

/* ------------------------------------------------------------------ phones and tablets: a native swipe row with position dots */
@media only screen and (max-width: 63.999rem) {
  .tm-carousel {
    width: calc(100% + 2rem);
    margin: 0 -1rem; /* the row runs to the screen edges; the section's side padding is 1rem */
  }
  .tm-list {
    position: relative;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.35rem 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1rem;
    scrollbar-width: none;
  }
  .tm-list::-webkit-scrollbar {
    display: none;
  }
  .tm-list:focus-visible {
    outline: 2px solid #0a74b5;
    outline-offset: -2px;
  }
  .tm-card {
    scroll-snap-align: start;
  }
  .tm-quote p {
    font-size: 1rem;
    line-height: 1.7;
  }
  .tm-logo {
    max-width: 5.5rem;
  }
  .tm-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    margin-top: 0.75rem;
  }
  .tm-dots[hidden],
  .tm-dot[hidden] {
    display: none;
  }
  .tm-dot {
    display: grid;
    place-items: center;
    min-width: 1.5rem;
    margin: 0;
    border: 0;
    background: none;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
  }
  .tm-dot span {
    display: block;
    border-radius: 99px;
    background-color: rgba(0, 31, 63, 0.28);
    height: 0.5rem;
    width: 0.5rem;
    transition: width 0.25s, background-color 0.25s;
  }
  .tm-dot.is-active span {
    background-color: #0a76c2;
    width: 1.5rem;
  }
  .tm-dot:focus-visible {
    outline: 2px solid #0a74b5;
    border-radius: 0.5rem;
  }
}

/* Phones: one card, with about 15% of the next showing. */
@media only screen and (max-width: 39.999rem) {
  .tm-card {
    flex: 0 0 calc((100% + 0.25rem) / 1.15);
  }
  .tm-card:only-child {
    flex-basis: 100%;
  }
}
/* Tablets: two complete cards and a sliver of the next. One or two testimonials share the full width instead. */
@media only screen and (min-width: 40rem) and (max-width: 63.999rem) {
  .tm-card {
    flex: 0 0 calc((100% - 2.5rem) / 2);
  }
  .tm-card:only-child,
  .tm-card:first-child:nth-last-child(2),
  .tm-card:first-child:nth-last-child(2) ~ .tm-card {
    flex: 1 1 0;
  }
}

/* Logos sized by eye for equal weight. Bralux is a compact wordmark in tall capitals, so it is held to a lower height than the
 * width limits above would give it. Proportions are always preserved. */
.tm-logo.tm-logo--bralux {
  max-height: 1.625rem;
}
@media only screen and (min-width: 80rem) {
  .tm-logo.tm-logo--bralux {
    max-height: 1.875rem;
  }
}

/* ------------------------------------------------------------------ dark mode */
html.dark-mode .tm-card {
  background-color: #0a1a27;
}
html.dark-mode .tm-quote p,
html.dark-mode .tm-name {
  color: var(--bodyTextColorWhite);
}
html.dark-mode .tm-company {
  color: #b4c1cf;
}
html.dark-mode .tm-source,
html.dark-mode a.tm-source:focus-visible {
  color: var(--secondary);
  outline-color: var(--secondary);
}
html.dark-mode .tm-by {
  border-top-color: #1d3547;
}
html.dark-mode .tm-logo {
  filter: brightness(0) invert(1);
  opacity: 0.7;
}
html.dark-mode .tm-list:focus-visible,
html.dark-mode .tm-dot:focus-visible {
  outline-color: var(--secondary);
}
html.dark-mode .tm-dot span {
  background-color: rgba(255, 255, 255, 0.32);
}
html.dark-mode .tm-dot.is-active span {
  background-color: var(--secondary);
}
@media (prefers-reduced-motion: reduce) {
  .tm-dot span {
    transition: none;
  }
  #reviews-355 .cs-bubbles::before,
  #reviews-355 .cs-bubbles::after {
    animation: none;
  }
}
