/* ===== Testimonials Section ===== */
.testimonials {
  background: #f9fafb;
  padding: 6rem 2rem;
  overflow: hidden;
  text-align: center;
}

.testimonials-header {
  max-width: 700px;
  margin: 0 auto 3rem;
}

.tag-line.centered {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.6rem;
}

.tag-line.centered .line {
  width: 50px;
  height: 3px;
  background-color: var(--color-green);
  margin-right: 10px;
  border-radius: 3px;
}

.tag-line.centered .text {
  color: var(--color-green);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.testimonials-header h2 {
  font-size: 2rem;
  color: var(--color-slate);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.testimonials-header p {
  color: #555;
  line-height: 1.6;
  font-size: 1rem;
}

/* Testimonials Slider */
.testimonials-slider {
  overflow: hidden;
  position: relative;
}

.testimonials-track {
  display: flex;
  gap: 2rem;
  animation: slideTestimonials 45s linear infinite;
  width: max-content;
}

.testimonial-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  width: 350px;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.testimonial-card .message {
  font-style: italic;
  color: #444;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.client-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.client-info img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.client-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-slate);
}

.client-info span {
  display: block;
  color: #888;
  font-size: 0.9rem;
}

/* Slide Left to Right */
@keyframes slideTestimonials {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Pause on hover */
.testimonials-slider:hover .testimonials-track {
  animation-play-state: paused;
}

/* ===== Brands Section ===== */
.brands {
  background: #fff;
  padding: 4rem 2rem;
  overflow: hidden;
  text-align: center;
}

.brands-header {
  margin-bottom: 2rem;
}

.brands-header .tag-line.centered .line {
  background-color: var(--color-green);
}

.brands-header h2 {
  font-size: 1.8rem;
  color: var(--color-slate);
  font-weight: 700;
}

/* Brand Slider */
.brands-slider {
  overflow: hidden;
}

.brands-track {
  display: flex;
  align-items: center;
  gap: 3rem;
  animation: scrollBrands 40s linear infinite;
  width: max-content;
  opacity: 0.9;
}

.brands-track img {
  height: 55px;
  filter: grayscale(100%);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.brands-track img:hover {
  filter: grayscale(0%);
  transform: scale(1.08);
}

/* Right to Left */
@keyframes scrollBrands {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Pause on hover */
.brands-slider:hover .brands-track {
  animation-play-state: paused;
}

/* Responsive */
@media (max-width: 900px) {
  .testimonial-card {
    width: 280px;
  }

  .brands-track img {
    height: 40px;
  }
}

  .testimonial-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }
  .rating {
    color: #fbbc04; /* Google yellow for stars */
    font-size: 1rem;
  }
  .rating-value {
    color: #333333;
    margin-left: 6px;
    font-weight: 600;
  }
  .google-logo {
    height: 20px;
    width: 20px;
  }
/* Responsive */
@media (max-width: 900px) {
    /* Overall section override */
    .testimonials {
        padding: 4rem 0; /* Reduce side padding for full-bleed scroll effect */
        text-align: left; /* CRITICAL: Force all content (h2, p) to align left */
    }
    
    /* 1. Header Alignment Fixes */
    .testimonials-header {
        max-width: 100%;
        margin: 0 auto 2rem;
        padding: 0 1.5rem; /* Add horizontal padding back for content */
        text-align: left; /* Ensures h2 and p align left */
    }

    /* Adjust the tagline specifically to align its contents left */
    .tag-line.centered {
        justify-content: flex-start;
    }
    
    /* 2. Slider Behavior: Change to horizontal scroll with snapping */
    .testimonials-slider {
        overflow-x: scroll; 
        overflow-y: hidden;
        scroll-snap-type: x mandatory; 
        -webkit-overflow-scrolling: touch; 
        
        padding-left: 1.5rem; /* Start the first card inside the padding */
        padding-bottom: 1rem; /* Space for the scrollbar */
    }

    .testimonials-track {
        /* Disable automatic sliding animation */
        animation: none; 
        width: max-content; 
        gap: 1.5rem; /* Tighter gap */
    }

    .testimonial-card {
        width: 85vw; /* Show one large card at a time */
        scroll-snap-align: start; /* Snap the left edge of the card to the container's start */
        flex-shrink: 0; 
    }

    /* Ensure client info (image + text) is left-aligned within the card */
    .client-info {
        justify-content: flex-start;
    }
    
    /* Brands section adjustments for consistency */
    .brands {
        padding: 3rem 0; 
        text-align: left; 
    }

    .brands-header {
        padding: 0 1.5rem; 
    }

    .brands-header .tag-line.centered {
        justify-content: flex-start;
    }

    .brands-track img {
        height: 40px;
    }
}