/* ============================================
   JENNY FIGMENT — Testimonial carousel
   The horizontal, torn-paper testimonial rail. Shared by the School Visits
   page (educator testimonials) and the home page (reader reviews) so the two
   read as the same component. Base .testimonial-card styling lives in
   components.css; everything here is the rail around it.
   ============================================ */

.visits-gallery__viewport {
  --visits-gallery-nav: 2.75rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.visits-gallery__nav-btn {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: var(--visits-gallery-nav);
  height: var(--visits-gallery-nav);
  padding: 0;
  border: 1px solid var(--cream);
  border-radius: 999px;
  background: rgba(254, 252, 248, 0.95);
  box-shadow: var(--shadow-sm);
  color: var(--burgundy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease,
    box-shadow 0.15s ease;
}

.visits-gallery__nav-btn:hover:not(:disabled) {
  background: #fff;
  color: var(--pink-hot);
  box-shadow: 0 2px 10px rgba(43, 22, 27, 0.1);
}

.visits-gallery__nav-btn:focus-visible {
  outline: 2px solid var(--pink-hot);
  outline-offset: 2px;
}

.visits-gallery__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.visits-gallery__nav-icon {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 600;
  margin-top: -0.08em;
}

/* School visits — horizontal testimonials */
.visits-testimonials-section .section-title {
  margin-bottom: var(--space-2);
}

.visits-testimonials__hint {
  font-size: var(--text-sm);
  color: var(--burgundy-light);
  margin: 0 0 var(--space-5);
  max-width: 40ch;
}

.visits-testimonials-section .visits-gallery__viewport {
  margin-top: var(--space-3);
}

.visits-testimonials__scroller {
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: var(--space-2) var(--space-4);
  margin-top: 0;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Centered snap: native feel on touch / trackpad */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Inset snap targets so first & last cards can sit in the middle */
  scroll-padding-inline: var(--tt-scroll-padding, 0px);
}

/* Same flex + touch behavior as visit snapshots carousel */
.visits-testimonials-section .visits-gallery__scroller {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  touch-action: pan-x pinch-zoom;
}

.visits-testimonials__marquee {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--space-5);
  width: max-content;
  box-sizing: border-box;
}

.visits-testimonials__track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--space-5);
  flex: 0 0 auto;
}

.visits-testimonials__scroller:focus-visible {
  outline: 2px solid var(--pink-hot);
  outline-offset: 4px;
}

.visits-testimonials__scroller::-webkit-scrollbar {
  display: none;
}

.visits-testimonials__scroller .testimonial-card {
  /* Same allowance as the image gallery's cards: subtract the two nav
     buttons and the gaps around the scroller, not just page padding,
     so the card doesn't get clipped by the scroller's overflow. */
  flex: 0 0 min(36rem, calc(100vw - var(--visits-gallery-nav) * 2 - var(--space-2) * 2 - 2.5rem));
  box-sizing: border-box;
  max-height: 24rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: center;
  scroll-snap-stop: normal;
}

.visits-testimonials__scroller .star-rating {
  flex-shrink: 0;
}

.visits-testimonials__scroller .testimonial-card__author,
.visits-testimonials__scroller .testimonial-card__role {
  flex-shrink: 0;
}

/* Quote + non-scrolling “more below” strip (cue sits outside overflow so it never covers text) */
.visits-testimonials__scroller .testimonial-card__quote-frame {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-4);
}

.visits-testimonials__scroller .testimonial-card__quote-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding-right: var(--space-2);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.visits-testimonials__scroller .testimonial-card__quote-scroll::-webkit-scrollbar {
  display: none;
}

.visits-testimonials__scroller .testimonial-card__quote-more-cue {
  flex-shrink: 0;
  display: none;
  text-align: center;
  padding-top: var(--space-2);
  border-top: 1px solid rgba(250, 3, 107, 0.14);
  margin-top: var(--space-1);
  font-size: var(--text-lg);
  line-height: 1;
  letter-spacing: 0.2em;
  color: var(--pink-hot);
  opacity: 0.55;
  font-family: var(--font-body);
}

.visits-testimonials__scroller .testimonial-card__quote-frame.has-more-below .testimonial-card__quote-more-cue {
  display: block;
}

.visits-testimonials__scroller .testimonial-card__quote-more-cue::before {
  content: '· · ·';
}

.visits-testimonials__scroller .testimonial-card__quote {
  margin-bottom: 0;
}

/* Press cards carry a link back to the published review; readers' cards don't.
   Sits below the role line and never shrinks away with the quote. */
.visits-testimonials__scroller .testimonial-card__link {
  flex-shrink: 0;
  align-self: flex-start;
  /* Same indent the quote, author and role carry, so the link starts on the
     card's text column rather than out in the ruled margin. */
  margin-left: var(--space-6);
  margin-top: var(--space-2);
  font-family: var(--font-kids);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  color: var(--pink-hot);
}

.visits-testimonials__scroller .testimonial-card__link:hover,
.visits-testimonials__scroller .testimonial-card__link:focus-visible {
  text-decoration: underline;
}
