/**
 * 【首页】21.客户评论展示模块样式
 * Home Testimonials Module Stylesheet
 *
 * 主题配色：白底 #ffffff / 深棕文字 #2b271b / 金色点缀 #f5c12e
 *
 * @package RiPro-V5
 */

/* ============ 区块容器 ============ */
.htm-testimonial-area {
    --htm-bg: #ffffff;
    --htm-text: #2b271b;
    --htm-text-soft: #6b6353;
    --htm-text-muted: #9a917e;
    --htm-gold: #f5c12e;
    --htm-gold-dark: #d9a815;
    --htm-gold-light: #fff6d1;
    --htm-border: #ece8d9;
    --htm-card-bg: #ffffff;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.htm-bg-light {
    background-color: #ffffff;
}

.htm-bg-gray {
    background-color: #faf8f2;
}

.htm-bg-gold {
    background-color: #fffcf2;
}

@media (max-width: 768px) {
    .htm-testimonial-area {
        padding: 80px 0;
    }
}

/* ============ 标题区（左右两栏布局）============ */
.htm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 60px;
}

.htm-section-title {
    margin: 0;
    flex: 1;
    min-width: 280px;
}

.htm-subtitle {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--htm-gold-dark);
    background: var(--htm-gold-light);
    border: 1px solid var(--htm-border);
    padding: 6px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
}

.htm-title {
    font-size: 32px;
    line-height: 1.3;
    font-weight: 800;
    margin: 0;
    color: var(--htm-text);
    letter-spacing: -0.5px;
}

/* ============ 评论数量徽章 ============ */
.htm-reviews-count {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(43, 39, 27, 0.06);
    border: 1px solid var(--htm-border);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.htm-reviews-count:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(217, 168, 21, 0.18);
}

.htm-reviews-count-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #f5c12e 0%, #d9a815 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.htm-reviews-count-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--htm-text-soft);
    line-height: 1.4;
    max-width: 90px;
}

@media (max-width: 768px) {
    .htm-section-header {
        margin-bottom: 40px;
        gap: 16px;
    }
    .htm-title {
        font-size: 26px;
    }
    .htm-reviews-count {
        padding: 12px 18px;
        gap: 10px;
    }
    .htm-reviews-count-value {
        font-size: 22px;
    }
    .htm-reviews-count-label {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .htm-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .htm-section-title {
        min-width: 0;
        width: 100%;
    }
    .htm-reviews-count {
        width: 100%;
    }
    .htm-title {
        font-size: 22px;
    }
}

/* ============ 轮播容器 ============ */
.htm-testimonial-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 4px;
}

.htm-testimonial-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.55s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.htm-testimonial-track > .htm-slide {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 0 14px;
    box-sizing: border-box;
}

/* 通过 data-columns 控制每行显示数 */
.htm-testimonial-slider-wrapper[data-columns="1"] .htm-slide {
    flex: 0 0 100%;
    max-width: 100%;
}

.htm-testimonial-slider-wrapper[data-columns="2"] .htm-slide {
    flex: 0 0 50%;
    max-width: 50%;
}

.htm-testimonial-slider-wrapper[data-columns="3"] .htm-slide {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}

@media (max-width: 992px) {
    .htm-testimonial-slider-wrapper[data-columns="3"] .htm-slide {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .htm-testimonial-slider-wrapper .htm-slide {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 4px;
    }
}

.htm-testimonial-track .htm-card {
    height: 100%;
}

/* ============ 单条评论卡片 ============ */
.htm-single-testimonial {
    margin-bottom: 0;
}

.htm-card {
    position: relative;
    background: var(--htm-card-bg);
    border-radius: 20px;
    padding: 40px 36px 36px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(43, 39, 27, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    height: 100%;
    border: 1px solid var(--htm-border);
}

.htm-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(217, 168, 21, 0.16);
    border-color: var(--htm-gold);
}

/* ============ 头部：客户信息 + 评分 ============ */
.htm-testimonial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.htm-client-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.htm-client-img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff6d1, #f5c12e);
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 4px rgba(245, 193, 46, 0.35), 0 6px 16px rgba(43, 39, 27, 0.08);
    transition: box-shadow 0.3s ease;
}

.htm-card:hover .htm-client-img {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 4px rgba(245, 193, 46, 0.55), 0 8px 20px rgba(43, 39, 27, 0.12);
}

.htm-client-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.htm-client-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.htm-client-name {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: var(--htm-text);
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.htm-client-role {
    font-size: 13px;
    color: var(--htm-text-muted);
    line-height: 1.4;
    font-weight: 500;
}

.htm-client-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--htm-gold);
    font-size: 15px;
}

.htm-client-rating .htm-not-rated {
    color: #e4ddc9;
}

.htm-client-rating span {
    line-height: 1;
}

