/* 证书滚动容器 */
.geniatech-certificate-container {
    display: flex;
    gap: 150px;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    position: relative;
}

/* 手机端容器（与PC分离）默认隐藏，在小屏显示 */
.geniatech-certificate-container-mobile { display: none; }

/* 轮播容器 - 添加相对定位 */
.geniatech-swiper-container-outer {
    position: relative;
    width: 500px;
}

.geniatech-swiper-container {
    height: 549px;
    overflow: visible; /* 改为visible以允许激活项突破 */
    position: relative;
    width: 100%;
}

/* 隐藏默认滚动条 */
.geniatech-swiper-container::-webkit-scrollbar {
    display: none;
}

/* 证书列表 */
.geniatech-swiper-container .swiper-wrapper {
    padding: 0;
}

/* 每项高度 */
.geniatech-swiper-slide {
    height: 52px;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
}

.geniatech-swiper-slide:hover { 
    background: #f9f9f9;
}

/* 移除最后一项的底部边框 */
.geniatech-swiper-slide:last-child {
    border-bottom: none;
}

/* 激活项样式 - 突破容器 */
.geniatech-swiper-slide-active {
    height: auto;
    justify-content: space-between;
    z-index: 10;
    position: relative;
    margin: 0 -50px;
}

.geniatech-swiper-slide .geniatech-text-content { 
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    color: #555;
    font-size: 15px;
    line-height: 1.4;
    padding: 6px 0;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    white-space: normal;
    word-wrap: break-word;
    flex-shrink: 0;
}

/* 激活项文本样式 */
.geniatech-swiper-slide-active .geniatech-text-content {
    color: #d23131;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    padding: 0px 15px;
    flex: 1;
    max-width: none;
}

/* 激活项图标颜色由Elementor控制器控制 */

/* 横线元素 */
.geniatech-line {
    display: none;
    height: 2px;
    background: #d23131;
    width: 130px;
    flex-shrink: 0;
}

/* 激活状态显示横线 */
.geniatech-swiper-slide-active .geniatech-line {
    display: block;
}

/* 右侧图片 */
.geniatech-cert-img {
    width: 280px;
    height: 400px;
    z-index: 5;
    position: relative;
    flex-shrink: 0;
} 

.geniatech-cert-img img { 
    max-width: 100%; 
    max-height: 100%; 
    display: block; 
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* 移动端折叠面板（每项内） */
.geniatech-accordion-panel {
    display: none;
    width: 100%;
    padding: 10px 0 0;
}

.geniatech-accordion-panel img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

/* 标题样式 */
.geniatech-section-title {
    position: absolute;
    top: -40px;
    left: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    z-index: 10;
}

/* 遮罩层样式 */
.geniatech-mask-top,
.geniatech-mask-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    z-index: 20;
    pointer-events: none;
}

