/* --- General & Desktop Styles (保持不变) --- */
.custom-swiper-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: transparent; 
}
.swiper-father {
    position: relative;
}
.swiper-father .swiper-container { width: 100%; }
.image-item {
    position: relative;
    width: 100%;
    padding-top: 56.25%; 
    background-color: transparent !important;
}
.image-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tab-control {
    width: 100%;
    max-width: 800px;
    margin: 20px auto 0;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: center;
}
.tab-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: relative;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}
.tab-item {
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap;
}
.tab-item.active { color: #fff; }
.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e57300;
    animation: draw-line 0.3s ease-out;
}
.swiper-slide {
    background-color: transparent !important;
}

@keyframes draw-line { from { width: 0; } to { width: 100%; } }
.description-list {
    margin-top: 20px;
    min-height: 40px;
}
.description-item {
    display: none;
    color: #ccc;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.description-item.active {
    display: block;
    opacity: 1;
}
.medium-hide { display: none; }

/* ==================================================================== */
/* --- Responsive Breakpoints (Mobile Styling) --- */
/* ==================================================================== */
@media (max-width: 768px) {
    .small-hide { display: none; }
    .medium-hide {
        display: block;
        margin-top: 25px;
        padding: 0; 
    }
    .description-list {
        margin-top: 0;
        margin-bottom: 25px;
        padding: 0 20px;
        text-align: left;
        min-height: auto;
    }
    .text-scroll {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px; /* <<< 记住这个间距值 */
        position: relative;
        padding-left: 20px; 
         
        margin-right: auto;
    }
    .text-scroll::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background-color: #444;
        border-radius: 2px;
    }
    
    /* --- 关键修改区域 --- */
    .text-scroll::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        /* 高度由JS直接设定，不再用CSS计算 */
        height: var(--item-height, 20px); 
        background-color: #e57300;
        border-radius: 2px;
        transition: transform 0.3s ease-in-out;
        /* 
         * 简化的、正确的位移公式
         * 位移 = 当前索引 * (单个item的高度 + item之间的间距)
         */
        transform: translateY(calc(var(--active-index, 0) * (var(--item-height, 20px) + 15px))); /* <<< 15px是上面的gap值 */
    }

    .text-item {
        color: #888;
        font-size: 16px;
        font-weight: normal;
        transition: color 0.3s, font-weight 0.3s;
        cursor: pointer;
    }
    .text-item.active {
        color: #fff;
        font-weight: bold;
    }
}
