.testimonials-section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

/* Optimized Background Effects with leaf */
.testimonials-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50px;
  right: -50px;
  bottom: 0;
  background-image: url("../leaf.jpg");
  background-position: -60px center;
  background-repeat: no-repeat;
  background-size: 300px auto;
  opacity: 0.1;
  z-index: 1;
  will-change: transform;
  animation: leafFloat 8s ease-in-out infinite alternate;
}

.testimonials-section::after {
  content: "";
  position: absolute;
  top: 0;
  right: -50px;
  width: 50%;
  height: 100%;
  background-image: url("../leaf.jpg");
  background-position: calc(100% + 60px) center;
  background-repeat: no-repeat;
  background-size: 300px auto;
  opacity: 0.08;
  z-index: 1;
  transform: scaleX(-1);
  will-change: transform;
  animation: leafFloat 8s ease-in-out infinite alternate-reverse;
}

@keyframes leafFloat {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}




.testimonials-section .container {
    position: relative;
    z-index: 2;
}

.testimonials-header {
    margin-bottom: 60px;
    position: relative;
}

.testimonials-header::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #FA6E32, #E85A28);
    border-radius: 2px;
}

.testimonials-subheading {
    font-size: 1.2rem;
    color: #FA6E32;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.testimonials-subheading::after {
    content: "✨";
    margin-left: 10px;
}

.testimonials-heading {
    font-size: 3.2rem;
    font-weight: 800;
    color: #2C1810;
    line-height: 1.2;
    margin-bottom: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.testimonials-description {
    font-size: 1.2rem;
    color: #555;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
    opacity: 0.9;
}

.testimonial-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 35px 30px;
    text-align: center;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(250, 110, 50, 0.1);
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.testimonial-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FA6E32, #E85A28, #FA6E32);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.testimonial-card:hover::before {
    transform: translateX(0);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(250, 110, 50, 0.1);
    border-color: rgba(250, 110, 50, 0.2);
}

.testimonial-image {
    margin-bottom: 25px;
    position: relative;
}

.testimonial-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #FA6E32;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(250, 110, 50, 0.3);
    transition: all 0.3s ease;
    will-change: transform;
}

.testimonial-card:hover .testimonial-avatar {
    transform: scale(1.05);
    border-color: #E85A28;
}

.star-rating {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 3px;
}

.star-rating i {
    color: #FFD700;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
    will-change: transform;
}

.testimonial-card:hover .star-rating i {
    transform: scale(1.1);
    color: #FFC107;
}

.testimonial-text {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 30px;
    font-style: italic;
    position: relative;
    padding: 0 15px;
    min-height: 120px;
    display: flex;
    align-items: center;
}

.testimonial-text::before {
    content: '"';
    font-size: 4rem;
    color: rgba(250, 110, 50, 0.15);
    position: absolute;
    top: -10px;
    left: -5px;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-text::after {
    content: '"';
    font-size: 4rem;
    color: rgba(250, 110, 50, 0.15);
    position: absolute;
    bottom: -30px;
    right: -5px;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-author h5 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2C1810;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.testimonial-author span {
    font-size: 1rem;
    color: #FA6E32;
    font-weight: 500;
    position: relative;
}

.testimonial-author span::before {
    content: "📍";
    margin-right: 5px;
}

.testimonial-card:hover .testimonial-author h5 {
    color: #FA6E32;
}

/* Enhanced Testimonials Carousel Styles */
.carousel-indicators {
    margin-bottom: -60px;
    gap: 8px;
}

.carousel-indicators [data-bs-target] {
    background: linear-gradient(45deg, #FA6E32, #E85A28);
    border: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0;
    opacity: 0.4;
    transition: all 0.3s ease;
    position: relative;
}

.carousel-indicators [data-bs-target]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 25px;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.2);
}

.carousel-indicators .active::before {
    border-color: rgba(250, 110, 50, 0.3);
}

.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FA6E32, #E85A28);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.carousel-control-prev {
    left: -30px;
}

.carousel-control-next {
    right: -30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    background: linear-gradient(135deg, #E85A28, #D64A1F);
    box-shadow: 0 10px 25px rgba(250, 110, 50, 0.4);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 24px 24px;
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Optimized Carousel Animation */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-item-next,
.carousel-item-prev,
.carousel-item.active {
    display: flex;
}

.carousel-item-next:not(.carousel-item-start),
.active.carousel-item-end {
    transform: translateX(100%);
}

.carousel-item-prev:not(.carousel-item-end),
.active.carousel-item-start {
    transform: translateX(-100%);
}

/* Simplified fade in animation for testimonial cards */
.testimonial-card {
    opacity: 1;
}

/* Simplified animations for enhanced performance */
.fade-in-animation {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-in {
    animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonials-section.loaded {
    opacity: 1;
}

/* Accessibility Enhancements */
.testimonial-card:focus,
.carousel-control-prev:focus,
.carousel-control-next:focus,
.carousel-indicators [data-bs-target]:focus {
    outline: 3px solid rgba(250, 110, 50, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .testimonial-card {
        border: 2px solid #000;
    }
    
    .testimonials-heading {
        color: #000;
        -webkit-text-fill-color: #000;
    }
    
    .star-rating i {
        color: #000;
    }
}

/* Reduced motion support - default for better performance */
.testimonial-card,
.carousel-item,
.star-rating i,
.testimonial-avatar {
    animation: none;
}

.testimonials-section::before,
.testimonials-section::after {
    animation: leafFloat 8s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: no-preference) {
    /* Only add more animations if user doesn't prefer reduced motion */
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .testimonials-heading {
        font-size: 2.5rem;
    }
    
    .testimonial-card {
        margin-bottom: 30px;
        padding: 25px 20px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    .carousel-control-prev {
        left: -20px;
    }
    
    .carousel-control-next {
        right: -20px;
    }
    
    .testimonials-section::before,
    .testimonials-section::after {
        opacity: 0.05;
        animation: none;
    }
}

@media (max-width: 576px) {
    .testimonials-section {
        padding: 60px 0;
    }
    
    .testimonials-heading {
        font-size: 2rem;
    }
    
    .testimonial-text {
        min-height: auto;
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
    
    .testimonial-avatar {
        width: 70px;
        height: 70px;
    }
    
    .testimonials-subheading {
        font-size: 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .testimonials-section {
        background: #ffffff;
    }
    
    .testimonial-card {
        background: #ffffff;
        border-color: rgba(250, 110, 50, 0.2);
        color: #333;
    }
    
    .testimonials-heading {
        color: #2C1810;
    }
    
    .testimonial-text {
        color: #555;
    }
    
    .testimonial-author h5 {
        color: #2C1810;
    }
}