.geniatech-mask-top {
    top: 0;
    background: linear-gradient(to bottom, #ffffff 0%, transparent 100%);
}

.geniatech-mask-bottom {
    bottom: 0;
    background: linear-gradient(to top, #ffffff 0%, transparent 100%);
}

/* 证书项图标样式 */
.geniatech-certificate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #999;
    flex-shrink: 0;
}

.geniatech-certificate-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.geniatech-certificate-icon i {
    font-size: inherit;
}

/* 左侧图标（激活项显示在横线左侧） */
.geniatech-certificate-icon-left {
    display: none; /* 默认隐藏 */
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* 内联图标（非激活项显示在文字前） */
.geniatech-certificate-icon-inline {
    /* 继承基础样式 */
}

/* 激活项显示左侧图标，隐藏内联图标 */
.geniatech-swiper-slide-active .geniatech-certificate-icon-left {
    display: inline-flex;
}

.geniatech-swiper-slide-active .geniatech-certificate-icon-inline {
    display: none;
}

/* 非激活项隐藏左侧图标，显示内联图标 */
.geniatech-swiper-slide:not(.geniatech-swiper-slide-active) .geniatech-certificate-icon-left {
    display: none;
}

.geniatech-swiper-slide:not(.geniatech-swiper-slide-active) .geniatech-certificate-icon-inline {
    display: inline-flex;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .geniatech-certificate-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .geniatech-swiper-container-outer {
        width: 100% !important;
        max-width: 520px;
    }
    
    .geniatech-swiper-slide-active {
        margin: 0 -30px !important;
        width: calc(100% + 60px);
        padding: 15px 20px;
    }
    
    .geniatech-cert-img {
        width: 250px !important;
        height: 350px !important;
    }
    
    /* 响应式横线宽度调整 */
    .geniatech-line {
        width: 40px !important;
    }
}

@media (max-width: 768px) {
    .geniatech-certificate-container {
        gap: 25px;
    }
    
    .geniatech-swiper-container-outer {
        max-width: 100%;
    }
    
    .geniatech-swiper-slide-active {
        margin: 0 -25px !important;
        width: calc(100% + 50px);
        padding: 12px 18px;
    }
    
    .geniatech-cert-img {
        width: 220px !important;
        height: 320px !important;
    }
    
    .geniatech-line {
        width: 35px !important;
    }
}

@media (max-width: 600px) {
    /* 隐藏PC版，展示手机手风琴 */
    .geniatech-certificate-container { display: none !important; }
    .geniatech-certificate-container-mobile { display: block; }

    .geniatech-swiper-slide-active {
        margin: 0 -20px !important;
        width: calc(100% + 40px);
        padding: 12px 15px;
    }
    
    /* PC内部面板不再使用 */
    .geniatech-cert-img { display: none !important; }
    .geniatech-accordion-panel { display: none !important; }
    
    .geniatech-line {
        width: 30px !important;
    }
}

/* 手机端手风琴样式 */
.geniatech-accordion { width: 100%; max-width: 720px; margin: 0 auto; }
.geniatech-acc-item { border-bottom: 1px solid #eee; }
.geniatech-acc-title {
    width: 100%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 6px;
    font-size: 15px;
    color: #555;
}
.geniatech-acc-title:focus { outline: none; }
.geniatech-acc-arrow { width: 10px; height: 10px; border-right: 2px solid #999; border-bottom: 2px solid #999; transform: rotate(-45deg); transition: transform .2s ease; flex-shrink: 0; }
.geniatech-acc-item.open .geniatech-acc-arrow { transform: rotate(45deg); }
.geniatech-acc-content { display: none; padding: 0 6px 14px; }
.geniatech-acc-content img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 5px 25px rgba(0,0,0,0.1); }
.geniatech-section-title-mobile { font-size: 18px; font-weight: bold; margin-bottom: 8px; }

@media (max-width: 480px) {
    .geniatech-certificate-container {
        gap: 20px;
    }
    
    .geniatech-swiper-slide-active {
        margin: 0 -15px !important;
        padding: 10px 12px;
    }
    
    .geniatech-cert-img {
        width: 180px !important;
        height: 280px !important;
    }
    
    .geniatech-line {
        width: 25px !important;
    }
    
    .geniatech-section-title {
        font-size: 16px !important;
        top: -35px !important;
    }
}

/* 加载动画 */
.geniatech-certificate-container.loading .geniatech-swiper-slide {
    opacity: 0;
    animation: certificateFadeIn 0.5s ease forwards;
}

@keyframes certificateFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 证书项的延迟加载动画 */
.geniatech-swiper-slide:nth-child(1) { animation-delay: 0.1s; }
.geniatech-swiper-slide:nth-child(2) { animation-delay: 0.2s; }
.geniatech-swiper-slide:nth-child(3) { animation-delay: 0.3s; }
.geniatech-swiper-slide:nth-child(4) { animation-delay: 0.4s; }
.geniatech-swiper-slide:nth-child(5) { animation-delay: 0.5s; }
.geniatech-swiper-slide:nth-child(6) { animation-delay: 0.6s; }
.geniatech-swiper-slide:nth-child(7) { animation-delay: 0.7s; }
.geniatech-swiper-slide:nth-child(8) { animation-delay: 0.8s; }
.geniatech-swiper-slide:nth-child(9) { animation-delay: 0.9s; }

/* 图片加载过渡 */
.geniatech-cert-img img {
    transition: opacity 0.3s ease;
}

.geniatech-cert-img img.loading {
    opacity: 0.7;
}
