/* Ensure these root variables are defined if not already */
:root {
    --primary-green: #4CAF50;
    --secondary-brown: #8D6E63;
    --light-grey: #f4f4f4;
    --dark-grey: #333;
    --text-color: #555;
    --white: #ffffff;
    --accent-purple-start: #d0ff00; /* Derived from mockup */
    --accent-purple-end: #19880f97;   /* Derived from mockup */
}

/* Testimonials Section Styling */
.testimonials-section {
    padding: 60px 20px;
    background-color: var(--light-grey);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

@media (min-width: 576px) {
    .testimonials-section {
        padding: 70px 20px;
    }
}

@media (min-width: 768px) {
    .testimonials-section {
        padding: 80px 0;
    }
}

/* Green Glowing Grid Background */
.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(76, 175, 80, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(76, 175, 80, 0.1) 1px, transparent 1px);
    background-size: 30px 30px; /* Adjust grid size as needed */
    background-position: center center;
    z-index: -1; /* Place behind content */
}

.testimonials-section .container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .testimonials-section .container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 50px;
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .testimonials-section .container {
        gap: 60px;
    }
}

/* Left-side Testimonial Introduction Block */
.testimonial-intro {
    width: 100%;
    max-width: 100%;
    position: relative;
}

@media (min-width: 768px) {
    .testimonial-intro {
        flex: 1;
        min-width: 300px;
        max-width: 500px;
        width: auto;
    }
}

.testimonial-intro .intro-decoration {
    position: absolute;
    top: -98px; /* Adjust as needed to position the star path */
    left: -10px;
    width: 100px; /* Size of your SVG/image */
    height: 100px;
    z-index: 0;
}

.testimonial-intro h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark-grey);
    margin-bottom: 15px;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

@media (min-width: 576px) {
    .testimonial-intro h2 {
        font-size: 2.6rem;
        margin-bottom: 18px;
    }
}

@media (min-width: 768px) {
    .testimonial-intro h2 {
        font-size: 3rem;
        margin-bottom: 20px;
    }
}

@media (min-width: 1024px) {
    .testimonial-intro h2 {
        font-size: 3.2rem;
    }
}

.testimonial-intro p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

@media (min-width: 576px) {
    .testimonial-intro p {
        font-size: 1.05rem;
        margin-bottom: 28px;
    }
}

@media (min-width: 768px) {
    .testimonial-intro p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
}

/* "View More" Button */
.btn-view-more {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px; /* Rounded corners */
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    color: var(--white);
    /* Subtle gradient background */
    background: linear-gradient(to right, var(--accent-purple-start), var(--accent-purple-end));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-view-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
    background-color: #d0ff00;
}

/* Right-side Testimonial Cards Grid */
.testimonial-cards-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 576px) {
    .testimonial-cards-grid {
        gap: 18px;
    }
}

@media (min-width: 768px) {
    .testimonial-cards-grid {
        flex: 1.2;
        min-width: 400px;
        gap: 20px;
        width: auto;
    }
}

/* Individual Testimonial Card */
.testimonial-item {
  background: rgba(255, 255, 255, 0.25);
  padding: 20px;
  border-radius: 18px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  width: 100%;
}

@media (min-width: 576px) {
  .testimonial-item {
    padding: 22px 25px;
    border-radius: 20px;
  }
}

@media (min-width: 768px) {
  .testimonial-item {
    padding: 25px 30px;
    border-radius: 22px;
  }
}

.testimonial-item:hover {
  background: rgba(22, 163, 74, 0.1);
  box-shadow: 0 8px 32px rgba(22, 163, 74, 0.2);
  transform: translateY(-5px);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid var(--primary-green); /* Green border for avatars */
}

.testimonial-info {
    flex-grow: 1;
}

.testimonial-name {
    font-weight: 600;
    color: var(--dark-grey);
    margin: 0;
    font-size: 1.1em;
}

.testimonial-location {
    font-size: 0.9em;
    color: var(--text-color);
    margin: 0;
}

.quote-icon {
    font-size: 3em; /* Large quote mark */
    color: var(--light-grey); /* Light grey as per mockup */
    font-family: serif; /* Ensure it's a prominent quote mark */
    opacity: 0.7;
    position: absolute;
    top: -10px;
    right: 0px;
    z-index: 0; /* Behind text */
}

.testimonial-text {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    position: relative; /* Over quote icon */
    z-index: 1;
}

/* Visual Highlight Style for Active/Center Testimonial */
.testimonial-item.highlight {
    border-left: 5px solid;
    border-image: linear-gradient(to bottom, var(--accent-purple-start), var(--accent-purple-end)) 1; /* Gradient border */
    transform: translateY(-10px); /* Lift it more */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2); /* Stronger shadow */
    z-index: 2; /* Ensure it's on top */
}

.testimonial-item.highlight .testimonial-avatar {
    border-color: var(--accent-purple-start); /* Change avatar border color */
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .testimonials-section .container {
        flex-direction: column; /* Stack columns on smaller screens */
        text-align: center;
    }

    .testimonial-intro {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .testimonial-intro .intro-decoration {
        left: 50%;
        transform: translateX(-50%);
    }

    .testimonial-cards-grid {
        min-width: unset; /* Remove min-width to allow shrinking */
        width: 100%; /* Take full width */
        align-items: center; /* Center cards in the column */
    }

    .testimonial-item {
        width: 100%; /* Make cards take full width available */
        max-width: 400px; /* Optional: limit max width of individual cards */
    }
}

@media (max-width: 576px) {
    .testimonial-intro h2 {
        font-size: 2.5em;
    }

    .testimonial-item {
        padding: 20px;
    }

    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }
}