/* Testimonial + Video Block */
.hp-testimonial-block {
  position: relative;
  background: var(--white);
  padding: 1.5rem 0 0;
  overflow: hidden;
}

.video-container {
  position: relative;
}

.video-container.has-dot-bg::before {
  content: "";
  position: absolute;
  top: 14%;
  left: 0;
  width: 100%;
  height: 70%;
  background: url("/wp-content/themes/all/assets/svg/all-dots-orange-xl.svg") center center no-repeat;
  background-size: cover;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* 🎥 Video Container */
.hp-testimonial-video {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  z-index: 1;
  border-radius: 1rem;
  overflow: hidden;
  margin: 0 auto;
}

.hp-testimonial-video .video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.hp-testimonial-video .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 📢 Section Heading */
.hp-testimonial-heading {
  text-align: left;
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--almost-black);
  position: relative;
  z-index: 1;
}

/* Testimonial Slides */
.hp-testimonial-slider {
  position: relative;
  z-index: 1;
  padding: 0;
}

.hp-testimonial-slider .swiper {
  position: relative;
  overflow: hidden;
}

.hp-testimonial-slider .swiper-wrapper {
  display: flex;
  /* overflow: hidden; */
}

.hp-testimonial-slider .swiper-slide {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
  min-height: auto;
  height: auto;
  padding: 0;
}

/* Card Styling */
.testimonial-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: transparent;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  text-align: left;
  overflow: hidden;
  min-height: auto;
  background-color: var(--light-orange);
  border: 3px var(--mid-orange) solid;
}

/* Fixed height below the tablet JS-matching breakpoint (768px) so swiping
   between a short and a long excerpt doesn't resize the carousel and
   push the controls out of view. Paired with line-clamp below so long
   excerpts can't grow past this — a true fixed height, not a minimum.
   TODO: tune both the height and the clamp line count together against
   your longest 50-word excerpt + 2-line name, on a real phone. */
@media (max-width: 767px) {
  .testimonial-card {
    height: 524px;
  }

  .testimonial-text {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .testimonial-name {
    margin-top: 0.75rem;
  }
}

.testimonial-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 1;
  z-index: -1;
}

/* 👤 Image */
.testimonial-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px #ffffff solid;
}

/* ✍️ Text */
.testimonial-text {
  margin-bottom: 0.75rem;
}

.testimonial-name {
  font-weight: 400;
  font-size: 1.6rem;
  margin-top: auto;
  margin-bottom: 1rem;
}

.testimonial-name p {
  margin: 0;
}

/* 🔗 Read full story link */
.testimonial-read-more {
  align-self: flex-start;
  margin-top: -0.5rem;
}

.testimonial-read-more:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

/* === Testimonial Navigation Styles (matching homepage slider) === */
.testimonial-controls {
  position: static;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem auto 2rem;
  width: 100%;
  max-width: var(--content-max, 1200px);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  pointer-events: auto;
}

.testimonial-controls-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.testimonial-controls .swiper-button-prev,
.testimonial-controls .swiper-button-next {
  all: unset;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--orange); /* or var(--orange) */
  color: var(--orange); /* or var(--orange) */
  font-size: 1.5rem;
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.testimonial-controls .swiper-button-prev:hover,
.testimonial-controls .swiper-button-next:hover {
  background-color: var(--orange);
  color: var(--white);
}

.testimonial-controls .swiper-button-prev:focus-visible,
.testimonial-controls .swiper-button-next:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

.testimonial-controls .swiper-button-prev i,
.testimonial-controls .swiper-button-next i {
  font-size: 1.5rem;
  line-height: 1;
  margin: 0;
  padding: 0;
  display: inline-block;
}

.testimonial-controls .swiper-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  position: static !important;
  transform: none !important;
  text-align: center;
  z-index: auto !important;
  margin: 0;
  padding: 0;
}

.testimonial-controls .swiper-pagination-bullet {
  width: 0.75rem;
  height: 0.75rem;
  background: var(--grey);
  opacity: 0.5;
  border-radius: 50%;
  transition: opacity 0.3s ease;
}

.testimonial-controls .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--orange); /* or var(--orange) */
}

.testimonial-controls .swiper-button-next::after,
.testimonial-controls .swiper-button-prev::after {
  display: none !important;
}

.hp-testimonial-heading {
  margin: 1rem 0 2rem;
  font-size: 2rem;
  text-align: center;
}

/* Optional: adjust arrow spacing at larger sizes */
/* @media (min-width: 64em) {
  .hp-testimonial-slider .swiper-button-prev {
    left: -1.5rem;
  }

  .hp-testimonial-slider .swiper-button-next {
    right: -1.5rem;
  }
} */

/* Large DT (1440px+) */
@media (min-width: 90em) {
  .hp-testimonial-block.has-dot-bg::before {
    background: url("/wp-content/themes/all/assets/svg/all-dots-orange-xl.svg") center center no-repeat;
    background-size: contain;
  }

  .testimonial-controls {
    margin: 2rem auto 1rem;
  }

  .testimonial-controls .swiper-pagination {
    gap: 0.5rem;
  }

  .hp-testimonial-block {
    padding: 3rem 0;
  }

  .hp-testimonial-heading {
    margin: 2rem 0 3rem;
    font-size: 2.5rem;
    text-align: center;
  }

  .hp-testimonial-slider .swiper-slide,
  .testimonial-card {
    min-height: 0;
  }

  .testimonial-name {
    margin-bottom: 1.5rem;
  }
}
