.testimonials-header {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* padding-top: 2rem; */
}

.testimonials-container h2 {
  margin-bottom: unset;
}

.testimonial-card {
  display: flex;
  justify-content: center;
  align-items: stretch;
  background-color: #ffffff;
}

.testimonial-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  gap: 2rem;
  max-width: 1200px;
  min-height: 500px;
  background-color: #ffffff;
  box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.205); /* light gray shadow */
  border-radius: 12px; /* match right side rounding */
  padding: 2rem;
  margin: 2rem;
}

.testimonial-left {
  position: relative;
  flex: 1;
  background-color: #fff;
  /* padding: 2rem; */
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  gap: 1.25rem;
  max-width: 50%;
  min-width: 486.5px;
}

.company-logo {
  /* position: absolute;
  top: 0%; */
  font-size: 1.5rem;
  font-weight: 400;
  /* letter-spacing: 0.05em; */
  color: #2c2c2c;
}

.subtext-block {
  display: -webkit-box;
  -webkit-line-clamp: 5; /* Max lines to show */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* position: absolute;
  top: 20%; */
  font-size: 1.5rem;
  color: #000000;
}

.deal-summary {
  /* position: absolute;
  top: 58%; */
  display: flex;
  /* flex-direction: column; */
  gap: 1rem;
}

.deal-summary > div {
  background-color: #eafbea;
  color: #2e7d32;
  border-color: #2e7d32;
  border-style: solid;
  border-width: 1px;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  width: fit-content;
  text-wrap: nowrap;
}

.testimonial-cta {
  /* position: absolute; */
  width: 80%;
  /* top: 85%; */
  margin-top: 1rem;
}

.read-more-btn {
  padding: 0.9rem 1.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 70%;
}

.read-more-btn:hover {
  background-color: #222;
}

/* RIGHT PANEL */
.testimonial-right {
  position: relative;
  flex: 1;
  background-color: #111;
  border-radius: 12px;
  padding: 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  max-width: 40%;
  min-width: 450px;
}

.review-text {
  font-size: 1.2rem;
  /* margin-bottom: 2rem; */
  font-weight: 600;
  color: #fff;
  max-width: 400px;
  text-align: left;

  display: -webkit-box;
  -webkit-line-clamp: 5; /* Max lines to show */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reviewer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  /* margin-top: auto; */
  /* padding-top: 2rem; */
}

.reviewer-meta {
  /* position: absolute;
  bottom: 10%;
  left: 10%; */
  display: flex;
  flex-direction: column;
  align-items: left;
  /* justify-content: center; */
  /* gap: 1rem; */
}

.reviewer-name {
  font-weight: bold;
  color: #3cd071;
  text-align: left;
  font-size: 1.2rem;
  margin-bottom: unset;
}

.reviewer-role {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: unset;
}

.reviewer-image img {
  /* position: absolute;
  bottom: 20%;
  right: 10%; */
  width: 180px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  object-position: 50% 10%;
}

.carousel {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  /* margin-top: 2rem; */
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 2;
}

.carousel-arrow.left {
  left: 1rem;
}

.carousel-arrow.right {
  right: 1rem;
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
  gap: 2rem;
}
.testimonial-card {
  flex: 0 0 100%;
  max-width: 100%;
}

.testimonial-left,
.testimonial-right {
  min-height: 400px;
}

@media (max-width: 1050px) {
  .testimonials-header {
    font-size: clamp(1rem, 3vw, 1.5rem);
  }

  .testimonial-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* width: 100%; */
    gap: 2rem;
    max-width: 90%;
    background-color: #ffffff;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.205);
    border-radius: 12px;
    padding: 1rem;
    margin: 2rem auto;
  }

  .testimonial-left {
    background-color: #fff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;

    /* ✅ Remove constraints */
    max-width: 100%;
    min-width: 0;
    flex: none;
    box-sizing: border-box;
  }

  .company-logo {
    font-size: clamp(1.2rem, 5vw, 2rem);
    text-align: center;
  }
  .company-logo,
  .deal-summary,
  .subtext-block,
  .testimonial-cta {
    position: static !important; /* override any absolute positioning */
    bottom: unset !important;
    left: unset !important;
    right: unset !important;
  }

  .subtext-block {
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Max lines to show */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    font-size: clamp(1rem, 4.5vw, 1.2rem);
    /* line-height: 1.6; */
    text-align: left;
    word-break: break-word;
    padding: 0 0.5rem;
    margin-top: 1rem;
  }

  .deal-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-top: 2rem;
  }

  .deal-summary > div {
    width: 100%;
    max-width: 280px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #e9fce8;
    border: 1px solid #449d44;
    border-radius: 6px;
    text-align: center;
    text-wrap: wrap;
  }

  .testimonial-cta {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
  }

  .read-more-btn {
    display: inline-block;
    font-size: clamp(1rem, 2vw, 2.5rem);
    padding: 0.75rem 1.5rem;
    width: auto;
    max-width: 100%;
  }

  .read-more-btn:hover {
    background-color: #222;
  }

  .testimonial-right {
    display: none;
  }
}
