.testimonial-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  min-height: 100vh;
}

.testimonial-card-wrapper .testimonail {
  max-width: 339px;
  width: 100%;
}

#testimonials {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: column;
}

#testimonials .testimonial-container {
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
}

/* Add Swiper specific styles */
.testimonial-swiper .testimonial-container {
  display: flex !important;
  grid-template-columns: unset !important;
}

.testimonail {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  min-height: 699px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  overflow: hidden;
  background-color: #E2F5FF;
  width: 100%;
}

.testimonail .text {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 20px 61px 33px 33px;
  margin-top: 15px;
  width: 100%;
  box-sizing: border-box;
}

.testimonail .text .star-rating {
  display: flex;
  gap: 5px;
  margin-bottom: 24px;
  line-height: 1;
  flex-wrap: wrap;
}

.testimonail .text .star-rating .star {
  transition: color 0.3s ease;
}

.testimonail .text .review {
  color: #555;
  font-size: 20px;
  margin: 0;
  line-height: 1.2;
  word-wrap: break-word;
}

.testimonail .info {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 101px;
}

.testimonail .info .pfp img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  z-index: 10;
  width: 150px;
  max-width: 100%;
  min-width: 100%;
  min-height: 130%;
  border-radius: 50%;
}

.testimonail .info .pfp {
  width: 150px;
  position: absolute;
  border-radius: 50%;
  overflow: hidden;
  top: -85px;
  display: flex;
  left: 44px;
}

.testimonail .information {
  font-weight: bold;
  color: #545659;
  padding: 28px 64px 31px 33px;
  font-size: 20px;
  margin-top: -110px;
  width: 100%;
  box-sizing: border-box;
}

.testimonail .information span {
  font-weight: bold;
  color: #545659;
  font-size: 20px;
  width: 100%;
  box-sizing: border-box;
  display: inline;
  line-height: 23px;
  font-family: "Figtree", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

.testimonail .info .information .social:hover a {
  opacity: 0.5;
}

.testimonail .info .information .social a:hover {
  opacity: 1;
}

.testimonail .field--name-field-short-description {
  color: #545659;
  font-size: 20px;
  font-family: "Figtree", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

@media (min-width: 1111px) {
  #testimonials .testimonial-container:not(.swiper-wrapper) {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 641px) and (max-width: 1110px) {
  #testimonials .testimonial-container:not(.swiper-wrapper) {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  .testimonial-card-wrapper {
    padding: 30px 16px;
  }

  .testimonail {
    min-height: auto;
  }
  
  /* Only apply width when NOT in swiper */
  #testimonials .testimonial-container:not(.swiper-wrapper) .testimonail {
    width: 49%;
  }

  .testimonail .text {
    padding: 18px;
  }

  .testimonail .text .review {
    font-size: 18px;
  }

  .testimonail .information {
    font-size: 18px;
    padding: 18px;
    margin-top: 0px;
    padding-bottom: 110px;
  }

  .testimonail .info .pfp {
    width: 130px;
    left: 38px;
    top: -75px;
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  #testimonials .testimonial-container:not(.swiper-wrapper) .testimonail {
    width: 48.5%;
  }
}

@media (max-width: 1024px) {
  /* Swiper specific styles for mobile/tablet */
  .testimonial-swiper .swiper-slide {
    width: auto !important;
  }
}

@media (max-width: 640px) {
  .testimonail .info .pfp img {
    width: 110px;
  }

  #testimonials {
    padding: 12px 0;
  }

  #testimonials .testimonial-container {
    gap: 20px;
  }
  
  #testimonials .testimonial-container:not(.swiper-wrapper) {
    grid-template-columns: 1fr !important;
  }

  .testimonial-card-wrapper {
    padding: 20px 12px;
    min-height: auto;
  }

  .testimonial-card-wrapper .testimonail {
    max-width: 100%;
  }

  .testimonail {
    min-height: auto;
  }

  .testimonail .text {
    padding: 16px;
    margin-top: 8px;
  }

  .testimonail .text .star-rating {
    margin-bottom: 16px;
  }

  .testimonail .text .review {
    font-size: 16px;
    line-height: 1.6;
  }

  .testimonail .information {
    font-size: 18px;
    padding: 16px;
    margin-top: 0px;
    padding-bottom: 82px;
  }

  .testimonail .info .pfp {
    width: 110px;
    left: 32px;
    top: -65px;
  }

  .testimonail .field--name-field-short-description {
    font-size: 18px;
  }

  .testimonail .information span {
    font-size: 18px;
  }
}

@media (max-width: 375px) {
  .testimonail {
    min-height: auto;
  }

  .testimonail .text {
    padding: 14px;
  }

  .testimonail .text .review {
    font-size: 15px;
  }

  .testimonail .information {
    font-size: 18px;
    padding-top: 0;
    padding-bottom: 80px;
  }

  .testimonail .info .pfp {
    width: 100px;
    left: 28px;
    top: -60px;
  }
}
/* Swiper overrides - add this at the end of your CSS file */
.testimonial-swiper {
  width: 100%;
  padding-bottom: 50px;
}

.testimonial-swiper .swiper-wrapper {
  display: flex !important;
  align-items: stretch;
}

.testimonial-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.testimonial-swiper .testimonail {
  width: 100% !important;
  max-width: 100% !important;
  height: 100%;
}

.testimonial-swiper .swiper-pagination {
  bottom: 10px !important;
}

.testimonial-swiper .swiper-button-next,
.testimonial-swiper .swiper-button-prev {
  color: #004E90;
}

@media (max-width: 1024px) {
  #testimonials .testimonial-container.swiper-wrapper {
    display: flex !important;
    grid-template-columns: unset !important;
  }
}
/* Swiper overrides - IMPORTANT */
.testimonial-swiper {
  width: 100%;
  padding-bottom: 50px;
  overflow: hidden;
}

.testimonial-swiper .swiper-wrapper {
  display: flex !important;
  align-items: stretch !important;
  /* Remove any grid properties */
  grid-template-columns: none !important;
}

.testimonial-swiper .swiper-slide {
  height: auto !important;
  display: flex !important;
  flex-shrink: 0 !important;
  width: auto !important;
  position: relative !important;
}

.testimonial-swiper .swiper-slide .testimonail {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  height: 100%;
  display: flex !important;
  flex-direction: column;
}

/* Hide duplicate loop slides issue */
.testimonial-swiper .swiper-slide-duplicate .testimonail {
  display: flex !important;
}

.testimonial-swiper .swiper-pagination {
  bottom: 10px !important;
}

.testimonial-swiper .swiper-button-next,
.testimonial-swiper .swiper-button-prev {
  color: #004E90;
}

/* Force override for mobile */
@media (max-width: 1024px) {
  #testimonials .swiper-wrapper {
    display: flex !important;
    grid-template-columns: none !important;
  }
  
  #testimonials .testimonial-container {
    display: grid;
  }
  
  /* When it's a swiper wrapper, force flex */
  #testimonials .swiper-wrapper.testimonial-container,
  #testimonials div[class*="swiper-wrapper"] {
    display: flex !important;
  }

}