/**
 * Swiper History Widget Styles
 * 
 * @package SuopuChild\ElementorWidgets\SwiperEcosystem
 */

/* ===== 基础容器样式 ===== */
.suopu-swiper-history {
    position: relative;
    width: 100%;height: 950px;
    overflow: hidden;
}

.suopu-swiper-history .cw1400 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.suopu-swiper-history .box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.suopu-swiper-history .flex-between {
    display: flex;
    justify-content: space-between;
}

.suopu-swiper-history .flex {
    display: flex;
    align-items: flex-start;
}

.suopu-swiper-history .text-center {
    text-align: center;
}

.suopu-swiper-history .hide {
    display: none;
}

.suopu-swiper-history .nowrap {
    white-space: nowrap;
}

.suopu-swiper-history .pointer {
    cursor: pointer;
}

.suopu-swiper-history .trans {
    transition: all 0.3s ease;
}

/* ===== 标题样式 ===== */
.suopu-swiper-history .m-tit {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
}

/* ===== 左侧区域样式 ===== */
.suopu-swiper-history .left {
    margin-top:80px;width:250px;
}

.suopu-swiper-history .left .tit {
   font-size:48px;color:#333;font-weight:700;margin-bottom:50px;
}

.suopu-swiper-history .left .num {
    font-size: 200px;
    font-weight: 500;
    color: #d71d1e;
    line-height: 1;
   font-family: 'PM';
}

/* ===== 中间时间轴区域样式 ===== */
.suopu-swiper-history .center {
    flex: 0 0 auto;
    display: flex;
    gap: 20px;
    width: 380px;
    height: 100%;
    overflow: hidden; margin-top: -292px;
}


.suopu-swiper-history .center .m-num {
    font-size: 200px;
    font-weight: 900;
    color: #e8e8e8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.5;
   font-family: 'PM';
    line-height: 1;
}

.suopu-swiper-history .center .container.main {
    position: relative;
    width: 250px;
    z-index: 1;height: 1200px;overflow:visible;margin:0;
}

.suopu-swiper-history .center .swiper-wrapper {
    flex-direction: column;
}

.suopu-swiper-history .center .swiper-slide {
    height: 200px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 9.5px;
}

.suopu-swiper-history .center .time {
    font-size: 200px;
    color: rgba(0, 0, 0, 0.2);
    line-height: 200px;
    font-weight: 700;
    color: #d0d0d0;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'PM';
}

.suopu-swiper-history .swiper-slide-active .time {
    color: #d71d1e;
}

/* ===== 按钮样式 ===== */
.suopu-swiper-history .center .btn {
    display: flex;
    flex-direction: column;
    gap: 10px;padding-top: 530px;
}

.suopu-swiper-history .center .btn .pn {
    width: 70px!important;
    height: 70px!important;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.suopu-swiper-history .center .btn .pn:hover {
    background-color: #d71d1e;
    border-color: #d71d1e;
}

.suopu-swiper-history .center .btn .pn::before {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid #333;
    border-right: 2px solid #333;
    transition: all 0.3s ease;
}

.suopu-swiper-history .center .btn .pn:hover::before {
    border-color: #fff;
}

.suopu-swiper-history .center .btn .prev::before {
    transform: rotate(-45deg);
    margin-bottom: -3px;
}

.suopu-swiper-history .center .btn .next::before {
    transform: rotate(135deg);
    margin-top: -3px;
}

/* ===== 右侧内容区域样式 ===== */
.suopu-swiper-history .right {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 700px;
   width: calc(100% - 250px - 380px);
    padding-left: 10.715%;
    margin-top: 15%;
}

.suopu-swiper-history .right .container.thumbs {
    height: auto !important;
    min-height: 400px;
    overflow: visible !important;
    position: relative;
}

/* 右侧内容区域 - 使用绝对定位实现淡入淡出效果 */
.suopu-swiper-history .right .swiper-wrapper {
    position: relative !important;
    height: 400px !important;
    width: 100% !important;
    overflow: hidden !important;
}

.suopu-swiper-history .right .swiper-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.5s ease, visibility 0.5s ease !important;
    overflow-y: auto !important;
    padding-right: 10px;
}

