/* Why Choose 板块手机端水平滚动样式 */

/* 手机端 Why Choose 板块 */
@media (max-width: 768px) {
    /* Why Choose 容器 */
    .kuanwei2 .chanxinbox {
        overflow: hidden !important;
        position: relative !important;
        padding: 0 15px !important;
    }
    
    /* 创建水平滚动的容器 */
    .kuanwei2 .chanxinbox {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE and Edge */
        gap: 15px !important;
        padding-bottom: 20px !important; /* 为滚动条留出空间 */
        margin-top: 30px !important;
        justify-content: flex-start !important;
    }
    
    /* 隐藏滚动条 */
    .kuanwei2 .chanxinbox::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Why Choose 项目 */
    .kuanwei2 .chanitem {
        flex: 0 0 auto !important;
        width: 280px !important; /* 固定宽度 */
        scroll-snap-align: start !important;
        transition: transform 0.3s ease !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }
    
    /* Why Choose 项目悬停效果 */
    .kuanwei2 .chanitem:hover {
        transform: translateY(-5px) !important;
    }
    
    /* 图片容器 */
    .kuanwei2 .chanitem .hdt-image_wrapper {
        background: #ffffff !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
        height: 200px !important; /* 手机端调整高度 */
    }
    
    /* 图片容器悬停效果 */
    .kuanwei2 .chanitem .hdt-image_wrapper:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* 图片样式 */
    .kuanwei2 .chanitem .hdt-image_wrapper img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        transition: transform 0.3s ease !important;
        border-radius: 12px !important;
    }
    
    /* 图片悬停效果 */
    .kuanwei2 .chanitem .hdt-image_wrapper:hover img {
        transform: scale(1.05) !important;
    }
    
    /* 标题样式 */
    .kuanwei2 .chanitem .ehr2 {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #333333 !important;
        margin-top: 16px !important;
        line-height: 1.4 !important;
        text-align: center !important;
    }
    
    /* 描述文本样式 */
    .kuanwei2 .chanitem .hrdesc {
        font-size: 14px !important;
        line-height: 1.5 !important;
        color: #666666 !important;
        margin-top: 8px !important;
        text-align: center !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* 分页点状指示器容器 */
    .kuanwei2 .chanxinbox::after {
        content: '' !important;
        position: absolute !important;
        bottom: -35px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        z-index: 5 !important;
    }
    
    /* 分页点状指示器样式 */
    .kuanwei2 .chanxinbox .pagination-dots {
        display: flex !important;
        gap: 10px !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.95) !important;
        padding: 12px 20px !important;
        border-radius: 25px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid #f0f0f0 !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    /* 分页点状指示器小点 */
    .kuanwei2 .chanxinbox .pagination-dots .dot {
        width: 10px !important;
        height: 10px !important;
        border-radius: 50% !important;
        background: #d0d0d0 !important;
        transition: all 0.3s ease !important;
        border: 2px solid transparent !important;
        cursor: pointer !important;
    }
    
    /* 分页点状指示器激活状态 */
    .kuanwei2 .chanxinbox .pagination-dots .dot.active {
        background: #16336b !important;
        transform: scale(1.3) !important;
        box-shadow: 0 3px 12px rgba(22, 51, 107, 0.4) !important;
        border-color: #16336b !important;
    }
    
    /* 分页点状指示器悬停效果 */
    .kuanwei2 .chanxinbox .pagination-dots .dot:hover {
        background: #16336b !important;
        transform: scale(1.2) !important;
        border-color: #16336b !important;
    }
    
    /* 分页点状指示器动画 */
    .kuanwei2 .chanxinbox .pagination-dots .dot {
        animation: dotFadeIn 0.5s ease-out !important;
    }
    
    @keyframes dotFadeIn {
        from {
            opacity: 0;
            transform: scale(0.5);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
    
    /* 滚动指示器 */
    .kuanwei2 .chanxinbox::before {
        content: '' !important;
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 30px !important;
        height: 30px !important;
        background: rgba(22, 51, 107, 0.8) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #ffffff !important;
        font-size: 16px !important;
        z-index: 10 !important;
        animation: pulse 2s infinite !important;
    }
    
    /* 脉冲动画 */
    @keyframes pulse {
        0% {
            transform: translateY(-50%) scale(1) !important;
            opacity: 0.8 !important;
        }
        50% {
            transform: translateY(-50%) scale(1.1) !important;
            opacity: 1 !important;
        }
        100% {
            transform: translateY(-50%) scale(1) !important;
            opacity: 0.8 !important;
        }
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .kuanwei2 .chanitem {
        width: 260px !important;
    }
    
    .kuanwei2 .chanitem .hdt-image_wrapper {
        height: 180px !important;
    }
    
    .kuanwei2 .chanitem .hdt-image_wrapper img {
        height: 180px !important;
    }
    
    .kuanwei2 .chanitem .ehr2 {
        font-size: 15px !important;
    }
    
    .kuanwei2 .chanitem .hrdesc {
        font-size: 13px !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .kuanwei2 .chanxinbox {
        padding: 0 12px !important;
        gap: 12px !important;
    }
    
    /* 超小屏幕分页指示器优化 */
    .kuanwei2 .chanxinbox::after {
        bottom: -30px !important;
    }
    
    .kuanwei2 .chanxinbox .pagination-dots {
        padding: 10px 16px !important;
        gap: 8px !important;
    }
    
    .kuanwei2 .chanxinbox .pagination-dots .dot {
        width: 8px !important;
        height: 8px !important;
    }
}

/* 小屏幕优化 */
@media (max-width: 375px) {
    .kuanwei2 .chanitem {
        width: 240px !important;
    }
    
    .kuanwei2 .chanitem .hdt-image_wrapper {
        height: 160px !important;
    }
    
    .kuanwei2 .chanitem .hdt-image_wrapper img {
        height: 160px !important;
    }
    
    .kuanwei2 .chanitem .ehr2 {
        font-size: 14px !important;
    }
    
    .kuanwei2 .chanitem .hrdesc {
        font-size: 12px !important;
    }
    
    .kuanwei2 .chanxinbox {
        padding: 0 10px !important;
        gap: 10px !important;
    }
    
    /* 小屏幕分页指示器优化 */
    .kuanwei2 .chanxinbox::after {
        bottom: -28px !important;
    }
    
    .kuanwei2 .chanxinbox .pagination-dots {
        padding: 8px 14px !important;
        gap: 6px !important;
    }
    
    .kuanwei2 .chanxinbox .pagination-dots .dot {
        width: 7px !important;
        height: 7px !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .kuanwei2 .chanitem:active {
        transform: scale(0.98) !important;
    }
    
    .kuanwei2 .chanitem .hdt-image_wrapper:active {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* 触摸反馈效果 */
    .kuanwei2 .chanitem:active .hdt-image_wrapper img {
        transform: scale(1.02) !important;
    }
}

/* 触摸滑动优化 */
.kuanwei2 .chanxinbox {
    /* 启用触摸滑动 */
    -webkit-overflow-scrolling: touch !important;
    /* 防止滚动链接 */
    overscroll-behavior-x: contain !important;
    /* 触摸操作 */
    touch-action: pan-x !important;
}

/* 触摸滑动时的视觉反馈 */
.kuanwei2 .chanxinbox:active {
    cursor: grabbing !important;
}

.kuanwei2 .chanxinbox:active .chanitem {
    transition: none !important;
}

/* 确保在所有设备上的可用性 */
.kuanwei2 .chanxinbox {
    /* 防止内容溢出 */
    overflow: hidden !important;
    /* 确保触摸滑动正常工作 */
    touch-action: pan-x !important;
    /* 优化性能 */
    will-change: scroll-position !important;
}

/* 滚动性能优化 */
.kuanwei2 .chanxinbox {
    /* 启用硬件加速 */
    -webkit-transform: translateZ(0) !important;
    -moz-transform: translateZ(0) !important;
    -ms-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    /* 平滑滚动 */
    scroll-behavior: smooth !important;
}

/* 确保在所有浏览器中圆角都正确显示 */
.kuanwei2 .chanitem .hdt-image_wrapper {
    /* 跨浏览器兼容性 */
    -webkit-border-radius: 12px !important;
    -moz-border-radius: 12px !important;
    -ms-border-radius: 12px !important;
    -o-border-radius: 12px !important;
    border-radius: 12px !important;
}

/* 最终确认：强制应用样式 */
.kuanwei2 .chanitem,
.kuanwei2 .chanitem .hdt-image_wrapper,
.kuanwei2 .chanitem .ehr2,
.kuanwei2 .chanitem .hrdesc {
    /* 确保所有样式都正确应用 */
    box-sizing: border-box !important;
    /* 防止其他样式覆盖 */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* 桌面端保持原有样式 */
@media (min-width: 769px) {
    .kuanwei2 .chanxinbox {
        display: flex !important;
        margin-top: 30px !important;
        justify-content: center !important;
        overflow: visible !important;
    }
    
    .kuanwei2 .chanitem {
        flex: 0 0 auto !important;
        width: 33.33333333% !important;
        padding-right: 15px !important;
        padding-left: 15px !important;
    }
    
    .kuanwei2 .chanitem .hdt-image_wrapper {
        height: 345px !important;
    }
    
    .kuanwei2 .chanitem .hdt-image_wrapper img {
        height: 345px !important;
    }
    
    /* 隐藏手机端特有的元素 */
    .kuanwei2 .chanxinbox::after,
    .kuanwei2 .chanxinbox::before {
        display: none !important;
    }
    
    /* 恢复桌面端的布局 */
    .kuanwei2 .chanxinbox {
        flex-wrap: wrap !important;
        gap: 0 !important;
    }
} 