/**
 * Testimonials Section - Unified Sitewide Styles
 *
 * Single source of truth for all testimonial styling.
 * Used by: Homepage, service pages, solution pages, industry pages.
 *
 * @package SunnyHQ
 */

/* ═══════════════════════════════════════════════════════════════
   SECTION WRAPPER
   ═══════════════════════════════════════════════════════════════ */

.testimonials-section {
    padding: 5rem 0;
    background: #f5f7fa;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════════════════════════════ */

.testimonials-header {
    text-align: center;
    margin-bottom: 3rem;
}

.testimonials-section .section-label,
.testimonials-header .section-label {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 0.75rem;
}

.testimonials-header h2 {
    font-family: var(--font-h);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--navy);
    margin: 0;
}

.testimonials-header h2 em {
    font-style: italic;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════
   CARD GRID
   ═══════════════════════════════════════════════════════════════ */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TESTIMONIAL CARD
   ═══════════════════════════════════════════════════════════════ */

.testimonial-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: default;
}

.testimonial-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 96, 72, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   GRADIENT STARS
   ═══════════════════════════════════════════════════════════════ */

.testimonial-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 1.25rem;
}

.testimonial-stars svg {
    width: 18px;
    height: 18px;
}

/* Fallback for browsers without gradient fill support */
.testimonial-stars svg path {
    fill: var(--coral);
}

/* ═══════════════════════════════════════════════════════════════
   QUOTE TEXT
   ═══════════════════════════════════════════════════════════════ */

.testimonial-card blockquote {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-style: normal;
    color: var(--navy-70);
    line-height: 1.65;
    margin: 0 0 1.5rem 0;
    padding: 0;
    border: none;
}

/* ═══════════════════════════════════════════════════════════════
   ATTRIBUTION
   ═══════════════════════════════════════════════════════════════ */

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Initials fallback avatar (hidden when image present) */
.testimonial-avatar {
    width: 40px;
    height: 40px;
    background: var(--navy-05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    flex-shrink: 0;
}

.testimonial-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.testimonial-name {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
}

.testimonial-role {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray-500);
    line-height: 1.3;
}

/* Alternative class name compatibility */
.testimonial-title {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gray-500);
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .testimonials-section {
        padding: 3.5rem 0;
    }

    .testimonials-header {
        margin-bottom: 2rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SINGLE TESTIMONIAL VARIANT
   (Used on some inner pages for featured testimonial)
   ═══════════════════════════════════════════════════════════════ */

.testimonial-single {
    padding: 4rem 0;
    background: #f5f7fa;
}

.testimonial-single .testimonial-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-single .testimonial-stars {
    justify-content: center;
}

.testimonial-single .testimonial-author {
    justify-content: center;
}

.testimonial-single blockquote {
    font-size: 1.125rem;
}

/* ═══════════════════════════════════════════════════════════════
   CAROUSEL VARIANT (Legacy Support)
   ═══════════════════════════════════════════════════════════════ */

.testimonial-carousel {
    padding: 5rem 0;
    background: #f5f7fa;
}

.carousel-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.carousel-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.carousel-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.carousel-card blockquote {
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--navy-70);
    line-height: 1.65;
    margin: 0 0 1.5rem 0;
    padding: 0;
    border: none;
    font-style: normal;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--navy-30);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: var(--coral);
}

@media (max-width: 992px) {
    .carousel-track {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .carousel-track {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   GRID SECTION VARIANT (Legacy Support)
   ═══════════════════════════════════════════════════════════════ */

.testimonial-grid-section {
    padding: 5rem 0;
    background: #f5f7fa;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}
