/**
 * 首页评论展示模块样式
 * Home Testimonials Module Stylesheet
 *
 * @package RiPro-V5
 */

/* ============ 区块容器 ============ */
.htm-testimonial-area {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.htm-bg-light   { background-color: #ffffff; }
.htm-bg-gray    { background-color: #f5f7fa; }
.htm-bg-primary { background-color: #eef2ff; }
.htm-bg-dark    { background-color: #1a1a2e; color: #e6e6f0; }

@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: #6c5ce7;
    background: rgba(108, 92, 231, 0.08);
    padding: 6px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
}

.htm-bg-dark .htm-subtitle {
    background: rgba(108, 92, 231, 0.2);
    color: #a8a0ff;
}

.htm-title {
    font-size: 32px;
    line-height: 1.3;
    font-weight: 800;
    margin: 0;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

.htm-bg-dark .htm-title {
    color: #ffffff;
}

/* ============ 评论数量徽章 ============ */
.htm-reviews-count {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(120, 130, 160, 0.08);
    border: 1px solid rgba(230, 235, 245, 0.8);
    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(108, 92, 231, 0.12);
}

.htm-bg-dark .htm-reviews-count {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

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

.htm-bg-dark .htm-reviews-count-value {
    background: linear-gradient(135deg, #a8a0ff 0%, #d4ccff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.htm-reviews-count-label {
    font-size: 13px;
    font-weight: 500;
    color: #5a5a72;
    line-height: 1.4;
    max-width: 90px;
}

.htm-bg-dark .htm-reviews-count-label {
    color: #a8a8c0;
}

@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;
    padding: 0 60px;
}

@media (max-width: 768px) {
    .htm-testimonial-slider-wrapper {
        padding: 0 10px;
    }
}

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

.htm-testimonial-track > .htm-slide {
    flex-shrink: 0;
    padding: 0 16px;
    box-sizing: border-box;
}

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

.htm-card {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 36px 36px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(120, 130, 160, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    height: 100%;
    border: 1px solid rgba(230, 235, 245, 0.6);
}

.htm-bg-dark .htm-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.htm-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 56px rgba(120, 130, 160, 0.14);
}

.htm-bg-dark .htm-card:hover {
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.4);
}

/* ============ 装饰背景：大引号 ============ */
.htm-card-shape {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.06), rgba(255, 154, 91, 0.04));
    z-index: 0;
    pointer-events: none;
}

.htm-bg-dark .htm-card-shape {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(255, 154, 91, 0.06));
}

.htm-card > * {
    position: relative;
    z-index: 1;
}

/* ============ 头部：客户信息 + 评分 ============ */
.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, #f5f7fa, #e3e8f0);
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 4px rgba(108, 92, 231, 0.15), 0 6px 16px rgba(0, 0, 0, 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(108, 92, 231, 0.3), 0 8px 20px rgba(0, 0, 0, 0.12);
}

.htm-bg-dark .htm-client-img {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04), 0 0 0 4px rgba(108, 92, 231, 0.25), 0 6px 16px rgba(0, 0, 0, 0.3);
}

.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: #1a1a2e;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.htm-bg-dark .htm-client-name {
    color: #ffffff;
}

.htm-client-role {
    font-size: 13px;
    color: #8a8aa0;
    line-height: 1.4;
    font-weight: 500;
}

.htm-bg-dark .htm-client-role {
    color: #a8a8c0;
}

.htm-client-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #f5a623;
    font-size: 15px;
}

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

.htm-bg-dark .htm-client-rating .htm-not-rated {
    color: #4a4a60;
}

.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(0, 0, 0, 0.12);
    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(0, 0, 0, 0.18);
}

.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(108, 92, 231, 0.04);
    font-weight: 700;
    pointer-events: none;
    z-index: 0;
}

.htm-bg-dark .htm-card::before {
    color: rgba(168, 160, 255, 0.06);
}

/* 6 套渐变方案 */
.htm-quote.gradient-1,
.htm-card[data-gradient="gradient-1"] .htm-quote {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.28);
}

.htm-quote.gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.28);
}

.htm-quote.gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.28);
}

.htm-quote.gradient-4 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 8px 20px rgba(250, 112, 154, 0.28);
}

.htm-quote.gradient-5 {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    box-shadow: 0 8px 20px rgba(48, 207, 208, 0.28);
}

.htm-quote.gradient-6 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    box-shadow: 0 8px 20px rgba(168, 237, 234, 0.28);
    color: #555;
}

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

.htm-bg-dark .htm-testimonial-content {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.htm-testimonial-content p {
    font-size: 15.5px;
    line-height: 1.8;
    color: #5a5a72;
    margin: 16px 0 0;
    font-style: italic;
    letter-spacing: 0.1px;
}

.htm-bg-dark .htm-testimonial-content p {
    color: #c8c8e0;
}

/* ============ 控件：箭头 ============ */
.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 #e0e3eb;
    background: #ffffff;
    color: #5a5a72;
    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(0, 0, 0, 0.05);
    padding: 0;
}

.htm-arrow:hover {
    background: #f0fff4;
    color: #2ea380;
    border-color: #c8eede;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 163, 128, 0.15);
}

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

.htm-arrow:focus-visible {
    outline: 2px solid #2ea380;
    outline-offset: 2px;
}

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

.htm-bg-dark .htm-arrow {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #c8c8e0;
}

.htm-bg-dark .htm-arrow:hover {
    background: rgba(46, 163, 128, 0.2);
    color: #6ee7b7;
    border-color: rgba(46, 163, 128, 0.4);
}

/* ============ 控件：分页点 ============ */
.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: #d0d3db;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.htm-slider-dots button.htm-active {
    background: #2ea380;
    width: 24px;
    border-radius: 4px;
}

.htm-slider-dots button:hover {
    background: #6ee7b7;
}

/* ============ 滚动淡入动画 ============ */
.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-desc {
        font-size: 14px;
    }
    .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;
    }
}
