/**
 * 声网选项卡样式
 * 
 * @package ShengWang
 * @since 1.0.0
 */

/* ========================================
   基础样式
======================================== */

.sw_tabs_wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* 主标题样式 */
.sw_tab_main_title {
    font-weight: 600;
    font-size: 48px;
    line-height: 56px;
    color: #181F27;
    text-align: center;
    margin: 0 0 24px 0;
}

.sw_tabs {
    position: relative;
    overflow: hidden;
}

/* ========================================
   选项卡导航样式
======================================== */

.sw_tab_nav_wrapper {
    position: relative;
    margin-bottom: 24px;
}

.sw_tab_nav {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.sw_tab_nav_item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 48px;
    padding: 0 20px;
    margin: 0;
    background: transparent;
    border: 1px solid rgba(24, 31, 39, 0.5);
    border-radius: 48px;
    color: var(--sw-color-heading);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.sw_tab_nav_item:hover,
.sw_tab_nav_item.sw-active {
    color: var(--sw-color-white);
    background-color: var(--sw-color-heading);
    border-color: var(--sw-color-heading);
    box-shadow: none;
}

.sw_tab_title {
    display: flex;
    align-items: center;
}

.sw_tab_icon {
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.sw_tab_nav_item.sw-active .sw_tab_icon {
    opacity: 1;
}

/* 活动指示器 - 隐藏 */
.sw_tab_indicator {
    display: none;
}

/* ========================================
   选项卡样式变体
======================================== */

/* 对齐方式 */
.sw-align-left .sw_tab_nav {
    justify-content: flex-start;
}

.sw-align-center .sw_tab_nav {
    justify-content: center;
}

.sw-align-right .sw_tab_nav {
    justify-content: flex-end;
}



/* ========================================
   内容区域样式
======================================== */

.sw_tab_container {
    min-height: 408px;
    position: relative;
}

.sw_tab_content_wrapper {
    position: relative;
    height: 100%;
    padding: 0;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 背景色变体 */
.sw_tabs.sw-bg-white .sw_tab_content_wrapper {
    background-color: var(--sw-color-white);
}

.sw_tabs.sw-bg-light_gray .sw_tab_content_wrapper {
    background-color: var(--sw-color-light-gray);
}

.sw_tab_content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    width: 100%;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.sw_tab_content.sw-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sw_tab_content_inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 100px;
    padding: 24px 48px;
}

.sw_tab_image {
    flex-shrink: 0;
    max-width: 480px;
    order: 2;
}

.sw_tab_image img {
    width: 100%;
    height: auto;
    border-radius: 24px;
}

.sw_tab_text {
    flex: 1;
    order: 1;
}

.sw_tab_content_title {
    margin: 0 0 15px 0;
    font-size: 36px;
    font-weight: 500;
    line-height: 44px;
    color: var(--sw-color-heading);
}

.sw_tab_content_text {
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    color: var(--sw-color-text);
}

.sw_tab_content_text p {
    margin: 0 0 15px 0;
}

.sw_tab_content_text p:last-child {
    margin-bottom: 0;
}

.sw_tab_content_text p:first-child {
    margin-top: 0;
}

.sw_tab_content_text p:last-child {
    margin-bottom: 0;
}

.sw_tab_content_text a {
    color: var(--sw-color-primary);
    text-decoration: none;
}


/* 移动端内容布局：图片在上，文字在下 */
@media (max-width: 768px) {
    .sw_tab_content_inner {
        flex-direction: column;
        align-items: center;
        padding: 0;
        text-align: center;
    }
    
    .sw_tab_image {
        order: 1; /* 确保图片在上面 */
        width: 100%;
        max-width: 280px;
    }
    
    .sw_tab_text {
        width: 100%;
        order: 2;
    }
}


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

@media (max-width: 1024px) {
    .sw_tab_nav_item {
        width: 160px;
        height: 44px;
        padding: 0 16px;
        font-size: 15px;
    }
    
    .sw_tab_content_inner {
        gap: 48px;
    }
    
    .sw_tab_image {
        max-width: 250px;
    }
    
    .sw_tab_content_title {
        font-size: 22px;
    }
    
    .sw_tab_main_title {
        font-size: 42px;
        line-height: 50px;
        margin-bottom: 35px;
    }
}

/* 平板设备样式 (769px - 1024px) - 一行3个tab */
@media (min-width: 769px) and (max-width: 1024px) {
    .sw_tab_nav {
        justify-content: center;
        gap: 12px;
        display: flex;
        flex-wrap: wrap;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .sw_tab_nav_item {
        flex: 0 0 calc(33.33% - 8px);
        max-width: calc(33.33% - 8px);
        width: auto;
        min-width: 160px;
        height: 46px;
        font-size: 15px;
        text-align: center;
        padding: 0 12px;
    }
    
    .sw_tab_content_wrapper {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .sw_tab_nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .sw_tab_nav_item {
        flex: 0 0 calc(50% - 5px);
        max-width: none;
        height: 44px;
        justify-content: center;
        padding: 0 12px;
        font-size: 14px;
    }
    
    /* 第一行：前两个item各占50% */
    .sw_tab_nav_item:nth-child(1),
    .sw_tab_nav_item:nth-child(2) {
        flex: 0 0 calc(50% - 5px);
    }
    
    /* 第二行：后面的item各占33.33%，最多显示3个 */
    .sw_tab_nav_item:nth-child(n+3):nth-child(-n+5) {
        flex: 0 0 calc(33.33% - 7px);
        max-width: calc(33.33% - 7px);
        font-size: 12px;
        padding: 0 8px;
    }
    
    /* 如果第6个及以后的item存在，换到第三行 */
    .sw_tab_nav_item:nth-child(n+6) {
        flex: 0 0 calc(33.33% - 7px);
        max-width: calc(33.33% - 7px);
        font-size: 12px;
        padding: 0 8px;
    }
    
    /* 如果只有3个tab，第三个居中显示 */
    .sw_tab_nav_item:nth-child(3):last-child {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
        font-size: 14px;
        padding: 0 12px;
    }
    
    /* 内容区域在移动端的图片处理 */
    .sw_tab_image {
        max-width: 100%;
        align-self: center;
    }

    .sw_tab_content_wrapper {
        padding: 40px;
    }

    .sw_tab_content_title,
    .sw_tab_content_text {
        text-align: left;
    }

    .sw_tab_content_title {
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .sw_tab_nav_wrapper {
        margin-bottom: 20px;
        gap: 8px;
    }
    
    .sw_tab_nav_item {
        height: 40px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    /* 小屏幕下保持第一行2个，第二行3个的布局 */
    .sw_tab_nav_item:nth-child(1),
    .sw_tab_nav_item:nth-child(2) {
        flex: 0 0 calc(50% - 5px);
    }
    
    .sw_tab_nav_item:nth-child(n+3):nth-child(-n+5) {
        flex: 0 0 calc(33.33% - 7px);
        font-size: 11px;
        padding: 0 6px;
    }
    
    .sw_tab_nav_item:nth-child(n+6) {
        flex: 0 0 calc(33.33% - 7px);
        font-size: 11px;
        padding: 0 6px;
    }
    
    .sw_tab_nav_item:nth-child(3):last-child {
        flex: 0 0 calc(50% - 5px);
        font-size: 12px;
        padding: 0 8px;
    }
    
    .sw_tab_content_title {
        font-size: 20px;
        line-height: 24px;
        margin-bottom: 8px;
    }
    
    .sw_tab_content_text {
        font-size: 13px;
    }
    
    .sw_tab_link_button {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .sw_tab_main_title {
        font-size: 32px;
        line-height: 38px;
        margin-bottom: 25px;
    }
    
    .sw_tab_content_wrapper {
        min-height: 320px;
        padding: 20px;
        border-radius: 16px;
    }

    .sw_tab_content_inner {
        gap: 24px;
    }
}

/* ========================================
   导航箭头样式
======================================== */

.sw_tab_arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 20px;
    z-index: 10;
}

.sw_tab_arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border: 1px solid #c9c6d7;
    border-radius: 50%;
    background: transparent;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    padding: 0;
    margin: 0;
    outline: none;
    position: relative;
    right: -120px;
}

.sw_tab_arrow:hover {
    background: var(--sw-color-white);
    border-color: var(--sw-color-white);
}

.sw-bg-light_gray .sw_tab_arrow:hover {
    background: var(--sw-color-gray-background);
    border-color: var(--sw-color-gray-background);
}

.sw_tab_arrow:focus {
    outline: none;
}

.sw_tab_arrow svg {
    width: 15px;
    height: 12px;
    display: block;
}

.sw_tab_arrow.sw_tab_arrow_prev {
    transform: rotate(0deg);
    left: -120px;
    right: 0;
}

/* 响应式箭头样式 */
@media (max-width: 768px) {
    .sw_tab_arrows {
        display: none;
    }
}