/* 只显示激活的年份 */
.suopu-swiper-history .right .swiper-slide.active-year {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
}

/* 移除其他 Swiper 状态类的影响 */
.suopu-swiper-history .right .swiper-slide-active,
.suopu-swiper-history .right .swiper-slide-next,
.suopu-swiper-history .right .swiper-slide-prev,
.suopu-swiper-history .right .swiper-slide-duplicate {
    /* 不使用 Swiper 的状态类，只使用 active-year */
}

/* 自定义滚动条样式 */
.suopu-swiper-history .right .swiper-slide::-webkit-scrollbar {
    width: 6px;
}

.suopu-swiper-history .right .swiper-slide::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.suopu-swiper-history .right .swiper-slide::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.suopu-swiper-history .right .swiper-slide::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.suopu-swiper-history .right .li {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.suopu-swiper-history .right .mouth {
    flex: 0 0 auto;
    min-width: 52px;
font-size: 18px;
    font-weight: 500;
    color: #999;
}

.suopu-swiper-history .right .cont {
    flex: 1;
    min-width: 0;padding-bottom: 25px;
    border-bottom: 1px solid #dedede;
}
.suopu-swiper-history .right .li:last-child .cont {
    padding-bottom: 0;
    border-bottom: none;
}

.suopu-swiper-history .right .cont .name {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.suopu-swiper-history .right .cont .name p {
    margin: 0 0 10px 0;
}

.suopu-swiper-history .right .cont .name p:last-child {
    margin-bottom: 0;
}

/* 激活年份的高亮效果（可选） */
.suopu-swiper-history .right .swiper-slide.active-year {
    /* 可以添加高亮效果 */
}

/* 富文本内容样式 */
.suopu-swiper-history .right .cont .name p {
    margin: 0 0 10px 0;font-size: 18px;
    color: #333;
    font-weight: 500; line-height: 1.3;
}

.suopu-swiper-history .right .cont .name p:last-child {
    margin-bottom: 0;
}

.suopu-swiper-history .right .cont .name strong {
    font-weight: bold;
}

.suopu-swiper-history .right .cont .name em {
    font-style: italic;
}

.suopu-swiper-history .right .cont .name a {
    color: #d71d1e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.suopu-swiper-history .right .cont .name a:hover {
    color: #c0392b;
    text-decoration: underline;
}

.suopu-swiper-history .right .cont .name ul,
.suopu-swiper-history .right .cont .name ol {
    margin: 10px 0;
    padding-left: 20px;
}

.suopu-swiper-history .right .cont .name li {
    margin-bottom: 5px;
}

/* ===== 响应式设计 ===== */

/* 平板端（768px - 1024px） */
@media (max-width: 1024px) {
    .suopu-swiper-history .box {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    /* 左侧区域 - 移到顶部，居中显示 */
    .suopu-swiper-history .left {
        width: 100%;
        max-width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 0; display:none;
    }
.suopu-swiper-history .m-tit.hide,.suopu-swiper-history .center .m-num{ display:block!important; opacity:1; z-index:1;transform:none}
.suopu-swiper-history .center .m-num{ position:inherit; color:#d71d1e}
.suopu-swiper-history .center .btn{ padding-top:0;flex-direction: row;align-items:center;margin-top:30px;justify-content:center; gap:30px}
    .suopu-swiper-history .left .tit {
        font-size: 42px;
        margin-bottom: 50px;
    }
    .suopu-swiper-history .center .btn .prev::before { transform: rotate(225deg);}
    .suopu-swiper-history .center .btn .next::before {transform: rotate(45deg);}
.suopu-swiper-history .right {  margin: 50px 0 0 0;}


    /* 中间时间轴 - 调整为水平或保持垂直 */
    .suopu-swiper-history .center {
        width: 100%;
        max-width: 100%;
        min-width: auto;margin-top:0;flex-direction:column;padding-top:0;
    }

    .suopu-swiper-history .center .m-box {
       display:flex;align-items:center;justify-content:center;text-align:center;padding:0 100px;
    }

    .suopu-swiper-history .center .m-num {
        font-size: 200px;}
        .suopu-swiper-history .center .container.main{
            height: 600px !important;
            padding-top: 0;
            overflow: visible !important;
            touch-action: pan-y !important;
        }

    .suopu-swiper-history .center .swiper-wrapper {
        touch-action: pan-y !important;
    }

    .suopu-swiper-history .center .swiper-slide {
        height: 150px !important;
        touch-action: pan-y !important;
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
    }

    /* 平板端：只显示激活的年份项（使用 opacity 而不是 display: none，保持 Swiper 功能） */
    .suopu-swiper-history .center .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-thumb-active) {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: scale(0.8) !important;
    }

    /* 确保激活的年份项可见且可交互 */
    .suopu-swiper-history .center .swiper-slide-active,
    .suopu-swiper-history .center .swiper-slide-thumb-active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: scale(1) !important;
    }

    .suopu-swiper-history .center .time {
        color: #d0d0d0;
    }

    .suopu-swiper-history .center .swiper-slide-active .time,
    .suopu-swiper-history .center .swiper-slide-thumb-active .time {
        color: #d71d1e;
    }

    .suopu-swiper-history .left .num{ padding-right:250px}

    /* 右侧内容区域 */
    .suopu-swiper-history .right {
        width: 100%;
        max-width: 100%;
    }

    .suopu-swiper-history .right .container.thumbs {
        height: 350px !important;
    }

    .suopu-swiper-history .right .swiper-slide {
        height: 350px !important;
    }
}

/* 手机端（< 768px） */
@media (max-width: 768px) {
    .suopu-swiper-history {
        padding: 30px 15px;
    }

    .suopu-swiper-history .m-tit {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .suopu-swiper-history .box {
        gap: 30px;
    }

    /* 左侧区域 - 缩小以适应手机屏幕 */
    .suopu-swiper-history .left {
        padding: 15px 0;
    }

    .suopu-swiper-history .left .tit {
        font-size: 20px;
        margin-bottom: 15px;
        letter-spacing: 1px;
    }

    .suopu-swiper-history .left .num {
        font-size: 100px;
        letter-spacing: -2px;
    }

    /* 中间时间轴 - 缩小 */
    .suopu-swiper-history .center {
        gap: 15px;
    }

    .suopu-swiper-history .center .m-box {
        height: 250px;
    }

    .suopu-swiper-history .center .container.main {
        height: 800px !important;
        overflow: visible !important;
        touch-action: pan-y !important;
    }

    .suopu-swiper-history .center .swiper-wrapper {
        touch-action: pan-y !important;
    }

    .suopu-swiper-history .center .swiper-slide {
        height: 150px !important;
        touch-action: pan-y !important;
    }

    /* 平板端：只显示激活的年份项（使用 opacity 而不是 display: none，保持 Swiper 功能） */
    .suopu-swiper-history .center .swiper-slide {
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
    }

    .suopu-swiper-history .center .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-thumb-active) {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: scale(0.8) !important;
    }

    /* 确保激活的年份项可见且可交互 */
    .suopu-swiper-history .center .swiper-slide-active,
    .suopu-swiper-history .center .swiper-slide-thumb-active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: scale(1) !important;
    }

    .suopu-swiper-history .center .m-num {
        font-size: 120px;
    }

    .suopu-swiper-history .center .time {
        font-size: 150px;
        line-height: 150px;
        color: #d0d0d0;
    }

    .suopu-swiper-history .center .swiper-slide-thumb-active .time,
    .suopu-swiper-history .center .swiper-slide-active .time {
        font-size: 150px;
        transform: scale(1.05);
        color: #d71d1e;
    }

    .suopu-swiper-history .center .btn .pn {
        width: 50px !important;
        height: 50px !important;
    }

    /* 右侧内容区域 */
    .suopu-swiper-history .right .container.thumbs {
        height: 300px !important;
    }

    .suopu-swiper-history .right .swiper-slide {
        height: 300px !important;
        gap: 15px;
    }

    .suopu-swiper-history .right .li {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 15px;
    }

    .suopu-swiper-history .right .mouth {
        min-width: auto;
        font-size: 13px;
        color: #999;
    }

    .suopu-swiper-history .right .cont .name {
        font-size: 13px;
        line-height: 1.6;
        color: #333;
    }
}

/* 小手机端（< 480px） */
@media (max-width: 480px) {
    .suopu-swiper-history {
        padding: 20px 10px;
    }

    .suopu-swiper-history .m-tit {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .suopu-swiper-history .box {
        gap: 20px;
    }

    /* 左侧区域 - 进一步缩小 */
    .suopu-swiper-history .left {
        padding: 10px 0;
    }

    .suopu-swiper-history .left .tit {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .suopu-swiper-history .left .num {
        font-size: 80px;
        letter-spacing: -1px;
    }

    /* 中间时间轴 - 进一步缩小 */
    .suopu-swiper-history .center {
        gap: 10px;
    }

    .suopu-swiper-history .center .m-box {
        height: 200px;
    }

    .suopu-swiper-history .center .container.main {
        height: 600px !important;
        overflow: visible !important;
        touch-action: pan-y !important;
    }

    .suopu-swiper-history .center .swiper-wrapper {
        touch-action: pan-y !important;
    }

    .suopu-swiper-history .center .swiper-slide {
        height: 120px !important;
        margin-bottom: 0;
        touch-action: pan-y !important;
    }

    /* 移动端：只显示激活的年份项（使用 opacity 而不是 display: none，保持 Swiper 功能） */
    .suopu-swiper-history .center .swiper-slide {
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease !important;
    }

    .suopu-swiper-history .center .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-thumb-active) {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: scale(0.8) !important;
    }

    /* 确保激活的年份项可见且可交互 */
    .suopu-swiper-history .center .swiper-slide-active,
    .suopu-swiper-history .center .swiper-slide-thumb-active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: scale(1) !important;
    }

    .suopu-swiper-history .center .m-num {
        font-size: 120px;
        line-height: 200px;
    }

    .suopu-swiper-history .center .time {
        font-size: 120px;
        line-height: 120px;
        color: #d0d0d0;
    }

    .suopu-swiper-history .center .m-box {
        padding: 0 30px;
    }

    .suopu-swiper-history .center .swiper-slide-thumb-active .time,
    .suopu-swiper-history .center .swiper-slide-active .time {
        font-size: 120px;
        color: #d71d1e;
    }

   .suopu-swiper-history .center .btn .pn {
    width: 60px !important;
    height: 60px !important;}

    .suopu-swiper-history .center .btn .pn::before {
        width: 8px;
        height: 8px;
    }

    /* 右侧内容区域 */
    .suopu-swiper-history .right .container.thumbs {
        height: 250px !important;
    }

    .suopu-swiper-history .right .swiper-slide {
        height: 250px !important;
        gap: 12px;
    }

    .suopu-swiper-history .right .li {
        margin-bottom: 12px;
    }

    .suopu-swiper-history .right .mouth {
        font-size: 12px;
        color: #999;
    }

    .suopu-swiper-history .right .cont .name {
        font-size: 12px;
        line-height: 1.5;
        color: #333;
    }
}

/* ===== Elementor编辑器预览样式 ===== */
.elementor-editor-active .suopu-swiper-history {
    min-height: 500px;
}

