/**
 * Testimonials Section Styles
 * 
 * @package DenLED_Vinhomes
 */

/* Testimonials Section */
#testimonials {
    padding: 6rem 0;
}

/* Section Header */
.testimonials-header {
    max-width: 42rem;
    margin: 0 auto;
    text-align: center;
}

/* View All Footer */
.testimonials-footer {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.testimonials-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s var(--transition-smooth);
}

.testimonials-view-all:hover {
    background: hsl(var(--secondary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
}

.testimonials-view-all i {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s;
}

.testimonials-view-all:hover i {
    transform: translateX(3px);
}

@media (max-width: 640px) {
    .testimonials-view-all {
        width: 100%;
        justify-content: center;
    }
}

.testimonials-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background: hsl(var(--primary) / 0.1);
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--primary));
}

.testimonials-badge i {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.testimonials-header h2 {
    margin-top: 1.25rem;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

/* Testimonials Grid */
.testimonials-grid {
    margin-top: 3rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Testimonial Card */
.testimonial-card {
    position: relative;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    box-shadow: var(--shadow-card);
    transition: all 0.4s var(--transition-spring);
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

.testimonial-quote-icon {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    color: hsl(var(--accent) / 0.3);
}

/* Rating Stars */
.testimonial-rating {
    display: flex;
    gap: 0.25rem;
    color: hsl(var(--accent));
}

.testimonial-rating i,
.testimonial-rating svg {
    width: 1rem;
    height: 1rem;
}

.testimonial-rating .star-filled {
    fill: currentColor;
}

.testimonial-rating .star-half {
    opacity: 0.5;
}

.testimonial-rating .star-empty {
    opacity: 0.2;
}

/* Testimonial Content */
.testimonial-content {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: hsl(var(--foreground) / 0.85);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Constrain images within testimonial content */
.testimonial-content img {
    max-width: 200px !important;
    height: auto !important;
    display: block;
    margin: 0.5rem auto;
}

/* Testimonial Author */
.testimonial-author {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsl(var(--border));
    margin-top: auto; /* Ensure author section stays at bottom */
}

.testimonial-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(142 55% 32%) 0%, hsl(130 60% 45%) 100%);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(var(--primary-foreground));
    flex-shrink: 0;
}

.testimonial-author-name {
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 0;
}

.testimonial-author-location {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
}
