/* Updated styles for Success Stories & Testimonials Section based on detailed Figma specifications */
.testimonials {
  width: 100%;
  max-width: 100vw;
  background: #fff;
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  box-sizing: border-box;
}
.testimonials__title {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 600;
  font-size: 60px; /* Figma: 60px */
  color: #274472; /* Figma color */
  line-height: 77px; /* Figma height */
  text-align: center;
  margin: 0 auto 8px auto;
  max-width: 992px; /* Figma width */
  display: block;
}
.testimonials__subtitle {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 400;
  font-size: 25px; /* Figma: 25px */
  color: #333333; /* Figma color */
  line-height: 38px; /* Figma height */
  text-align: center;
  margin: 0px auto 142px auto;
  max-width: 1099px; /* Figma width */
  display: block;
}
.testimonials__grid {
  display: flex;
  flex-direction: row;
  gap: 40px; /* Increased gap to prevent overlapping */
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  margin-top: 100px; /* Add top margin to account for half-outside icons */
  box-sizing: border-box;
}
.testimonial__card {
  width: 100%;
  max-width: 380px; /* Reduced from 411px */
  min-height: 450px; /* Changed from fixed height */
  background: rgba(255,255,255,0.78); /* #FFFFFFC7 */
  border-radius: 5px;
  box-shadow: 0px 0px 20px 5px #00000040; /* Figma */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 95px; /* create room for half of icon (roughly 171/2 = 85) + spacing */
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 24px;
  position: relative;
  overflow: visible; /* Keep visible for icons */
  box-sizing: border-box;
}
.testimonial__icon-box {
  width: 184px; /* Figma */
  height: 171px; /* Figma */
  display: flex;
  align-items: center;
  justify-content: center;
  /* background: #ffffff; */
  border-radius: 6px;
  /* place half outside: negative translate up by half the icon height */
  position: absolute;
  top: -85px; /* approx half of 171 */
  left: 50%;
  transform: translateX(-50%);
  /* box-shadow: 0 0 20px 0 rgba(0,0,0,0.25);  */
  z-index: 2;
}
.testimonial__icon {
  width: 184px;
  height: 171px;
  object-fit: contain;
  display: block;
}

