/* ==========================================
   手风琴横幅模板 (accordion)
   对应 carousel-accordion.blade.php
   参考: ajaxList-animation.html
   ========================================== */

.ifc-our-main-box {
    position: relative;
    margin-bottom: 10px;
    overflow: hidden;
    width: 100%;
    /* 组件自带对齐，不继承页面容器：原模板里这些文字是左对齐的，
       而内页容器 .ifc-bannerChannel 有 text-align:center，会导致横幅文字被居中 */
    text-align: left;
}

/* ===== dl / dd (背景图) ===== */
.ifc-our-main-box dl {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
}
.ifc-our-main-box dl,
.ifc-our-main-box dd,
.ifc-our-main-box dd img {
    width: 100%;
    height: 100%;
}

/* 手风琴是固定宽高比的横幅（宽 / 高 ≈ 2.28），竖图被拉满会变形 */
.ifc-our-main-box dd img {
    object-fit: cover;
    object-position: center center;
}
.ifc-our-main-box dd {
    position: absolute;
    z-index: 1;
    left: 0;
    top: 0;
    margin: 0;
}
.ifc-our-main-box.ifc-transition-enabled dd {
    transition: opacity 0.6s ease-in-out;
}
.ifc-our-main-box dd.on {
    z-index: 2;
}

/* ===== ul / li (覆盖层) ===== */
.ifc-our-main-box ul {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 4;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    list-style: none;
    margin: 0;
    padding: 0;
}
.ifc-our-main-box ul li {
    float: left;
    height: 100%;
    position: relative;
    z-index: 2;
    cursor: pointer;
    overflow: hidden;
    /* 重置全局样式 ul li{padding-left:.4rem}：
       jQuery 设置 li 宽度时会把该 padding 叠加进去，
       导致 n 个 li 总宽超出容器，最后一个被挤到第二行（编号看不见） */
    padding: 0;
    box-sizing: border-box;
}
.ifc-our-main-box.ifc-transition-enabled ul li {
    transition: width 0.6s cubic-bezier(0.42, 0, 1, 1) 0s;
}
.ifc-our-main-box ul li::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}
.ifc-our-main-box ul li:last-child::after {
    display: none;
}

/* ===== li 内的编号 ===== */
.ifc-our-main-box ul li span {
    left: 5%;
    display: block;
    padding-top: 68px;
    font-size: 12px;
    color: #fff;
    font-family: Arial, sans-serif;
    position: relative;
    width: 90%;
    transition: all 0.6s cubic-bezier(0.42, 0, 1, 1) 0s;
}

/* ===== 标题/描述容器 ===== */
/* 只有展开的那一条才显示文字，收起状态只留编号（否则窄条里会飘一行标题） */
.ifc-our-main-box ul li .ifc-our-main-box-wrap {
    opacity: 0;
}
.ifc-our-main-box ul li.on .ifc-our-main-box-wrap {
    opacity: 1;
}

.ifc-our-main-box-wrap {
    left: 5%;
    width: 80%;
    bottom: 50%;
    position: absolute;
    transition: all 0.6s cubic-bezier(0.42, 0, 1, 1) 0s;
    opacity: 0;
}
.ifc-our-main-box-wrap h4 {
    color: #fff;
    font-size: 14px;
    height: 2.4em;
    line-height: 1.2em;
    font-weight: normal;
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.42, 0, 1, 1) 0s;
}
.ifc-our-main-box-wrap p {
    color: #dadbdd;
    font-size: 12px;
    line-height: 2em;
    height: 6em;
    opacity: 0;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.42, 0, 1, 1) 0s;
}

/* ===== 展开状态 (li.on) ===== */
.ifc-our-main-box ul li.on .ifc-our-main-box-wrap {
    bottom: 10%;
}
.ifc-our-main-box ul li.on .ifc-our-main-box-wrap h4 {
    font-size: 30px;
}
.ifc-our-main-box ul li.on span {
    font-size: 30px;
    padding-top: 60px;
}
.ifc-our-main-box ul li.on .ifc-our-main-box-wrap p {
    opacity: 1;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .ifc-our-main-box ul li span {
        padding-top: 30px;
        font-size: 10px;
    }
    .ifc-our-main-box-wrap h4 {
        font-size: 12px;
    }
    .ifc-our-main-box-wrap p {
        font-size: 10px;
    }
    .ifc-our-main-box ul li.on .ifc-our-main-box-wrap h4 {
        font-size: 18px;
    }
    .ifc-our-main-box ul li.on span {
        font-size: 18px;
        padding-top: 24px;
    }
}
