/* ===== Wrapper ===== */
.tfc-wrap{
  width:100%;
  margin:0 auto;
  padding-left:12px;
  padding-right:12px;
}

/* ===== GRID MODE =====
   - Up to 4 columns at 350px each
   - Shrinks columns down to 260px as needed
   - Centers grid so 1–3 items don't stretch too wide
*/
.tfc-wrap:not(.tfc-mode-carousel) .tfc-row{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 350px));
  gap:24px;
  justify-content:center;
}

/* Single-result centering (grid mode) */
.tfc-wrap.tfc-single:not(.tfc-mode-carousel) .tfc-row{
  grid-template-columns: minmax(260px, 350px);
}

/* ===== CAROUSEL MODE ===== */
.tfc-mode-carousel .tfc-row{ display:block; } /* not used; carousel injects its own container */
.tfc-owl .tfc-item{ display:flex; justify-content:center; }

/* Empty state spans */
.tfc-empty{
  background:#fee;
  padding:8px;
  border-radius:8px;
  text-align:center;
}

/* ===== Card ===== */
.testimonial-card{
  position:relative;
  width:100%;        /* stretches to column/carousel item width */
  max-width:350px;   /* cap width */
  height:620px;      /* fixed height */
  border-radius:15px;
  overflow:hidden;
  box-shadow:0 4px 8px rgba(0,0,0,0.2);
  background-size:cover;
  background-position:top center;
}

/* Content area & overlay */
.testimonial-content{
  margin:0;
  position:absolute;
  bottom:0;
  width:100%;
  color:#fff;
  padding:75px 15px 15px 15px;
  -webkit-backdrop-filter:blur(1px);
  backdrop-filter:blur(1px);
}

/* Quote */
.testimonial-text{
  font-size:19px;
  max-height:220px;
  overflow:hidden;
  transition:max-height 0.4s ease-in-out;
}
.testimonial-text,
.testimonial-text p{
  font-size:19px !important;
  line-height:20px !important;
  color:white !important;
  padding-bottom: 1px;
}
.testimonial-content:hover .testimonial-text{ max-height:300px; }

/* Footer (forced white) */
.testimonial-footer{
  margin-top:10px;
  border-top:1px solid rgba(255,255,255,0.3);
  padding-top:10px;
}
.testimonial-footer,
.testimonial-footer p,
.testimonial-footer h3,
.testimonial-footer h4,
.testimonial-footer h5,
.testimonial-footer h6{
  color:#ffffff !important;
}
.testimonial-footer p  { font-size:20px !important; line-height:20px !important; }
.testimonial-footer h3 { font-size:26px !important; line-height:26px !important; font-weight:300 !important; }
.testimonial-footer h3 strong { font-weight:600 !important; }
.testimonial-footer h4 { font-size:20px !important; line-height:23px !important; }
.testimonial-footer h5 { font-size:18px !important; line-height:19px !important; }
.testimonial-footer h6 { font-size:16px !important; line-height:17px !important; }

/* Small-screen tweaks */
@media (max-width:979px){
  .testimonial-content{ position:absolute; }
  .testimonial-content:hover .testimonial-text{ max-height:500px; }
  .testimonial-footer{ border-top:none; }
}

/* Optional minor Owl theme tweaks (feel free to style further) */
.tfc-owl .owl-nav button.owl-prev,
.tfc-owl .owl-nav button.owl-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4) !important;
  color: #fff !important;
  border-radius: 999px;
  width: 36px; height: 36px;
  line-height: 36px;
}
.tfc-owl .owl-nav button.owl-prev{ left: -12px; }
.tfc-owl .owl-nav button.owl-next{ right: -12px; }
.tfc-owl .owl-dots{ margin-top: 8px; }
