/**
 * UX Block: Testimonials (Khách hàng nói gì về TD-Corp)
 * Matching Figma Node 1:991
 */

.td-section-testimonials {
    position: relative;
    padding: 60px 0;
    box-sizing: border-box;
}

.td-section-testimonials .td-section-header {
    text-align: center;
    margin-bottom: 32px;
}

/* Heading H2: 40px desktop, 32px mobile */
.td-section-testimonials .td-section-title,
.td-section-testimonials h2.td-section-title {
    font-size: 40px !important;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #1A1A1A;
    margin: 0;
    line-height: 1.25;
}

/* Description: 16px desktop, 14px mobile */
.td-section-testimonials .td-section-subtitle,
.td-section-testimonials p.td-section-subtitle {
    font-size: 16px !important;
    color: #1A1A1A !important;
    margin-top: 10px;
    line-height: 1.5;
}

/* Slider Wrapper & Viewport */
.td-testimonials-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.td-testimonials-viewport {
    position: relative;
    margin-top: 32px;
    overflow: hidden;
    padding: 12px 4px;
}

/* Equal Height Flexbox Setup for Swiper */
.td-testimonials-viewport .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important;
}

.td-testimonials-viewport .swiper-slide {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Card item: Stretches to 100% height of tallest card */
.td-pd-testimonial-card {
    height: 100% !important;
    box-sizing: border-box;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    padding: 24px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 220px;
    box-shadow: 0px 4px 20px 0px rgba(0, 0, 69, 0.05);
    transition: border-color 0.25s ease-in-out, box-shadow 0.25s ease-in-out, transform 0.25s ease-in-out;
}

.td-pd-testimonial-card:hover {
    border-color: #F97316 !important;
    box-shadow: 0px 8px 24px 0px rgba(0, 0, 69, 0.1);
    transform: translateY(-4px);
}

.td-pd-testimonial-quote {
    font-size: 15px;
    line-height: 1.6;
    color: #1A1A1A;
    margin-bottom: 20px;
    font-style: normal;
    flex-grow: 1; /* Stretches quote area so author aligns at the bottom */
}

.td-pd-testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto; /* Pins author info to the bottom */
}

.td-pd-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #E6E2D5;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    overflow: hidden;
}

.td-pd-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.td-pd-author-avatar svg {
    width: 24px;
    height: 24px;
    fill: #888;
}

.td-pd-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.td-pd-author-name {
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A;
    display: block;
}

.td-pd-author-sub {
    font-size: 13px;
    color: #666666;
    display: block;
}

/* Navigation Buttons */
.td-pd-testimonials-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.td-pd-testimonial-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease-in-out;
    color: #1A1A1A;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.td-pd-testimonial-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
}

.td-pd-testimonial-nav-btn:hover {
    background: #1F6F4A;
    color: #FFFFFF;
    border-color: #1F6F4A;
}

/* Responsive */
@media (max-width: 768px) {
    .td-section-testimonials {
        padding: 40px 0;
    }

    /* Heading H2: 32px on mobile */
    .td-section-testimonials .td-section-title,
    .td-section-testimonials h2.td-section-title {
        font-size: 32px !important;
        line-height: 1.3;
    }

    /* Description: 14px on mobile */
    .td-section-testimonials .td-section-subtitle,
    .td-section-testimonials p.td-section-subtitle {
        font-size: 14px !important;
        margin-top: 8px;
    }

    .td-pd-testimonial-card {
        padding: 20px;
        min-height: 190px;
    }
}
