:root {
    --primary-color: #F9BF15;
    --text-color: #333;
    --background-color: #f5f5f5;

    --btn-color: #F9BF15;
    --btn-color-hover: #ffd34d;

    --font-family: 'Poppins', sans-serif;
}

.testimonials {
  padding: 80px 20px;
  background: #f9f9f9;
  text-align: center;
}

/* HEADER */
.testimonials-header h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.testimonials-header p {
  color: #666;
  margin-bottom: 40px;
}

/* GRID */
.testimonials-container {
  max-width: 1200px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* CARD */
.testimonial-card {
  background: #fff;
  padding: 25px;
  position: relative;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);

  text-align: left;
 scroll-snap-align: start;
  transition: 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
}

/* ⭐ STARS */
.stars {
  margin-bottom: 12px;
}

.stars i {
  color: #f9bf15;
  font-size: 16px;
  margin-right: 2px;
}

/* TEXT */
.testimonial-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* CLIENT */
.client {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.client h4 {
  font-size: 14px;
  margin: 0;
}

.client span {
  font-size: 12px;
  color: #777;
}

@media (max-width: 1024px) {

  .testimonials-container {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    gap: 20px;

    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    padding-bottom: 10px;
  }

  .testimonial-card {
    background: #fff;
    padding: 25px;

    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);

    text-align: left;
    width: 550px;

    scroll-snap-align: start;
    flex-shrink: 0;

    transition: 0.3s ease;
  }
}

@media (max-width: 500px) {
  .testimonials-header h2 {
    font-size: 22px;
  }
  .testimonials-container {
    display: grid;

    grid-template-columns: 1fr;
    grid-auto-flow: row;        /* ✅ VERY IMPORTANT (reset from column) */
    grid-auto-columns: unset;   /* ✅ remove horizontal sizing */

    gap: 20px;

    overflow-x: hidden;
    scroll-snap-type: none;

    align-items: start;         /* ✅ prevent stretch */
  }

  .testimonial-card {
    width: auto;                    /* ✅ reset width */
    max-width: 100%;

    padding: 20px;

    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);

    text-align: left;

    height: auto !important;        /* ✅ FORCE FIX */
    min-height: 0 !important;
    display: block;                 /* ✅ reset layout */
  }
}








.preview-text{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.read-more-btn,
.modal-translate-btn{
    padding:10px 18px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    margin-top:10px;
}

/* CARD CLIENT */
.client{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:20px;
}

.client img{
    width:50px;
    height:50px;
    border-radius:50%;
}

/* MODAL */
.testimonial-modal{
    display:none;
    position:fixed;
    top:0;
    text-align: left;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.7);
    z-index:9999;
    justify-content:center;
    align-items:center;
}

.testimonial-modal-content{
    position:relative;
    background:#fff;
    width:90%;
    max-width:650px;
    max-height:80vh;
    overflow-y:auto;
    padding:30px;
    border-radius:15px;
}

.close-testimonial{
    position:absolute;
    top:15px;
    right:20px;
    font-size:30px;
    cursor:pointer;
}

/* MODAL CLIENT */
.modal-client{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:25px;
    padding-top:20px;
    border-top:1px solid #ddd;
}

.modal-client img{
    width:55px;
    height:55px;
    border-radius:50%;
}

.modal-client-info h4{
    margin:0;
}

.modal-client-info span{
    color:gray;
    font-size:14px;
}