/* 百家内容轮播2 - 左侧内容右侧图片布局 */

.geniatech-content-carousel2 {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.geniatech-carousel2-container {
    position: relative;
    width: 100%;
}

.geniatech-carousel2-wrapper {
    position: relative;
    width: 100%;
    height: auto;
}

/* 轮播项目 */
.geniatech-carousel2-item {
    display: none;
    width: 100%;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.geniatech-carousel2-item.active {
    display: block;
}

/* 内容布局 */
.geniatech-carousel2-content {
    display: flex;
    align-items: center;
    gap: 40px;
    min-height: 300px;
}

/* 左侧内容区域 */
.geniatech-carousel2-left {
    flex: 1;
    max-width: 50%;
}

/* 右侧图片区域 */
.geniatech-carousel2-right {
    flex: 1;
    max-width: 50%;
}

/* 标题包装器 */
.geniatech-carousel2-title-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* 标题图片 */
.geniatech-carousel2-title-image {
    flex-shrink: 0;
    margin-right: 15px;
}

.geniatech-carousel2-title-image img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* 标题样式 */
.geniatech-carousel2-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    color: #333333;
    margin: 0;
    flex: 1;
}

/* 描述样式 */
.geniatech-carousel2-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
    margin: 0 0 30px 0;
}

.geniatech-carousel2-description p {
    margin: 0 0 15px 0;
}

.geniatech-carousel2-description p:last-child {
    margin-bottom: 0;
}

.geniatech-carousel2-description strong {
    color: #333333;
    font-weight: 600;
}

.geniatech-carousel2-description em {
    color: #007cba;
    font-style: normal;
    font-weight: 500;
}

/* 按钮样式 */
.geniatech-carousel2-button-wrapper {
    margin-top: 30px;
}

.geniatech-carousel2-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #007cba;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.geniatech-carousel2-button:hover {
    background-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.geniatech-carousel2-button-icon {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.geniatech-carousel2-button-icon.before {
    margin-right: 4px;
}

.geniatech-carousel2-button-icon.after {
    margin-left: 4px;
}

/* 图片样式 */
.geniatech-carousel2-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.geniatech-carousel2-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.geniatech-carousel2-item:hover .geniatech-carousel2-image img {
    transform: scale(1.02);
}

/* 导航按钮 */
.geniatech-carousel2-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.geniatech-carousel2-nav {
    width: 40px;
    height: 40px;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: #007cba;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.geniatech-carousel2-nav:hover {
    background-color: #ffffff;
    color: #005a87;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.geniatech-carousel2-nav:active {
    transform: scale(0.95);
}

.geniatech-carousel2-nav.prev {
    margin-left: -20px;
}

.geniatech-carousel2-nav.next {
    margin-right: -20px;
}

/* 指示器样式 - 参考原版百家内容轮播 */
.geniatech-carousel2-indicators {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 0;
}

.geniatech-carousel2-indicator-item {
    flex: 1;
    padding: 20px 30px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    font-size: 14px;
    color: #666666;
    background-color: transparent;
    border: none;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.geniatech-carousel2-indicator-item::before {
    content: '';
    width: 100%;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.geniatech-carousel2-indicator-item:hover {
    color: #007cba;
}

.geniatech-carousel2-indicator-item.active {
    color: #007cba;
    font-weight: 600;
}

.geniatech-carousel2-indicator-item.active::before {
    background-color: currentColor;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .geniatech-carousel2-content {
        gap: 30px;
    }
    
    .geniatech-carousel2-item {
        padding: 30px;
    }
    
    .geniatech-carousel2-title {
        font-size: 24px;
    }
    
    .geniatech-carousel2-title-image img {
        width: 36px;
        height: 36px;
    }
    
    .geniatech-carousel2-description {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .geniatech-carousel2-content {
        flex-direction: column;
        gap: 30px;
        min-height: auto;
    }
    
    .geniatech-carousel2-left,
    .geniatech-carousel2-right {
        max-width: 100%;
    }
    
    .geniatech-carousel2-item {
        padding: 20px;
    }
    
    .geniatech-carousel2-title {
        font-size: 22px;
    }
    
    .geniatech-carousel2-title-wrapper {
        margin-bottom: 15px;
    }
    
    .geniatech-carousel2-title-image {
        margin-right: 12px;
    }
    
    .geniatech-carousel2-title-image img {
        width: 32px;
        height: 32px;
    }
    
    .geniatech-carousel2-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .geniatech-carousel2-button-wrapper {
        margin-top: 20px;
    }
    
    .geniatech-carousel2-navigation {
        display: none;
    }
    
    /* 指示器改为可横向滑动，超出隐藏 */
    .geniatech-carousel2-indicators {
        border-radius: 0 0 8px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        gap: 10px;
    }
    .geniatech-carousel2-indicators::-webkit-scrollbar { display: none; }
    
    .geniatech-carousel2-indicator-item {
        padding: 15px 20px;
        font-size: 13px;
        flex: 0 0 auto; /* 不压缩，允许横向滚动 */
        min-width: 70%; /* 每项占视口大约70%，可按需调整 */
    }
}

@media (max-width: 480px) {
    .geniatech-carousel2-item {
        padding: 15px;
    }
    
    .geniatech-carousel2-title {
        font-size: 20px;
    }
    
    .geniatech-carousel2-title-image {
        margin-right: 10px;
    }
    
    .geniatech-carousel2-title-image img {
        width: 28px;
        height: 28px;
    }
    
    .geniatech-carousel2-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* 保持横向滚动行为（与 768 一致） */
    .geniatech-carousel2-indicators {
        border-radius: 0 0 5px 5px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
    }
    .geniatech-carousel2-indicators::-webkit-scrollbar { display: none; }
    
    .geniatech-carousel2-indicator-item {
        padding: 12px 15px;
        font-size: 12px;
        flex: 0 0 auto;
        min-width: 80%;
        border-bottom: 0;
    }
    
    .geniatech-carousel2-indicator-item::before {
        height: 2px;
        margin-bottom: 8px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.geniatech-carousel2-item.active .geniatech-carousel2-left {
    animation: fadeInUp 0.6s ease forwards;
}

.geniatech-carousel2-item.active .geniatech-carousel2-right {
    animation: fadeInRight 0.6s ease 0.2s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* 确保初始状态 */
.geniatech-carousel2-left,
.geniatech-carousel2-right {
    opacity: 1;
}

/* Elementor编辑器预览样式 */
.elementor-editor-preview .geniatech-carousel2-item {
    display: block !important;
    opacity: 0.3;
}

.elementor-editor-preview .geniatech-carousel2-item.active {
    opacity: 1;
}

.elementor-editor-preview .geniatech-carousel2-left,
.elementor-editor-preview .geniatech-carousel2-right {
    animation: none !important;
    opacity: 1 !important;
}
