/**
 * Tab Carousel Widget Styles
 */

.tab-carousel-widget {
    width: 100%;
    margin: 0 auto;
}

/* Tab 导航样式 */
.tab-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #B8956A;
    padding: 20px 30px;
    border-radius: 0;
    gap: 20px;
}

.tab-nav-item {
    flex: none;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    white-space: nowrap;
}

.tab-nav-item:last-child {
    border-right: none;
}

.tab-nav-item:hover {
    opacity: 0.8;
}

.tab-nav-item.active {
    color: #000000;
}

/* Tab 内容区域 */
.tab-content-wrapper {
    position: relative;
    width: 100%;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

/* Logo 导航栏样式 */
.logo-navigation-wrapper {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto 40px;
    padding: 0 30px;
}

.logo-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-item {
    width: 150px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: transparent;
    border: none;
    border-top: 5px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    position: relative;
}

.logo-item:hover {
    opacity: 0.8;
}

.logo-item.active {
    opacity: 1;
    border-top-color: #B8956A;
}

.logo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Logo 轮播样式 */
.logo-swiper {
    width: 100%;
    padding: 0;
    overflow: visible;
}

.logo-swiper .swiper-wrapper {
    align-items: center;
}

.logo-swiper .swiper-slide {
    width: auto;
    display: flex;
    justify-content: center;
}

/* PC 端 - Logo swiper 禁用时的样式 */
@media (min-width: 769px) {
    .logo-swiper .swiper-wrapper {
        transform: none !important;
        flex-wrap: wrap;
    }
    
    .logo-swiper.swiper-initialized {
        overflow: visible;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 轮播容器 */
.tab-carousel-widget .swiper {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    position: relative;
}

.tab-carousel-widget .swiper-wrapper {
    align-items: center;
}

/* 轮播项目 */
.tab-carousel-widget .swiper-slide {
    transition: 300ms;
    transform: scale(0.85);
    height: auto;
    display: flex;
    align-items: center;
}

.tab-carousel-widget .swiper-slide-active,
.tab-carousel-widget .swiper-slide-duplicate-active {
    transform: scale(1);
    opacity: 1 !important;
    align-items: flex-start;
}

.carousel-item {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: transform 0.3s ease;
}

/* 只在激活的 slide 上才有 hover 效果 */
.tab-carousel-widget .swiper-slide-active .carousel-item:hover {
    transform: translateY(-5px);
}

/* 图片区域 */
.carousel-item-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.carousel-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.carousel-item:hover .carousel-item-image img {
    transform: scale(1.05);
}

.carousel-item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* 内容区域 */
.carousel-item-content {
    background-color: #FFFFFF;
    padding: 30px 25px;
    text-align: center;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    height: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

/* 只有激活的 slide 显示内容 */
.swiper-slide-active .carousel-item-content {
    opacity: 1;
    visibility: visible;
    height: auto;
    min-height: 150px;
    padding: 30px 25px;
}

/* 动画效果 - 淡入 */
.carousel-item-content.animation-fade {
    transform: none;
}

.swiper-slide-active .carousel-item-content.animation-fade {
    transform: none;
}

/* 动画效果 - 向下滑动 */
.carousel-item-content.animation-slideDown {
    transform: translateY(-20px);
}

.swiper-slide-active .carousel-item-content.animation-slideDown {
    transform: translateY(0);
}

/* 动画效果 - 向上滑动 */
.carousel-item-content.animation-slideUp {
    transform: translateY(20px);
}

.swiper-slide-active .carousel-item-content.animation-slideUp {
    transform: translateY(0);
}

/* 动画效果 - 缩放 */
.carousel-item-content.animation-zoom {
    transform: scale(0.9);
}

.swiper-slide-active .carousel-item-content.animation-zoom {
    transform: scale(1);
}

.carousel-item-title {
    font-size: 24px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.carousel-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.carousel-item-title a:hover {
    color: #B8956A;
}

.carousel-item-description {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin: 0;
}

/* Swiper 导航按钮 */
.tab-carousel-widget .swiper-button-prev,
.tab-carousel-widget .swiper-button-next {
    width: 50px;
    height: 50px;
    background-color: rgba(184, 149, 106, 0.9);
    border-radius: 50%;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.tab-carousel-widget .swiper-button-prev:after,
.tab-carousel-widget .swiper-button-next:after {
    font-size: 20px;
    font-weight: bold;
}

.tab-carousel-widget .swiper-button-prev:hover,
.tab-carousel-widget .swiper-button-next:hover {
    background-color: rgba(184, 149, 106, 1);
    transform: scale(1.1);
}

.tab-carousel-widget .swiper-button-prev {
    left: 10px;
}

.tab-carousel-widget .swiper-button-next {
    right: 10px;
}

/* Swiper 分页器 */
.tab-carousel-widget .swiper-pagination {
    bottom: 20px;
}

.tab-carousel-widget .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: #D1D1D1;
    opacity: 1;
    transition: all 0.3s ease;
}

.tab-carousel-widget .swiper-pagination-bullet-active {
    background-color: #B8956A;
    width: 30px;
    border-radius: 6px;
}

/* 空内容提示 */
.tab-empty-message {
    text-align: center;
    padding: 80px 20px;
    color: #999999;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .carousel-item-image {
        height: 350px;
    }
    
    .carousel-item-title {
        font-size: 22px;
    }
    
    /* 确保缩放效果在所有设备上都生效 */
    .tab-carousel-widget .swiper-slide {
        transform: scale(0.85);
        display: flex;
        align-items: center;
    }
    
    .tab-carousel-widget .swiper-slide-active,
    .tab-carousel-widget .swiper-slide-duplicate-active {
        transform: scale(1);
        opacity: 1 !important;
        align-items: flex-start;
    }
    
    /* 确保只有激活的显示内容 */
    .swiper-slide-active .carousel-item-content {
        min-height: 150px;
    }
}

@media (max-width: 768px) {
    /* Logo 导航 - 手机端使用轮播模式 */
    .logo-navigation-wrapper {
        margin-bottom: 30px;
        padding: 0 20px;
    }
    
    .logo-swiper {
        overflow: visible;
        padding: 0 10px;
    }
    
    .logo-navigation {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }
    
    .logo-swiper .swiper-slide {
        width: auto !important;
        transition: all 0.3s ease;
    }
    
    /* 激活的 logo 在手机端居中时更突出 */
    .logo-swiper .swiper-slide-active .logo-item {
        transform: scale(1.1);
    }
    
    .logo-item {
        width: 100px;
        height: 60px;
        padding: 8px;
        flex-shrink: 0;
    }
    
    .tab-nav {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px 20px;
    }
    
    .tab-nav-item {
        padding: 10px 15px;
        font-size: 14px;
        border-right: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .tab-nav-item:last-child {
        border-right: none;
    }
    
    /* 手机端图片高度 - 移除固定高度，让用户自定义 */
    
    /* 手机端缩放效果稍微调整，让左右更可见 */
    .tab-carousel-widget .swiper-slide {
        transform: scale(0.88);
        display: flex;
        align-items: center;
    }
    
    .tab-carousel-widget .swiper-slide-active,
    .tab-carousel-widget .swiper-slide-duplicate-active {
        transform: scale(1);
        opacity: 1 !important;
        align-items: flex-start;
    }
    
    /* 未激活的不显示内容 */
    .carousel-item-content {
        padding: 0;
        min-height: 0;
    }
    
    /* 只有激活的显示内容 */
    .swiper-slide-active .carousel-item-content {
        min-height: 120px;
    }
    
    .carousel-item-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .carousel-item-description {
        font-size: 13px;
    }
    
    .tab-carousel-widget .swiper-button-prev,
    .tab-carousel-widget .swiper-button-next {
        width: 40px;
        height: 40px;
    }
    
    .tab-carousel-widget .swiper-button-prev:after,
    .tab-carousel-widget .swiper-button-next:after {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Logo 导航 - 小屏手机端轮播模式 */
    .logo-navigation-wrapper {
        margin-bottom: 25px;
        padding: 0 15px;
    }
    
    .logo-swiper {
        padding: 0 5px;
    }
    
    .logo-item {
        width: 80px;
        height: 50px;
        padding: 6px;
        border-top-width: 3px;
    }
    
    /* 小屏手机端激活的 logo 稍微放大 */
    .logo-swiper .swiper-slide-active .logo-item {
        transform: scale(1.15);
    }
    
    .tab-nav {
        gap: 5px;
        padding: 12px 15px;
    }
    
    .tab-nav-item {
        padding: 8px 12px;
        font-size: 13px;
        border-right: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .tab-nav-item:last-child {
        border-right: none;
    }
    
    /* 小屏手机端图片高度 - 移除固定高度，让用户自定义 */
    
    /* 只有激活的显示内容 */
    .swiper-slide-active .carousel-item-content {
        min-height: 100px;
    }
    
    .tab-carousel-widget .swiper-button-prev {
        left: 5px;
    }
    
    .tab-carousel-widget .swiper-button-next {
        right: 5px;
    }
}

/* 自定义按钮 */
.tab-carousel-button-wrapper {
    text-align: center;
    margin-top: 40px;
    padding: 0 30px;
}

.tab-carousel-button {
    display: inline-block;
    background-color: #B8956A;
    color: #FFFFFF;
    padding: 15px 40px;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-carousel-button:hover {
    background-color: #A07D56;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Elementor 编辑器预览样式 */
.elementor-editor-active .tab-carousel-widget {
    min-height: 400px;
}

