/* Text-only testimonials. Each button belongs below its bordered card.
 * JavaScript measures actual overflow rather than guessing from character count.
 * Without JavaScript every quote remains complete and readable.
 */
.quote-meta {
  margin: 30px 0 15px;
}
.quote-meta p {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}
.quote-stage {
  position: relative;
  padding: 0 28px;
}
.quote-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-color: #812b3e #e8e3d7;
  scrollbar-width: thin;
  padding: 5px 4px 22px;
  align-items: flex-start;
  overscroll-behavior-x: contain;
}
.testimonial-item {
  flex: 0 0 calc((100% - 40px) / 3);
  scroll-snap-align: start;
  min-width: 0;
}
.testimonial-card {
  background: white;
  border: 1px solid #ded9c8;
  border-top: 3px solid #d4ae57;
  border-radius: 9px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.quotes-enhanced .quote-rail .testimonial-card {
  height: 470px;
}
.quote-symbol {
  font:
    700 3.8rem/1 Georgia,
    serif;
  color: #812b3e;
  height: 48px;
  flex: 0 0 48px;
}
.testimonial-card blockquote {
  font-size: 1rem;
  line-height: 1.8;
  color: #292929;
  margin: 0 0 20px;
}
.quotes-enhanced .quote-rail blockquote {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.testimonial-card footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid #e2ded3;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.testimonial-card footer strong {
  color: #111;
  font-size: 1rem;
  font-weight: 700;
}
.testimonial-card footer span {
  color: #666;
}
.read-quote {
  display: block;
  background: none;
  border: 0;
  color: #812b3e;
  padding: 12px 2px 5px;
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-align: left;
  min-height: 44px;
}
.quotes-enhanced .testimonial-item.expanded .testimonial-card {
  height: auto;
  min-height: 470px;
}
.quotes-enhanced .testimonial-item.expanded blockquote {
  overflow: visible;
  flex: none;
}
.edge-control {
  position: absolute;
  z-index: 2;
  top: 235px;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 1px solid #c8c2b4;
  color: #812b3e;
  box-shadow: 0 3px 10px #25252317;
  display: grid;
  place-items: center;
  padding: 0;
}
.edge-control span {
  font:
    400 2.5rem/1 Georgia,
    serif;
  transform: translateY(-2px);
}
.edge-control.previous {
  left: 0;
}
.edge-control.next {
  right: 0;
}
.edge-control:hover:not(:disabled) {
  background: #f4ebed;
  border-color: #812b3e;
}
.edge-control:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}
.quote-bottom {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 15px 28px 0;
}
.quote-bottom a {
  font-size: 1rem;
  color: #812b3e;
}
.quote-status {
  font-size: 0.9rem;
  margin: 0 28px;
}
.quote-status:empty {
  display: none;
}
.quote-bottom button {
  background: white;
  border: 1px solid #812b3e;
  color: #812b3e;
  border-radius: 4px;
  padding: 8px 14px;
}
.all-quotes {
  padding: 45px 0 75px;
}
.all-quotes h1 {
  font:
    700 2.6rem/1.2 Georgia,
    serif;
  margin: 30px 0 16px;
}
.all-quotes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 35px;
  align-items: start;
}
@media (max-width: 1150px) {
  .testimonial-item {
    flex-basis: calc((100% - 20px) / 2);
  }
}
@media (max-width: 640px) {
  .quote-stage {
    padding: 0 15px;
  }
  .testimonial-item {
    flex-basis: 94%;
  }
  .testimonial-card {
    padding: 23px;
  }
  .edge-control {
    width: 42px;
    height: 42px;
  }
  .quote-bottom {
    margin: 15px 15px 0;
    gap: 14px;
  }
  .quote-bottom a {
    line-height: 1.6;
  }
  .all-quotes-grid {
    grid-template-columns: 1fr;
  }
  .all-quotes h1 {
    font-size: 2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .quote-rail {
    scroll-behavior: auto;
  }
}
/* Keep natural short quotes compact; footer auto-margin supplies remaining space. */
.quotes-enhanced .quote-rail blockquote {
  flex: 0 1 auto;
}
.has-overflow blockquote {
  mask-image: linear-gradient(#000 calc(100% - 8px), transparent);
}
