/* ==========================================================================
   CRERP - Section with Testimonials / Customer Reviews Styles
   ========================================================================== */

section[data-section-template="Section with Testimonials"],
.section-with-features {
    width: 100%;
}

section[data-section-template="Section with Testimonials"] .section-title,
.section-with-features .section-title {
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    color: var(--coderiven-dark, #0f172a) !important;
}

/* Grid Layout for Testimonials */
section[data-section-template="Section with Testimonials"] .section-features,
.section-with-features .section-features {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    align-items: stretch !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Individual Testimonial Card */
section[data-section-template="Section with Testimonials"] .section-feature,
.section-with-features .section-feature {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--border-radius-sm, 8px) !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

section[data-section-template="Section with Testimonials"] .section-feature:hover,
.section-with-features .section-feature:hover {
    border-color: var(--coderiven-primary, #111827) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
}

/* Reset wrapper div margins/paddings */
section[data-section-template="Section with Testimonials"] .section-feature > div,
.section-with-features .section-feature > div {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Testimonial Quote Content */
section[data-section-template="Section with Testimonials"] .feature-content,
.section-with-features .feature-content {
    font-size: 13px !important;
    font-style: italic !important;
    line-height: 1.4 !important;
    color: #334155 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 8px !important;
    text-align: justify !important;
    text-justify: inter-word !important;
}

/* Author Section */
section[data-section-template="Section with Testimonials"] .testimonial-author,
.section-with-features .testimonial-author {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-top: 8px !important;
    padding-bottom: 0 !important;
    border-top: 1px dashed #f1f5f9 !important;
}

section[data-section-template="Section with Testimonials"] .testimonial-author .avatar,
.section-with-features .testimonial-author .avatar {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #e0e7ff !important;
    color: #4338ca !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

section[data-section-template="Section with Testimonials"] .testimonial-author .avatar-frame,
.section-with-features .testimonial-author .avatar-frame {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: inherit !important;
}

section[data-section-template="Section with Testimonials"] .testimonial-author p,
.section-with-features .testimonial-author p {
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

section[data-section-template="Section with Testimonials"] .testimonial-author p::before,
.section-with-features .testimonial-author p::before {
    content: "— ";
    color: #64748b;
}

/* ==========================================================================
   Mobile Responsive: 1 Testimonial Item per Row
   ========================================================================== */
@media (max-width: 768px) {
    section[data-section-template="Section with Testimonials"] .section-title,
    .section-with-features .section-title {
        font-size: 16px !important;
        margin-top: 0 !important;
        margin-bottom: 10px !important;
    }

    /* 1 item in a row on mobile */
    section[data-section-template="Section with Testimonials"] .section-features,
    .section-with-features .section-features,
    .section-features[data-columns="3"],
    .section-features[data-columns="4"],
    .section-features[data-columns="2"],
    .section-features[data-columns="1"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    section[data-section-template="Section with Testimonials"] .section-feature,
    .section-with-features .section-feature {
        padding: 12px 14px !important;
        border-radius: var(--border-radius-sm, 8px) !important;
    }

    section[data-section-template="Section with Testimonials"] .section-feature > div,
    .section-with-features .section-feature > div {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    section[data-section-template="Section with Testimonials"] .feature-content,
    .section-with-features .feature-content {
        font-size: 12.5px !important;
        font-style: italic !important;
        line-height: 1.45 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 8px !important;
        text-align: justify !important;
        text-justify: inter-word !important;
    }

    section[data-section-template="Section with Testimonials"] .testimonial-author,
    .section-with-features .testimonial-author {
        gap: 8px !important;
        margin-top: auto !important;
        margin-bottom: 0 !important;
        padding-top: 8px !important;
        padding-bottom: 0 !important;
    }

    section[data-section-template="Section with Testimonials"] .testimonial-author .avatar,
    .section-with-features .testimonial-author .avatar {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 10.5px !important;
    }

    section[data-section-template="Section with Testimonials"] .testimonial-author .avatar-frame,
    .section-with-features .testimonial-author .avatar-frame {
        font-size: 10.5px !important;
    }

    section[data-section-template="Section with Testimonials"] .testimonial-author p,
    .section-with-features .testimonial-author p {
        font-size: 11.5px !important;
        font-style: normal !important;
        line-height: 1.2 !important;
    }
}
