/* Mloun Steps Slider Widget */
.mloun-steps-slider-wrapper {
    position: relative;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 步骤头部 */
.mloun-steps-header-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
}

.mloun-steps-track {
    position: absolute;
    /* 修正：对准外圈中心 = step-item padding-top (8px) + wrapper 高度一半 (72px/2=36px) */
    top: 44px;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 1;
    pointer-events: none;
}

.mloun-steps-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-color: #e0e0e0;
    z-index: 1;
    /* 确保连接线自身垂直居中于 track 容器 */
    transform: translateY(-50%);
    top: 50%;
}

.mloun-steps-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #2475ba;
    z-index: 2;
    transition: width 0.4s ease;
    /* 确保连接线自身垂直居中于 track 容器 */
    transform: translateY(-50%);
    top: 50%;
}

.mloun-steps-slider-wrapper[data-active-index="0"] .mloun-steps-track::after { width: 0%; }
.mloun-steps-slider-wrapper[data-active-index="1"] .mloun-steps-track::after { width: 25%; }
.mloun-steps-slider-wrapper[data-active-index="2"] .mloun-steps-track::after { width: 50%; }
.mloun-steps-slider-wrapper[data-active-index="3"] .mloun-steps-track::after { width: 75%; }
.mloun-steps-slider-wrapper[data-active-index="4"] .mloun-steps-track::after { width: 100%; }

.mloun-steps-header {
    display: flex;
    position: relative;
    z-index: 3;
    width: 100%;
}

.mloun-steps-header.has-scrollbar {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 10px;
}

/* 自定义滚动条 */
.mloun-steps-header.has-scrollbar::-webkit-scrollbar {
    height: 6px;
}

.mloun-steps-header.has-scrollbar::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.mloun-steps-header.has-scrollbar::-webkit-scrollbar-thumb {
    background: #2475ba;
    border-radius: 3px;
}

/* 步骤单项 - 增加垂直内边距给放大动画留空间，防止被裁切 */
.mloun-step-item {
    flex: 0 0 calc(100% / 5);
    max-width: calc(100% / 5);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 10px; /* 8px 垂直内边距防止 scale 放大后被 overflow 裁切 */
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.mloun-step-number-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mloun-step-number {
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    background-color: #ff8c42;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.mloun-step-text {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    transition: all 0.3s ease;
    word-break: break-word;
}

/* 激活/悬停 */
.mloun-step-item:hover .mloun-step-number-wrapper,
.mloun-step-item.active .mloun-step-number-wrapper {
    border-color: #2475ba;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(36, 117, 186, 0.2);
}

.mloun-step-item:hover .mloun-step-number,
.mloun-step-item.active .mloun-step-number {
    background-color: #2475ba;
}

.mloun-step-item:hover .mloun-step-text,
.mloun-step-item.active .mloun-step-text {
    color: #1b4f7c;
    font-weight: 500;
}

/* 幻灯片区域 */
.mloun-slides-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.mloun-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 400px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mloun-slide-item.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* 动画 */
.animation-fade .mloun-slide-item {
    transform: translateY(10px);
}

.animation-fade .mloun-slide-item.active {
    transform: translateY(0);
}

.animation-slide .mloun-slide-item {
    transform: translateX(30px);
}

.animation-slide .mloun-slide-item.active {
    transform: translateX(0);
}

/* 叠加层 */
.mloun-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(27, 79, 124, 0.85);
    z-index: 1;
}

/* 内容 */
.mloun-slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 40px;
    max-width: 800px;
    width: 100%;
}

.mloun-slide-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
}

.mloun-slide-text {
    color: #e8f2fb;
    font-size: 16px;
    line-height: 1.8;
}

.mloun-slide-text p {
    margin: 0 0 10px 0;
}

.mloun-slide-text p:last-child {
    margin-bottom: 0;
}

/* 响应式 */
@media (max-width: 1024px) {
    .mloun-step-item {
        flex: 0 0 calc(100% / 3) !important;
        max-width: calc(100% / 3) !important;
    }
    .mloun-slide-title { font-size: 22px; }
    .mloun-slide-content { padding: 40px 30px; }
}

@media (max-width: 768px) {
    .mloun-steps-header-wrapper { margin-bottom: 25px; }
    .mloun-step-item {
        flex: 0 0 calc(100% / 2) !important;
        max-width: calc(100% / 2) !important;
        padding: 8px 8px; /* 保持垂直内边距防止裁切 */
    }
    .mloun-step-number-wrapper { width: 60px; height: 60px; }
    .mloun-step-number {
        width: 46px; height: 46px; line-height: 46px; font-size: 16px;
    }
    .mloun-step-text { font-size: 13px; margin-top: 12px; }
    /* 修正：60px wrapper 中心 = 30px，+ 8px padding = 38px */
    .mloun-steps-track { top: 38px; }
    .mloun-slide-item { min-height: 300px; }
    .mloun-slide-title { font-size: 20px; }
    .mloun-slide-text { font-size: 14px; }
    .mloun-slide-content { padding: 30px 20px; }
}

@media (max-width: 480px) {
    .mloun-step-item {
        flex: 0 0 80% !important;
        max-width: 80% !important;
        padding: 8px 5px; /* 保持垂直内边距防止裁切 */
    }
    .mloun-step-number-wrapper { width: 52px; height: 52px; }
    .mloun-step-number {
        width: 40px; height: 40px; line-height: 40px; font-size: 14px;
    }
    /* 修正：52px wrapper 中心 = 26px，+ 8px padding = 34px */
    .mloun-steps-track { top: 34px; }
    .mloun-slide-item { min-height: 250px; }
    .mloun-slide-title { font-size: 18px; }
    .mloun-slide-content { padding: 25px 15px; }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .mloun-step-item:hover .mloun-step-number-wrapper {
        border-color: #e0e0e0; transform: none; box-shadow: none;
    }
    .mloun-step-item:hover .mloun-step-number {
        background-color: #ff8c42;
    }
    .mloun-step-item:hover .mloun-step-text {
        color: #666666; font-weight: normal;
    }
    .mloun-step-item.active .mloun-step-number-wrapper {
        border-color: #2475ba;
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(36, 117, 186, 0.2);
    }
    .mloun-step-item.active .mloun-step-number {
        background-color: #2475ba;
    }
    .mloun-step-item.active .mloun-step-text {
        color: #1b4f7c; font-weight: 500;
    }
}
