/* File: responsive-testimonials.css — AMRIC (mobile-first) */
/* NOTE: :root block intentionally omitted here — the canonical AMRIC palette
   is declared once in home-styles.css to avoid duplicate/conflicting :root
   definitions. This file relies on those same var() tokens. */

/* Testimonials Section Responsive Styles - AMRIC Agribusiness Theme (mobile-first base) */
.testimonials-section {
    padding: 40px 0;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background-image: url('../images/leaf-pattern.png');
    background-size: contain;
    opacity: 0.04;
    transform: rotate(45deg);
    z-index: 0;
}

.testimonials-section::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background-image: url('../images/leaf-pattern.png');
    background-size: contain;
    opacity: 0.04;
    transform: rotate(-45deg);
    z-index: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.section-title:after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.testimonials-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    min-height: 260px;
    z-index: 2;
}

.testimonial-item {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s ease;
    padding: 0 10px;
    visibility: hidden;
}

.testimonial-item.active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.testimonial-content {
    background-color: var(--bg-alt);
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(46, 125, 50, 0.12);
    margin-bottom: 15px;
    position: relative;
    border-left: 4px solid var(--primary-color);
    border: 1px solid rgba(46, 125, 50, 0.1);
}

.testimonial-content::before {
    content: """;
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 2.8rem;
    font-family: Georgia, serif;
    color: rgba(46, 125, 50, 0.15);
    line-height: 1;
    z-index: 0;
}

.testimonial-rating {
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.testimonial-rating .fas {
    color: #e0e0e0;
    margin-right: 2px;
    transition: color 0.3s ease;
}

.testimonial-rating .fas.filled {
    color: var(--accent-color);
}

.testimonial-content p {
    position: relative;
    z-index: 1;
    color: var(--text-dark);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.testimonial-author img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.2);
    transition: all 0.3s ease;
}

.testimonial-author img:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.testimonial-author h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.testimonial-author p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.testimonial-prev, .testimonial-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
}

.testimonial-prev:hover, .testimonial-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
}

.testimonial-prev i, .testimonial-next i {
    font-size: 1rem;
}

/* Enhanced AMRIC Agribusiness Elements */
.testimonial-content::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 30px;
    width: 14px;
    height: 14px;
    background-color: var(--bg-alt);
    transform: rotate(45deg);
    border-right: 1px solid rgba(46, 125, 50, 0.1);
    border-bottom: 1px solid rgba(46, 125, 50, 0.1);
}

/* Testimonial Type Indicators — relevant to AMRIC's three audiences */
.testimonial-item[data-type="farmer"] .testimonial-content {
    border-left-color: var(--accent-color);
}

.testimonial-item[data-type="client"] .testimonial-content {
    border-left-color: var(--secondary-color);
}

.testimonial-item[data-type="partner"] .testimonial-content {
    border-left-color: var(--primary-color);
}

/* Subtle Agricultural Background Pattern */
.testimonials-section {
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(46, 125, 50, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(249, 168, 37, 0.02) 0%, transparent 50%);
}

/*--------------------------------------------------------------
# Responsive Adjustments — scale up from mobile base
--------------------------------------------------------------*/
@media (min-width: 576px) {
    .testimonials-section {
        padding: 45px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-desc {
        font-size: 1rem;
    }

    .testimonial-content {
        padding: 22px;
        border-left-width: 4px;
    }

    .testimonial-content p {
        font-size: 1rem;
    }

    .testimonial-author img {
        width: 55px;
        height: 55px;
        margin-right: 14px;
    }

    .testimonial-author h4 {
        font-size: 1.05rem;
    }

    .testimonials-section::before,
    .testimonials-section::after {
        width: 160px;
        height: 160px;
        opacity: 0.035;
    }
}

@media (min-width: 768px) {
    .testimonials-section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 2rem;
    }

    .testimonial-content {
        padding: 25px;
    }

    .testimonial-author {
        padding: 0 15px;
    }

    .testimonial-author img {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }

    .testimonials-section::before,
    .testimonials-section::after {
        width: 180px;
        height: 180px;
        opacity: 0.04;
    }

    .testimonial-prev, .testimonial-next {
        width: 45px;
        height: 45px;
    }

    .testimonial-prev i, .testimonial-next i {
        font-size: 1.2rem;
    }

    .testimonial-controls {
        margin-top: 35px;
        gap: 15px;
    }
}

@media (min-width: 992px) {
    .testimonials-section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .testimonials-section::before,
    .testimonials-section::after {
        width: 200px;
        height: 200px;
    }
}

/* Dark Mode Enhancements for AMRIC */
[data-theme="dark"] .testimonials-section {
    background-color: var(--bg-color);
}

[data-theme="dark"] .testimonial-content {
    background-color: rgba(232, 245, 233, 0.05);
    border-color: rgba(46, 125, 50, 0.2);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .testimonial-content::before {
    color: rgba(165, 214, 167, 0.1);
}

[data-theme="dark"] .testimonial-content p {
    color: var(--text-light);
}

[data-theme="dark"] .testimonial-author h4 {
    color: var(--primary-light);
}

[data-theme="dark"] .testimonial-author img {
    border-color: var(--primary-light);
}

[data-theme="dark"] .testimonial-prev,
[data-theme="dark"] .testimonial-next {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Additional Agricultural Theme Enhancements */
.testimonial-item.farmer-testimonial .testimonial-content::before {
    content: "🌱";
    font-size: 1.8rem;
    color: var(--accent-color);
}

.testimonial-item.client-testimonial .testimonial-content::before {
    content: "🏢";
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.testimonial-item.innovation-testimonial .testimonial-content::before {
    content: "📊";
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* Smooth transitions for better user experience */
.testimonial-content,
.testimonial-author img,
.testimonial-prev,
.testimonial-next {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced accessibility */
.testimonial-prev:focus,
.testimonial-next:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.testimonial-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
}