/* ============ 引号装饰（大背景引号 + 金色渐变图标）============ */
.htm-quote {
    position: absolute;
    top: 32px;
    right: 36px;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(217, 168, 21, 0.25);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.htm-card:hover .htm-quote {
    transform: scale(1.08) rotate(-6deg);
    box-shadow: 0 12px 28px rgba(217, 168, 21, 0.35);
}

.htm-quote i {
    line-height: 1;
}

/* 大背景引号水印 */
.htm-card::before {
    content: "\201C";
    position: absolute;
    bottom: -30px;
    left: 24px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 180px;
    line-height: 1;
    color: rgba(245, 193, 46, 0.08);
    font-weight: 700;
    pointer-events: none;
    z-index: 0;
}

/* 金棕系渐变方案 */
.htm-quote.gradient-1 {
    background: linear-gradient(135deg, #f5c12e 0%, #d9a815 100%);
    box-shadow: 0 8px 20px rgba(217, 168, 21, 0.28);
}

.htm-quote.gradient-2 {
    background: linear-gradient(135deg, #2b271b 0%, #6b6353 100%);
    box-shadow: 0 8px 20px rgba(43, 39, 27, 0.28);
}

.htm-quote.gradient-3 {
    background: linear-gradient(135deg, #f7d868 0%, #e8b91f 100%);
    box-shadow: 0 8px 20px rgba(232, 185, 31, 0.28);
}

.htm-quote.gradient-4 {
    background: linear-gradient(135deg, #fff6d1 0%, #f5c12e 100%);
    box-shadow: 0 8px 20px rgba(245, 193, 46, 0.28);
    color: #2b271b;
}

.htm-quote.gradient-5 {
    background: linear-gradient(135deg, #d9a815 0%, #8a6d0d 100%);
    box-shadow: 0 8px 20px rgba(138, 109, 13, 0.28);
}

.htm-quote.gradient-6 {
    background: linear-gradient(135deg, #ece8d9 0%, #d9cdb0 100%);
    box-shadow: 0 8px 20px rgba(217, 205, 176, 0.4);
    color: #2b271b;
}

/* ============ 内容区 ============ */
.htm-testimonial-content {
    position: relative;
    padding-top: 8px;
    border-top: 1px dashed var(--htm-border);
    margin-top: 4px;
}

.htm-testimonial-content p {
    font-size: 15.5px;
    line-height: 1.8;
    color: var(--htm-text-soft);
    margin: 16px 0 0;
    font-style: italic;
    letter-spacing: 0.1px;
}

/* ============ 控件：箭头 ============ */
.htm-slider-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 48px;
}

.htm-arrow {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--htm-border);
    background: #ffffff;
    color: var(--htm-text-soft);
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(43, 39, 27, 0.05);
    padding: 0;
}

.htm-arrow:hover {
    background: var(--htm-gold-light);
    color: var(--htm-gold-dark);
    border-color: var(--htm-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 193, 46, 0.2);
}

.htm-arrow:active {
    transform: scale(0.95);
}

.htm-arrow:focus-visible {
    outline: 2px solid var(--htm-gold);
    outline-offset: 2px;
}

.htm-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ============ 控件：分页点 ============ */
.htm-slider-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.htm-slider-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #ded8c6;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.htm-slider-dots button.htm-active {
    background: var(--htm-gold);
    width: 24px;
    border-radius: 4px;
}

.htm-slider-dots button:hover {
    background: var(--htm-gold-dark);
}

/* ============ 滚动淡入动画 ============ */
.htm-testimonial-area:not(.htm-no-animation) .htm-slide {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.htm-testimonial-area:not(.htm-no-animation) .htm-slide.htm-in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .htm-testimonial-track,
    .htm-card,
    .htm-arrow,
    .htm-slide {
        transition: none;
        animation: none;
    }
    .htm-testimonial-area:not(.htm-no-animation) .htm-slide {
        opacity: 1;
        transform: none;
    }
}

/* ============ 响应式 ============ */
@media (max-width: 992px) {
    .htm-testimonial-area {
        padding: 100px 0;
    }
    .htm-card {
        padding: 36px 30px 30px;
    }
}

@media (max-width: 768px) {
    .htm-testimonial-slider-wrapper {
        padding: 0;
    }
    .htm-card {
        padding: 32px 24px 26px;
    }
    .htm-card::before {
        font-size: 140px;
        bottom: -24px;
        left: 16px;
    }
    .htm-quote {
        top: 24px;
        right: 24px;
        width: 46px;
        height: 46px;
        font-size: 18px;
    }
    .htm-client-img {
        width: 52px;
        height: 52px;
    }
    .htm-client-name {
        font-size: 16px;
    }
    .htm-testimonial-header {
        margin-bottom: 22px;
    }
    .htm-slider-controls {
        margin-top: 36px;
    }
    .htm-testimonial-content p {
        font-size: 14.5px;
    }
}

@media (max-width: 576px) {
    .htm-testimonial-area {
        padding: 70px 0;
    }
    .htm-title {
        font-size: 22px;
    }
    .htm-arrow {
        width: 46px;
        height: 46px;
    }
    .htm-client-rating {
        font-size: 13px;
    }
    .htm-testimonial-content p {
        font-size: 14px;
    }
    .htm-testimonial-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}