/* Header styles below the icon */
.testimonial__header {
  width: 100%;
  text-align: center;
  margin-top: 12px;
}
/* underline under the header (centred, 126px x 2px) */
.testimonial__header::after {
  content: "";
  display: block;
  width: 126px;
  margin: 16px auto 16px auto; /* increased spacing before and after the blue line */
  border-bottom: 2px solid #274472; /* use a border as requested */
  border-radius: 1px;
}
.testimonial__name {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 600;
  font-size: 30px; /* Figma */
  line-height: 36px;
  text-align: center;
  color: #274472;
  margin: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.testimonial__role {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 400;
  font-size: 25px; /* reduced slightly to keep line height */
  line-height: 22px;
  text-align: center;
  color: #333333;
  margin-top: 6px;
  display: block;
  width: 100%;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Quote image styles - positioned within description text */
.testimonial__quote {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: inline-block;
  vertical-align: top;
}

/* .testimonial__quote--open {
  margin-right: 12px;
  margin-bottom: 6px;
} */

/* .testimonial__quote--close {
  margin-left: 12px;
  margin-top: 6px;
} */

/* Remove the CSS-based quotes since we're using images */
.testimonial__desc::before,
.testimonial__desc::after {
  display: none;
}

/* Description area without quote marks using pseudo elements */
.testimonial__desc {
  font-family: 'Poppins', Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 26px; /* readable */
  text-align: center;
  color: #333333;
  width: 100%; /* Changed from fixed 361px to responsive */
  max-width: 100%; /* Ensure it doesn't exceed container */
  min-height: auto; /* Changed from 269px to auto for better responsiveness */
  margin: 6px auto 0 auto;
  position: relative;
  background: transparent;
  box-sizing: border-box;
  padding: 10px 0; /* Removed horizontal padding to prevent overflow */
  word-wrap: break-word; /* Ensure long words break properly */
  overflow-wrap: break-word; /* Additional text wrapping support */
}

/* Remove image-based quote selectors */
.testimonial__desc[data-quote-images="true"]::before,
.testimonial__desc[data-quote-images="true"]::after { display: none; }

/* Ensure title/subtitle stack */
.testimonial__name { display:block; }
.testimonial__role { display:block; }

/* Keep icon overlap */
.testimonial__icon-box { top: -85px; }

/* Responsive tweaks so the layout doesn't break on smaller screens */

/* Fix cutting issues between 1300px-1200px */
@media (max-width: 1300px) {
  .testimonials__grid {
    max-width: 100%;
    gap: 30px;
    padding: 0 30px;
  }
  .testimonial__card {
    max-width: 350px;
  }
}

@media (max-width: 1200px) {
  .testimonials__grid { 
    flex-direction: column; 
    gap: 60px; /* Increased gap to prevent overlapping */ 
    align-items: center;
    margin-top: 80px;
  }
  .testimonial__card { 
    width: 90vw; 
    max-width: 420px; 
    min-height: auto; /* Allow auto height */
    padding-top: 70px; 
  }
  .testimonial__icon-box { 
    top: -60px; 
    width: 140px; 
    height: 130px; 
  }
  .testimonial__icon { 
    width: 140px; 
    height: 130px; 
  }
  .testimonials__title { 
    font-size: clamp(28px, 5vw, 36px); /* Responsive font size */
    line-height: 1.2; 
    max-width: 90vw; 
  }
  .testimonials__subtitle { 
    font-size: clamp(14px, 3vw, 16px); /* Responsive font size */
    line-height: 1.4; 
    max-width: 95vw; 
  }
  .testimonial__quote { 
    width: 25px; 
    height: 25px; 
  }
}
@media (max-width: 700px) {
  .testimonials__grid {
    gap: 50px; /* Increased gap for mobile */
    margin-top: 70px;
    padding: 0 20px;
  }
  .testimonials__title {
    font-size: clamp(32px, 6vw, 40px); /* Larger title for mobile */
    line-height: 1.2;
    margin-bottom: 12px;
  }
  .testimonials__subtitle {
    font-size: clamp(16px, 4vw, 20px); /* Larger subtitle for mobile */
    line-height: 1.4;
    margin-bottom: 40px;
  }
  .testimonial__icon-box {
    width: 100px; /* Much larger icons */
    height: 100px;
    top: -50px; /* Better positioning */
  }
  .testimonial__icon {
    width: 80px; /* Larger icon size */
    height: 80px;
  }
  .testimonial__card {
    padding: 60px 24px 32px 24px; /* Better padding for mobile */
    max-width: 340px;
    min-height: 320px; /* Ensure good height */
  }
  .testimonial__name {
    font-size: clamp(18px, 4vw, 22px); /* Larger name text */
    margin-bottom: 4px;
  }
  .testimonial__role {
    font-size: clamp(14px, 3vw, 16px); /* Larger role text */
    margin-bottom: 16px;
  }
  .testimonial__quote {
    width: 32px; /* Larger quote marks */
    height: 32px;
  }
  .testimonial__text {
    font-size: clamp(14px, 3.5vw, 16px); /* Better readable text */
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .testimonial__desc {
    font-size: clamp(14px, 3.5vw, 16px); /* Match text size */
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 0; /* Reduced padding for mobile */
  }
}

/* Ultra small mobile devices (350px and below) */
@media (max-width: 350px) {
  .testimonials {
    padding: 40px 0 20px 0;
  }
  
  .testimonials__title {
    font-size: clamp(28px, 8vw, 32px); /* Larger title for ultra-small */
    line-height: 1.2;
    max-width: 320px;
    margin: 0 auto 12px;
    padding: 0 15px;
  }
  
  .testimonials__subtitle {
    font-size: clamp(14px, 4vw, 16px); /* Larger subtitle */
    line-height: 1.4;
    max-width: 320px;
    margin: 0 auto 30px;
    padding: 0 15px;
  }
  
  .testimonials__grid {
    flex-direction: column;
    gap: 40px; /* Increased gap */
    width: 100%;
    max-width: 320px;
    padding: 0 15px;
  }
  
  .testimonial__card {
    width: 100%;
    max-width: 300px; /* Increased width */
    height: auto;
    min-height: 280px;
    margin: 0 auto;
    padding: 50px 16px 20px 16px; /* Better padding */
  }
  
  .testimonial__icon-box {
    width: 70px; /* Much larger icons */
    height: 70px;
    top: -35px; /* Better positioning */
  }
  
  .testimonial__icon {
    width: 50px; /* Larger icon size */
    height: 50px;
  }
  
  .testimonial__name {
    font-size: clamp(16px, 4.5vw, 18px); /* Larger name */
    line-height: 1.2;
    margin-bottom: 4px;
  }
  
  .testimonial__role {
    font-size: clamp(12px, 3.5vw, 14px); /* Larger role */
    line-height: 1.2;
    margin-bottom: 12px;
  }
  
  .testimonial__underline {
    height: 2px;
    width: 30px;
    margin-bottom: 12px;
  }
  
  .testimonial__desc {
    font-size: clamp(12px, 3.5vw, 14px); /* Larger description */
    line-height: 1.4;
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 0; /* Reduced padding */
  }
  
  .testimonial__quote {
    width: 24px; /* Larger quotes */
    height: 24px;
  }
  
  /* Ensure all text elements have proper overflow handling */
  .testimonial__name,
  .testimonial__role {
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Progressive scaling for testimonials on bigger screens */
@media (min-width: 1700px) {
  .testimonials__title {
    font-size: 70px;
    line-height: 85px;
    max-width: 1100px;
  }
  .testimonials__subtitle {
    font-size: 28px;
    line-height: 42px;
    max-width: 1250px;
    margin: 0px auto 160px auto;
  }
  .testimonials__grid {
    max-width: 1500px;
    gap: 40px;
  }
  .testimonial__card {
    width: 460px;
    height: 580px;
  }
  .testimonial__name {
    font-size: 22px;
  }
  .testimonial__role {
    font-size: 16px;
  }
  .testimonial__desc {
    font-size: 16px;
    line-height: 24px;
  }
}

@media (min-width: 2000px) {
  .testimonials__title {
    font-size: 80px;
    line-height: 95px;
    max-width: 1300px;
  }
  .testimonials__subtitle {
    font-size: 32px;
    line-height: 48px;
    max-width: 1450px;
    margin: 0px auto 180px auto;
  }
  .testimonials__grid {
    max-width: 1700px;
    gap: 48px;
  }
  .testimonial__card {
    width: 520px;
    height: 650px;
  }
  .testimonial__name {
    font-size: 25px;
  }
  .testimonial__role {
    font-size: 18px;
  }
  .testimonial__desc {
    font-size: 18px;
    line-height: 26px;
  }
}

@media (min-width: 2400px) {
  .testimonials__title {
    font-size: 90px;
    line-height: 105px;
    max-width: 1500px;
  }
  .testimonials__subtitle {
    font-size: 36px;
    line-height: 52px;
    max-width: 1650px;
    margin: 0px auto 200px auto;
  }
  .testimonials__grid {
    max-width: 1900px;
    gap: 56px;
  }
  .testimonial__card {
    width: 580px;
    height: 720px;
  }
  .testimonial__name {
    font-size: 28px;
  }
  .testimonial__role {
    font-size: 20px;
  }
  .testimonial__desc {
    font-size: 20px;
    line-height: 28px;
  }
}

/* Extra Ultra Large screens 2800px+ */
@media (min-width: 2800px) {
  .testimonials {
    padding: 120px 0;
  }
  .testimonials__title {
    font-size: 110px;
    line-height: 130px;
    max-width: 1800px;
  }
  .testimonials__subtitle {
    font-size: 44px;
    line-height: 64px;
    max-width: 2000px;
    margin: 0px auto 240px auto;
  }
  .testimonials__grid {
    max-width: 2400px;
    gap: 72px;
  }
  .testimonial__card {
    width: 720px;
    height: 880px;
    border-radius: 24px;
  }
  .testimonial__image {
    width: 180px;
    height: 180px;
  }
  .testimonial__name {
    font-size: 36px;
  }
  .testimonial__role {
    font-size: 26px;
  }
  .testimonial__desc {
    font-size: 26px;
    line-height: 36px;
  }
}
  
